A.0 Preparations on VMware Workstation
[A.1. Deployment model on VMware Workstation] (#deployment)
C. Installation on CONTROLLER NODE
D. Installation on NETWORK NODE
E. Installation on COMPUTE NODE
F. Installing HORIZON, creating networks on CONTROLLER NODE
Configurations of vmnets on vmware workdstation in the following figures.
- VMNET0 - Bridge mode, 192.168.1.0/24
- VMNET2 - VMNET 2. IP range: 10.10.10.0/24
- VMNET3 - VMNET 3. IP range: 10.10.20.0/24 Go to "Edit" tab ==> Virtual Network Editor.
3 nodes model of Openstack deployment in a laptop.
- Ubuntu installation in Vmware Workstation must be ensured by the order of network.
- Ip addresses of NICs are dynamic, shell scripts will automatically assign static IPs later.(written in files config.cfg
- HDD: 20GB
- RAM: 2GB
- CPU: 02 (Virtualization support)
- NIC: 02 NICs (eth0 - vmnet2 ) (eth1 - brige). Dynamic IP.
As showed as following figure:
- HDD: 20GB
- RAM: 2GB
- CPU 01 (Virtualization support)
- NICs: 03. eth0-vmnet2. eth1-bridge . eth2-vmnet3. Dynamic IP.
- Hostname: network
As showed as following figure:
- HDD: 60GB
- RAM: 3GB
- CPU 2x2 (Virtualization support)
- NICs: 03. eth0-vmnet2. eth1-bridge . eth2-vmnet3. Dynamic IP.
- Hostname: compute1
As showed as following figure:
Access under the "root" user into host machines and install packages, preparation scripts for installing process.
apt-get update
apt-get install git -y
git clone https://github.com/vietstacker/openstack-juno-multinode-U14.04-v1.git
mv /root/openstack-juno-multinode-U14.04-v1/juno-ubuntu14.04/ juno-ubuntu14.04
rm -rf openstack-juno-multinode-U14.04-v1
cd juno-ubuntu14.04/
chmod +x *.sh
Before modifying, no need to assign static IP to NICs on each host machine. Modify the file config.cfg lying in the repo juno-ubuntu14.04 with your own IPs or remain IPs and ensure that they are not used by other machines in your network.
Here is initial file : .... # IP assignment in CONTROLLER NODE CON_MGNT_IP=10.10.10.71 CON_EXT_IP=192.168.1.71
# IP assignment in NETWORK NODE
NET_MGNT_IP=10.10.10.72
NET_EXT_IP=192.168.1.72
NET_DATA_VM_IP=10.10.20.72
# IP assignment in COMPUTE1 NODE
COM1_MGNT_IP=10.10.10.73
COM1_EXT_IP=192.168.1.73
COM1_DATA_VM_IP=10.10.20.73
# IP assignment in COMPUTE2 NODE
COM2_MGNT_IP=10.10.10.74
COM2_EXT_IP=192.168.1.74
COM2_DATA_VM_IP=10.10.20.74
GATEWAY_IP=192.168.1.1
NETMASK_ADD=255.255.255.0
# Set password
DEFAULT_PASS='Welcome123'
.....
Execution in each node
bash control-1.ipadd.sh
After executing scripts, the Controller will restart and has the following parameters:
Hostname | NICs | IP ADDRESS | SUBNET MASK | GATEWAY | DNS | Note |
---|---|---|---|---|---|---|
controller | eth0 | 10.10.10.71 | 255.255.255.0 | VMNET2 | ||
eth1 | 192.168.1.71 | 255.255.255.0 | 192.168.1.1 | 8.8.8.8 | brige |
Access to the controller node with the address of CON_EXT_IP declared in the file config.cfg 192.168.1.71 under the "root" user.
cd juno-ubuntu14.04
bash control-2.prepare.sh
bash control-3.create-db.sh
bash control-4.keystone.sh
Creates endpoints to the services. The parameters in shell are get from config.cfg
bash control-5-creatusetenant.sh
Executing the openrc file
source admin-openrc.sh
Checking again keystone service
keystone user-list
Result of keystone user-list
+----------------------------------+---------+---------+-----------------------+
| id | name | enabled | email |
+----------------------------------+---------+---------+-----------------------+
| eda2f227988a45fcbc9ffb0abd405c6c | admin | True | [email protected] |
| 07f996af33f14415adaf8d6aa6b8be83 | cinder | True | [email protected] |
| 6a198132f715468e860fa25d8163888e | demo | True | [email protected] |
| 4fa14e44dafb48f09b2febaa2a665311 | glance | True | [email protected] |
| 5f345c4a266d4c7691831924e1eec1f5 | neutron | True | [email protected] |
| d4b7c90da1c148be8741168c916cf149 | nova | True | [email protected] |
| ddcb21870b4847b4b72853cfe7badd07 | swift | True | [email protected] |
+----------------------------------+---------+---------+-----------------------+
Installation of other services
bash control-6.glance.sh
bash control-7.nova.sh
bash control-8.neutron.sh
bash control-9.cinder.sh
- Installing NEUTRON, ML2 and GRE config, using use case per-router per-tenant.
Access to the NETWORK NODE under the "root" user
apt-get update
apt-get install git -y
git clone https://github.com/vietstacker/openstack-juno-multinode-U14.04-v1.git
mv /root/openstack-juno-multinode-U14.04-v1/juno-ubuntu14.04/ juno-ubuntu14.04
rm -rf openstack-juno-multinode-U14.04-v1
cd juno-ubuntu14.04/
chmod +x *.sh
Script for OpenvSwitch installtion and declaring br-int & br-ex for OpenvSwitch
bash net-ipadd.sh
- NETWORK NODE will restart, access again under the "root" user.
- IP và hostname parameters on the NETWORK NODE:
Hostname | NICs | IP ADDRESS | SUBNET MASK | GATEWAY | DNS | NOTE |
---|---|---|---|---|---|---|
network | eth0 | 10.10.10.72 | 255.255.255.0 | VMNET2 | ||
br-ex | 192.168.1.72 | 255.255.255.0 | 192.168.1.1 | 8.8.8.8 | bridge | |
eth2 | 10.10.20.72 | 255.255.255.0 | VMNET3 |
Note: Shell will move eth1 to the promisc mode and assign IP for br-ex created after OpenvSwitch installation.
- Using putty to ssh to the NETWORK NODE through IP 192.168.1.172 with "root" user
cd juno-ubuntu14.04
bash net-prepare.sh
End of installing on the NETWORK NODE and move to COMPUTE NODE
apt-get update
apt-get install git -y
git clone https://github.com/vietstacker/openstack-juno-multinode-U14.04-v1.git
mv /root/openstack-juno-multinode-U14.04-v1/juno-ubuntu14.04/ juno-ubuntu14.04
rm -rf openstack-juno-multinode-U14.04-v1
cd juno-ubuntu14.04/
chmod +x *.sh
bash com1-ipdd.sh
NICs of COMPUTE NODE will be following:
Hostname | NICs | IP ADDRESS | SUBNET MASK | GATEWAY | DNS | NOTE |
---|---|---|---|---|---|---|
compute1 | eth0 | 10.10.10.73 | 255.255.255.0 | VMNET2 | ||
br-ex | 192.168.1.73 | 255.255.255.0 | 192.168.1.1 | 8.8.8.8 | bridge | |
eth2 | 10.10.20.73 | 255.255.255.0 | VMNET3 |
COMPUTE node will restart, access again to execute the following scripts
Access to the compute node
cd juno-ubuntu14.04
bash com1-prepare.sh
Choose "YES"
End of COMPUTE NODE installing, move back to the CONTROLLER NODE.
Access to the controller node
cd /root/juno-ubuntu14.04
bash control-horizon.sh
Create policies to allow external machines to access to the instances via IP PUBLIC. Execute the following scripts to create networks for Openstack Create router, assign subnet to router, gateway to router Initiate a virtual machine with cirros image to test
bash creat-network.sh
Restart nodes in order:
- CONTROLLER
- NETWORK NODE
- COMPUTE NODE
Have fun!