Creating and Restoring a Selective System Image Using Red Hat Network Satellite

Creating and Restoring a Selective System Image Using

Red Hat Network Satellite

Table of Contents

Requirements...................................................................................................3

Prepare the Client System...............................................................................3

Review System Content .............................................................................3

Create the Image on the Satellite.....................................................................3

Create a Configuration Channel on the Satellte..........................................3

Populate the Configuration Channel............................................................4

Clone the Client's Channels........................................................................4

Create an Activation Key for the Client........................................................5

Preserve any other files...............................................................................5

Create a Kickstart Distribution.....................................................................5

Create Kickstart Profile ...............................................................................6

Applying the Image to the Client System .........................................................6

Conclusion ......................................................................................................7

Appendix – Using Snapshots...........................................................................7

Appendix – Useful Documentation...................................................................8

Creating and Restoring a Selective System Image Using Red Hat Network Satellite 2

Requirements

This configuration requires a RHN Satellite Server, version 4.0 or newer, and a

Red Hat Enterprise Linux 2.1 or newer client. Hardware and software

requirements are discussed in the RHN Satellite Server Installation Guide and

the RHN Reference Guide. The instructions below require that the client

system have a Provisioning entitlement.

Prepare the Client System

The instructions that follow assume that the Red Hat Enterprise Linux client is

already registered to the RHN Satellite, including the installation of the

appropriate SSL certificate and your organization's GPG key.

The client does not need to be configured to accept configuration file

deployment or remote commands prior to the creation of the selective image.

However, the process of applying the image will prepare the client for these

activities.

Review System Content

Take a moment to note the configuration and any custom software you wish to

preserve as part of the system image. These files will be uploaded to the

Satellite in later steps. Please note that any file not specifically uploaded to the

Satellite will be overwritten

during the Kickstart process.

Create the Image on the Satellite

The following process assumes that this client image must be available to

multiple machines for either disaster recovery or in order to match corporate

policy. It is possible to create a system image that can only be applied to a

specific system, but this is not discussed in this paper.

Create a Configuration Channel on the Satellite

1. Login to the Satellite's web interface as a Channel Administrator or the

Organization Administrator.

2. Navigate to the Channels tab, followed by the Manage Config Channels

page from the left navigation bar.

3. Click the "create new configuration channel" link in the upper right of the

page and follow the onscreen

instructions to complete creation of the

channel. Be sure to name the channel something that clearly indicates that

it is part of the system image.

4. Click the Create Channel button on the bottom of the screen

Creating and Restoring a Selective System Image Using Red Hat Network Satellite 3

Populate the Configuration Channel

When uploading configuration files, it is important to include the absolute path

along which the file will be deployed.

1. Log in to the web interface of the Satellite as either a Channel Administrator

or the Organization Administrator

2. Navigate to the Channels tab, followed by the Manage Config Channels

page from the left navigation bar.

3. Click on the name of the configuration channel into which you wish to upload

the configuration files; choose the channel you created in the previous step.

4. From the Config Channel Details page, select the Files & Dirs subtab,

followed by the Upload subtab.

5. Populate all fields of this page. Browse to the configuration file on the

system and click the Upload File button. Note that files over 128KB cannot

be uploaded via the website.

Note: You must have ownership or read/write permissions for the file you

are uploading, or the operation fails.

6. Repeat this process for each configuration file you require for your image.

Clone the Client's Channels

To be certain that you are applying the exact packages and errata that are

currently on your client system, you must freeze the contents of the software

channel in its current state. The easiest way to accomplish this is to clone the

channel to which your client is currently subscribed. When you do so, be

certain to include all errata that have been applied to that system; the easiest

way to do this is to run up2date on that system before cloning the channel.

1. Navigate to the Channels tab, then select Manage Software Channels

from the left navigation bar. The Software Channel Management page

opens.

2. Click "clone channel" in the top right of the page

3. Identify the target channel in the Clone From dropdown

box.

4. Select Current state of the channel (all errata) from the radio button.

5. Click Create Channel

6. Fill out the Software Channel: New Channel page according to the

instructions on the page. Give the software channel a name that will

indicate to you later for which system and at what time this cloned channel

was created.

7. Click Create Channel

Creating and Restoring a Selective System Image Using Red Hat Network Satellite 4

Now that you've created the channel, it is possible to make any adjustments to

the included packages and errata that are appropriate for this client system.

1. As above, navigate to the Channels tab followed by the Manage Software

Channels page from the left navigation bar.

2. Click on the name of the channel you just created, which takes you to the

Channel Details page.

3. Select the subtabs

listed on this page and make the appropriate

adjustments to the cloned channel.

Create an Activation Key for the Client

Rather than manually subscribing the client to the channels you just created,

create an activation key that automatically registers the client to the proper

channels as soon as the Kickstart has completed.

1. Log in to the web interface of the Satellite as an Activation Key Administrator

or Organization Administrator

2. Navigate to the Systems tab. then select Activation Keys from the left

navigation bar.

3. Click the create new key link at the top right corner

4. Provide all information requested on the page. In the Base Channel field,

select the channel you cloned in the previous step.

5. Select the Provisioning addon

entitlement

6. Click Create Key

7. From the Activation Keys page, click on the name of the key you just

created. From the details page for that key, click on the Configuration subtab.

8. Select the configuration channel you created above and give it a rank of 1.

Select the "Schedule a deploy configuration action ..." check box, and

click the Update button.

Preserve any other files

If there are any other files on the client that must be added to the image on the

Satellite, you must create a software channel to contain those files, package the

