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

Modifying the OpenStack configuration


It would be ludicrous to think that all of the playbooks would be needed to run again for a small change such as changing the CPU contention ratio from 4:1 to 8:1. So instead, the playbooks have been developed and tagged so that specific playbooks can be run associated with that particular project that would reconfigure and restart the associated services to pick up the changes.

Getting ready

Ensure that you are root on the deployment host. In most cases, this is the first infrastructure controller node, infra01.

How to do it...

The following are the common changes and how they can be changed using Ansible. As we'll adjust the configuration, all of these commands are executed from the same host you used to perform the installation.

To adjust the CPU overcommit/allocation ratio, carry out the following steps:

  1. Edit the /etc/openstack_deploy/user_variables.yml file and modify (or add) the following line (adjust the figure to suit):

    nova_cpu_allocation_ratio: 8.0
    
  2. Now execute the following commands to make changes in the environment:

    cd /opt/openstack-ansible/playbooks
    openstack-ansible os-nova-install.yml --tags 'nova-config'
    

For more complex changes, for example, to add configuration that isn't a simple one-line change in a template, we can use an alternative in the form of overrides. To make changes to the default Nova Quotas, carry out the following as an example:

  1. Edit the /etc/openstack_deploy/user_variables.yml file and modify (or add) the following line (adjust the figure to suit):

    nova_nova_conf_overrides:  
      DEFAULT:
       quota_fixed_ips = -1
       quota_floating_ips = 20
       quota_instances = 20
  2. Now execute the following commands to make changes in the environment:

    cd /opt/openstack-ansible/playbooks
    openstack-ansible os-nova-install.yml --tag 'nova-config'
    

Changes for Neutron, Glance, Cinder, and all other services are modified in a similar way. Adjust the name of the service in the syntax used. For example, to change a configuration item in the neutron.conf file, you would use the following syntax:

neutron_neutron_conf_overrides:  
  DEFAULT:
   dhcp_lease_duration = -1

Then execute the following commands:

cd /opt/openstack-ansible/playbooks
openstack-ansible os-neutron-install.yml --tag 'neutron-config'

How it works…

We modified the same OpenStack-Ansible configuration files as in the Configuring the installation recipe and executed the openstack-ansible playbook command, specifying the playbook that corresponded to the service we wanted to change. As we were making configuration changes, we notified Ansible of this through the --tag parameter.

Refer to https://docs.openstack.org/ for all configuration options for each service.

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 $19.99/month. Cancel anytime