Upgrading the management server on Linux


This topic describes how to upgrade the management server on Linux.

Important

The supported upgrade path is from the previous two releases to the latest one. The upgrade steps are available in Upgrading from a specific version.

If you are upgrading from versions prior to versions 3.1.00, contact BMC Support. 

Related topic

Prerequisites

  • No policies scheduled to run during the upgrade operation
  • At least 4 GB of free space under /var/lib/docker
  • Docker (version 18 or later) or Podman (version 4.4.1 or later)

    Important

    You must run the Docker or Podman commands using root or sudo.

Upgrading from a specific version

Select the version you need to upgrade from.

Task 1: To obtain the installation files

  1. Using the search bar, search for either BMC AMI Cloud Data or BMC AMI Cloud Vault. Both product files are composed with the same binaries.
  2. Click the version that want to download. 
  3. On the Product tab, select the files and click Download.

Task 2: To upload the zip files

Upload the model9-v4.0.1_build_8816b37-server.zip installation file to the designated server in binary mode.

Important

If installing the s390x version for Linux on z, use the model9-v4.0.1_build_4932dbf-server-s390x.zip file.

Task 3: To back up the server before the upgrade 

  1. Set the default MODEL9_HOME environment variable by using the following command:

    sudo su -
    export MODEL9_HOME=<model9 home>
  2. Stop the server and remove the BMC AMI Cloud containers that are running by using the following commands: 

    docker stop model9-v4.0.0
    docker rm model9-v4.0.0
  3. Verify that the container is not running by using the following command:

    docker ps -a
  4. Back up the local configuration and database:

    cd $MODEL9_HOME

    fileStamp=$(date +%Y-%m-%d)
    tar -czf conf-$fileStamp.tar.gz conf
    docker exec -it model9db /bin/bash -c "PGPASSWORD=model9 pg_dump --username postgres model9" > $MODEL9_HOME/model9db-$fileStamp.dump 

Task 4: To unzip the installation files

The configuration file structure has been changed in this release and should be backed up before upgrading the server, as shown in the following example. Unzip the installation file to $MODEL9_HOME:

# The path to model9 installation zip uploaded
export M9INSTALL=/<path>

# Verify MODEL9_HOME parameter is defined
echo $MODEL9_HOME

cd $MODEL9_HOME
# Backup current configuration files
cp conf/model9-local.yml conf/model9-local.yml.backup
cp conf/logback.groovy conf/logback.groovy.backup

# Create the diag directory
mkdir diag

# On Linux issue:
unzip -o $M9INSTALL/model9-v4.0.1_build_8816b37-server.zip 'model9*'

# On Linux on z issue:
unzip -o $M9INSTALL/model9-v4.0.1_build_4932dbf-server-s390x.zip 'model9*'

#Define docker to podman alias if using podman as the container platform
alias docker=podman

#When using sudo define sudo alias that will resolve other aliases
alias sudo='sudo '

Important

Verify that the $MODEL9_HOME/diag directory exists.

Task 5: To load the new release artifacts

Deploy the new BMC AMI Cloud release container by using the following command:

# On Linux issue:
docker load -i $MODEL9_HOME/model9-v4.0.1_build_8816b37.docker

# On Linux on z issue:
docker load -i $MODEL9_HOME/model9-v4.0.1_build_4932dbf-s390x.docker

Task 6: To start the BMC AMI Cloud management server

Important

The first BMC AMI Cloud management server startup following an upgrade might take longer than usual because of internal migration processes. Subsequent startups will not be affected.

When the object storage provider is available and PostgreSQL is running, start the BMC AMI Cloud management server by using the following commands:

# On Linux issue:
docker run -d -p 0.0.0.0:443:443 -p 0.0.0.0:80:80 \
--sysctl net.ipv4.tcp_keepalive_time=600 \
--sysctl net.ipv4.tcp_keepalive_intvl=30 \
--sysctl net.ipv4.tcp_keepalive_probes=10 \
-v $MODEL9_HOME:/model9:z -h $(hostname) --restart unless-stopped \
--env-file $MODEL9_HOME/conf/model9.env \
--network model9network \
--name model9-v4.0.1 model9:v4.0.1.8816b37

# On Linux on z issue:
docker run -d -p 0.0.0.0:443:443 -p 0.0.0.0:80:80 \
--sysctl net.ipv4.tcp_keepalive_time=600 \
--sysctl net.ipv4.tcp_keepalive_intvl=30 \
--sysctl net.ipv4.tcp_keepalive_probes=10 \
-v $MODEL9_HOME:/model9:z -h $(hostname) --restart unless-stopped \
--env-file $MODEL9_HOME/conf/model9.env \
--network model9network \
--name model9-v4.0.1 model9:v4.0.1.4932dbf

