Pages

Friday, September 19, 2014

Red Hat Satellite 6.0 - Part 4 - Creating a custom repository

In this section of my adventure with Satellite 6, I am going to setup a custom "Product" which will contain a non-Red Hat repository (VM Ware tools).  I've already one of these up for the RHEL 6 servers, so in this example I will be creating a product for RHEL 5 VM Ware tools.

Creating a GPG key
First thing is to create a GPG key. In the satellite 6 web interface, select Content > GPG Keys.

Click +New Gpg Key in the upper right.

Type in a name for the gpg key, I called it "vmware-tools-gpg."  There is a box to copy they key into or you can upload one if you have it downloaded. The one I'm using is from vmware and is located at:

  • http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub
Either download that and upload it through the web interface or just paste it in. Click save. The gpg key should now be showing in the list.

Creating a Product
Click on Content > Products

There is probably already one product listed here from when we selected the RHEL repositories. Click on +New Product in the upper right.

Type in a name for the product, the Label section should automatically fill out. Select the gpg key (not required) and leave the sync plan empty for now. Enter a description if you want to. Click save.
A new product has been created! Now, a repository has to be added to the product so it will actually do something. On the product page, click on Create Repository.

Type in a name, the label should fill out by itself. Select yum for a type. In the URL section, put the URL of the repository you wish to sync. In this example, I am syncing VM Ware tools. The url is this:
  • RHEL 5
    • http://packages.vmware.com/tools/esx/5.5latest/rhel5/x86_64/
  • RHEL 6
    • http://packages.vmware.com/tools/esx/5.5latest/rhel6/x86_64/
Select the GPG key created for the product (optional). Click save when done.

Click on Sync Now to sync the repository. This will download the VM Ware tools to the Satellite.


Packages should start syncing. A details page will show itself and will present sync status as well as how many packages it found. This particular repository did not take very much time to sync.



Red Hat Satellite 6.0 - Part 3 - Syncing Repositories

In part 3 of my adventure into installing Red Hat Satellite 6, I am going to be selecting and syncing official Red Hat package repositories.

Selecting Repositories
After logging into the Satellite web interface and making sure your organization is selected, we can start getting some packages sync'd up.  Click on Content > Red Hat Repositories
A list of products should appear.  This list populates based upon the manifest and subscriptions you have attached to the Satellite. If something is missing, you will have to go back to the RH customer portal, make sure the subscription is attached to the satellite and redownload / reimport the manifest.

My environment is RHEL 5 and RHEL 6, so I'm going to be syncing those repositories. A fun new feature of sat 6 is that specific release levels of RHEL can be selected like RHEL 6.4, 5.3 or whatever. In satellite 5, it was very difficult to do this kind of thing to stay compliant with vendor support requirements and security patches.

I'm running RHEL 6.5 and 5.10, so I'm going to sync just those repositories. I think that selecting "Red Hat Enterprise Linux 6 Server RPMs x86_64 6Server" is the latest repository. Since I don't want my systems to start getting RHEL 6.6 stuff when it is released, I'm going to select the following repos to make sure my servers stay at the release level I want them to stay at.
  • Red Hat Enterprise Linux 6 Server RPMs x86_64 6.5
  • Red Hat Enterprise Linux 6 Server Kickstart x86_64 6.5
  • RHN Tools for Red Hat Enterprise Linux 6 Server RPMs x86_64 6.5
  • Red Hat Enterprise Linux 5 Server Kickstart x86_64 5.10
  • Red Hat Enterprise Linux 5 Server RPMs x86_64 5.10
  • RHN Tools for Red Hat Enterprise Linux 5 Server RPMs x86_64 5.10
I can always come back here and select other repositories to sync to my organization, but I think this should get me most of what I need for now.

Synchronizing Repositories
In Satellite 5, channels were sync'd by running commands on the command line and then putting those commands into cron jobs so new packages would get downloaded.  However, in Satellite 6, that is no longer the case. Click on Content > Sync Status.
The sync status page should appear. The repositories which were selected before will be listed here.

Selecting repositories and clicking Synchronize Now will start to download packages from Red Hat to the Satellite server. You can click "select all" on the top or do each one separately. The initial sync is going to take a long time for each repository, so I'm going to do one at a time. The page will give you a cool status bar showing progress when clicking the button. Time to go do some other work for a while.

In part 4, I will attempt to create a repository to get the latest VM Ware tools for ESX 5.5 right from VM Ware so I can manage VM Ware tools from the satellite instead of having to go through the vsphere console and manually updating everything.

Thursday, September 18, 2014

Red Hat Satellite 6.0 - Part 2 - Attaching Subscriptions

