Patching RHEL 7 VMware Template using Satellite

Latest response

Hello,

I have an idea of how I want to do this, but I would like to make sure i'm not off to left field so to speak?

My situation: We have a disconnected web server that we use as a repo server. We export repos from CDN and import the content there. Our RHEL 7 VM templates are config'd to point to the web server to get yum content.

Moving forward we are deploying Satellite to essentially replace the repo server so we can start leveraging features within Satellite. To start, we want to use Satellite to patch our RHEL boxes. Later we want to look at day to day configuration mgmt tasks to support our boxes.

Anyways, we have a RHEL 7 VMware template (Side info; not sure if this is important: I have a local RHEL 7 ISO and Satellite Tools ISO I exported from Satellite mounted as local yum repos on my template so I can install the katello-agent and have RHEL7 packages available) that we want to keep up to date. Since we will not have the web server anymore, my thought was to install the katello-agent onto the template, register/subscribe it, and update it accordingly. I testing this out and it worked great.

Now that the template has been patched, I need to clean it up so i can convert it back to template. What I thought I would do is keep katello-agent installed but I would unregister the template from Satellite. So I think I would need to run the following before shutting it down:

subscription-manager unsubscribe-all
subscription-manager unregister
subscription-manager clean

So now I shutdown the server and convert it to template. When I deploy (clone it) the machine, it will have a new server name and IP, like it should. At this point, I think all I need to do is subscription-manager register --org "org name here", and provide creds, OR enable auto-attach/subscribe??

Moving forward, when I need to patch the template, I turn it on, register, patch, unregister, turn off.

Would this be a good plan, or am I out to lunch?

Responses

You're missing a key step which is the downloading and installation of the katello-ca-consumer-latest.noarch.rpm which includes the satellite server certificates and updated /etc/rhsm.conf with the correct configuration for what server (satellite or capsule) you are registering the cloned system to

Assuming you account for that , eg install the package in your template, register, update , unregister and remove the rpm, and then after you clone download the rpm from the appropriate capsule or satellite server and install before registration I think you should be good.

Hi Will,

yah I forgot to mention I do install the katello-ca-consumer-latest.noarch.rpm along with katello-agent. So to be clear, I'll need to remove everything you suggested above including the katello-ca...rpm before converting back to a template. Moving forward, whenever I clone my template, i'll need to install katello-ca and the katello-agent package, register, then i'm good to go from a Client joining Satellite...then I would proceed with any other config like host grouping, etc..

Hi Tim,

I would create activation keys, so you can control the subscriptions you want to attach to the VMs.

Regards,

Jan Gerrit

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.