How to Install All-in-One Red Hat OpenStack Platform 16 (Proof-of-Concept) | RHOSP 16

Ach.Chusnul Chikam
6 min readJul 23, 2020

--

The all-in-one installation method uses TripleO to deploy Red Hat OpenStack Platform and related services with a simple, single-node environment. Use this installation to enable proof-of-concept, development, and test deployments on a single node with limited or no follow-up operations.

Workflow

To install a single-node Red Hat OpenStack Platform environment, complete the tasks in the following basic workflow:

  1. Prepare the environment.
  2. Install packages for the all-in-one environment.
  3. Configure the all-in-one environment.
  4. Deploy the all-in-one environment.

Step 1: Prepare the Environment

  • Minimal Dual Core Processor
  • Minimal 8 Gb RAM
  • Minimal 40 Gb Free Disk
  • Stable Internet Connection
  • Operating System RHEL 8.1
  • Red Hat OpenStack Subscription
  • 2 Network Interfaces

(Interface ens18 assigned to the default network 192.168.1.0/24

Interface ens19 assigned to the management network 192.168.25.0/24)

In my environment, I used VM in Proxmox, like the image below:

Step 2: Installing Package the all-in-one Red Hat OpenStack Platform environment

First, configure hostname, a non-root user, and install the necessary packages and dependencies:

[root@localhost]# hostnamectl set-hostname all-in-one
[root@localhost]# exec bash
[root@all-in-one]# useradd stack
[root@all-in-one]# passwd stack
[root@all-in-one]# echo "stack ALL=(root) NOPASSWD:ALL" | tee -a /etc/sudoers.d/stack
[root@all-in-one]# chmod 0440 /etc/sudoers.d/stack

Log in as the non-root user on the all-in-one host:

$ ssh stack@all-in-one

Register the machine with Red Hat Subscription Manager and attach it. Then lock the undercloud to RHEL 8.1:

[stack@all-in-one]$ sudo subscription-manager register
[stack@all-in-one]$ sudo subscription-manager attach --auto
[stack@all-in-one]$ sudo subscription-manager release --set=8.1

Run the following commands to install dnf-utils, disable all default repositories, enable the necessary repositories and install the TripleO command-line interface (CLI):

[stack@all-in-one]$ sudo dnf install -y dnf-utils
[stack@all-in-one]$ sudo subscription-manager repos --disable=*
[stack@all-in-one]$ sudo subscription-manager repos \
--enable=rhel-8-for-x86_64-baseos-rpms \
--enable=rhel-8-for-x86_64-appstream-rpms \
--enable=rhel-8-for-x86_64-highavailability-eus-rpms \
--enable=ansible-2.8-for-rhel-8-x86_64-rpms \
--enable=openstack-16-for-rhel-8-x86_64-rpms \
--enable=fast-datapath-for-rhel-8-x86_64-rpms \
--enable=rhel-8-for-x86_64-highavailability-rpms
[stack@all-in-one]$ sudo dnf install -y python3-tripleoclient

Step 3: Configuring the all-in-one Red Hat OpenStack Platform environment

The following configuration files to deploy the all-in-one Red Hat OpenStack Platform environment located at $HOME directory:

  • $HOME/containers-prepare-parameters.yaml
  • $HOME/standalone_parameters.yaml

If you want to customize the all-in-one environment for development or testing, edit the following configuration files:

  • /usr/share/openstack-tripleo-heat-templates/environments/standalone/standalone-tripleo.yaml
  • /usr/share/openstack-tripleo-heat-templates/roles/Standalone.yaml

Generating YAML files for the all-in-one Red Hat OpenStack Platform environment

To generate the containers-prepare-parameters.yaml and standalone_parameters.yaml files, complete the following command:

[stack@all-in-one]$ openstack tripleo container image prepare default --output-env-file $HOME/containers-prepare-parameters.yaml

Edit the containers-prepare-parameters.yaml file and include your Red Hat credentials in the ContainerImageRegistryCredentials parameter so that the deployment process can authenticate with registry.redhat.io and pull container images successfully:

[stack@all-in-one]$ sudo vi containers-prepare-parameters.yaml
.......
ContainerImageRegistryCredentials:
registry.redhat.io:
<USERNAME>: "<PASSWORD>"
ContainerImageRegistryLogin: true
.......

For more information, see Red Hat Container Registry Authentication:

Set the ContainerImageRegistryLogin parameter to true in the containers-prepare-parameters.yaml So the content ofcontainers-prepare-parameters.yaml will look like this:

