Upgrading CloudBees Build Acceleration on Linux

6 minute read
Installing a component overwrites the entire installation on that machine. Only one CloudBees Build Acceleration installation can exist on a machine, which is the combination of components that are in the most recent installation. For example, installing the Cluster Manager on a machine with the Electric Agent results in a machine with the Cluster Manager only, not a machine with the Electric Agent and the Cluster Manager.

You can install the Cluster Manager, eMake, and agents at the same time on the same machine.

Upgrading the Cluster Manager

  • The Cluster Manager server and agent hosts must run the same version of CloudBees Build Acceleration.

  • If you want to upgrade the Cluster Manager and migrate the database to a different machine, you must first upgrade the Cluster Manager (to update the existing database’s schema), then migrate the database to the new machine.

  • The remote database configuration upgrade might trigger a warning. The Cluster Manager can connect to a remote database, and the user can shut down the local database (if applicable).

    During the upgrade, the installer cannot reach the local database (because it is shut down already), so it gives this prompt:

    Unable to contact the database. Please enter a correct username/password: Root User (empty=no database migration):

    Leaving the value empty lets the installer finish. Upon completion, a warning message appears. This is the expected behavior and does not indicate a problem.

  • The duration of the database schema upgrade might trigger an extraneous failure message. During a CloudBees Build Acceleration upgrade, the installer attempts to connect to the Cluster Manager. Because the Cluster Manager handles the database schema upgrade, a large database might cause the Cluster Manager to take a long time to finish the upgrade.

    A failure message stating that the Cluster Manager failed to start might appear. This message does not indicate an actual failure and means only that the Cluster Manager is still processing the schema upgrade. The Cluster Manager will load after the schema upgrade completes.

  • To back up and restore your database, use the exportData and importData cmtool commands as described in the cmtool Reference Guide.

  • CloudBees no longer bundles MySQL as the default local database for CloudBees Build Acceleration. Starting with CloudBees Build Acceleration version 7.1, CloudBees bundles MariaDB and installs it as the default local database on the Cluster Manager. When you perform a Cluster Manager upgrade, MariaDB replaces the local MySQL database (if applicable) and migrates all information from it.

    MariaDB is an open-source database that is fully compatible with MySQL. As open-source software, there is no enterprise license support model available with MariaDB. If using an open-source database is of concern to your organization, you continue to have the option to use any of the following databases as a replacement: MySQL, Oracle, or SQL Server. See the online help topic “Database Configuration” for information about configuring CloudBees Build Acceleration to use an external database.

Using the GUI to upgrade the Cluster Manager

  1. Sign in as root.

  2. Ensure that no builds are running.

  3. Copy the installer executable to the Cluster Manager machine to a location such as /var/tmp.

    Do not run the installer from a directory path that contains spaces.

  4. Double-click the CloudBeesAccelerator-<version> file.

    The Welcome screen appears after the installation packages are extracted.

  5. Proceed with the upgrade in the same way that you initially installed the Cluster Manager.

    Ensure that you type in the correct value for your Cluster Manager admin password. The encrypted default password is changeme.

    The upgrade fails if the correct password is not used. You can change the Cluster Manager admin password during the upgrade only if the current password is the default password.

  6. Accept the existing Cluster Manager configuration or update your configuration settings.

  7. When the Start Copying Files screen appears, click Next.

    The Installing screen appears. When installation is finished, the Complete screen appears.

  8. Click Finish.

  9. If you changed Cluster Manager ports during the upgrade, close your browser windows to avoid potential conflicts and to ensure that your settings take effect.

Installation is complete. The installation log file is in the installation directory’s root by default.

If Apache fails to start properly after the Cluster Manager installs, reboot the system.

Using the interactive command line to upgrade the Cluster Manager

  1. Sign in as root.

  2. Ensure that no builds are running.

  3. Copy the installer executable ( CloudBeesAccelerator-<version> ) to the Cluster Manager machine to a location such as /var/tmp.

    Do not run the installer from a directory path that contains spaces.

  4. Run `chmod +x ` on the installer file to ensure that it is executable.

  5. Enter ./CloudBeesAccelerator-<version> --mode console.

  6. Enter y to the question Do you want to upgrade CloudBees Build Acceleration with the same settings? and then press Enter.

  7. Wait until the upgrade process is done with message Installation complete.

    • Migrate data from the current Cluster Manager version to preserve previously-generated data. However, if the database schema has changed significantly, migration is not possible, and a warning message is displayed.

      If you want to upgrade the Cluster Manager and migrate the database to a different machine, you must upgrade the Cluster Manager first (to update the existing database’s schema), and then migrate the database to the new machine.

