blob: f44bc62f91a272496ada840a2b6ef0dc99fe9eb2 [file] [log] [blame]
Victor Moralesdd074802017-07-26 16:06:35 -05001==================
2OpenStack Provider
3==================
4
5It's possible to use Vagrant to provision VMs on OpenStack using the
6`Vagrant OpenStack Cloud Provider <https://github.com/ggiamarchi/vagrant-openstack-provider/>`.
7The only requirement for the Cloud provider is to have an Ubuntu Cloud
8image accesible to your tenant and a Security Rule that allows to do
9SSH into the instance.
10
11Environment variables
12---------------------
13
14The usage of environment variables in OpenStack command-line clients
15is to avoid repeating some values. These variables have *OS_* as
16prefix. This provider will use them for authentication to Keystone
17service.
18
19.. code-block:: console
20
21 export OS_AUTH_URL=http://<keystone_ip>:5000/v3
22 export OS_TENANT_NAME=<project_or_tenant_name>
23 export OS_PROJECT_NAME=<project_or_tenant_name>
24 export OS_USERNAME=<openstack_username>
25 export OS_PASSWORD=<openstack_password>
26 export OS_REGION_NAME=<openstack_region_name>
27 export OS_IDENTITY_API_VERSION=<keystone_version_number>
28 export OS_PROJECT_DOMAIN_ID=<openstack_domain_name>
29
30.. end
31
32OpenStack Vagrant provider needs additional information about the
33name of the image to be used and the networking where the instance
34will be provisioned. That information can be passed using the
35following variables
36
37.. code-block:: console
38
39 export OS_IMAGE=<ubuntu_cloud_image_name>
40 export OS_NETWORK=<neutron_private_network>
41 export OS_FLOATING_IP_POOL=<neutron_floating_ip_pool>
42 export OS_SEC_GROUP=<onap-ssh-secgroup>
43
44.. end
45
46Tenant setup
47------------
48
49The *tools/setup_openstack.sh* script can be useful to get an idea
50of the process to setup the OpenStack environment with the necessary
51requirements. This script depends on the Environment Variables
52explained previously.
53
54----
55
56Devstack
57--------
58
59It's possible to use this plugin to provision instances on
60`Devstack <https://docs.openstack.org/devstack/latest/>`. This is
61an example of the *local.conf* file that can be used as input
62for Devstack
63
64.. path local.conf
65.. code-block:: ini
66
67 [[local|localrc]]
68 ADMIN_PASSWORD=<password>
69 DATABASE_PASSWORD=<password>
70 RABBIT_PASSWORD=<password>
71 SERVICE_PASSWORD=<password>
72 SERVICE_TOKEN=<token>
73
74 # Used to only upload the Ubuntu Cloud Image
75 DOWNLOAD_DEFAULT_IMAGES=False
76 IMAGE_URLS+="http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img"
77
78 # (Optional) These values helps to improve the experience deploying and using Devstack
79 GIT_BASE=https://git.openstack.org
80 FORCE_CONFIG_DRIVE="True"
81 disable_service tempest
82
83.. end
84
85.. note::
86
87 There is a validation that checks if the
88 *vagrant-openstack-provider* plugin is installed raising an error
89 for those cases when it isn't.