You are on page 1of 2

1.

To specify /var/www/h t ml/p u b /exp o rt / as the export directory, enter


# hammer settings set --name pulp_export_destination --value
/var/www/html/pub/export

2. Create the export directory:


# mkdir /var/www/html/pub/export

3. Ensure the foreman user has read and write permissions on the export directory:
# chown foreman:foreman /var/www/html/pub/export

4. Configure the SELinux context:


# semanage fcontext -a -t foreman_var_run_t "/var/www/html/pub/export(/.*)?"
# restorecon -RvF /var/www/html/pub/export

Configuring the D ownload Policy


ISS requires that the Download Policy be set to immed iat e. You can set this
globally so that it
applies to new repositories created in all Organizations, or you can set it
individually for every
repository. Changing the default value will not change existing settings.

1. To specify the global default D ownload Policy using the command line, use the
hammer
command as follows:
# hammer settings set --name default_download_policy --value immediate

2. To list the repositories for an organization, use a command as follows:

# hammer repository list --organization-label organization-label

3. To change the download policy for an existing repository, use a command as


follows:

# hammer repository update --organization-label organization-label --product "Red


Hat Enterprise Linux Server" --name "Red Hat Enterprise Linux 7 Server Kickstart
x86_64 7.2" --download-policy immediate

Exporting Repositories
# hammer repository export --id 1 [--export-to-iso 1]

If you use the --export-to-iso parameter, you need to specify either 1 (ISO) or 0
(directory). This parameter does not have a default value.

Exporting Content View Versions (CVVs) to a Directory

1. Determining Which Content View Version to Export


# hammer content-view version list --organization "Mega Corporation" --content-view
cdn.megacorp.com
---|---------------------------|------------|-----------------------------------
ID | NAME | VERSION | LIFECYCLE ENVIRONMENTS
---|---------------------------|------------|-----------------------------------
14 | cdn.megacorp.com 1.0| 1.0 | Library, Production
---|---------------------------|------------|-----------------------------------

2. Use the hammer content-view version export command to export a CV.


# hammer content-view version export --id 14

3. You can add a link to the export directory to make it easier to refer to
# tree megacorp-cdn_megacorp_com-v1.0

4. Create a symbolic link to the version directory and then use the link:
# ln -s megacorp-cdn_megacorp_com-v1.0/megacorp/content_views/cdn_megacorp_com/1.0
latest-cdn

5. When you update the subscription CDN URL to point to where the export is being
served from, use the symbolic link:

Importing Content
Red Hat Satellite 6.2 currently supports importing content that has been exported
from an upstream Satellite Server in a disconnected environment.
There is no actual " import" command to use on the downstream server. The process
is a normal repository synchronization using the exported content from the upstream
server as the source.

Before you can import content into your downstream server, you need to know what
was exported.
You can use the hammer repository-set list command to establish what was exported.
For example:

# hammer repository-set list \


--organization "Mega Subsidiary" \
--product "Red Hat Enterprise Linux Server" \
| grep kickstart
1952 | kickstart | Red Hat Enterprise Linux 6 Server (Kickstart)
1951 | kickstart | Red Hat Enterprise Linux 5 Server (Kickstart)

To Enable a Repository:
1. Use the hammer repository-set enable command to enable a repository from an
export file. For example:
# hammer repository-set enable \
--organization "Mega Subsidiary" \
--product "Red Hat Enterprise Linux Server" \
--basearch x86_64 --releasever 7.2 --id 2455

To Synchronize the Repositories:

1. List the repositories for the required Organizations to determine their ID s:


# hammer repository list --organization "Mega Subsidiary"
---|--------------------------------------------------------|
ID | NAME |
44 | Red Hat Enterprise Linux 7 Server Kickstart x86_64 7.2 |

2. Use the hammer repository synchronize command to synchronize the required


repositories. For example:
# hammer repository synchronize --id 44

You might also like