Installing Openstack Centos 7

Time to install Openstack on an Centos 7 server. This was my first meeting with Openstack and it took some time for gettings things up.
This would be a beginners guide to get you first server up and running.

I followed this page in my installation


My Openstack server has one NIC connect to my DMZ network and then routed out.


First install a Centos 7 minimal server and setup network



Time to install

Set correct hostname make shoure that you hostname is in the hostfile with you ip corrected my servername is openstack1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6


Install the packages needed


sudo yum install -y
sudo yum install -y openstack-packstack
sudo yum update


sudo reboot



Install and setup Openstack RDO

packstack --allinone --provision-all-in-one-ovs-bridge=n



Setup the network

Create the file /etc/sysconfig/network-scripts/ifcfg-br-ex and add the following correct to you ip on host

IPADDR= # Old eth0 IP since we want the network restart to not kill the connection, otherwise pick something outside your dhcp range
NETMASK= # your netmask
GATEWAY= # your gateway
DNS1= # your nameserver


Fix you eno1 file (My network are connect to eno1 interface) my looks like this



Open the file vi /etc/neutron/plugin.ini and add

under the [ml2_type_vxlan]

network_vlan_ranges = physnet1

and then add under that


network_vlan_ranges = physnet1
bridge_mappings = physnet1:br-ex

Restart the network

systemctl restart network.service

sometimes I have problem when i restart my server the  I have to run the network restart after the server is booted to get network running.
This can have some issues so that the network dies and have to be restarted to work.



Set up Openstack

Now you shuld have av openstack server up and running the admin password is found in /root/keystonerc_admin

Setup the Network


get access

source ~/keystonerc_admin


Clean out

neutron router-gateway-clear router1
neutron subnet-delete public_subnet


Add our exesting subnet as public

my exesting network is and i want to use to to my server inside openstack

neutron subnet-create --name public_subnet --enable_dhcp=False --allocation-pool=start=,end= --gateway= public


Add our router and private network

neutron router-gateway-set router1 public
neutron net-create hostnet
neutron subnet-create --name private_subnet --enable_dhcp=True --allocation-pool=start=,end= hostnet
neutron router-gateway-set router1 hostnet  <-- dont work read bellow

This could somethimes dont work but then you can login to openstack as admin and go to Project/network/routers
Add a router and conenct it to the public network. Then press the router and add new port and add it to the hostnet give it ip

you should have e network top that looks like this.



Time to add floating ip

in the openstack dashbourd go to project ->compute ->Access & security -> floating ip
add as many ip as you can i started now with only two that i need.

Set up keys

in the openstack dashbourd go to project ->compute ->Access & security -> key pairs

generate and se that you get the pem file to you computer.


Set up access to server

in the openstack dashbourd go to project ->compute ->Access & security -> security group

press manager rules and add rules for


icmp all both ingress / egress directions (two rules)
ssh allow rule


So the network part is OK now we need to set up some openstack


Install instance



Go to in the openstack dashbord projects ->compute -> instans

press launch instanse and give the host the following settings


name: cirrius
flavor: tiny
instance boot source:boot from image

Network:hostnet (ONLY THE HOSTNET !!!!!!!)


then press launch


Add flouting ip

assosiate a floting ip that we created before to the host


Test so that it works

loggin in to the instance and test so that you have network by pingen and

it should work and you instanse should have internet access so lets test from external into the instance. From your openstack host ping you floting ip. and test to ssh into it.
And it should work and you have a working platform.




Error test to restart service in this order

[root@openstack1 mathem(keystone_admin)]# systemctl restart rabbitmq-server.service
[root@openstack1 mathem(keystone_admin)]# systemctl restart openstack-swift-proxy.service
[root@openstack1 mathem(keystone_admin)]# systemctl restart openstack-swift-object.service
[root@openstack1 mathem(keystone_admin)]# systemctl restart openstack-swift-container.service
[root@openstack1 mathem(keystone_admin)]# systemctl restart openstack-swift-account.service
[root@openstack1 mathem(keystone_admin)]# systemctl restart openstack-ceilometer-api.service
[root@openstack1 mathem(keystone_admin)]# systemctl restart openstack-ceilometer-api.service
[root@openstack1 mathem(keystone_admin)]# systemctl restart neutron-server.service
[root@openstack1 mathem(keystone_admin)]# systemctl restart mongod.service