Professional Documents
Culture Documents
DeployingOpenStackinaVirtualMachineEnvironmentUsingOpenStackDeployment(tripleO)RedHatCustomerPortal
C USTO ME R PO RTAL
Products & Services Knowledgebase Articles
Environment Using OpenStack Deployment (tripleO)
Introduction
These procedures are for installing OpenStack in a host machine using the OpenStack Deployment
service. This can be used for testing and evaluating the provisioning, conguring, and operating of
OpenStack components. This material is for proof-of-concept testing and not recommended for
enterprise environments.
This setup creates virtual machines within a host machine. It creates three (3) to ve (5) virtual
machines, depending on if you choose to deploy block and object storage nodes, consisting of 4GB
of memory and 40GB of disk space each. The virtual machine disk les are thinly provisioned and
will not take up the full 40GB initially.
Technology Preview
OpenStack Deployment (tripleO) is included as a technology preview in Red Hat Enterprise Linux
OpenStack Platform 6.0. For more information on the support scope for features marked as
technology previews, refer to https://access.redhat.com/support/offerings/techpreview/.
Contents
1. Minimum System Requirements
2. Preparing the Host Machine
https://access.redhat.com/articles/1320563
1/19
5/9/2015
DeployingOpenStackinaVirtualMachineEnvironmentUsingOpenStackDeployment(tripleO)RedHatCustomerPortal
https://access.redhat.com/articles/1320563
2/19
5/9/2015
DeployingOpenStackinaVirtualMachineEnvironmentUsingOpenStackDeployment(tripleO)RedHatCustomerPortal
3. The user performing all of the installation steps on the host machine needs to have sudo
enabled. You can use an existing user or use the following commands to create a new user
called stack with password-less sudo enabled. Do not run the rest of the steps in this guide as
root. Note the use of -, -l, or --login with the su command:
$sudouseraddstack
$sudopasswdstack
$echo"stackALL=(root)NOPASSWD:ALL"|sudoteea/etc/sudoers.d/stack
$sudochmod0440/etc/sudoers.d/stack
$sulstack
If you have previously used the host machine to test tripleO, then there is a risk of conict
with scripts previously installed. It is recommended to clean up from any previous tripleO
tests by deleting ~/.cache/tripleo and making sure there is no $TRIPLEO_ROOT dened in
your environment.
Host Setup
These steps will setup your host machine with a virtual environment for testing the Overcloud
deployment. For more information about the changes performed, see the FAQ.
1. Make sure you are logged in as the user you created above.
$whoami
https://access.redhat.com/articles/1320563
3/19
5/9/2015
DeployingOpenStackinaVirtualMachineEnvironmentUsingOpenStackDeployment(tripleO)RedHatCustomerPortal
$sudosubscriptionmanagerregister
$sudosubscriptionmanagerlistavailable|less
Search for the word "OpenStack", note the pool ID at the bottom of the section where "OpenStack"
was mentioned and then proceed as follows:
$sudosubscriptionmanagerattachpool=<UUID>
$sudosubscriptionmanagerreposenablerhel7serveropenstack6.0rpms
Repository'rhel7serveropenstack6.0rpms'isenabledforthissystem.
2. Download the Red Hat Enterprise Linux 7 KVM guest image, rhel-guest-image-7.020140930.0.x86_64.qcow2, from the Red Hat Customer Portal. The image is listed on this
page: Product Downloads (https://access.redhat.com/downloads/content/69/ver=/rhel--7/7.0/x86_64/product-downloads). Ensure the le name is correct after downloading. Note
that the links do expire, so reload the page before copying the link.
3. Congure your environment by replacing the values in [ ] with the appropriate ones for your
environment. These are the settings needed to run instack-virt-setup:
export DIB_LOCAL_IMAGE="[/path/to/]rhel-guest-image-7.0-20140930.0.x86_64.qcow2"
export NODE_DIST="rhel7"
export REG_METHOD=portal
export REG_PASSWORD="[your password]"
export REG_POOL_ID="[pool id]"
export REG_REPOS="rhel-7-server-openstack-6.0-rpms,rhel-ha-for-rhel-7-server-rpms"
export REG_USER="[your username]"
export RHOS=1
Note that you can nd some of the above information with the following command:
sudosubscriptionmanagerlistconsumedpoolonly
4/19
5/9/2015
DeployingOpenStackinaVirtualMachineEnvironmentUsingOpenStackDeployment(tripleO)RedHatCustomerPortal
$source/usr/libexec/openstacktripleo/devtest_variables.sh
$tripleoinstalldependencies
$tripleosetusergroupmembership
The previous command has added the user to the libvirtd group, so we need to login to the new
group
$newgrplibvirtd
$newgrp
When the script has completed successfully it will output the IP address of the "instack" virtual
machine. Addresses for the Undercloud are assigned by the host machine, using DHCP, from the
192.168.122.0/24 range, but 192.168.122.1 is reserved for use by the host.
Running virsh list --all will show that you now have one running virtual machine called "instack", and
four called "baremetal_[0-3]" all shut off. The "instack" virtual machine runs a minimal install of Red
Hat Enterprise Linux 7 and will be used to install the Undercloud on. You can login to the "instack"
virtual machine by running:
$sshi.ssh/id_rsa_virt_powerroot@<instackvmip>
The virtual machine contains a user "stack" that uses the password "stack" and is granted passwordless sudo privileges. Once logged in as root to the "instack" virtual machine, you can become the
stack user as follows (note the use of -, -l, or --login):
$sulstack
https://access.redhat.com/articles/1320563
5/19
5/9/2015
DeployingOpenStackinaVirtualMachineEnvironmentUsingOpenStackDeployment(tripleO)RedHatCustomerPortal
The other virtual machines do not have an operating system installed yet but will eventually become
part of the "Overcloud".
You may also want to install virt-manager on the host as it can be very helpful if monitoring when
the virtual machines for the Overcloud nodes are powered on and off. You can also use virt-manager
to login to the console on the Overcloud nodes.
Subscribe this system to the Red Hat Network using Red Hat Subscription Manager as described in
the Red Hat Enterprise Linux 7 Installation Guide (https://access.redhat.com/documentation/enUS/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/). For additional information, see Using
and Conguring Red Hat Subscription Manager (https://access.redhat.com/documentation/enUS/Red_Hat_Subscription_Management/).
Repeat the procedure described in "Enable the Red Hat OpenStack 6 repository" above.
Install instack-undercloud
$sudoyumyinstallinstackundercloud
Once this script completes, you will have the follow les in /home/stack/:
deploy-overcloudrc
instack.answers
instackenv.json
https://access.redhat.com/articles/1320563
6/19
5/9/2015
DeployingOpenStackinaVirtualMachineEnvironmentUsingOpenStackDeployment(tripleO)RedHatCustomerPortal
The values in the answer le must be suitable for your environment. Check and replace them
if required.
In particular, check that the LOCAL_INTERFACE setting matches the Network Interface on
the Undercloud used as the provisioning network to handle PXE boots.
https://access.redhat.com/articles/1320563
7/19
5/9/2015
DeployingOpenStackinaVirtualMachineEnvironmentUsingOpenStackDeployment(tripleO)RedHatCustomerPortal
After extracting the image les from the tar les you should have the following image les:
deploy-ramdisk-ironic.initramfs
deploy-ramdisk-ironic.kernel
discovery-ramdisk.initramfs
discovery-ramdisk.kernel
overcloud-cinder-volume.initrd
overcloud-cinder-volume.qcow2
overcloud-cinder-volume.vmlinuz
overcloud-compute.initrd
overcloud-compute.qcow2
overcloud-compute.vmlinuz
overcloud-control.initrd
overcloud-control.qcow2
overcloud-control.vmlinuz
overcloud-swift-storage.initrd
overcloud-swift-storage.qcow2
overcloud-swift-storage.vmlinuz
Copy each of the downloaded image les to the Undercloud.
$scp/pathtoimageroot@<instackvmip>:~/
Run the script to install Undercloud. The script will produce a lot of output on the screen. It also logs
to ~/.instack/install-undercloud.log. You should see instack-install-undercloud complete, along with
the details about the stackrc le at the end of a successful run.
$instackinstallundercloud
Once the install script has run to completion, you should take note of the les /root/stackrc and
/root/tripleo-undercloud-passwords. Both these les will be needed to interact with the installed
Undercloud. Copy them to your home directory for ease of use later.
https://access.redhat.com/articles/1320563
8/19
5/9/2015
DeployingOpenStackinaVirtualMachineEnvironmentUsingOpenStackDeployment(tripleO)RedHatCustomerPortal
$sudocp/root/tripleoundercloudpasswords.
$sudocp/root/stackrc.
If your install does not complete successfully, please see the FAQ for potential solutions.
Deploying an Overcloud
Deploying the Overcloud via the Dashboard
You can deploy the Overcloud either through the browser-based dashboard user interface using the
Tuskar plugin, or via the Tuskar command-line interface.
where <instack-vm-ip> is the address of the Undercloud virtual machine to bind to, and "hostname"
is the host name of the host machine. The Dashboard UI will be at
http://<host_ip>:8080/dashboard (if using SSH tunnel).
https://access.redhat.com/articles/1320563
9/19
5/9/2015
DeployingOpenStackinaVirtualMachineEnvironmentUsingOpenStackDeployment(tripleO)RedHatCustomerPortal
By default <instack-vm-ip> will be 192.168.122.1. When logging into the dashboard the default user
and password are required. They can be found in the /root/stackrc le on the Undercloud node,
OS_USERNAME and OS_PASSWORD. Once you have logged into the Dashboard UI use the Tuskar
UI guide to continue deploying your Overcloud.
$curlLOhttps://raw.githubusercontent.com/openstack/tuskarui/master/nodes.sh./nodes
Both options lead to a node registration form where you can choose to have auto-discovery
performed on the nodes to identify missing node attributes.
To choose auto-discovery, ensure the box is checked on each node "Discover missing
attributes". If you use the CSV le upload method, the auto discovery option should already
be selected. If you use auto-discovery, your nodes will appear in the 'Maintenance' tab instead
with the status 'Discovering'. Wait a few minutes, and the status will change to 'Discovered';
their attributes will appear as well. Now you can choose to 'Activate' these nodes, and they
will appear in the 'Free' tab. After discovery is complete, refresh your browser to see the
changes as the "Maintenance' page does not auto-update.
If you choose not to use auto-discovery, ll in any missing node attributes and submit the
form. Your nodes are now registered and viewable in the 'Free' tab.
2. Deploy the Overcloud
You are now ready to deploy your Overcloud. Start by clicking on 'Overview' in the left
navigation. From here, you can adjust the role count of your Overcloud as node availability
permits. At a minimum, a controller node and a compute node must be specied. Also, please
note that the number of controller nodes can only be increased by 2 at a time. Once you are
satised, click on 'Deploy'. A popup will appear informing you of any autogenerated overcloud
parameters; press 'Deploy'.
Your Overcloud is now deploying.
3. Initialize the Overcloud
https://access.redhat.com/articles/1320563
10/19
5/9/2015
DeployingOpenStackinaVirtualMachineEnvironmentUsingOpenStackDeployment(tripleO)RedHatCustomerPortal
After the Overcloud is deployed, you will still need to initialize Overcloud services. To do so
simply click on the 'Initialize' button. A form will appear detailing various initialization
parameters; the defaults will be sufcient. Press 'Initialize' to start the initialization process.
Once this is complete, the 'Overview' page will show you the credentials needed to access
Overcloud Horizon.
The instack-undercloud package provides a test script, instack-deploy-overcloud that can be used to
verify your environment. The following steps will guide you through using instack-deploy-overcloud.
To deploy a production ready Overcloud, you should use the Tuskar CLI or OpenStack Dashboard UI.
1. While logged into the Undercloud node export the required variables into your shell in order
to use the CLI tools for the Undercloud and Overcloud. If you copied the stackrc le into your
home directory at the end of the Undercloud installation, simply source that le. Alternatively,
you can use the following command directly to set the needed environment variables.
$command$(sudocat/root/stackrc|xargs)
4. To further interact with the API services running in the Overcloud using the OpenStack CLI
tools, you can run the following commands:
exportTE_DATAFILE=instackenv.json
$source/etc/tripleo/overcloudrc
If you run into issues and want to redeploy your Overcloud the rst step is to delete it using the
instructions in the FAQ. You should then be able to re-execute instack-prepare-for-overcloud and
deploy the Overcloud again.
https://access.redhat.com/articles/1320563
11/19
5/9/2015
DeployingOpenStackinaVirtualMachineEnvironmentUsingOpenStackDeployment(tripleO)RedHatCustomerPortal
2. Run the instack-test-overcloud script to launch an image on the Overcloud and wait until it
can be pinged successfully
$instacktestovercloud
https://access.redhat.com/articles/1320563
12/19
5/9/2015
DeployingOpenStackinaVirtualMachineEnvironmentUsingOpenStackDeployment(tripleO)RedHatCustomerPortal
#systemctlstoplvm2lvmetad
#systemctlstoplvm2lvmetad.socket
#systemctldisablelvm2lvmetad.socket
#systemctlstoplvm2lvmetad
Example deploy-overcloudrc le for deploying the overcloud on a bare metal machine setup:
/usr/share/instackundercloud/deploybaremetalovercloudrc
https://access.redhat.com/articles/1320563
13/19
5/9/2015
DeployingOpenStackinaVirtualMachineEnvironmentUsingOpenStackDeployment(tripleO)RedHatCustomerPortal
NODES_JSON:pathtoafileoftheJSONrepresentationofthebaremetalnodes.Documentedinth
NeutronPublicInterface:Overcloudmanagementinterfacename
OVERCLOUD_LIBVIRT_TYPE:Overcloudlibvirttype:qemuorkvm
NETWORK_CIDR:NeutronnetworkaddressinCIDRformat
FLOATING_IP_START:StartoffloatingIPaddressesallocation
FLOATING_IP_END:EndoffloatingIPaddressallocation
FLOATING_IP_CIDR:floatingIPnetworkaddressinCIDRformat
NEUTRON_NETWORK_TYPE:tenantnetworktype:greorvxlan
NEUTRON_TUNNEL_TYPES:supportedtenantnetworktunneltypes:greorvxlanorgre,vxlan
COMPUTESCALE:#ofovercloudcomputenodes
BLOCKSTORAGESCALE:#ofovercloudblockstoragenodes
SWIFTSTORAGESCALE:#ofovercloudobjectstoragenodes
https://access.redhat.com/articles/1320563
14/19
5/9/2015
DeployingOpenStackinaVirtualMachineEnvironmentUsingOpenStackDeployment(tripleO)RedHatCustomerPortal
{
"nodes":
[
{
"memory":"4072",
"disk":"30",
"arch":"x86_64",
"pm_user":"stack",
"pm_addr":"192.168.122.1",
"pm_password":"contentsofsshprivatekeygohere",
"pm_type":"pxe_ssh",
"mac":[
"00:76:31:1f:f2:a0"
],
"cpu":"1"
},
{
"memory":"4072",
"disk":"30",
"arch":"x86_64",
"pm_user":"stack",
"pm_addr":"192.168.122.1",
"pm_password":"contentsofsshprivatekeygohere",
"pm_type":"pxe_ssh",
"mac":[
"00:76:31:1f:f2:a0"
],
"cpu":"1"
}
]
}
15/19
5/9/2015
DeployingOpenStackinaVirtualMachineEnvironmentUsingOpenStackDeployment(tripleO)RedHatCustomerPortal
$instackdeleteovercloud
2. Use the following command to load new images. Pass the command whatever new image le
you want loaded into glance.
$tripleoloadimagedovercloudcontrol.qcow2
where <instack-vm-ip> is the address of the Undercloud virtual machine to bind to, and "hostname"
is the host name of the host machine. Dashboard UI will be at http://<host_ip>:8080/dashboard (if
using SSH tunnel)
By default, the <instack-vm-ip> will be 192.168.122.1. Update appropriately for your environment.
With the SSH tunnel created you can launch a browser on a system with connectivity to the host
machine and go to http://<host-ip>:8080/dashboard and the dashboard should appear. If you need
to connect remotely through the host machine, you can chain SSH tunnels as needed.
When logging into the dashboard the default user and password are required. They can be found in
the /root/stackrc le on the "instack" virtual machine, OS_USERNAME and OS_PASSWORD.
https://access.redhat.com/articles/1320563
16/19
5/9/2015
DeployingOpenStackinaVirtualMachineEnvironmentUsingOpenStackDeployment(tripleO)RedHatCustomerPortal
17/19
5/9/2015
DeployingOpenStackinaVirtualMachineEnvironmentUsingOpenStackDeployment(tripleO)RedHatCustomerPortal
Note that you can nd some of the above information with the following command:
sudosubscriptionmanagerlistconsumedpoolonly
Article Type
General (https://access.redhat.com/search/#/?q=article_type:("General"))
Product(s)
Red Hat Enterprise Linux OpenStack Platform (https://access.redhat.com/search/#/?q=product:
("Red+Hat+Enterprise+Linux+OpenStack+Platform"))
Category
Install (https://access.redhat.com/search/#/?q=category:("Install"))
Comments
Add new comment
Formatting Help
SUBMIT COMMENT
https://access.redhat.com/articles/1320563
18/19
5/9/2015
DeployingOpenStackinaVirtualMachineEnvironmentUsingOpenStackDeployment(tripleO)RedHatCustomerPortal
https://access.redhat.com/articles/1320563
19/19