Table of Content

dreamcloud/ct7os is a centos based openstack ready sandbox, here is demo to show how to launch a one node openstack in few mins using vagrant.

tool set

  • vagant 2.0.2
  • virtualbox 5.2.6
  • cmder/msys64, I use portabledevops which seamless integrated with vagrant/virtualbox

prepare Vagrantfile

$ cd ~/vagrant/cttest
$ curl -Lo Vagrantfile https://raw.githubusercontent.com/robertluwang/cloud-hands-on-guide/master/dc-vagrant-cloud/ctopenstack/Vagrantfile.ct7osbox
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   769  100   769    0     0    921      0 --:--:-- --:--:-- --:--:--  1177

the openstack vm setting by default:

  • cpu 2
  • memory 8GB , you can change it in Vagrantfile, vb.memory=4GB
  • 1st NIC : NAT for Internet access
  • 2nd NIC : Hostonly private network interface 10.120.0.22, you can change it in Vagrantfile

launch openstack sandbox

$ vagrant up

openstack sandbox GUI access

you can launch dashboard in your laptop browser:

http://10.120.0.22/dashboard

the default user/password:

admin/demo
demo/demo

openstack sandbox CLI access

[vagrant@cttest ~]$ source keystonerc_admin
[vagrant@cttest ~(keystone_admin)]$ openstack network list
+--------------------------------------+---------+--------------------------------------+
| ID | Name | Subnets |
+--------------------------------------+---------+--------------------------------------+
| 6a3ce6f6-b778-4838-bb1f-d1a3ce9a00ee | private | 00895ce5-0704-4682-9a4a-841099dc8a40 |
| eb11ac1c-e035-4260-9920-6f3c7b0862b8 | public | bbcb22c7-1c38-4776-b83d-e462c300da0d |
+--------------------------------------+---------+--------------------------------------+

[vagrant@cttest ~(keystone_admin)]$ source keystonerc_demo
[vagrant@cttest ~(keystone_demo)]$ openstack project list
+----------------------------------+------+
| ID | Name |
+----------------------------------+------+
| 189b942f71764ad08c9b122b595a374c | demo |
+----------------------------------+------+