Skip to content

AlexxNica/satellite-clone

 
 

Repository files navigation

Satellite-clone

Satellite-clone contains simple Ansible playbooks that can be used to setup a Satellite 6.1 or 6.2 install with restored backup data.

Getting Started

What you need:

to clone a Satellite Server:

  • A blank (vanilla install) RHEL 7 server. You will run the setup commands here.
  • A backup from a 6.1 or 6.2 Satellite server created with katello-backup. This backup can be with or without pulp-data, and can be from a RHEL 6 or 7 machine.
  • You will need a Satellite 6 subscription for the cloned machine. There are options for obtaining subscriptions at a discounted rate for smaller environments. If you would like to handle the registration of the system manually, set register_to_portal: false in satellite-clone-vars.yml

Setup

  1. git clone this project.

      # git clone https://github.com/RedHatSatellite/satellite-clone.git
  2. Install ansible package on the server. Ansible should be installed from extras channel.

      # subscription-manager repos --enable rhel-7-server-extras-rpms
      # yum install -y ansible

Now you can proceed to performing the clone:

Please check our FAQ section for frequently asked questions.

Development

To make a contribution, please fork the repository and open up a pull request with your branch. All pull requests need to have a corresponding issue, you can comment the issue that your are fixing by putting Fixes #302 (where 302 is the issue number) in the commit message. If there is no issue yet for your problem, just open one up! Community issues and contributions are always appreciated.

Testing is automated and can be run by commenting yee-haw on a pull request.

Fact caching

In order to have the functionality of start-at-task and interactive mode, we cache facts so they can be re-used if someone wants to start the playbook at a certain step. The syntax for this looks something like:

- name: Check for config tar file
  stat:
    path: '{{ backup_dir }}/config_files.tar.gz'
    get_checksum: False
    get_md5: False
  register: config_data

- name: set fact - config_data
  set_fact:
    clone_config_data_exists: "{{ config_data.stat.exists }}"
    cacheable: True

Any variable-type data should be stored as a fact and made cacheable. Note that cacheable: True should be set for every fact.

About

Utility to assist cloning an existing Satellite 6 server to a new host

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 77.0%
  • Ruby 18.5%
  • Shell 4.5%