Book Image

OpenStack Cloud Computing Cookbook

By : Cody Bunch
Book Image

OpenStack Cloud Computing Cookbook

By: Cody Bunch

Overview of this book

Table of Contents (19 chapters)
OpenStack Cloud Computing Cookbook Third Edition
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Creating and managing key pairs


SSH key pairs consist of two elements—a public key and a private key. Key pairs are used for access to our Linux hosts via SSH. The public portion of our key pair is injected into our instance at boot-time through a service known as cloud-init. It can perform many tasks, one of which is managing this public key pair injection. Only this specific combination of the public and private key will allow us access to our instances.

Getting ready

To begin with, ensure that you are logged in to your Ubuntu client that has access to the Nova client tools. This can be installed using the following commands:

sudo apt-get update
sudo apt-get install python-novaclient

Ensure you have set the following credentials:

export OS_TENANT_NAME=cookbook
export OS_USERNAME=admin
export OS_PASSWORD=openstack
export OS_AUTH_URL=https://192.168.100.200:5000/v2.0/
export OS_NO_CACHE=1
export OS_KEY=/vagrant/cakey.pem
export OS_CACERT=/vagrant/ca.pem

How to do it...

To create a key pair, we...