From ControlTier
A situation may arise where you need to migrate to a different machine to serve as your ControlTier server. There are three main approaches to a migration of this sort:
- Move your entire installation wholesale: The quickest way, assuming that you do not plan to upgrade ControlTier versions and your old and new boxes are sufficiently similar.
- Migrate individual projects using project archive (PAR) files: Recommended if you're upgrading versions as well as migrating.
- Reload your entire project from ProjectBuilder source files: Cleanest, but most time-consuming method. Recommended if you are also making significant model changes at the same time.
Move your entire installation wholesale
- Back up $CTIER_ROOT on the old server.
- Unpack $CTIER_ROOT on the new server.
- Copy
.ctierrc and .bashrc from your old server to your new server.
- Repoint the DNS name of your ctier server to the new server.
Caveats
- Java must be in the same location on both systems, or be installed inside the $CTIER_ROOT.
- The user running ControlTier needs to be the same on both boxes.
Migrate individual projects using project archive files
Step 1: Create project archive (PAR) file(s)
Go to (old server's) Workbench and open your project. Click the Admin button on the right hand side. Then pick the Create Archive command. In the screen that follows, use these options:
- Where should the Archive file be saved? Save to DAV share
- Which Module Jars should be included? All Module Jars
Repeat for each project.
Step 2: Install new server
- Temporarily add an /etc/hosts entry on your new box pointing the DNS hostname of the server (e.g.
ctier.example.com) to itself.
- You may want to go as far as adding an iptables rule to block connectivity between your new server and your production server.
- Go through the normal Installation process for the new server. Override the server name to be the eventual name of the server, for which you just added the entry in /etc/hosts.
Step 3: Copy the WebDAV repository
In this step, you need to copy the contents of the old WebDAV repository into the new.
- On Windows or MacOS, you can use Web Folders client, or any other WebDAV client, to drag and drop all the files from the old WebDAV to the new.
- On Linux, use the davfs2 filesystem to mount the old and new WebDAV and copy the files from the old WebDAV to the new one. Use
rsync -av if you plan on doing this more than once. Otherwise, cp should suffice.
Step 4: Import the PAR file(s)
- Go to your new Workbench and click the Admin button. Then click "Unarchive". The PAR file that you saved in step 1 should be available. Pick that and proceed.
- Optionally, if you installed a newer version of ctier on your new server, you should also update the module library:
- Locate the controltier-seed.jar archive from the installer directory: (e.g.
ControlTier-3.4.5/pkgs/ctl-1.4.5/lib/extensions/commander/jars/controltier-seed-3.4.5.jar)
- Load the new seed jar from the installer using either ProjectBuilder or Workbench into each project:
- ProjectBuilder: Run the load-library command:
ctl -m ProjectBuilder -c load-library -- -jar /path/to/controltier-seed-3.x.x.jar
- Workbench: Go to the Admin page (eg, http://strongbad:8080/itnav/do/menu/Admin) and press the "Import Seed" button and upload the jar file. Check the box "Restage all submodules of imported modules after import".
- Remove the old seed from the WebDAV:
ctl -m davutil -c delete -- -url dav://seeds/controltier-seed.jar
Repeat this procedure if you have more than one project.
Step 5: Copy Jobcenter and Reportcenter databases
Copy the files $CTIER_ROOT/jobcenter/grailsdb.* and $CTIER_ROOT/reportcenter/grailsdb.* from the old box to the new box.
Step 6: Repoint clients
- Repoint DNS to point to your new server and remove the temporary /etc/hosts entry.
- If you upgraded ControlTier in this process, you also need to upgrade the clients. Use the regular client-only installation procedures. Then, afterwards, run
ctl-project -p project -a install for each project on each node. (You can use ctl-exec for this.)
Caveats
Be careful that you make sure /etc/hosts on your new server points your server hostname to itself during the migration. Otherwise, it may cause production issues by connecting to the old server instead of the new.
Reload your entire project from ProjectBuilder source files
- Temporarily add an /etc/hosts entry on your new box pointing the DNS hostname of the server (e.g.
ctier.example.com) to itself. Or, you can choose to skip this step and just use the real name of the new server.
- Go through the normal Installation process for the new server. Override the server name to the the eventual name of the box that you just added to /etc/hosts, if needed.
- Recreate your node objects, either from node.xml or by re-registering each node from the node itself using
ctl-project -p create. If you choose the latter option, you need to add an /etc/hosts entry on those nodes as well, so that the nodes talk to the correct server.
- Recreate your project, adding ProjectBuilder objects and rebuilding modules as necessary. Reload all your objects and jobs from your ProjectBuilder source base.
- Remove and recreate the depot on each node using the ctl-project actions remove, create and install, in that order. You can use ctl-exec to do this.
- Repoint DNS to your new server, if needed.
Caveats
- If you're keeping your server name, be careful that you make sure /etc/hosts on your new server points your server hostname to itself during the migration. Otherwise, it may cause production issues by connecting to the old server instead of the new.
- This method does not preserve any state information that you may have had in your old project, such as package files or package assignments. It is, in effect, starting over from before you ever built or deployed anything.
| User Guide |
|---|
| | Introduction | | | | Projects | | | | Command execution | | | | Examples | |
|
| Installation |
|---|
| | Requirements | | | | Installers | | | | Configuration | | | | Server | |
|
| Modeler Guide |
|---|
| | Introduction | | | | Resource modeling | | | | Module development | | | | Examples | |
|
| Reference |
|---|
| | Ant tasks | | | | Command-line utilities | | | | XML | | | | APIs | |
|