enable the rhsm/cdn yum repos in repo-setup

This change enables rhn production public yum repos for RHOSP.
The username, password, pool-id and versions are all configurable.
It is left to the user to define pre and post actions in the config
itself like any other yum repo. An example configuration file will
be provided.

Change-Id: I492d740cdf97a07b99af009785bf78434f5538e3
This commit is contained in:
Wes Hayutin 2017-06-01 22:44:45 -04:00 committed by John Trowbridge
parent d683de2d08
commit b3c479589b
6 changed files with 127 additions and 1 deletions

View File

@ -0,0 +1,40 @@
# Note: Some of the values in this config are missing as they are private credentails or subscription
# manager hashes. This is to be used by humans only, not by CI.
release: ocata
osp_release: rhos-11
undercloud_image_url: http://uri to a RHEL 7.3. qcow2 file
overcloud_image_url: file:///usr/share/rhosp-director-images/overcloud-full.tar
ipa_image_url: file:///usr/share/rhosp-director-images/ironic-python-agent.tar
use_rhsm: true
rhsm_username:
rhsm_password:
pool_id:
rhel_version_number: 7
osp_release_version_number: 11
rhceph_version_number: 1.3
repo_cmd_before: |
subscription-manager remove --all || true
subscription-manager unregister || true
rm -Rf /etc/yum.repos.d/*.repo
repo_cmd_after: |
rm -Rf /etc/yum.repos.d/delorean*
yum repolist
yum clean all
yum -y remove rhosp-director-images.noarch
yum -y install rhosp-director-images.noarch
md5sum /usr/share/rhosp-director-images/overcloud-full.tar > /usr/share/rhosp-director-images/overcloud-full.tar.md5
md5sum /usr/share/rhosp-director-images/ironic-python-agent.tar > /usr/share/rhosp-director-images/ironic-python-agent.tar.md5
rhsm_repos:
- name: rhel-{{ rhel_version_number }}-server-rpms
- name: rhel-{{ rhel_version_number }}-server-extras-rpms
- name: rhel-{{ rhel_version_number }}-server-rh-common-rpms
- name: rhel-ha-for-rhel-{{ rhel_version_number }}-server-rpms
- name: rhel-{{ rhel_version_number }}-server-openstack-{{ osp_release_version_number }}-rpms
- name: rhel-{{ rhel_version_number }}-server-rhceph-{{ rhceph_version_number }}-osd-rpms
- name: rhel-{{ rhel_version_number }}-server-rhceph-{{ rhceph_version_number }}-mon-rpms

View File

@ -20,3 +20,4 @@ Contents:
design
contributing
working-with-extras
rhosp

44
doc/source/rhosp.rst Normal file
View File

@ -0,0 +1,44 @@
============================================================================
TripleO deployments and Red Hat OpenStack Platform
============================================================================
Brief Introduction
==================
Production deployments of Red Hat Openstack Platform should be executed by
following the official `Red Hat documentation <https://access.redhat.com/documentation/en/red-hat-openstack-platform/>`_
TripleO-Quickstart is a tool to assist development, test and continuous integration
environments and there is no official support for deploying Red Hat OpenStack
Platform with TripleO-Quickstart.
It is appropriate to use TripleO-Quickstart and the released Red Hat OpenStack
Platform yum repos provided by Red Hat Subscription Manager (RHSM) for development
and test purposes.
Using TripleO-Quickstart with RHSM yum repos
============================================
Under the config/release directory of the TripleO-Quickstart git repository there
is a sample configuration file for RHOSP 11::
config/release/rhos-11-rhn-baseos-undercloud.yml.example
To use this configuration one must fill out a few values in the configuration::
rhsm_username: The rhn/rhsm user account name
rhsm_password: The rhn/rhsm user password
pool_id: the `product or subscription id [1]
Under the config/environments directory of the TripleO-Quickstart git repository
there is a configuration file for Red Hat Enterprise Linux based deployments::
config/environments/base_rhel_libvirt.yml
An example invocation of TripleO-Quickstart::
./quickstart.sh -R rhos-11-rhn-baseos-undercloud -E baseos_rhel_libvirt --tags all $VIRTHOST
[1] `product subscription documentation <https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/sub-cli.html>`_

View File

@ -50,6 +50,18 @@ Role Variables
* `repos.custom_cmd` - custom command to install this package (default: 'yum install -y')
* `repos.pkg_url` - direct URL of the package to install
*RHSM*
-----
Setup the yum repositories with Red Hat Subscription Manager, https://access.redhat.com/
* `use_rhsm`: - boolean to turn rhsm public repos on or off, this by default is false.
* `rhsm_username`: - rhsm username
* `rhsm_password`: rhsm password
* `pool_id`: The subscription manager pool id with RHOSP entilements
* `rhel_version_number`: The major version of RHEL
* `osp_release_version_number`: The major version of RHOSP
* `rhceph_version_number`: The version of RHCeph
* `rhsm_repos`: a yaml list of yum repos that should be enabled via subscription manager, an example config is in config/release/rhos-11-rhn-baseos-undercloud.yml
Dependencies
------------

View File

@ -19,7 +19,6 @@ repo_cmd_after: |
# Repositories definitions
repos:
- type: file
filename: delorean.repo
down_url: https://trunk.rdoproject.org/centos7-{{ release }}/current/delorean.repo
@ -27,3 +26,16 @@ repos:
- type: file
filename: delorean-deps.repo
down_url: https://trunk.rdoproject.org/centos7-{{ release }}/delorean-deps.repo
# rhsm variables
use_rhsm: false
use_use_rhsm_baseos_channel: true
use_rhsm_openstack_channel: true
use_rhsm_ceph_channel: true
rhsm_username: none
rhsm_password: none
pool_id: none
rhel_version_number: 7
osp_release_version_number: 8
rhceph_version_number: "1.3"

View File

@ -86,6 +86,23 @@ sudo cp -f /tmp/repo_role_tmp/{{ repo.filename }} /etc/yum.repos.d/
{% endif %}
{% endfor %}
{% if use_rhsm|bool %}
## * Install repo from rhsm subscription manager
## ::
subscription-manager register --username {{ rhsm_username }} --password {{ rhsm_password }}
subscription-manager attach --pool={{ pool_id }}
subscription-manager repos --disable=*
{% for repo in rhsm_repos %}
subscription-manager repos --enable={{ repo.name }}
{% endfor %}
{% endif %}
## * Execute commands after repositories setup
## ::