Red Hat Training

A Red Hat training course is available for Red Hat Satellite

Chapter 3. Migrating Existing Systems Using The Bootstrap Script

When the transition tooling is not being used to model a Satellite 6 Server based on Satellite 5, a method is needed to migrate existing clients which also supports adding a Puppet configuration to the clients. Clients can be migrated to Satellite 6 using the following bootstrap script method.

The bootstrap script handles content registration, Product certificates, and Puppet configuration. The method using the rhn-migrate-classic-to-rhsm script does not configure Puppet, which is required for a system in Satellite 6 to be properly subscribed. In addition, the bootstrap script has the advantage of taking a Red Hat Enterprise Linux system, regardless of where it is registered (RHN, Satellite 5, SAM, RHSM), or if it is registered at all, and properly subscribe it to Satellite 6.

The bootstrap script package, katello-client-bootstrap, is installed by default on the Satellite Server’s base system and the script itself is installed in the /var/www/html/pub/ directory to make it available to clients. It can be accessed using a URL in the following form:

satellite6.example.com/pub/bootstrap.py

The script includes documentation in a readme file. To view the file:

$ less /usr/share/doc/katello-client-bootstrap-version/README.md

Installing the Bootstrap Script on a Client

As the script is only required once, and only for the root user, you can place it in /root and remove it after use, or place it in /usr/local/sbin. This example will use /root.

As root, install the bootstrap script on client systems as follows:

  1. Ensure you are in the correct directory. For example, to change to /root:

    # cd
  2. Download the script:

    # wget http://satellite6.example.com/pub/bootstrap.py

    This will install the script to the current directory.

  3. Make the script executable:

    # chmod +x bootstrap.py
  4. To confirm that the script can now be run, view the usage statement as follows:

    # ./bootstrap.py -h
  5. Optionally, when the transition process is complete, remove the script:

    # cd
    # rm bootstrap.py

Migrating a Red Hat Enterprise Linux 6 System

Prerequisites:

  • The bootstrap script is installed as described previously;
  • You have an activation key from the Satellite 6 Server. See Section 4.6.5, “Importing Activation Keys”.

    1. Enter the bootstrap command as follows with values suitable for your environment.

      For the -s, --server option specify the FQDN name of the Capsule; in this example the integrated Capsule is being used so the URL is the FQDN of the Satellite. For options such as location, organization, and host group, use quoted names, not labels, as arguments to the options:

      # bootstrap.py --login=admin \
      --server satellite6.example.com \
      --location="Example Location" \
      --organization="Example Organization" \
      --hostgroup="Example Host Group" \
      --activationkey=activation_key

      The script will prompt you for the password corresponding to the Satellite user name you entered with the -l, --login option. As a result, it will run and send notices of progress to stdout. Watch for output prompting you to approve the certificate. For example:

      [NOTIFICATION], [2016-04-26 10:16:00], [Visit the UI and approve this certificate via Infrastructure->Capsules]
      [NOTIFICATION], [2016-04-26 10:16:00], [if auto-signing is disabled]
      [RUNNING], [2016-04-26 10:16:00], [/usr/bin/puppet agent --test --noop --tags no_such_tag --waitforcert 10]

      The client will wait indefinitely until an administrator approves the Puppet certificate.

    2. Sign the Pupper certificate as follows:

      1. In the web UI, navigate to Infrastructure > Capsules.
      2. Select Certificates to the right of the name of the Capsule corresponding to the FQDN given with the -s, --server option.
      3. In the Actions column select Sign to approve the client’s Puppet certificate.
      4. Return to the guest to see the remainder of the bootstrap process completing.
    3. In the web UI, navigate to Hosts > All hosts and ensure that the client is connected to the correct host group.