<%@ page isELIgnored="true" %> <%@ taglib uri="cms" prefix="cms" %> Clone AnthillPro Instance

Clone AnthillPro Instance

Cloning an instance of your AnthillPro server will allow you to change scripts, optimize processes, improve build performance, move the server, etc., without having to experiment on the production server. The process involves installing a clean version of AnthillPro in a new location, cloning the production database, and copying over the cloned database to the new instance. If necessary, you can move the artifacts, logs, and reports to the new server.

If you plan on changing the database type, see Migrate Server Database.

Before you begin, make sure:

  • The anthill3 distributable either anthill3-[version].zip or anthill3-[version].tar.gz for the version of AnthillPro which is currently installed as the production instance. For example, if your production server is Version 3.7.0_52506, you will need to install Version 3.7.0_52506 in the new instance. Otherwise, you may not be able to copy over the database to the new instance. If you can't find the correct distributable, please contact support.

  • Your evaluation license (different from the production server). To obtain a copy of the evaluation license, login to the AnthillPro Supportal.

  • The ability to start and stop the production AnthillPro instance.

  • Access to the AnthillPro production database.

Once the prerequisites are met, you can clone then move the database:

  1. Install the new AnthillPro server and instruct it to connect to a new empty database created specifically for the instance.

  2. Modify the production server to ensure that it is configured to bind to the address: 0.0.0.0 on startup. Go to System > Server Settings, and set the Bind to IP setting to 0.0.0.0.

  3. Shutdown the AnthillPro production server.

  4. Clone the AnthillPro database. The procedure varies depending on the underlying database. Your database vendor should have documentation on cloning.

  5. Start the production AnthillPro server. If need be, reset the Bind to IP setting. This may require you to restart the server to take effect.

  6. Copy the cloned database over the top of the clean database schema which was created in Item 1.

  7. Cleanup the cloned database before installing it in the new instance.

    The first two statements (see below) remove the production license from the new server to prevent license conflicts. If you do not run these statements, starting the new server may disable your production server.

    The third statement instructs the new instance to ignore all production agents, preventing accidental upgrades.

    Connect to the new database using a tool such as DBVisualizer (or the console) and issue the following SQL statements:

    • DELETE FROM ANTHILL_LICENSE;

    • DELETE FROM REPOSITORY_USERS;

    • UPDATE AGENT SET ISIGNORED = 1;

  8. Moving SSL certificates. If your production server is using SSL, you will need to copy over all the *.keystore files into the new instance. Do not remove the files from the production server.

  9. Start the new AnthillPro instance and enter your evaluation license. In order to use the server, you will have to connect it to at least one agent. There are a number of options you can choose: the simplest is to install some new agents and bind them to the new server.

    Note that if you have any production agents come online (e.g., you restart an agent) while the new instance is running and still set to bind to 0.0.0.0, that agent may bind to the new instance and not the production instance. To prevent accidental binding and/or upgrade, you can give the AnthillPro new instance a unique IP address and then tell its agents only to bind to that IP.

Move Artifacts, Logs, and Reports

If you need to move the artifacts, logs, reports, etc., stored on the server, you will need to copy the /var directory from the old server to the new instance. When moving, you must ensure that you exactly copy over the directory -- otherwise AnthillPro will not be able to properly retrieve artifacts, etc. To move the artifacts, etc.:

  1. Ensure the new AnthillPro instance has been installed correctly and stop the server if it is running.

  2. Go to the old AnthillPro instance and copy the entire /var directory. It is important to match the file system exactly!

  3. Once copied, overwrite the /var directory of the new instance. This may take a while, depending on how many artifacts are stored on the machine.

  4. When done, restart the new AnthillPro instance.