Chapter 2. Taking an OpenStack test-drive
Listing 2.1. Updating packages
Listing 2.2. Upgrading packages
Listing 2.4. Retrieving DevStack scripts
Listing 2.5. Preparing DevStack directory
Listing 2.6. Switching to stack user
Listing 2.7. Creating local.conf
Listing 2.10. Stack summary log
Listing 2.11. Running DevStack exercises
Listing 2.12. Running single OpenStack Tempest test
Chapter 3. Learning basic OpenStack operations
Listing 3.1. Set environmental variables
Listing 3.2. Setting variables and executing a first CLI command
Listing 3.3. Launching an instance from the CLI
Listing 3.4. Executing a first API command
Listing 3.5. Prepare your shell session as admin
Listing 3.6. Creating a new tenant
Listing 3.7. Creating a new user
Listing 3.8. Listing OpenStack roles
Listing 3.10. Accessing the Neutron console
Listing 3.11. Creating an internal network
Listing 3.12. Creating an internal subnet for a network
Listing 3.13. Creating a router
Listing 3.14. Adding a router to the internal subnet
Listing 3.15. Listing external networks
Listing 3.16. Add existing external network as router gateway
Listing 3.17. Creating an external network
Listing 3.18. Creating an external subnet
Listing 3.19. Clearing a router gateway
Listing 3.20. Adding a new external network as the router gateway
Listing 3.21. Showing the Compute quota for a tenant
Listing 3.22. Updating the Compute quota for tenant
Listing 3.23. Showing the Compute quota for a tenant user
Listing 3.24. Updating the Compute quota for a tenant user
Chapter 5. Walking through a Controller deployment
Listing 5.1. Listing the interfaces
Listing 5.2. Modifying interface configuration in /etc/network/interfaces
Listing 5.3. Refreshing networking settings
Listing 5.4. Checking the network for updates
Listing 5.5. Updating and upgrading packages
Listing 5.6. Rebooting the server
Listing 5.7. Installing RabbitMQ
Listing 5.8. Configuring the RabbitMQ guest password
Listing 5.9. Verifying the RabbitMQ status
Listing 5.10. Installing MySQL binaries
Listing 5.11. Modifying /etc/mysql/my.cnf
Listing 5.12. Restart and verify that MySQL is running and accessible
Listing 5.13. Logging in to the MySQL server as root
Listing 5.14. Installing the Keystone package
Listing 5.15. Creating a database and granting access
Listing 5.16. Verifying the database and user
Listing 5.17. Modifying /etc/keystone/keystone.conf
Listing 5.18. Restarting Keystone
Listing 5.19. Initializing the data store
Listing 5.20. Creating keystone.auth
Listing 5.21. Setting and confirming keystone.auth variables
Listing 5.22. Checking Keystone operation
Listing 5.23. Creating the Keystone service
Listing 5.24. Creating the Keystone endpoint
Listing 5.25. Creating the admin tenant
Listing 5.26. Creating the service tenant
Listing 5.27. Creating the admin user
Listing 5.28. Creating the admin role
Listing 5.29. Creating the Member role
Listing 5.30. Assigning the admin role
Listing 5.31. Verify admin roles in admin tenant
Listing 5.32. Creating the database and granting access
Listing 5.33. Creating a glance user
Listing 5.34. Assigning admin role to glance user in service tenant
Listing 5.35. Creating the Glance service
Listing 5.36. Creating the Glance endpoint
Listing 5.37. Installing Glance binaries
Listing 5.38. Modifying /etc/glance/glance-api.conf
Listing 5.39. Modifying /etc/glance/glance-registry.conf
Listing 5.40. Restarting glance-api and glance-registry
Listing 5.41. Initializing the data store
Listing 5.42. Downloading a prebuilt image
Listing 5.43. Creating a Glance image
Listing 5.44. Create the Cinder database and grant access
Listing 5.45. Creating a cinder user
Listing 5.46. Assigning admin role to cinder user in service tenant
Listing 5.47. Creating a Cinder service
Listing 5.48. Creating a Cinder endpoint
Listing 5.49. Installing Cinder
Listing 5.50. Modifying /etc/cinder/cinder.conf
Listing 5.51. Restarting Cinder
Listing 5.52. Initializing the data store
Listing 5.53. Creating a database and granting access
Listing 5.54. Creating a neutron user
Listing 5.55. Assigning the admin role to the neutron user in the service tenant
Listing 5.56. Creating the Neutron service
Listing 5.57. Creating the Neutron endpoint
Listing 5.59. Modifying /etc/neutron/neutron.conf
Listing 5.60. Modifying /etc/neutron/plugins/ml2/ml2_conf.ini
Listing 5.61. Restarting Neutron
Listing 5.62. Create database and grant access
Listing 5.63. Creating the nova user
Listing 5.64. Assigning admin role to nova user in service tenant
Listing 5.65. Checking role assignment
Listing 5.66. Creating the Nova service
Listing 5.67. Creating the Nova endpoint
Listing 5.68. Install Nova controller
Listing 5.69. /etc/nova/nova.conf
Listing 5.70. Executing nova-manage
Listing 5.71. Restarting services
Listing 5.72. Listing Nova services
Chapter 6. Walking through a Networking deployment
Listing 6.2. Modify interface config /etc/network/interfaces
Listing 6.3. Refreshing Networking settings
Listing 6.4. Check network for updates
Listing 6.5. Update and upgrade packages
Listing 6.7. Install vlan and bridge-utils
Listing 6.8. Modify /etc/sysctl.conf
Listing 6.9. Execute the sysctl command
Listing 6.11. Verify OVS kernel modules
Listing 6.12. Configure internal OVS bridge
Listing 6.13. Configure external OVS bridge
Listing 6.14. Verify OVS configuration
Listing 6.15. Verify OVS OS integration
Listing 6.16. Add interface p2p1 (VM) to bridge br-ex
Listing 6.17. Verify OVS configuration
Listing 6.18. Install Neutron components
Listing 6.19. Modify /etc/neutron/neutron.conf
Listing 6.20. Modify /etc/neutron/plugins/ml2/ml2_conf.ini
Listing 6.21. Modify /etc/neutron/l3_agent.ini
Listing 6.22. Modify /etc/neutron/dhcp_agent.ini
Listing 6.23. Modify /etc/neutron/metadata_agent.ini
Listing 6.24. Restart Neutron agents
Listing 6.25. Access Neutron console
Listing 6.26. Create internal network
Listing 6.27. Creating an internal subnet for the network
Listing 6.29. Adding router to internal subnet
Listing 6.30. Create external network
Chapter 7. Walking through a Block Storage deployment
Listing 7.2. Modify interface file config /etc/network/interfaces
Listing 7.3. Refreshing Networking settings
Listing 7.4. Check network for updates
Listing 7.5. Update and upgrade packages
Listing 7.8. List disk devices
Listing 7.9. Using pvcreate to create a physical volume
Listing 7.10. Using pvscan to verify physical volumes
Listing 7.11. Using pvdisplay to display physical volume attributes
Listing 7.12. Using vgcreate to create a volume group
Listing 7.13. Using vgdisplay to verify volume groups
Listing 7.14. Install Cinder component
Listing 7.15. Modify /etc/cinder/cinder.conf
Listing 7.17. Install Cinder command-line tools
Listing 7.18. List Cinder volumes
Listing 7.19. Create Cinder volume
Chapter 8. Walking through a Compute deployment
Listing 8.2. Modify interface config /etc/network/interfaces
Listing 8.3. Refreshing networking settings
Listing 8.4. Check network for updates
Listing 8.5. Update and upgrade packages
Listing 8.7. Modify /etc/sysctl.conf
Listing 8.8. Execute sysctl command
Listing 8.10. Verify OVS kernel modules
Listing 8.11. Configure internal OVS bridge
Listing 8.12. Show OVS configuration
Listing 8.13. Verify OVS OS integration
Listing 8.14. Verify processor virtualization extensions
Listing 8.15. Install KVM software
Listing 8.16. Verify KVM acceleration
Listing 8.17. Unload and reload KVM kernel extensions
Listing 8.18. Verify libvirt/qemu/kvm availability
Listing 8.19. Remove KVM default virtual bridge
Listing 8.20. Install Neutron Software
Listing 8.21. Modify /etc/neutron/neutron.conf
Listing 8.22. Modify /etc/neutron/plugins/ml2/ml2_conf.ini
Listing 8.23. Install Nova Compute software
Listing 8.24. Modify /etc/nova/nova.conf
Listing 8.25. List Nova instances
Listing 8.26. List Nova flavors
Listing 8.27. List Nova images
Listing 8.28. List Nova networks
Chapter 10. Deploying Ceph
Listing 10.1. Create Ceph user
Listing 10.2. Create the sudoers file
Listing 10.3. Create private/public key pair on admin node
Listing 10.4. Distribute public key from admin node
Listing 10.5. Install ceph-deploy
Listing 10.6. Generate initial cluster configuration
Listing 10.7. Deploying Ceph software to resource nodes
Listing 10.8. Add monitor nodes and gather keys
Listing 10.9. Deploy the ceph client configuration
Listing 10.10. Checking Ceph health
Listing 10.11. List OSD node devices
Listing 10.12. Clear disks on OSD nodes
Listing 10.13. OSD disk prepare
Listing 10.14. OSD disk activate
Listing 10.15. Ceph health and stats
Listing 10.16. Create Ceph pool
Listing 10.17. Ceph pool benchmark tool
Listing 10.18. Ceph write benchmark
Listing 10.19. Ceph read benchmark
Chapter 11. Automated HA OpenStack deployment with Fuel
Listing 11.1. Out-of-band and administration switch configuration
Listing 11.2. Scripting OOB management console actions over SSH
Chapter 12. Cloud orchestration using OpenStack
Listing 12.1. AWS CloudFormation template format
Listing 12.2. Example Heat OpenStack Template (HOT)
Listing 12.3. Enable Heat in your DevStack local.conf
Listing 12.4. Set environmental variables
Listing 12.5. List Heat stacks
Listing 12.6. List Glance images
Listing 12.7. Generate Heat SSH key pair
Listing 12.8. Launch Heat stack
Listing 12.9. Listing Heat stack status
Listing 12.10. List mystack events
Listing 12.11. Show mystack details
Listing 12.13. Running the openrc.sh script
Listing 12.14. Register an image for Juju
Listing 12.15. Install Juju binaries
Listing 12.16. Generate a Juju configuration file
Listing 12.17. Modify your Juju configuration
Listing 12.18. Generate image metadata
Listing 12.19. Generate tool metadata
Listing 12.20. Bootstrapping an OpenStack tenant
Listing 12.21. Check Juju status
Listing 12.22. Deploy WordPress using Juju
Listing 12.23. Check WordPress deployment
Listing 12.24. Nova list instances
Listing 12.25. Deploy remaining dependencies
Listing 12.26. Expose the WordPress service
Listing 12.27. SSH to Juju instance
Listing 12.28. Check Juju environment status
Listing 12.29. Deploying and exposing the Juju GUI