Create the $HOME/standalone_parameters.yaml file and configure basic parameters for your all-in-one Red Hat OpenStack Platform environment, including network configuration and some deployment options. In this example, network interface ens19 is the interface on the management network that you use to deploy Red Hat OpenStack. eth19 has the IP address 192.168.25.10:

[stack@all-in-one]$ export IP=192.168.25.10
[stack@all-in-one]$ export NETMASK=24
[stack@all-in-one]$ export INTERFACE=ens19
[stack@all-in-one]$ cat <<EOF > $HOME/standalone_parameters.yaml
parameter_defaults:
CloudName: $IP
CloudDomain: all-in-one.localdomain
ControlPlaneStaticRoutes: []
Debug: true
DeploymentUser: $USER
DnsServers:
- 1.1.1.1
- 8.8.8.8
DockerInsecureRegistryAddress:
- $IP:8787
NeutronPublicInterface: $INTERFACE
NeutronDnsDomain: localdomain
NeutronBridgeMappings: datacentre:br-ctlplane
NeutronPhysicalBridge: br-ctlplane
StandaloneEnableRoutedNetworks: false
StandaloneHomeDir: $HOME
StandaloneLocalMtu: 1500
EOF

If your machine to use the all-in-one Red Hat OpenStack Platform installation in a virtual environment, you must define the virtualization type with the StandaloneExtraConfig parameter:

StandaloneExtraConfig:
NovaComputeLibvirtType: qemu

Because I use a virtual environment, so the content ofstandalone_parameters.yaml in my machine look like this:

Step 4: Deploying the all-in-one Red Hat OpenStack Platform environment

Before deploy all-in-one Red Hat OpenStack Platform environment, ensure that system is up to date:

[stack@all-in-one]$ sudo dnf update
[stack@all-in-one]$ sudo reboot

Log in to registry.redhat.io with your Red Hat credentials:

[stack@all-in-one]$ sudo podman login registry.redhat.io

Export the environment variables that the deployment command uses. In this example, deploy the all-in-one environment with the ens19 interface that has the IP address 192.168.25.10 on the management network:

[stack@all-in-one]$ export IP=192.168.25.10
[stack@all-in-one]$ export NETMASK=24
[stack@all-in-one]$ export INTERFACE=ens19

Run the deploy command. Ensure that you include all .yaml files relevant to your environment:

[stack@all-in-one]$ sudo openstack tripleo deploy \
--templates \
--local-ip=$IP/$NETMASK \
-e /usr/share/openstack-tripleo-heat-templates/environments/standalone/standalone-tripleo.yaml \
-r /usr/share/openstack-tripleo-heat-templates/roles/Standalone.yaml \
-e $HOME/containers-prepare-parameters.yaml \
-e $HOME/standalone_parameters.yaml \
--output-dir $HOME \
--standalone

Your deployment is successful if you see your screen like this:

After a successful deployment, use the clouds.yaml configuration file in the ~/.config/openstack directory to query and verify the OpenStack endpoint:

[stack@all-in-one]$ export OS_CLOUD=standalone
[stack@all-in-one]$ openstack endpoint list

Check the version of Red Hat OpenStack Platform with the following :

[stack@all-in-one]$ sudo yum list installed | grep openstack-*
[stack@all-in-one]$ openstack service list
[stack@all-in-one]$ openstack --version

To access the dashboard, get information that contains credential from ~/.config/openstack/cloud.yamlfile

[stack@all-in-one]$ cat .config/openstack/cloud.yaml

Access Horizon dashboard with URL http://192.168.25.10/
Set username admin and password from ~/.config/openstack/cloud.yamlfile

Horizon Dashboard
Overview Resources
System Information from Services
System Information from Compute Services

Besides all of that, you can use custom configurations in this guide to using heat templates and environment files WORKING WITH HEAT TEMPLATES. Custom roles and service on your all-in-one Red Hat OpenStack Platform WORKING WITH CUSTOM ROLES AND SERVICES

Let’s try to Hands-On. Good Luck! :)

Thanks, Guys
#s0mprett0_tenan

References :

#RHEL8 #OpenStack #RedHat #RedHatOpenStackPlatform #StayHealth

--

--

Ach.Chusnul Chikam

Cloud Consultant | RHCSA | CKA | AWS SAA | OpenStack Certified | OpenShift Certified | Google Cloud ACE | LinkedIn: https://www.linkedin.com/in/achchusnulchikam