Migration of CJE AWS to an alternative AWS region for a variety or reasons such as geographic or regulatory purposes.
CJE in conjunction with AWS provides a method to migrate a CJE cluster using a combination of CJE and AWS steps.
Then migration process caters for CJE-OC and Master configuration data including job history, it does not however migrate Elastic Search analytics data
- CloudBees Jenkins Enterprise (CJE) - AWS
Access to the current and target AWS regions via the AWS UI or AWS CLI with the ability to create resources.
The target AWS region must have at least the same number of Availabilty Zones as the existing region.
Access to the existing CJE project configuration.
- Elasticsearch Data - Data is not migrated
- Encryption - It is not possible to migrate from a non encrypted installation to a encrypted installation, its is however possible to migrate from an encrypted installation to a target encrypted installation.
- Take a backup of your CJE project
- Take a backup of both the CJE-OC and Masters using CJE-OC Cluster Operations job as a precaution. Use CloudBees Backup plugin.
- Stop all Masters from the UI, this ensures that no jobs are in process and data is migrated.
- Login into AWS console and select the current region.
- From AWS services select ‘EC2’.
- Select ‘Snapshots’ from the left hand side panel under ‘ELASTIC BLOCK STORE’.
- In the filter panel at the top of the screen enter the cluster_name for your current cluster.
- Stop CJE-OC (
dna stop cjoc)
- A number of snapshots will be shown, at least one for CJE-OC and each master, ensure the latest start time for each is later than when the masters were stopped.
- Take a copy of the AWS snapshots, anything with the tag
cloudbees:pse:clusterto the new region, see for detail on how to achieve this EBS Copy Snapshot guide in AWS.
- Tags are not copied to a new region, you must go in and create corresponding tags in the new region, CJE needs the tags
cluster, account, cloudbees:pse:cluster, cloudbees:pse:accountfor the migration, refer to existing region for tag values.
- Create a new cluster (
cje init-project) with the same cluster_name and similar configuration as the previous one, ensuring you specify the new region. You should ensure you edit cluster-init.secrets with the existing
Provided you copied the EBS snapshots earlier, the cluster will boot using your existing data.
- Once the project has been applied and created, login to CJE-OC.
- Check to ensure configuration should be as per the origin region (Masters etc), start masters and ensure that job information and history are available.
- If for any reason the masters do not start or give an error such as “connection off-line, cannot check licence”, select restart on the troublesome master which should resolve the issue.
- Check any backup jobs configured run successfully.
- Ensure snapshots are being created successfully.