Showing posts with label Satellite. Show all posts
Showing posts with label Satellite. Show all posts

Wednesday, January 27, 2016

How to integrate Red Hat Satellite with VMWare (ESX)



You can integrate Red Hat Satellite with VMWare ESX Hypervisor so that you can just use one license "Red Hat Enterprise Linux for Virtual Datacenters, Standard" per ESX.

Here is the procedure to make your satellite talk to ESX hypervisor to retrive the UUIDs


1. Register a VMWare based Linux server on Satellite

2. Install virt-who package

# yum install virt-who

3. Add the following lines onto /etc/sysconfig/virt-who


4. Enable and restart virt-who service

# chconfig virt-who on

# service virt-who restart

5. Now virt-who will populate all your hypervisors on RedHat satellite webUI.

6. Go to Content > Content host. Here you will find some systems with UUID. These are all hypervisors reported by your virt-who service.

7. Select a hypervisor > Subscription > Add > Select virtual datacenter subscription. > attach.
Follow this step for all hypervisors available on web UI.

8. Now on your virt-who server execute the following command to list out the hypervisors inherited virtual datacenter subscription.
This subscription contains the pool id. Note down this pool id.

# subscription-manager list --available

9. Now subscribe your system

# subscription-manager subscribe --pool=

Friday, December 18, 2015

Daemons used in Satellite 6.1

Here are some daemons used in Satellite 6.1.

MongoDB - Database used by Pulp.

To Manage on RHEL6:
# chkconfig mongod on
# service mongod start

To Manage on RHEL7:
# systemctl enable mongod
# systemctl start mongod


Qpid - Message bus used by Pulp.

To Manage on RHEL6:
# chkconfig qpidd on
# service qpidd start

To Manage on RHEL7:
# systemctl enable qpidd
# systemctl start qpidd


Apache - Web Server

To Manage on RHEL6:
# chkconfig httpd on
# service httpd start

To Manage on RHEL7:
# systemctl enable httpd
# systemctl start httpd


Pulp Workers -

To Manage on RHEL6:
# chkconfig pulp_workers on
# service pulp_workers start

To Manage on RHEL7:
# systemctl enable pulp_workers
# systemctl start pulp_workers


Pulp Celerybeat -  This process performs a job similar to a cron daemon for Pulp.

Config File:  /etc/default/pulp_celerybeat

To Manage on RHEL6:
# chkconfig pulp_celerybeat on
# service pulp_celerybeat start

To Manage on RHEL7:
# systemctl enable pulp_celerybeat
# systemctl start pulp_celerybeat


Pulp Resource Manager  - This process acts as a task router.

Config File: /etc/default/pulp_resource_manager

To Manage on RHEL6:
# chkconfig pulp_resource_manager on
# service pulp_resource_manager start

To Manage on RHEL7:
# systemctl enable pulp_resource_manager
# systemctl start pulp_resource_manager

Managing Activation Key using Hammer commands

1. To create an activation key,

# hammer activation-key create --name "rhel70ak" \
 --content-view "rhel70cv" --lifecycle-environment Library \
 --organization "MyCompany"

2. To update the release version on an activation key,

# hammer activation-key update --release-version "7Server"  \
 --organization "MyCompany" --name "rhel70ak"

3. To display and find out the ID of the subscriptions available,

# hammer subscription list --organization "MyCompany"

4. To list and find out the ID of the activation keys,

# hammer activation-key list --organization "MyCompany"

5. Attach the subscription to the activation key,

# hammer activation-key add-subscription --id 2 --subscription-id 12

6. To list the subscriptions attached to an activation key,

# hammer activation-key subscriptions --id 2 --organization "MyCompany"

Managing Content views using Hammer commands:


1. To list all the available repositories,

# hammer repository list --organization "MyCompany"

---|-------------------------------------------------------------------|---------------------------------|--------------|---------------------------------------------------------------------------------
ID | NAME                                                              | PRODUCT                         | CONTENT TYPE | URL                                                                            
---|-------------------------------------------------------------------|---------------------------------|--------------|---------------------------------------------------------------------------------
1  | Red Hat Enterprise Linux 7 Server Kickstart x86_64 7.1            | Red Hat Enterprise Linux Server | yum          | https://cdn.redhat.com/content/dist/rhel/server/7/7.1/x86_64/kickstart         
4  | Red Hat Enterprise Linux 7 Server - RH Common RPMs x86_64 7Server | Red Hat Enterprise Linux Server | yum          | https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/rh-common/os  
2  | Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server             | Red Hat Enterprise Linux Server | yum          | https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/os            
3  | Red Hat Satellite Tools 6.1 for RHEL 7 Server RPMs x86_64         | Red Hat Enterprise Linux Server | yum          | https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/sat-tools/6....
---|-------------------------------------------------------------------|---------------------------------|--------------|---------------------------------------------------------------------------------

2. To create a content view,.

# hammer content-view create --name "rhel70cv" \
 --description "RHEL 7.0 Content View" --organization "MyCompany"

3. To add the required repositories to the content view,

