How to setup automatic sync on the Red Hat Capsule server?

Solution Verified - Updated

Environment

  • Red Hat Satellite 6
  • Red Hat Capsule 6

Issue

  • How to add a lifecycle environment to the Red Hat Capsule server using hammer command?
  • How to automatically sync the Red Hat Capsule server from Red Hat Satellite?
  • What is the supported or best way to always have 'latest' available on Capsules?
  • Do we need to add Life cycle environment to capsule server?

Resolution

  • To sync the Red Hat Capsule server from the Red Hat Satellite, Lifecycle environment should be added to the Red Hat Capsule server.

  • To add the lifecycle environment to the Red Hat Capsule server, Perform the following procedure:

    1. Log in to the Red Hat Satellite Server CLI as root.

    2. Display a list of all Red Hat Capsule Servers and note the ID:

    # hammer capsule list
    
    1. Using the ID, verify the details of your Red Hat Capsule Server:
    # hammer capsule info --id capsule_id_number
    

    4.Verify the life cycle environments available and note the environment ID:

    # hammer capsule content available-lifecycle-environments --id capsule_id_number
    
    1. If the previous step reveals that available lifecycle environments that need to be added to the Red Hat Capsule Server are not added to the Capsule server, add the life cycle environment to the Red Hat Capsule Server:
    # hammer capsule content add-lifecycle-environment --id capsule_id_number --environment-id environment_id_number
    
    1. Repeat for each life cycle environment you want to add to Red Hat Capsule Server.
  • To synchronize all content from the Satellite Server to the Capsule Server, run the following command:

    # hammer capsule content synchronize --id capsule_id_number
    
  • To synchronize a specific life cycle environment from the Satellite Server to the Capsule Server, run the following command:

    # hammer capsule content synchronize --id external_capsule_id_number --environment-id environment_id_number
    
  • Once the above is done, Whenever a new content view publish/promote is initiated for the added lifecycle environment, a capsule sync task will be triggered automatically.

For more KB articles/solutions related to Red Hat Satellite 6.x Capsule Sync Issues, please refer to the Consolidated Troubleshooting Article for Red Hat Satellite 6.x Capsule Sync Issues

SBR
Product(s)
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.