Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
OpenStack Cloud Computing Cookbook

You're reading from   OpenStack Cloud Computing Cookbook Over 100 practical recipes to help you build and operate OpenStack cloud computing, storage, networking, and automation

Arrow left icon
Product type Paperback
Published in Jan 2018
Publisher Packt
ISBN-13 9781788398763
Length 398 pages
Edition 4th Edition
Languages
Arrow right icon
Authors (4):
Arrow left icon
James Denton James Denton
Author Profile Icon James Denton
James Denton
Egle Sigler Egle Sigler
Author Profile Icon Egle Sigler
Egle Sigler
Cody Bunch Cody Bunch
Author Profile Icon Cody Bunch
Cody Bunch
Kevin Jackson Kevin Jackson
Author Profile Icon Kevin Jackson
Kevin Jackson
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

OpenStack Cloud Computing Cookbook Fourth Edition
Contributors
Preface
Another Book You May Enjoy
1. Installing OpenStack with Ansible FREE CHAPTER 2. The OpenStack Client 3. Keystone – OpenStack Identity Service 4. Neutron – OpenStack Networking 5. Nova – OpenStack Compute 6. Glance – OpenStack Image Service 7. Cinder – OpenStack Block Storage 8. Swift – OpenStack Object Storage 9. OpenStack Orchestration Using Heat and Ansible 10. Using OpenStack Dashboard Index

Manually testing the installation


Once the installation has completed successfully, the first step is to test the install. Testing OpenStack involves both automated and manual checks.

Manual tests verify user-journeys that may not normally be picked up through automated testing, such as ensuring horizon is displayed properly.

Automated tests can be invoked using a testing framework such as tempest or the OpenStack benchmarking tool—rally.

Getting ready

Ensure that you are root on the first infrastructure controller node, infra01.

How to do it…

The installation of OpenStack-Ansible creates several utility containers on each of the infra nodes. These utility hosts provide all the command-line tools needed to try out OpenStack, using the command line of course. Carry out the following steps to get access to a utility host and run various commands in order to verify an installation of OpenStack manually:

  1. First, view the running containers by issuing the following command:

    lxc-ls -f
    
  2. As you can see, this lists a number of containers because the OpenStack-Ansible installation uses isolated Linux containers for running each service. By the side of each one its IP address and running state will be listed. You can see here that the container network of 172.29.236.0/24 was used in this chapter and why this was named this way. One of the containers on here is the utility container, named with the following format: nodename_utility_container_randomuuid. To access this container, you can SSH to it, or you can issue the following command:

    lxc-attach -n infra01_utility_container_34u477d
    
  3. You will now be running a Terminal inside this container, with access only to the tools and services belonging to that containers. In this case, we have access to the required OpenStack clients. The first thing you need to do is source in your OpenStack credentials. The OpenStack-Ansible project writes out a generated bash environment file with an admin user and project that was set up during the installation. Load this into your bash environment with the following command:

    source openrc
    

    Note

    Tip: you can also use the following syntax in Bash: . openrc

  4. Now you can use the OpenStack CLI to view the services and status of the environment, as well as create networks, and launch instances. A few handy commands are listed here:

    openstack server list
    openstack network list
    openstack endpoint list
    openstack network agent list
    

How it works…

The OpenStack-Ansible method of installing OpenStack installs OpenStack services into isolated containers on our Linux servers. On each of the controller (or infra) nodes are about 12 containers, each running a single service such as nova-api or RabbitMQ. You can view the running containers by logging into any of the servers as root and issuing a lxc-ls -f command. The -f parameter gives you a full listing showing the status of the instance such as whether it is running or stopped.

One of the containers on the infra nodes has utility in its name, and this is known as a utility container in OpenStack-Ansible terminology. This container has OpenStack client tools installed, which makes it a great place to start manually testing an installation of OpenStack. Each container has at least an IP address on the container network—in the example used in this chapter this is the 172.29.236.0/24 subnet. You can SSH to the IP address of this container, or use another lxc command to attach to it: lxc-attach -n <name_of_container>. Once you have a session inside the container, you can use it like any other system, provided those tools are available to the restricted four-walls of the container. To use OpenStack commands, however, you first need to source the resource environment file which is named openrc. This is a normal bash environment file that has been prepopulated during the installation and provides all the required credentials needed to use OpenStack straight away.

You have been reading a chapter from
OpenStack Cloud Computing Cookbook - Fourth Edition
Published in: Jan 2018
Publisher: Packt
ISBN-13: 9781788398763
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime