To upgrade to TeamForge
6.1.1, set up a new box, then
bring over your old site's data and convert it.
TeamForge
6.1.1 runs on
SuSE Linux Enterprise Server 11 SP1. To take
advantage of the new operating system, you should install a fresh box and move your
TeamForge 6.1 site to it.
If you
need to run your new site on the same box that your existing site is running on, see
Upgrade a TeamForge site to 6.1.1 on the same hardware.
Note: This procedure assumes that you are running your new
site-wide reporting database on the same box where your TeamForge application and
database are running, and that the reporting database shares the same port as the
site database.
You don't have to set it up exactly like
this.
Take these steps on the new TeamForge
6.1.1
box:
-
Install SuSE Linux Enterprise Server 11 SP1
and log in as root.
Important: Don't customize your installation. Select only the
default packages list.
-
Check your basic networking setup.
See Set up networking for your
TeamForge box for
details.
-
Set up the SuSE repository.
-
Register the machine with Novell.
-
suse_register -i -a email=<MailID> -a
regcode-sles=<Registration code>
where <MailID> is the email address associated
with your SuSE Linux Enterprise Server license and
<Registration code> is the Suse
Enterprise Linux license code.
-
Move the existing installer repository out of the way.
-
cd /etc/zypp/repos.d/
-
mv SUSE-Linux-Enterprise-Server-11-SP1\
11.1.1-1.152.repo SUSE-Linux-Enterprise-Server-11-SP1\
11.1.1-1.152.repo_old
-
Make sure the correct Novell repository is enabled.
Open nu_novell_com:SLES11-SP1-Pool.repo in a text
editor and confirm that enabled=1.
-
Refresh zypper.
Note: As an alternative, you can insert the SuSe Linux Enterprise Server DVD.
- Ensure that the DVD is mounted in the location specified by the
baseurl variable in
SUSE-Linux-Enterprise-Server-11-SP1\
11.1.1-1.152.repo.
- Use zypper info postgresql to check that the
DVD is properly mounted.
-
Download the TeamForge
6.1.1 installation repository
from open.collab.net. Copy it to
/etc/zypp/repos.d/.
On the TeamForge 6.1 box, log in as root and take these
steps:
-
Stop the TeamForge application server and the
Apache server, if they are running.
-
/etc/init.d/apache2 stop
-
/etc/init.d/collabnet stop
-
Back up your site data.
-
Make a dump file of your site database.
(This may be the same as your TeamForge
application server or a separate box.)
You have to do a PostgreSQL dump because we are upgrading the
PostgreSQL application as part of this upgrade.
Note: These commands are for a PostgreSQL
database, which is the default. If your site uses an Oracle
database, follow the
Oracle backup procedure
instead.
-
su - postgres
-
/usr/bin/pg_dumpall >
/var/lib/pgsql/backups/teamforge_data_backup.dmp
-
exit
-
mkdir /tmp/backup_dir
-
cp /var/lib/pgsql/backups/teamforge_data_backup.dmp
/tmp/backup_dir/
Note: If your reporting database is running on a separate port, back up
your reporting database too:
- /usr/bin/pg_dumpall -p
<reports_database_port> >
/var/lib/pgsql/backups/teamforge_reporting_data_backup.dmp
-
Make an archive file with the following data directories:
| Directory |
Contents |
| /opt/collabnet/teamforge/var |
User-created data, such as artifact
attachments |
| /svnroot |
Subversion source code repositories |
| /sf-svnroot |
Subversion repository for branding data |
| /cvsroot |
CVS source code repositories (not present on all
sites) |
-
cp -Rpf /svnroot /sf-svnroot /cvsroot
/opt/collabnet/teamforge/var /tmp/backup_dir
-
cd /tmp
-
tar czvf 61backup.tgz backup_dir
-
Back up your SSH keys, if any.
-
Back up your SSL certificates and keys, if any.
-
Stop PostgreSQL.
- sudo /etc/init.d/postgresql stop
-
Copy the file system data to the new box.
- scp /tmp/61backup.tgz username@newbox:/tmp
-
Copy the master configuration file from the old server to the same location on
the new server.
-
scp
/opt/collabnet/teamforge-installer/6.1.0.0/conf/site-options.conf
username@newbox:/tmp
Tip: scp is just an
example. Use whatever file transfer method you prefer.
Do this on the new TeamForge
6.1.1
box:
-
Log in as root and unpack the file system data.
- cd /tmp
- tar xzvf 61backup.tgz
-
Install the TeamForge
application.
- zypper install
teamforge-sles
-
Put the site-options.conf file where the installer can
find it.
- cp /tmp/site-options.conf
/opt/collabnet/teamforge-installer/6.1.1.0/conf
-
Open the site-options.conf file.
This is the master configuration file that controls your TeamForge site.
-
vi /opt/collabnet/teamforge-installer/6.1.1.0/conf/site-options.conf
Note: vi is an example. Any *nix text editor will
work.
-
Update the host name and domain name, if necessary.
- HOST_my.host.name=app database
subversion cvs etl datamart
- DOMAIN_my.host.name=my.domain.name
-
Make sure your Java settings are right for TeamForge
6.1.1.
-
Check the JAVA_HOME variable in /opt/collabnet/teamforge-installer/6.1.1.0/conf/site-options.conf
to make sure TeamForge is using the right JDK.
- vi
/opt/collabnet/teamforge-installer/6.1.1.0/conf/site-options.conf
The JAVA_HOME variable should look like this:
-
JAVA_HOME=/usr/java/jdk1.6.0_26
-
In the JBOSS_JAVA_OPTS variable, increase the
MaxPermSize value to 512.
-
In the site-options.conf file, make sure you do the
following:
-
If you don't specify a domain name, replace the HOST_localhost token with the hostname. Otherwise, ViewVC pages for Subversion and CVS repositories created after the site is up, will be rendered with a CSS error.
-
Important: It is mandatory that you include the SCM_DEFAULT_SHARED_SECRET token in the site-options.conf file of the primary TeamForge server, and give it a value of 16-24 characters.
Remember that you need to use that same key in the external SCM integration server also.
-
Increase the Phoenix optimization interval.
PHOENIX_JAVA_OPTS=-Xms256m -Xmx256m -server -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp -verbose:gc -XX:+
PrintGCTimeStamps -XX:+PrintGCDetails -Dsun.rmi.dgc.client.gcInterval=600000 -Dsun.rmi.dgc.server.gcInterval=600000 -Dsf
.luceneOptimizeEvery=100000
-
Increase the value of MAX_WWW_CLIENTS.
MAX_WWW_CLIENTS=200
-
Review the variables you've changed, then save the site-options.conf file.
-
Run the installer.
-
cd /opt/collabnet/teamforge-installer/6.1.1.0
-
./install.sh -r -I -V
-
Set up the site database.
-
Point the database to the local machine.
- su - postgres
- initdb -D /var/lib/pgsql/data
- vim /var/lib/pgsql/data/postgresql.conf
listen_addresses = '127.0.0.1,<IP address of database box>'
-
Configure database access for the site database.
- vi /var/lib/pgsql/data/pg_hba.conf
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
#host all all ::1/128 trust
host <DATABASE_NAME> <DATABASE_USERNAME <IP address of app box>/32 md5
host <REPORTS_DATABASE_NAME> <REPORTS_DATABASE_USERNAME> <IP address of app box>/32 md5
host <REPORTS_DATABASE_NAME> <REPORTS_DATABASE_READ_ONLY_USERNAME> <IP address of app box>/32 md5
-
Exit and restart PostgreSQL.
- exit
-
/etc/init.d/postgresql start
-
Bring your site data back.
-
Reload the PostgreSQL data.
-
su - postgres
-
/usr/bin/psql <
/tmp/backup_dir/teamforge_data_backup.dmp
-
exit
Note: If your reporting database is running on a separate port, restore
that data too:
-
su - postgres -c "/usr/bin/psql -p
<reports_database_port> <
/tmp/backup_dir/teamforge_reporting_data_backup.dmp"
-
Reload svnroot,
sf-svnroot, cvsroot, and
var.
-
Update the file permissions on your site's data.
-
/opt/collabnet/teamforge/runtime/scripts/fix_data_permissions.sh
Note: This process can take a long time for a site with a lot of data.
-
Convert your site data to work with TeamForge
6.1.1.
Tip: Before you kick off the data migration, use the
/etc/init.d/collabnet status command to make sure
Jboss and Tomcat are stopped.
-
/opt/collabnet/teamforge/runtime/scripts/migrate.py
The migrate.py script locates the existing site
data and modifies it as needed.This includes configuration data for LDAP and
the James mail server. Any modifications that you have applied to these
components on your old site are reproduced on your upgraded TeamForge
6.1.1
site.
-
Swap in the new Apache configuration file.
-
cd /etc/apache2
-
mv httpd.conf httpd.conf_old
-
cp httpd.conf.cn_new httpd.conf
-
cd /etc/sysconfig/
-
mv apache2 apache2_old
-
cp apache2.cn_new apache2
-
/etc/init.d/apache2 start
-
Start TeamForge.
Start PostgreSQL if it is not running.
-
/etc/init.d/postgresql start
Start CollabNet services.
-
/etc/init.d/collabnet start
-
Apply the finishing touches and make sure everything is running smoothly after
upgrading to TeamForge
6.1.1.
-
Make sure your users can still access their source control
services.
See Synchronize TeamForge source control integrations.
-
If you are bringing SSL certificates and keys from your old site, make
sure their locations match the paths specified by the
SSL_CERT_FILE and SSL_KEY_FILE
variables in site-options.conf. See Set up SSL for your TeamForge site.
-
Log into your site as the administrator.
-
Reboot the server and make sure all services come up automatically at
startup.
-
Rebuild your site's search index so that users get up-to-date search
results.
See Rebuild TeamForge search indexes for details.
-
If your site has custom branding, verify that your branding changes
still work as intended.
See Customize anything on your site.
-
Let your site's users know they've been upgraded.
See Create a site-wide
broadcast.
Important: Do not delete the teamforge-installer/6.1.1.0
directory. You will need it for future maintenance and upgrades.
Note: After the upgrade, it takes some time for the publishing
repositories to get created for projects imported from other TeamForge sites.