The installer upgrades the Cluster Manager using the configuration details you entered, followed by Installation complete.

The installation log file is in the install directory’s root, /opt/ecloud, by default.

Upgrading the Electric Agent/EFS

The Cluster Manager server and agent hosts must run the same version of CloudBees Build Acceleration.

Upgrading Electric Agent/EFS on multiple hosts simultaneously

If you used ecconfig to change the Cluster Manager/port any time after you initially ran the installer, you must manually update the Cluster Manager/port (where the agent hosts point to) in /opt/ecloud/install.props ` before running `ecclusterupgrade.

  1. Sign in as root.

  2. Ensure that no builds are running.

  3. Copy the installer executable to the Cluster Manager machine to a location such as /var/tmp.

    Do not run the installer from a directory path that contains spaces.

  4. On the Cluster Manager machine, run:

    ecclusterupgrade

    Depending on your setup, you might need the following options as well:

    • --agentinstalldir=<path> indicates the agents’ installation location. All agents that you want to upgrade must have the same installation location. If this is not true, you must run the script multiple times using the relevant --agentinstalldir path names. You must also specify the --hosts option to limit the upgrade to machines that use the nonstandard agent installation directory.

    • --targetos=<os> limits which operating system to upgrade. indicates which operating system to update. Available values for <os> are windows and linux. This lets you update any operating system type from any operating system.

    • --hosts="host1 host2 …​" specifies a list of hosts to upgrade. You can also use a pattern such as host[1-3], host[2,5].

    • For multiple installer versions, use one of the following options:

      • --installerversion=<version> to select the version. You need this option only if there are multiple installer versions in the local/<installerdir> location.

      • --installer=<filename> to explicitly select an installer. Use an absolute file name for this option.

See ecclusterupgrade Options for all ecclusterupgrade options.

Following is an example of an ecclusterupgrade command. This command upgrades two agents:

/opt/ecloud/i686_Linux/bin/ecclusterupgrade --installer=/tmp/CloudBeesAccelerator-7.1.1.48690-Linux-x86_64-Install --hosts="agent1 agent2"

Using the GUI to upgrade Electric Agent/EFS on a single cluster host

  1. Sign in as root.

  2. Ensure that no builds are running.

  3. Copy the CloudBeesAccelerator-<version> installer executable to the agent machine to a location such as /var/tmp.

    Do not run the installer from a directory path that contains spaces.

  4. Double-click the executable to start the upgrade. The Welcome screen appears after the installation packages are extracted.

  5. Click Next to continue.

  6. Select Electric Agent, and then click Next.

    The Electric Agent screen is filled in with your previous configuration information. The maximum number of agents allowed on one 64-bit machine is 64.

  7. Click Next to continue to the next screen.

  8. When the Start Copying Files screen appears, click Next.

    The Installing screen displays while the upgrade progresses.

  9. When the Complete screen displays, click Finish.

  10. Reboot the agent machine.

The installation log file is in the install directory’s root, /opt/ecloud, by default.

Using the interactive command line to upgrade Electric Agent/EFS on a single cluster host

  1. Sign in as root.

  2. Ensure that no builds are running.

  3. Copy the CloudBeesAccelerator-<version> installer executable to the agent machine to a location such as /var/tmp.

    Do not run the installer from a directory path that contains spaces.

  4. Run `chmod +x ` on the file to ensure that it is executable.

  5. Run ./<installer filename> --mode console to start the upgrade.

  6. Enter 1 to select the Electric Agent/EFS package and then press Enter.

  7. Enter configuration details for the Electric Agent/EFS upgrade.

    Use the Cluster Manager default port 8030 or type in the alternative port that you specified during the initial installation.

    The installer upgrades Electric Agent/EFS using the configuration details you entered, followed by Installation complete.

    You might receive a message to reboot the agent machine after upgrading Electric Agent/EFS—rebooting might not be required.

The installer dynamically builds the EFS kernel module if it detects no prebuilt version matching your Linux kernel version. The installation log file is in the install directory’s root, /opt/ecloud, by default.

Upgrading eMake

If you are uninstalling eMake before upgrading, if eMake and the Cluster Manager are installed on the same machine, uninstalling eMake removes the Cluster Manager.