- It is recommended that the target server is network isolated. We take steps to disable communication from the target server to existing capsules and hosts, but the only way to ensure this is in an isolated environment.
- You can choose to perform a clone without a pulp_data.tar file. After the clone run without pulp content, you have two options:
- To recover pulp content after the cloning process, follow these steps.
- If you are cloning just for testing purposes, you can get away with not using pulp data at all. The target server should still be functional other than the pulp content.
- If your storage is slow (like NFS) and your pulp backup tar file is large (>100 gb), you might see memory errors while untaring pulp data during the playbook run. In this case, don't include pulp_data.tar during the cloning process.
- The playbook will update the target server's hostname to match the hostname of the source server.
- The target server will have the same Y version of the source server. For example, if your source server is Satellite version 6.2, your target server will have version 6.2 as well.
- The playbook will reset the admin password of the target server to "changeme".
- On the target server, refreshing the manifest will invalidate the source server's manifest.
- DHCP, DNS, TFTP, and IPA authentication will be disabled during the install to avoid configuration errors. If you want to use provisioning on the target server, you will have to manually re-enable these settings after the playbook run.
- If you are using Remote Execution, you will have to re-copy the ssh keys to your clients. The keys are regenerate during the install portion of the clone process.
- On the target server, the capsules will be unassociated with Lifecycle environments to avoid any interference with existing infrastructure. Instructions to reverse these changes can be found in
logs/reassociate_capsules.txt
under Satellite Clone's root directory
- You can clone RHEL 6 backup data to a RHEL 7 machine. In this case, you must update the variable
rhel_migration
totrue
as explained later in this document. - The migration scenario is supported only for Satellite 6.2. If you have a RHEL6 Satellite 6.1 server and want to migrate to RHEL7, then perform the following steps:
- Upgrade RHEL6 Satellite 6.1 to RHEL6 Satellite 6.2.latest using the normal upgrade process.
- Use this clone tool (also shipped with Satellite 6.2) to migrate from RHEL6 Satellite 6.2.latest to RHEL 7 Satellite 6.2.latest.
- Upgrade RHEL7 Satellite 6.2.latest to RHEL7 Satellite 6.3.latest using the foreman-maintain (also shipped with Satellite 6.3) tool.
Note: This step is not required if you used pulp_data.tar during cloning process.
-
Use clone tool to clone/migrate from source server to the target server.
-
Stop katello-service on the target server:
katello-service stop
-
Copy
/var/lib/pulp
from source server to the target server. On the source server:# rsync -aPz /var/lib/pulp/ target_server:/var/lib/pulp/
Note:
- This command may take a while to complete in case of large data.
- If you find issues in Satellite content syncing post rsync command, verify the contents of
/var/lib/pulp
on the target server.
-
Start katello-service on the target server:
katello-service start
This workflow will help transition your environment from a current working Satellite to a new cloned Satellite.
- Backup the source server.
- Clone/Migrate the source server (RHEL6 Satellite 6.2.latest) server to the target server (RHEL7 Satellite 6.2.latest).
- Shut down the source server.
- Update network configuration on the target server, (e.g., DNS) to match the target server’s IP address with its new host name.
- Restart goferd in Content hosts and capsules to refresh the connection.
- Test the new target server.
- Decommission the source server.
-
You will need files from a katello-backup (
katello-backup
on theSatellite server
). Required backup files:- Standard backup scenario: config_files.tar.gz, mongo_data.tar.gz, pgsql_data.tar.gz, (optional) pulp_data.tar
- Online backup or RHEL 6 to 7 migration scenario: config_files.tar.gz, mongo_dump folder, foreman.dump, candlepin.dump, (optional) pulp_data.tar
- For Satellite 6.3+ backups, you will need the metadata.yml file from the backup as well as the other required files.
-
The target server must have capacity to store the backup files, which the source server transfers to the target server, and the backup files when they are restored.
On the target server:
-
Create file
satellite-clone-vars.yml
(by copyingsatellite-clone-vars.sample.yml
found in the root of the project) and update the required variables.# cp satellite-clone-vars.sample.yml satellite-clone-vars.yml
-
Place the backup files in
/backup
folder. If using a different folder, updatebackup_dir
variable insatellite-clone-vars.yml
. -
If you are cloning RHEL 6 backup data to a RHEL 7 machine, update the variable
rhel_migration
to true insatellite-clone-vars.yml
. -
You are required to register and subscribe the blank machine to Red Hat portal to get content for the Satellite installation. Alternatively, to let the clone tool register to Red Hat portal, you can override
register_to_portal
totrue
and updateactivationkey
,org
variables insatellite-clone-vars.yml
. -
It is assumed that you have access to the required repositories for Satellite installation. If using custom repositories for Satellite installation, override
enable_repos
tofalse
insatellite-clone-vars.yml
. -
Run the ansible playbook from the root directory of this project:
# ansible-playbook satellite-clone-playbook.yml
The playbook run may may take a while to complete.