Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
- UnixArena
Deploying openstack on Ubuntu is very easy if you use the devstack method. DevStack is not general openstack insta
will help us to reduce the manual configuration for first time deployment. Let’s follow the easiest method to underst
openstack deployment and other functionality. Here I have chosen Ubuntu as my base operating system/Hyper-viso
I should choose Ubuntu ? Ubuntu is Debian Linux variant operating system and it is one of the stable Linux operatin
in the world. Ubuntu’s simple package management and supports impressed me lot. Also Ubuntu is the world’s mos
operating system for OpenStack and widely used on many public and private clouds.
Let’s start.
Prerequisites:
X86 Server Hardware with VT enabled. (You can also use VM for testing purpose)
Two NIC’s
2 x 30GB HDD
8GB Memory
2 CPU cores
http://www.unixarena.com/2015/08/how-to-deploy-openstack-on-ubuntu.html 1/8
18/12/2017 How to Deploy Openstack on Ubuntu ? - UnixArena
Setting up git-man (1:1.9.1-1ubuntu0.1) ...
Setting up git (1:1.9.1-1ubuntu0.1) ...
root@uacloud:~#
3. Create user and group called “stack” and set the password for the user. (Do not try with other username).
5. System must has static IP. Make sure that /etc/hosts file has the FQDN for the host.
uacloud:~$id
uid=1001(stack) gid=1001(stack) groups=1001(stack)
7. Configure the password less authentication for stack user with the same host.
uacloud:~$ssh stack@uacloud
The authenticity of host 'uacloud (127.0.1.1)' can't be established.
ECDSA key fingerprint is 8e:c1:20:29:32:b4:67:5c:fb:b2:a0:8c:3a:ee:9a:85.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'uacloud' (ECDSA) to the list of known hosts.
stack@uacloud's password:
uacloud:~$
Asking for the password ? . Let me generate the new RSA keys for user “stack” and make it as password less authenti
uacloud:~$cd ~stack/.ssh
uacloud:~$ls -la
total 12
drwx------ 2 stack stack 4096 Aug 19 01:11 .
drwxr-xr-x 4 stack stack 4096 Aug 19 01:10 ..
-rw-r--r-- 1 stack stack 222 Aug 19 01:11 known_hosts
uacloud:~$ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/opt/stack/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /opt/stack/.ssh/id_rsa.
Your public key has been saved in /opt/stack/.ssh/id_rsa.pub.
The key fingerprint is:
df:0d:92:bc:3f:e8:5c:25:33:1e:e4:d3:a4:99:b8:54 stack@uacloud
The key's randomart image is:
+---[RSA 2048]----+
| |
| |
| E . |
| . * * |
| S * % o |
http://www.unixarena.com/2015/08/how-to-deploy-openstack-on-ubuntu.html 2/8
18/12/2017 How to Deploy Openstack on Ubuntu ? - UnixArena
| o * X |
| +.+ . |
| ..o. |
| .o .. |
+-----------------+
uacloud:~$
uacloud:~$ls -la
total 20
drwx------ 2 stack stack 4096 Aug 19 01:14 .
drwxr-xr-x 4 stack stack 4096 Aug 19 01:10 ..
-rw------- 1 stack stack 1675 Aug 19 01:14 id_rsa
-rw-r--r-- 1 stack stack 395 Aug 19 01:14 id_rsa.pub
-rw-r--r-- 1 stack stack 222 Aug 19 01:11 known_hosts
uacloud:~$cp id_rsa.pub authorized_keys
uacloud:~$
uacloud:~$chmod 400 authorized_keys id_rsa.pub
uacloud:~$ls -lrt
total 16
-rw-r--r-- 1 stack stack 222 Aug 19 01:11 known_hosts
-r-------- 1 stack stack 395 Aug 19 01:14 id_rsa.pub
-rw------- 1 stack stack 1675 Aug 19 01:14 id_rsa
-r-------- 1 stack stack 395 Aug 19 01:14 authorized_keys
uacloud:~$
* Documentation: https://help.ubuntu.com/
It works.
8. Clone the Openstack package from github to stack user’s home directory .
uacloud:~$cd ~
uacloud:~$pwd
/opt/stack
uacloud:~$git clone https://github.com/openstack-dev/devstack
Cloning into 'devstack'...
remote: Counting objects: 28833, done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 28833 (delta 2), reused 0 (delta 0), pack-reused 28826
Receiving objects: 100% (28833/28833), 9.97 MiB | 212.00 KiB/s, done.
Resolving deltas: 100% (20001/20001), done.
Checking connectivity... done.
uacloud:~$
9. Navigate to the “devstack” directory which is created under the stack user home .
uacloud:~$cd devstack/
uacloud:~$ls -lrt
total 316
-rw-rw-r-- 1 stack stack 15716 Aug 19 01:19 README.md
-rw-rw-r-- 1 stack stack 2591 Aug 19 01:19 Makefile
http://www.unixarena.com/2015/08/how-to-deploy-openstack-on-ubuntu.html 3/8
18/12/2017 How to Deploy Openstack on Ubuntu ? - UnixArena
-rw-rw-r-- 1 stack stack 1506 Aug 19 01:19 MAINTAINERS.rst
-rw-rw-r-- 1 stack stack 10143 Aug 19 01:19 LICENSE
-rw-rw-r-- 1 stack stack 14945 Aug 19 01:19 HACKING.rst
-rw-rw-r-- 1 stack stack 3774 Aug 19 01:19 FUTURE.rst
-rwxrwxr-x 1 stack stack 1978 Aug 19 01:19 exercise.sh
-rw-rw-r-- 1 stack stack 1145 Aug 19 01:19 exerciserc
-rw-rw-r-- 1 stack stack 1547 Aug 19 01:19 eucarc
drwxrwxr-x 2 stack stack 4096 Aug 19 01:19 driver_certs
drwxrwxr-x 3 stack stack 4096 Aug 19 01:19 doc
-rwxrwxr-x 1 stack stack 3229 Aug 19 01:19 clean.sh
drwxrwxr-x 2 stack stack 4096 Aug 19 01:19 extras.d
drwxrwxr-x 2 stack stack 4096 Aug 19 01:19 exercises
drwxrwxr-x 2 stack stack 4096 Aug 19 01:19 gate
-rw-rw-r-- 1 stack stack 64721 Aug 19 01:19 functions-common
-rw-rw-r-- 1 stack stack 23567 Aug 19 01:19 functions
drwxrwxr-x 7 stack stack 4096 Aug 19 01:19 files
drwxrwxr-x 2 stack stack 4096 Aug 19 01:19 inc
-rwxrwxr-x 1 stack stack 41570 Aug 19 01:19 stack.sh
-rw-rw-r-- 1 stack stack 30952 Aug 19 01:19 stackrc
-rwxrwxr-x 1 stack stack 781 Aug 19 01:19 setup.py
-rw-rw-r-- 1 stack stack 456 Aug 19 01:19 setup.cfg
drwxrwxr-x 2 stack stack 4096 Aug 19 01:19 samples
-rwxrwxr-x 1 stack stack 1188 Aug 19 01:19 run_tests.sh
-rwxrwxr-x 1 stack stack 638 Aug 19 01:19 rejoin-stack.sh
drwxrwxr-x 2 stack stack 4096 Aug 19 01:19 pkg
-rw-rw-r-- 1 stack stack 3984 Aug 19 01:19 openrc
drwxrwxr-x 8 stack stack 4096 Aug 19 01:19 lib
drwxrwxr-x 5 stack stack 4096 Aug 19 01:19 tools
drwxrwxr-x 2 stack stack 4096 Aug 19 01:19 tests
-rwxrwxr-x 1 stack stack 4185 Aug 19 01:19 unstack.sh
-rw-rw-r-- 1 stack stack 1445 Aug 19 01:19 tox.ini
uacloud:~$
10. Check the current branch and change it to “juno” openstack branch . kilo is the most recent stable release but st
some bugs.
uacloud:~$git branch
* master
uacloud:~$git checkout stable/juno
Branch stable/juno set up to track remote branch stable/juno from origin.
Switched to a new branch 'stable/juno'
uacloud:~$git branch
master
* stable/juno
uacloud:~$
uacloud:~$cat local.conf
[[local|localrc]]
# IP address of the Machine (Ubuntu)
HOST_IP=192.168.203.160
# Specify the ethernet card you are exposing to openstack
FLAT_INTERFACE=eth0
# Specify a Private IP Range - should be a non-existing network
FIXED_RANGE=192.168.204.0/24
FIXED_NETWORK_SIZE=256
MULTI_HOST=1
uacloud:~$
http://www.unixarena.com/2015/08/how-to-deploy-openstack-on-ubuntu.html 4/8
18/12/2017 How to Deploy Openstack on Ubuntu ? - UnixArena
Change the IP information according to your network. Read the comments within the file carefully.
It is better to keep same password for all the services for first time deployment.
uacloud:~$sudo su -
root@uacloud:~# echo 1 > /proc/sys/net/ipv4/ip_forward
root@uacloud:~# echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
root@uacloud:~# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
The ip_forward and proxy_arp changes will be reset when the machice reboots. You can make these changes perman
13. Login back as stack user & Run stack.sh to start deploying the openstack. It will take minimum 30 to 40 mins dep
the internet connection speed.
stack@uacloud:~/devstack$ ./stack.sh
2015-08-19 18:58:15.517 | ++ trueorfalse False
2015-08-19 18:58:15.523 | + OFFLINE=False
2015-08-19 18:58:15.523 | ++ trueorfalse False
2015-08-19 18:58:15.526 | + ERROR_ON_CLONE=False
2015-08-19 18:58:15.527 | ++ trueorfalse True
2015-08-19 18:58:15.530 | + ENABLE_DEBUG_LOG_LEVEL=True
2015-08-19 18:58:15.531 | + FLOATING_RANGE=192.168.203.170/24
2015-08-19 18:58:15.531 | + FIXED_RANGE=192.168.204.0/24
2015-08-19 18:58:15.531 | + FIXED_NETWORK_SIZE=256
In the bottom of the script output, you will get the Dashboard – Horizon Details and credentials .
http://www.unixarena.com/2015/08/how-to-deploy-openstack-on-ubuntu.html 5/8
18/12/2017 How to Deploy Openstack on Ubuntu ? - UnixArena
Dashboard – Horizon
Great. We got the Openstack Dashboard. In the upcoming articles , we will see how we can use the dashboard to lau
instances. Stay tuned with UnixArena by following in UnixArena Fans pages .
If the stack.sh failed with unknown errors , you must review the few things here.
3. In local.conf , RECLONE=yes
Reclone is used to keep the release up to date. For production environment, reclone should be set as “no”.
If the above things are not correct, you will get errors like below.
http://www.unixarena.com/2015/08/how-to-deploy-openstack-on-ubuntu.html 6/8
18/12/2017 How to Deploy Openstack on Ubuntu ? - UnixArena
If the Ubuntu version is 15.04, you will get error like below,
stack@CGI-MVPN:~/devstack$ ./stack.sh
WARNING: this script has not been tested on vivid
[Call Trace] ./stack.sh:98:die
[ERROR] ./stack.sh:98 If you wish to run this script anyway run with FORCE=yes
stack@CGI-MVPN:~/devstack$
You can overwrite above error by running like this , but stack.sh will failed at last. So better to use Ubuntu 14.04 wh
already tested by devstack community.
2015-08-19 07:44:11.024 | Linux uacloud 3.19.0-15-generic #15-Ubuntu SMP Thu Apr 16 23:32:37 UTC 2015 x86_64 x
x86_64 GNU/Linux
2015-08-19 07:44:11.024 | + SSL_BUNDLE_FILE=/opt/stack/data/ca-bundle.pem
Stack.sh will also fails in situation where your internet speed is not good or intermediate disconnects.
http://www.unixarena.com/2015/08/how-to-deploy-openstack-on-ubuntu.html 7/8
18/12/2017 How to Deploy Openstack on Ubuntu ? - UnixArena
http://www.unixarena.com/2015/08/how-to-deploy-openstack-on-ubuntu.html 8/8