In Red Hat Satellite 6 - Part 1, I went through the process of installing Red Hat Satellite 6 and getting it to the point of continuing the configuration from the web interface.  Part 2 will cover initial configuration of the satellite. Keep in mind I've never done this before and I'm just documenting my steps, failures and lessons learned for all to read.

Logging in
Browse to https://servername in your favorite browser. After accepting the self signed certificate, you should get the fancy new satellite 6 logon page. Login with admin and the password which was given to you in the console after running the install process.









Configuring an organization
Satellite 6 seems to do a lot more with "organizations" and "locations" than Sat 5 did.  So, my first thing I'm going to do in the new installation is rename the default organization to what I want my organization to be called. Click on Any Context > Manage organizations.


On the Organizations screen, there will be a "Default_Organization" already created.  Click the edit button on the right. On the edit Default_Organization screen, type in the name of your company or group. Scroll down and click submit.

Generating a manifest
Now that we have defined an organization, we can import the licenses from the customer portal so we can start syncing repositories and adding systems.  Log into the Red Hat customer portal with the account that has all of your RHEL licenses attached to it.

First, we have to create a new subscription manager application. Click on subscriptions, subscription management, subscription management applications. Once there, click on "Register a subscription management application"

Select Satellite for the type from the drop down list. Type in the name of your satellite server. Select Satellite 6.0 from the drop down list and press register.
The satellite entry should show up in the table now. Click on the server name. On the next page, click on "Attach a Subscription."  A window should open up that lists all of your available RHEL subscriptions. Select each one which you want your satellite to manage and click Add on the bottom.

After attaching the subscriptions to the satellite, we have to download the manifest so it can be uploaded to the satellite server. Click on Download Manifest in the upper right corner. A zip file should start downloading.

Attach the Manifest to the Satellite
Once the manifest is downloaded, it has to be uploaded to the satellite server.  In the satellite web interface, make sure you have your organization selected and not "Any Context." To do this, click on "Any Context" and select your organization. Performing this step will ensure your subscriptions will be available to servers which are added to the organization.

Click on Content and then Red Hat Subscriptions
Click the Choose File button and select your downloaded manifest file.
Click on upload. After a couple moments, all of your subscriptions should show up in the left window pane.

That is it for part 2. In part 3 I will start syncing some repositories. 



Red Hat Satellite 6.0 - Part 1 - Installation

Red Hat Satellite 6 was released last week and it has a lot of cool stuff that I want to get implemented in my environment. In this post I will attempt to document my installation of Sat 6.  I will make a new post for my migration from Sat 5 to 6.  I am following along the doc located at the official documentation.

I decided to live on the edge and try to deploy with RHEL 7 instead of 6. Much learning will have had! Also note, all commands in this guide are ran as root from a root shell.

Server specifications I'm using:
OS: RHEL 7
Hardware: VMWare 5.5
CPU: 4 cpu single socket
RAM: 8 GB
Disk: /boot 500 MB, / 30 GB, /var/lib/mongodb 50 GB, /var/lib/pulp 200 GB.

RHEL 7 Installation
For the installation, I didn't do anything special. Selected minimal install for packages and manually setup my partitions. The most important part is to make sure you have enough disk for the internal database and for all the repositories.  Some guy on the internet said that he had RHEL 6,7 and openstack repositories sync'd, his DB was 10 gig and his repositories were 65 gig.

In sat5, /var/satellite was where all the repositories were stored, in sat6, they are located in /var/lib/pulp. The satellite mongo database is in /var/lib/mongodb.  

Attach the server to a valid RHEL license using the subscription-manager command. Update all packages and reboot since there is probably a kernel update.  You will also need to attach to a Satellite license of some kind.

Satellite Installation
After installation and patching, I made sure all repositories accept the ones necessary are enabled.

  • subscription-manager repos --disable "*"
  • subscription-manager repos --enable rhel-7-server-rpms --enable rhel-server-rhscl-7-rpms --enable rhel-7-server-satellite-6.0-rpms
Install Satellite 
  • yum install katello
If it comes back and says that katello is not found, then you either don't have the correct repositories selected or the wrong subscription attached to the system. 

Run the Satellite installer
  • katello-installer
This process takes a while to run. Use this time to add a DNS A record for the server or even a CNAME if you want to get fancy if you have not already done so.  When the installer is complete, it will tell you what the admin password is for the satellite web page. If you forget what the password is, run this command and it will generate a new one.

  • foreman-rake permissions:reset
Also, disable the firewall so you can actually get to the page. If you want to keep the firewall on, refer to the official doc on which ports to keep open.
  • systemctl stop firewalld
We're now ready to log onto the Satellite management webpage.