The BMC AMI Cloud container is now linked to other containers over a Docker network. For a full description of all Docker run parameters, see the docker runs topic in the Docker Docs site.

Task 1: To obtain the installation files

  1. Using the search bar, search for either BMC AMI Cloud Data or BMC AMI Cloud Vault. Both product files are composed with the same binaries.
  2. Click the version that want to download. 
  3. On the Product tab, select the files and click Download.

Task 2: To upload the zip files

Upload the model9-v4.0.1_build_8816b37-server.zip installation file to the designated server in binary mode.

Important

If installing the s390x version for Linux on z, use the model9-v4.0.1_build_4932dbf-server-s390x.zip file.

Task 3: To back up the server before the upgrade 

  1. Set the default MODEL9_HOME environment variable by using the following command:

    sudo su -
    export MODEL9_HOME=<model9 home>
  2. Stop the server and remove the BMC AMI Cloud containers that are running by using the following commands: 

    docker stop model9-v3.3.0
    docker rm model9-v3.3.0
  3. Verify that the container is not running by using the following command:

    docker ps -a
  4. Back up the local configuration and database:

    cd $MODEL9_HOME

    fileStamp=$(date +%Y-%m-%d)
    tar -czf conf-$fileStamp.tar.gz conf
    docker exec -it model9db /bin/bash -c "PGPASSWORD=model9 pg_dump --username postgres model9" > $MODEL9_HOME/model9db-$fileStamp.dump 

Task 4: To unzip the installation files

The configuration file structure has been changed in this release and should be backed up before upgrading the server, as shown in the following example. Unzip the installation file to $MODEL9_HOME:

# The path to model9 installation zip uploaded
export M9INSTALL=/<path>

# Verify MODEL9_HOME parameter is defined
echo $MODEL9_HOME

cd $MODEL9_HOME
# Backup current configuration files
cp conf/model9-local.yml conf/model9-local.yml.backup
cp conf/logback.groovy conf/logback.groovy.backup

# Create the diag directory
mkdir diag

# On Linux issue:
unzip -o $M9INSTALL/model9-v4.0.1_build_8816b37-server.zip 'model9*'

# On Linux on z issue:
unzip -o $M9INSTALL/model9-v4.0.1_build_4932dbf-server-s390x.zip 'model9*'

#Define docker to podman alias if using podman as the container platform
alias docker=podman

#When using sudo define sudo alias that will resolve other aliases
alias sudo='sudo '

Important

Verify that the $MODEL9_HOME/diag directory exists.

Task 5: To load the new release artifacts

Deploy the new BMC AMI Cloud release container by using the following command:

# On Linux issue:
docker load -i $MODEL9_HOME/model9-v4.0.1_build_8816b37.docker

# On Linux on z issue:
docker load -i $MODEL9_HOME/model9-v4.0.1_build_4932dbf-s390x.docker

Task 6: To start the BMC AMI Cloud management server

Important

The first BMC AMI Cloud management server startup following an upgrade might take longer than usual because of internal migration processes. Subsequent startups will not be affected.

When the object storage provider is available and PostgreSQL is running, start the BMC AMI Cloud management server by using the following commands:

# On Linux issue:
docker run -d -p 0.0.0.0:443:443 -p 0.0.0.0:80:80 \
--sysctl net.ipv4.tcp_keepalive_time=600 \
--sysctl net.ipv4.tcp_keepalive_intvl=30 \
--sysctl net.ipv4.tcp_keepalive_probes=10 \
-v $MODEL9_HOME:/model9:z -h $(hostname) --restart unless-stopped \
--env-file $MODEL9_HOME/conf/model9.env \
--network model9network \
--name model9-v4.0.1 model9:v4.0.1.8816b37

# On Linux on z issue:
docker run -d -p 0.0.0.0:443:443 -p 0.0.0.0:80:80 \
--sysctl net.ipv4.tcp_keepalive_time=600 \
--sysctl net.ipv4.tcp_keepalive_intvl=30 \
--sysctl net.ipv4.tcp_keepalive_probes=10 \
-v $MODEL9_HOME:/model9:z -h $(hostname) --restart unless-stopped \
--env-file $MODEL9_HOME/conf/model9.env \
--network model9network \
--name model9-v4.0.1 model9:v4.0.1.4932dbf

The BMC AMI Cloud container is now linked to other containers over a Docker network. For a full description of all Docker run parameters, see the docker runs topic in the Docker Docs site.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*