files as RPMs, and push those files into the channel using rhnpush. Refer to

the RHN Channel Management Guide for details.

Create a Kickstart Distribution

You must now create a Kickstart distribution that can be used to Kickstart your

client.

Creating and Restoring a Selective System Image Using Red Hat Network Satellite 5

1. Navigate to the Systems tab, followed by the Kickstart page from the left

navigation bar. Finally, select Distributions from the left navigation bar.

2. Select the "create new distribution" link in the upper right of the screen.

3. Follow the onscreen

instructions to complete the fields on the resulting

page. From the AutoKickstart RPM dropdown box, choose the RPM that

matches the base channel from which you cloned the client's software

channel. This will ensure that the Kickstart only installs the initial packages

that match this release. Be certain that you choose the RPM that indicates

the correct Update at the end of its label (such as ­u2

for an Update 2 RPM).

4. Choose the software channel you created as the base channel for the

distribution.

5. Click the Create button in the lower right of the screen.

Create Kickstart Profile

The Kickstart profile contains all of the instructions that register the system, use

activation keys to subscribe the system to the channels created above, and

deploy the configuration files added to the configuration channel.

1. Log in to the Satellite's web interface as either the Provisioning

Administrator or the Organization Administrator.

2. Navigate to the Systems tab, followed by the Kickstart page from the left

navigation bar.

3. Click the "create new Kickstart" link in the top right of the screen. On the

resulting page, select the distribution you created for your client, enter a

name and label for the profile and select whether the profile should be

immediately activated. Click the Select Kickstart Options button.

4. Enter values for the bootloader type, time zone, Kickstart network

configuration, root password, and partition details.

5. Click the Create Kickstart button when finished.

Further details must be added to the Kickstart profile.

1. Click on the name of the Kickstart profile you just created.

2. Select the Post subtab.

This takes you to the Details subtab.

Choose to

include the Activation Key you created earlier.

3. Check the box labeled "Enable Configuration Management"

4. Click the Update Post button to save your changes.

Applying the Image to the Client System

Now that you have successfully created the infrastructure to apply your image,

Creating and Restoring a Selective System Image Using Red Hat Network Satellite 6

it is now easy to do so. Please note that when this image is applied any files

that are not part of the software or configuration channels created in the

previous section of this document will be permanently deleted.

1. Log in to the Satellite's web interface as a System Group Administrator, a

Provisioning Administrator, or the Organization Administrator.

2. Navigate to the Systems page. Select the machine or machines to which

you would like to apply the image and click the Update List button at the

bottom of the screen.

3. Navigate to the System Set Manager page from the left navigation bar.

From the resulting page, navigate to the Provisioning page, followed by the

Kickstart page.

4. On the Kickstart page, select the profile that was created in the previous

section. Click the Schedule Kickstart button and confirm your decision to

reboot and reinstall the systems.

The systems will be reinstalled with fresh installations of the software channel

you selected. They will also: register with the Satellite, subscribe to both the

software and configuration channels created above, and receive the

configuration files previously uploaded.

Conclusion

Careful preparation of a client image on a Red Hat Network Satellite can result

in easy system cloning or disaster recovery. Nearly any file or package on a

system can be uploaded to a custom channel, then automatically downloaded

to the restored system.

Appendix – Using Snapshots

There is a simpler way to return a client system to a previous state at any time

– system snapshots. Using snapshots avoids the necessity of creating custom

channels, uploading files, or Kickstarting the system. However, snapshots

cannot assist in disaster recovery, nor can they be used to revert any files not

managed via the Satellite. The client system must have a Provisioning

entitlement in order to use snapshots.

Any time the Satellite performs an action on the client system, that action is

recorded as part of its system details. Each of these actions can then be

incrementally rolled back to any given point in time. Because distinguishing

between these actions can be difficult, RHN provides the ability to tag these

snapshots, so that you can easily choose the point to which you wish to revert.

To view the snapshots for a specific system:

1. Log in as the system's administrator or the Organization Administrator.

Creating and Restoring a Selective System Image Using Red Hat Network Satellite 7

2. Navigate to the Systems tab and click on the appropriate system name.

3. On the System Details page, select the Snapshots subtab.

4. To roll back changes to the system, click the name of the last change you

wish to revert. The following page shows the changes that will be reverted if

you choose to roll back to this snapshot. When you are satisfied that these

are the changes you wish to revert, select the Rollback tab and click

"Rollback to Snapshot".

To tag the most recent snapshot:

1. Navigate to the Snapshots page for the system in question

2. Click on the Snapshot Tags subtab,

then the "create new snapshot tag"

link in the upper right of the screen

3. Enter a descriptive name for this change and click the Tag Current

Snapshot button

You can also tag previous snapshots. To do so:

1. From the Snapshots page of the system in question, click on the snapshot

you wish to tag

2. Select the Snapshot Tags subtab

(this is a separate tab from the

Snapshot Tags tab for the current snapshot.)

3. Click the "create new snapshot tag" link in the upper right of the screen

4. Enter a descriptive name for this change and click the Tag Current

Snapshot button

Appendix – Useful Documentation

RHN Satellite Server Installation Guide

https://rhn.redhat.com/rhn/help/satellite/index.jsp

RHN Channel Management Guide

https://rhn.redhat.com/rhn/help/channelmgmt/

Red Hat Network Reference Guide

https://rhn.redhat.com/rh/help/reference/index.jsp

Red Hat Knowledgebase

http://kbase.redhat.com

Post a Comment

You might also like :

Related Posts with Thumbnails