# hammer content-view update --repository-ids 4,2,3 --name "rhel70cv" --organization "MyCompany"

4. Publish the content view so that its contents are locked,

# hammer content-view publish --name "rhel70cv" --organization "MyCompany"

Basic configuration of Satelite 6.1 using Hammer commands

Introduction:
Hammer is the Satellite 6's command line tool.
You can use hammer to manage entities in Satellite instead of using GUI.

To run hammer you need to provide authentication, you can specify the username and password each time,
# hammer -u admin -p

or simple edit /etc/hammer/cli.modules.d/foreman.yml

:foreman:
    :enable_module: true
    :host: 'https://localhost/'
    :username: 'admin'
    :password: ''

If you ever forget the password, you can always reset as below

# foreman-rake permissions:reset
Reset to user: admin, password: qwJxBptxb7Gfcjj5


Here are some basic hammer commands keeping in mind that you have stored the satellite credentials in foreman.ym

1, To create an organization for your Satellite

# hammer organization create  --name "MyCompany"

2. To create a location for your organization

# hammer location create --name "Chennai"

3. To import the manifest that you've downloaded from Redhat site.

# hammer subscription upload --organization "MyCompany" --file /tmp/manifest-file

4. To display all the repository sets available.

# hammer repository-set  list --organization "MyCompany"

5. To enable a repository

# hammer repository-set enable  --organization "MyCompany" \
 --product "Red Hat Enterprise Linux Server" \
 --name "Red Hat Enterprise Linux 7 Server (RPMs)" --releasever "7.0" --basearch "x86_64"

6. To disable a repository

# hammer repository-set disable  --organization "MyCompany" \
 --product "Red Hat Enterprise Linux Server" \
 --name "Red Hat Enterprise Linux 7 Server (RPMs)" --releasever "7.0" --basearch "x86_64"


7. To synchronize a repository

# hammer repository synchronize --product "Red Hat Enterprise Linux Server" \
 --name "Red Hat Enterprise Linux 7 Server (RPMs)" --organization "MyComapany"

Or use the repo id

# hammer repository synchronize --id 1 --organization "MyCompany"

8. Create the Development and Production life cycle environments

# hammer lifecycle-environment create --name "Development" \
--description "Development" --organization "MyCompany" --prior "Library"

# hammer lifecycle-environment create --name "Production" \
--description "Production" --organization "MyCompany" --prior "Development"

Installation of Satellite 6.1 in Redhat Linux

Following procedure will guide you thru the installation of Satellite 6.1 by downloading packages thru Redhat network. 

1. First of all, You need to register the server in Redhat network and then configure proxy for internet connectivity.

Please refer
http://linuxulagam.blogspot.in/2015/12/how-to-register-red-hat-linux-server-in.html

2. Make sure you create the following file systems (space calculation was based on using just RHEL 6 repositories) on the server that is meant for Satellite.

File systems:
/var/lib/pgsql - 2GB
/var/lib/mongodb - 20 GB
/var/lib/pulp - 400GB

3. Enable the repositories requried to download Satellite packages.

# subscription-manager repos --enable rhel-6-server-rpms --enable rhel-server-rhscl-6-rpms --enable rhel-6-server-satellite-6.1-rpms

3. Install Katello (Satellite)

# yum install katello

# katello-installer --katello-proxy-url=http://10.11.12.13 --katello-proxy-port=8081
Installing             -ebug: Coprefix: /unicast                                 [99%] [.............................................................................Installing             Done                                               [100%] [.................................................................................]
  Success!
  * Katello is running at https://myserver.mycompany.net
      Initial credentials are admin / 6VcVnLn5uvzM
  * Capsule is running at https://myserver.mycompany.net:9090
  * To install additional capsule on separate machine continue by running:"

      capsule-certs-generate --capsule-fqdn "$CAPSULE" --certs-tar "~/$CAPSULE-certs.tar"

  The full log is at /var/log/katello-installer/katello-installer.log

4. You need to register the server as satellite in Redhat network by logging into access.redhat.com
or thru the following command

 # subscription-manager register --type=satellite

5. Download the manifest file

6. Do the rest of the configuration like the creation of Organization, Location, import manifest, enable & sync repositories, ...

How to register a Red hat Linux server in Red hat network ?


You need to make sure your server is able to talk to Red hat network thru internet.
For this, you need to add the proxy IP address (provided by your network team) on the file /etc/rhsm/rhsm.conf.

Add the details like proxy ip, port number, user name and password in the file rhsm.conf.

 # vi /etc/rhsm/rhsm.conf
proxy_hostname = x.x.x.x
proxy_port = 8080
proxy_user =
proxy_password =

You may need to add a user name and password for proxy connectivity.
However if the network admin adds your server IP address to the bypass list, then there may be no need to use user name and password for internet connectivity.

Finally you need to register (subscribe) your server in Red hat network.

2. Register the server in Redhat network.
# subscription-manager register --username --password --auto-attach
The system has been registered with id: 2a2334s3-3254-13e3-8r7e-2435324c5e45
Installed Product Current Status:
Product Name:           Red Hat Enterprise Linux Server
Status:                 Subscribed