Upgrade Autonomous Identity
Autonomous Identity provides an upgrade command to update your core software to the latest version while migrating your data.
Upgrade Considerations
-
Database Systems are the Same. If your current database is Apache Cassandra, you cannot upgrade to a MongoDB-based system. You will need to run a clean installation with the new version.
-
Host IPs should be the Same. Host IP addresses must be the same for existing components. You must update the
~/autoid-config/hosts
file by adding the IP addresses for the Elasticsearch entries. Refer to the instructions below. -
Registry Key Required. To download the deployment images for the upgrade, you still need your registry key to log into the ForgeRock Google Cloud Registry. Copy your registry key from your previous build to your new upgrade.
Make sure to test the upgrade on a staging or QA server before running it in production. |
Upgrade Paths
The upgrade assumes the following upgrade paths depends on your current deployment version. The preferred upgrade path is to the latest patch release. The following chart summarizes these upgrade paths:
Version | Upgrade To | See |
---|---|---|
2021.8.7 |
2022.11.0 |
|
2021.8.7 Air-Gapped |
2022.11.0 Air-Gapped |
Upgrade from Autonomous Identity 2021.8.7 to 2022.11.0
The following instructions are for upgrading from Autonomous Identity version 2021.8.7 to the latest version 2022.11.0 in non air-gapped deployments.
-
Start on the target server, and back up your
/data/conf
configuration file. The upgrade overwrites this file when updating, so you must restore this file after running the upgrade.sudo mv /data/conf ~/backup-data-conf-2021.8.7
-
Next, if you changed any analytic settings on your deployment, make note of your configuration, so that you can replicate those settings on the upgraded server. Log in to Autonomous Identity, navigate to Administration > Analytic Settings, and record your settings.
-
On the deployer machine, back up the 2021.8.7
~/autoid-config
directory or move it to another location.mv ~/autoid-config ~/backup-2021.8.7
-
Create a new
~/autoid-config
directory.mkdir ~/autoid-config
-
Copy your
autoid_registry_key.json
from your backup directory to~/autoid-config
. -
Copy your original SSH key into the new directory.
cp ~/.ssh/id_rsa ~/autoid-config
-
Change the permission on the SSH key.
chmod 400 ~/autoid-config/id_rsa
-
Check if you can successfully SSH to the target server.
ssh autoid@<Target-IP-Address> Last login: Wed Jan 15 18:19:14 2021
-
On the deployer node, change to the
~/autoid-config
directory.cd ~/autoid-config
-
Log in to the ForgeRock Google Cloud Registry using the registry key. The registry key is only available to ForgeRock Autonomous Identity customers. For specific instructions on obtaining the registry key, see How To Configure Service Credentials (Push Auth, Docker) in Backstage.
docker login -u _json_key -p "$(cat autoid_registry_key.json)" https://gcr.io/forgerock-autoid
You should see:
Login Succeeded
-
Run the
create-template
command to generate thedeployer.sh
script wrapper and configuration files. Note that the command sets the configuration directory on the target node to/config
. The--user
parameter eliminates the need to usesudo
while editing the hosts file and other configuration files.docker run --user=$(id -u) -v ~/autoid-config:/config -it gcr.io/forgerock-autoid/deployer:2022.11.0 create-template
-
Configure your upgraded system by editing the
~/autoid-config/vars.yml
,~/autoid-config/hosts
, and~/autoid-config/vault.yml
files on the deployer machine.You must keep your configuration settings consistent from one system to another. -
Migrate the consul data to JSON. This command is required for consul-server, consul-client, and configuration-service removal. The deployer migrates all consul data to JAS using the
migrated_consul_config.json
file../deployer.sh debug consul-backup
Make sure to check that the migrated_consul_config.json
file is generated underautoid-config
and has some content. Also, make sure to back up themigrated_consul_config.json
file for debugging. -
Stop the stack.
If you are upgrading a multi-node deployment, run this command on the Docker Manager node. docker stack rm configuration-service consul-server consul-client nginx jas swagger-ui ui api notebook
You should see:
Removing service configuration-service_configuration-service Removing service consul-server_consul-server Removing service consul-client_consul-client Removing service nginx_nginx Removing service jas_jasnode Removing service swagger-ui_swagger-ui Removing service ui_zoran-ui Removing service api_zoran-api Nothing found in stack: notebook
-
Prune old Docker images before running the upgrade command:
-
Get all of the Docker images:
docker images
-
Identify the images that are Autonomous Identity-related. They start with the URL of the ForgeRock Google cloud registry (ForgeRock GCR). For example:
REPOSITORY TAG IMAGE ID CREATED SIZE <ForgeRock GCR>/ci/develop/deployer 650879186 075481cea4c2 2 hours ago 823MB <ForgeRock GCR>/ci/develop/offline-packages 650879186 e1a90f389ccc 2 hours ago 3.03GB <ForgeRock GCR>/ci/develop/zoran-ui 650879186 bd303a28b5df 2 hours ago 35.3MB <ForgeRock GCR>/ci/develop/zoran-api 650879186 114d1aca5b0a 2 hours ago 421MB <ForgeRock GCR>/ci/develop/nginx 650879186 43b410661269 2 hours ago 16.7MB <ForgeRock GCR>/ci/develop/jas 650879186 2821e5c365d8 2 hours ago 491MB
-
Remove the old images using the
docker rmi
command. For example:docker rmi -f <image ID> Example: docker rmi -f 075481cea4c2
-
Repeat the previous command to remove all of the Autonomous Identity-related Docker images.
-
-
For multinode deployments, run the following on the Docker Worker node:
docker swarm leave
-
Enter
exit
to end your SSH session. -
From the deployer, restart Docker command:
sudo systemctl restart docker
-
Download the images. This step downloads software dependencies needed for the deployment and places them in the
autoid-packages
directory. Make sure you are in the~/autoid-config
directory../deployer.sh download-images
-
Run the upgrade:
./deployer.sh upgrade
-
SSH to the target server.
-
On the target server, restore your
/data/conf
configuration file from your previous installation.sudo mv ~/backup-data-conf-2021.8.7 /data/conf
-
Re-apply your analytics settings to your upgraded server if you made changes on your previous Autonomous Identity machine. Log in to Autonomous Identity, navigate to Administration > Analytics Settings, and edit your changes.
-
Log out, and then log back in to Autonomous Identity.
You have successfully upgraded your Autonomous Identity server to 2022.11.0.
Upgrade from Autonomous Identity 2021.8.7 to 2022.11.0 Air-Gapped
The following instructions are for upgrading from Autonomous Identity version 2021.8.7 to 2022.11.0 on air-gapped deployments.
-
Start on the target server, and back up your
/data/conf
configuration file. The upgrade overwrites this file when updating, so you must restore this file after running the upgrade.sudo mv /data/conf ~/backup-data-conf-2021.8.7
-
Next, if you changed any analytic settings on your deployment, make note of your configuration, so that you can replicate those settings on the upgraded server. Log in to Autonomous Identity, navigate to Administration > Analytic Settings, and record your settings.
-
On the deployer machine, back up the 2021.8.7
~/autoid-config
directory or move it to another location.mv ~/autoid-config ~/backup-2021.8.7
-
Create a new
~/autoid-config
directory.mkdir ~/autoid-config
-
Copy your
autoid_registry_key.json
from your backup directory to~/autoid-config
. -
Copy your original SSH key into the new directory.
cp ~/.ssh/id_rsa ~/autoid-config
-
Change the permission on the SSH key.
chmod 400 ~/autoid-config/id_rsa
-
On the deployer node, change to the
~/autoid-config
directory.cd ~/autoid-config
-
Log in to the ForgeRock Google Cloud Registry using the registry key. The registry key is only available to ForgeRock Autonomous Identity customers. For specific instructions on obtaining the registry key, see How To Configure Service Credentials (Push Auth, Docker) in Backstage.
docker login -u _json_key -p "$(cat autoid_registry_key.json)" https://gcr.io/forgerock-autoid
You should see:
Login Succeeded
-
Run the
create-template
command to generate thedeployer.sh
script wrapper and configuration files. Note that the command sets the configuration directory on the target node to/config
. The--user
parameter eliminates the need to usesudo
while editing the hosts file and other configuration files.docker run --user=$(id -u) -v ~/autoid-config:/config -it gcr.io/forgerock-autoid/deployer:2022.11.0 create-template
-
Configure your upgraded system by editing the
~/autoid-config/vars.yml
,~/autoid-config/hosts
, and~/autoid-config/vault.yml
files on the deployer machine.You must keep your configuration settings consistent from one system to another. -
Migrate the consul data to JSON. This command is required for consul-server, consul-client, and configuration-service removal. The deployer migrates all consul data to JAS.
./deployer.sh debug consul-backup
Make sure to check that the migrated_consul_config.json
file is generated underautoid-config
and has some content. Also, make sure to back up themigrated_consul_config.json
file for debugging. -
Download the images. This step downloads software dependencies needed for the deployment and places them in the
autoid-packages
directory. Make sure you are in the~/autoid-config
directory../deployer.sh download-images
-
Stop the stack.
If you are upgrading a multi-node deployment, run this command on the Docker Manager node. docker stack rm configuration-service consul-server consul-client nginx jas swagger-ui ui api notebook
You should see:
Removing service configuration-service_configuration-service Removing service consul-server_consul-server Removing service consul-client_consul-client Removing service nginx_nginx Removing service jas_jasnode Removing service swagger-ui_swagger-ui Removing service ui_zoran-ui Removing service api_zoran-api Nothing found in stack: notebook
-
Prune old Docker images before running the upgrade command:
-
Get all of the Docker images:
docker images
-
Identify the images that are Autonomous Identity-related. They start with the URL of the ForgeRock Google cloud registry (ForgeRock GCR). For example:
REPOSITORY TAG IMAGE ID CREATED SIZE <ForgeRock GCR>/ci/develop/deployer 650879186 075481cea4c2 2 hours ago 823MB <ForgeRock GCR>/ci/develop/offline-packages 650879186 e1a90f389ccc 2 hours ago 3.03GB <ForgeRock GCR>/ci/develop/zoran-ui 650879186 bd303a28b5df 2 hours ago 35.3MB <ForgeRock GCR>/ci/develop/zoran-api 650879186 114d1aca5b0a 2 hours ago 421MB <ForgeRock GCR>/ci/develop/nginx 650879186 43b410661269 2 hours ago 16.7MB <ForgeRock GCR>/ci/develop/jas 650879186 2821e5c365d8 2 hours ago 491MB
-
Remove the old images using the
docker rmi
command. For example:docker rmi -f <image ID> Example: docker rmi -f 075481cea4c2
-
-
For multinode deployments, run the following on the Docker Worker node:
docker swarm leave
-
From the deployer, restart Docker:
sudo systemctl restart docker
-
Create a tar file containing all of the Autonomous Identity binaries.
tar czf autoid-packages.tgz deployer.sh migrated_consul_config.json autoid-packages/*
-
Copy the
autoid-packages.tgz
,deployer.sh
,migrated_consul_config.json
, and SSH key (id_rsa ) to a portable hard drive. -
On the air-gapped target machine, backup your previous
~/autoid-config
directory, and then create a new~/autoid-config
directory.mkdir ~/autoid-config
-
Copy the
autoid-package.tgz
tar file,deployer.sh
,migrated_consul_config.json
, and SSH key from the portable storage device to the/autoid-config
folder. -
Unpack the tar file.
tar xf autoid-packages.tgz -C ~/autoid-config
-
Copy the SSH key to the
~/autoid-config
directory. -
Change the privileges to the file.
chmod 400 ~/autoid-config/id_rsa
-
Change to the configuration directory.
cd ~/autoid-config
-
Import the deployer image.
./deployer.sh import-deployer
You should see:
… db631c8b06ee: Loading layer [=============================================⇒] 2.56kB/2.56kB 2d62082e3327: Loading layer [=============================================⇒] 753.2kB/753.2kB Loaded image: <ForgeRock Google cloud registry URl>/deployer:2022.11.0
-
Create the configuration template using the
create-template
command. This command creates the configuration files:ansible.cfg
,vars.yml
,vault.yml
andhosts
../deployer.sh create-template
You should see:
Config template is copied to host machine directory mapped to /config
-
Configure your upgraded system by editing the
~/autoid-config/vars.yml
,~/autoid-config/hosts
, and~/autoid-config/vault.yml
files on the deployer machine.You must keep your configuration settings consistent from one system to another. -
Run the upgrade on versions 2021.8.0–2021.8.3:
./deployer.sh upgrade
-
On the target server, restore your
/data/conf
configuration file from your previous installation.sudo mv ~/backup-data-conf-2021.8.7 /data/conf
-
Re-apply your analytics settings to your upgraded server if you made changes on your previous Autonomous Identity machine. Log in to Autonomous Identity, navigate to Administration > Analytics Settings, and edit your changes.
-
Log out, and then log back in to Autonomous Identity.
You have successfully upgraded your Autonomous Identity server to 2022.11.0.