Project

General

Profile

Task #4467

Story #4466: Base VM operating systems and sofware need to be upgraded

Deploy and Test Metacat on Ubuntu 12.04 with Java 7, Tomcat 7, PostgreSQL 9

Added by Chris Jones almost 11 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Metacat
Target version:
Start date:
2014-03-17
Due date:
% Done:

100%

Milestone:
CCI-1.2
Product Version:
1.2.7
Story Points:
Sprint:

Description

We need to understand what issues we'll face with regard to Metacat installation and performace when we move to Ubuntu 12.04 with Java 7, Tomcat 7, and PostgreSQL 9. Any configuration changes that are needed in Metacat will need to also be added into the cn-buildout postinst scripts, and should be added as sub tasks to this story.


Related issues

Related to Infrastructure - Task #4470: Test CN installation on Ubuntu 12.04 with Java 7, tomcat 7, PostgreSQL 9 Closed 2014-03-17
Related to Infrastructure - Task #4472: Test Hazelcast installation on Ubuntu 12.04 with Java 7, Tomcat 7 Closed 2014-03-17

History

#1 Updated by Chris Jones almost 11 years ago

  • Target version deleted (2014.12-Block.2.2)

#2 Updated by Chris Jones almost 11 years ago

  • Description updated (diff)
  • Subject changed from Deploy and Test Metacat on Ubuntu 14.04 with Java 7, Tomcat 7, PostgreSQL 9 to Deploy and Test Metacat on Ubuntu 12.04 with Java 7, Tomcat 7, PostgreSQL 9

#3 Updated by Jing Tao over 10 years ago

  1. In order to make java 1.7 client to connect the Metacat through https on Ubuntu 12.04 work, we need this line to the default-ssl on the apache configuration:
    ServerName servername.mydomain.com
    Otherwise, the client should set the system property to false:
    System.setProperty("jsse.enableSNIExtension", "false”);
    java -Djsse.enableSNIExtension=false yourClass

  2. In order to make morpho to connect Metacat work, we need add this attribute on the element of "context" in the context.xml file under tomcat7/conf directory:
    useHttpOnly='false'

#4 Updated by Jing Tao over 10 years ago

Upgrade Ubuntu from 10.04 to 12.04

  1. Prepare
    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get install update-manager-core
    sudo vim /etc/update-manager/release-upgrades
    (Verify that the line presents in the file: Prompt=lts)

  2. Do upgrade
    sudo do-release-upgrade
    notes:
    Choose Y for newer verion packages.
    GRUB should be installed in /dev/vda (use the space key to select it).

  3. Install openjdk 7 and configure it

    a. sudo apt-get install openjdk-7-jdk

b. choose openjdk-7 as default java, javac and javaws:
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config Javaws
sudo update-alternatives --config keytool

  1. Install tomcat 7 :
    sudo apt-get install tomcat7

  2. Migrate the database data from Postgresql 8.4 to 9.1 (after the upgrade, the system has both 8.4 and 9.1 running):

    a. stop both 8.4 and 9.1 server:
    sudo /etc/init.d/postgresql stop

    b: make some links as the root:
    ln -s /etc/postgresql/9.1/main/postgresql.conf /var/lib/postgresql/9.1/main/
    ln -s /etc/postgresql/8.4/main/postgresql.conf /var/lib/postgresql/8.4/main/

    c. run the upgrade script with the —check option as user postgresql:
    /usr/lib/postgresql/9.1/bin/pg_upgrade --check -b /usr/lib/postgresql/8.4/bin -B /usr/lib/postgresql/9.1/bin -d /var/lib/postgresql/8.4/main -D /var/lib/postgresql/9.1/main

    d. do a real upgrade as user postgresql:
    /usr/lib/postgresql/9.1/bin/pg_upgrade -b /usr/lib/postgresql/8.4/bin -B /usr/lib/postgresql/9.1/bin -d /var/lib/postgresql/8.4/main -D /var/lib/postgresql/9.1/main

    e: remove 8.4:
    sudo apt-get remove postgresql-8.4

    f: edit the file /etc/postgresql/9.1/main/postgresql.conf as the user postgres:
    change the port to 5432

    g: start postgresql 9.1:
    sudo /etc/init.d/postgresql start

    h: vaccum db as the user postgres
    /usr/lib/postgresql/9.1/bin$ ./vacuumdb --all

  3. Modify the configuration of Apache:

    a. modify /etc/apache2/site-enabled/knb-ssl:
    ServerName mn-demo-11.test.dataone.org (if this line doesn't exist, please add it)
    DocumentRoot /var/lib/tomcat7/webapps/knb
    ScriptAlias /knb/cgi-bin/ /var/lib/tomcat7/webapps/knb/cgi-bin/

    b.modify apache /etc/apache2/workers.properties:
    workers.tomcat_home=/var/lib/tomcat7
    workers.java_home=/usr/lib/jvm/java-1.7.0-openjdk-amd64

    c. restart apache
    sudo /etc/init.d/apache2 restart

  4. Modify the configuration of Tomcat and Metacat:

    a. stop tomcat
    sudo /etc/init.d/tomcat stop

    b. Modify the file /var/lib/tomcat7/conf/context.xml:
    add a new attribute useHttpOnly='false' for the “context" element

    c. change the ownership of /var/metacat to tomcat7:tomcat7 recursively
    sudo chown -R tomcat7:tomcat7 /var/metacat

    d. start tomcat:
    sudo /etc/init.d/tomcat start

  5. Install the metacat on tomcat 7.

#5 Updated by Robert Waltz over 10 years ago

  • Target version set to 2014.26-Block.4.1

#6 Updated by Robert Waltz over 10 years ago

  • Product Version changed from * to 1.2.7
  • Milestone changed from None to CCI-1.2
  • Status changed from New to In Progress

#7 Updated by Robert Waltz over 10 years ago

  • Status changed from In Progress to Testing

#8 Updated by Robert Waltz over 10 years ago

  • Status changed from Testing to Closed
  • translation missing: en.field_remaining_hours set to 0.0

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 14.8 MB)