4. Installing Subscription Asset Manager

Subscription Asset Manager is included as part of a subscription to Red Hat Enterprise Linux. Subscription Asset Manager allows local administration of subscriptions and allows a stronger organization structure to be created to define machines, groups, and content streams.
Subscription Asset Manager is configured through a setup script which can use simple defaults for all settings or allow environment-specific customization.

4.1. Prerequisites

The machine on which Subscription Asset Manager 1.4 is installed must meet these requirements:
  • Red Hat Enterprise Linux 6.5 Server, 64-bit

    Important

    Subscription Asset Manager 1.4cannot be installed on Red Hat Enterprise Linux 7. While Subscription Asset Manager does support Red Hat Enterprise Linux 7 client connection and management, installation of Subscription Asset Manager on Red Hat Enterprise Linux 7 servers is not supported.
  • OpenJDK 1.7
  • A minimum of 1.5GB RAM.
  • A minimum of 1GB of memory must be swap-enabled.
  • The Subscription Asset Manager hostname must be fully resolvable in DNS. Both servers and any client systems must be able to resolve the Subscription Asset Manager hostname for authentication operations and other management tasks.
  • Ports 443 and 8088 for HTTPS (secure HTTP) must be open.
  • For enhanced reporting. An additional 4 GB disk space.

4.2. Installing Using yum

  1. Register the host system. Use the --autoattach option to attach the required subscriptions for the operating system immediately.
    
    [root@server ~]# subscription-manager register --autoattach
       Username: jsmith@example.com
       Password:
    
  2. Wait several minutes for the updated content repositories to be added to the system configuration.
  3. Enable the [rhel-6-server-sam-rpms] repository.
    
    [root@server ~]# yum-config-manager --enable rhel-6-server-sam-rpms
    Loaded plugins: product-id, refresh-packagekit
    ========================= repo: rhel-6-server-sam-rpms =========================
    [rhel-6-server-sam-rpms]
    bandwidth = 0
    base_persistdir = /var/lib/yum/repos/x86_64/6Server
    baseurl = https://cdn.redhat.com/content/dist/rhel/server/6/6Server/x86_64/subscription-asset-manager/1/os
    cache = 0
    cachedir = /var/cache/yum/x86_64/6Server/rhel-6-server-sam-rpms
    cost = 1000
    enabled = 1
    enablegroups = True
    exclude =
    failovermethod = priority
    ...
    
  4. Install the katello-headpin-all package using yum install:
    [root@server ~]# yum install -y katello-headpin-all
    
  5. After installing the packages, run the Subscription Asset Manager configuration script, katello-configure.
    The only required parameter for the basic installation is the deployment type, which is sam.
    While not required, it is useful to specify an initial organization name for your deployment. If this is not set, then the first organization has a default name of ACME_Corporation.
    This sets up the Subscription Asset Manager instance with the default user and database settings.
    
    [root@server ~]# katello-configure --deployment=sam --org=Example_Org --user-pass=admin
       Starting Katello configuration
       The top-level log file is
       [/var/log/katello/katello-configure-20130904-210539/main.log]
    

4.3. Upgrading

4.3.1. Required Upgrades

A new model of pricing and counting subscriptions conincident with the Subscription Asset Manager 1.4 release. Subscription Asset Manager 1.4 (and updated Red Hat Subscription Manager) can properly parse and apply these updated subscriptions as well as the former subscription structure. Older versions of Subscription Asset Manager cannot.

Important

If any subscriptions will be purchased after October 1, 2013, those subscriptions will use the new instance-based model. All Subscription Asset Manager servers must be upgraded to verion 1.4 in order to use those new subscriptions. Older versions of Subscription Asset Manager are not compatible with the new instance-based subscriptions.
Additionally, it is strongly recommended that the local Red Hat Subscription Manager packages be updated on all local systems in order to use the new instance-based subscriptions.
The upgrade process requires backing up Subscription Asset Manager and its databases and managing indexes, along with updating packages. The full upgrade procedure is covered in the Using Subscription Asset Manager guide in the subscription documentation set.

4.3.2. Upgrading Subscription Asset Manager

  1. Back up the Subscription Asset Manager instance before beginning the upgrade procedure. This requires backing up all of the configuration files and dumping the backend Postgres database. The default database names are katelloschema and candlepin.
  2. Stop all Subscription Asset Manager services:
    [root@server]# katello-service stop
    
    If the katello-service command is not available, then stop the associated services manually:
    
    [root@server]# service katello stop 
    [root@server]# service katello-jobs stop 
    [root@server]# service httpd stop 
    [root@server]# service tomcat6 stop 
    [root@server]# service elasticsearch stop
    

    Important

    Do not turn off the postgresql service.
  3. Flush the indexes.
    1. Start the Elasticsearch service:
      # service elasticsearch start
      
    2. Flush the indexes:
      # curl localhost:9200/_flush
      
    3. Stop the Elasticsearch service:
      # service elasticsearch stop
      
  4. Upgrade the Subscription Asset Manager packages with yum:
    [root@server]# yum upgrade
    
  5. yum avoids overwriting the current Subscription Asset Manager configuration by creating a set of .rpmnew and .rpmsave files. Check these files against the existing configuration for any new changes.
    For a list of configuration files, run the following command:
    
    [root@server]# rpm -ql katello-configure | grep erb | grep etc | sed \
    's/.*etc/\/etc/' | sed 's/\.erb//'
    
    For a list of .rpmnew files, run the following command:
    [root@server]# find /etc -name *rpmnew
    
  6. Upgrade Subscription Asset Manager using the upgrade script.
    [root@server]# katello-upgrade
    
    The upgrade script prompts for confirmation for each part of the upgrade process. For example:
    
    1/1: Update Candlepin (0003_update_candlepin.sh)
     Updates Candlepin database schema to the latest version
     Do you want to proceed? (y/n): y
     Update Candlepin OK.
    
  7. Run katello-configure to correct any configuration files and analyze log output for errors.
    [root@server]# katello-configure
    

    Note

    In some cases, the configuration process is not finished after running katello-configure once. You will need to run katello-configure again to finish the configuration process. You can safely run katello-configure as many times as required to finish the configuration process, but twice is usually sufficient.
  8. Start the Subscription Asset Manager server:
    [root@server]# katello-service start
    
  9. Test the Subscription Asset Manager server:
    
    [root@server]# katello-service status
    [root@server]# katello -u admin -p [PASSWORD] ping
    
  10. Update the port settings on every Subscription Asset Manager agent system.
    The QPIDD port changed from 5674 to 5671 after Subscription Asset Manager 1.1. All systems connecting to Subscription Asset Manager using katello-agent must be updated to use port 5671.
    1. Upgrade your system to the latest version of katello-agent and goferd.
    2. Open the Katello plug-in configuration file:
      [root@server]# vim /etc/gofer/plugins/katelloplugin.conf
      
    3. Edit the url line to change port number.
      url=ssl://$(host):5671
    4. Restart the katello-agent and goferd services.
    5. Open port 5671 on your Subscription Asset Manager firewall. For example, add the following rule to iptables:
      -A INPUT -p tcp -m state --state NEW -m tcp --dport 5671 -j ACCEPT