OpenStack:RDO
lastmod 2018-08-17created 2015-07-1628 edits
Install introduce
- Install CentOS. (Use LVM.)
- On CentOS 7, a large amount of space is allocated to
/home, so remove that LVM partition and reallocate it to root: see CentOS:ResizeLVM. - Disable SELinux.
- If needed, install the NVIDIA driver.
- Generate the RDOProject Answer file.
- Install. (The installer tries to access the root account over ssh during installation. So you must check that root access over ssh is possible.)
How to install
In non-English locales, apply the locale settings below. /etc/environment
Change the SELinux setting. Change enforcing to permissive in the /etc/sysconfig/selinux file.
Install the repository.
## On RHEL:
$ sudo yum install -y https://www.rdoproject.org/repos/rdo-release.rpm
## On CentOS:
$ sudo yum install -y centos-release-openstack-mitaka
## Add repository
$ sudo yum update -y
$ sudo yum install -y openstack-packstack
Stop the NetworkManager service, which changes network settings.
$ sudo systemctl disable NetworkManager
$ sudo systemctl enable network
$ sudo systemctl stop NetworkManager.service
$ sudo systemctl start network.service
The simple installation method is as follows. (Skip this if you want to use an external network.)
Using external network
If you want to connect to an external network, install as below. (In the following, replace eth0 with the name of your own Ethernet device. e.g. on CentOS 7, something like enp0s31.)
$ sudo packstack --allinone --provision-demo=n --os-neutron-ovs-bridge-mappings=extnet:br-ex --os-neutron-ovs-bridge-interfaces=br-ex:eth0 --os-neutron-ml2-type-drivers=vxlan,flat
Above, extnet is the logical name for the external physical L2 segment. You will refer to this name later when defining the external network.
Also, the network type supported by the install command above is flat. This is needed when the Provider Network is a simple flat network. (the most common setup for PoCs). If you use a VLAN Segment for external connectivity, the type driver needs vlan.2
| the command is currently broken for Mitaka |
| See: Bug 1316856 - packstack fails to configure ovs bridge for CentOS |
| If the command above does not work properly, remove the |
| After completion, given a single machine with a current IP of 192.168.122.212/24 via DHCP with gateway of 192.168.122.1: Make The file above will move the network parameters from eth0 to br-ex. Make Note: if on Centos7, the file could be It is also possible to use a bond. In that case This means, we will bring up the interface and plug it into br-ex OVS bridge as a port, providing the uplink connectivity. Restart the network service |
Create the external network with the Neutron command. (The extnet L2 segment name below was used as the argument to --os-neutron-ovs-bridge-mappings during the initial installation.)
$ . keystonerc_admin
$ neutron net-create external_network --provider:network_type flat --provider:physical_network extnet --router:external
Create the subnet, paying attention to the /etc/sysconfig/network-scripts/ifcfg-br-ex settings.
$ neutron subnet-create --name public_subnet --enable_dhcp=False --allocation-pool=start=192.168.122.10,end=192.168.122.20 --gateway=192.168.122.1 external_network 192.168.122.0/24
Add CirrOS to Glance for the demo.
$ curl http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img | glance image-create --name='cirros image' --visibility=public --container-format=bare --disk-format=qcow2
This completes the minimum setup for administration.
Testing
Add a new user to test the external network. Detailed explanations of the commands are omitted.
$ openstack project create --enable internal
$ openstack user create --project internal --password foo --email [email protected] --enable internal
Now, let's switch to the newly created user:
Then create a router and set its gateway using the external network created by the admin in one of previous steps:
Now create a private network and a subnet in it, since demo provisioning has been disabled:
# neutron net-create private_network
# neutron subnet-create --name private_subnet private_network 192.168.100.0/24
Finally, connect your new private network to the public network through the router, which will provide floating IP addresses.
Easiest way to the network and to launch instances is via horizon, which was set up by packstack.
Command
-
packstack --gen-answer-file=/answer/file/path - Generates an Answer file.
-
packstack --answer-file=/path/to/packstack_answers.txt - Reuse an answer file.
-
packstack --allinone - Shorthand for:
--install-hosts=<local ipaddr>--novanetwork-pubif=<dev>--novacompute-privif=lo --novanetwork-privif=lo --os-swift-install=y --nagios--install=y - All in one command.
Configure
- CONFIG_CINDER_VOLUMES_SIZE
- how to resize cinder size
- Sets the Cinder volume size.
- Size of Block Storage volumes group. Actual volume size will be extended with 3% more space for VG metadata. Remember that the size of the volume group will restrict the amount of disk space that you can expose to Compute instances, and that the specified amount must be available on the device used for
/var/lib/cinder.
- CONFIG_PROVISION_DEMO
- Recommand value:
n - Command-line flag:
--provision-demo=n - Whether to apply the settings for the test demo.
- CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS
- Recommand value: extnet:
br-ex - Command-line flag:
--os-neutron-ovs-bridge-mappings=extnet:br-ex
- CONFIG_NEUTRON_OVS_BRIDGE_IFACES
- Recommand value:
br-ex:enp3s0 - Command-line flag:
--os-neutron-ovs-bridge-interfaces=br-ex:enp3s0
- CONFIG_NEUTRON_ML2_TYPE_DRIVERS
- Recommand value:
vxlan,flat - Command-line flag:
--os-neutron-ml2-type-drivers=vxlan,flat
Horizon SSL
With the current (Oct. 2013) version of packstack the CONFIG_HORIZON_SSL=y fails for both grizzly and havana. Here is a guide to setting up ssl after the installation.
install the ssl module for apache
copy the certificate and key files to /etc/httpd/conf.d
update /etc/httpd/conf.d/ssl.conf
update /etc/httpd/conf.d/openstack-dashboard.conf
sed -i '1 i\
#these lines force an ssl connection\
RewriteEngine On\
RewriteCond %{HTTPS} !on\
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]\
' /etc/httpd/conf.d/openstack-dashboard.conf
make a backup of the ssl.conf file (in case packstack is re-run)
restart the web service
Troubleshooting
rdo cannot remove lib dracut hooks shutdown 30-dm-shutdown readonly file system
After installing RDO, the server may fail to shut down normally. See here.
Not working external network in VirtualBox
In VirtualBox, communication with the external network may fail through a network adapter configured as a bridged adapter. In this case, change that network adapter to promiscuous mode.
See also
Favorite site
- RDO web site: Quickstart
- Github: naototty/centos7-rdo-icehouse
- Diving into OpenStack Network Architecture - Part 4 - Connecting to Public Network
- [Recommended] First install a Centos 7 minimal server and setup network
- My RDO installation procedure : Single Node using Neutron GRE
- Red Hat RDO - Single Node using Neutron GRE - Havana
- Evaluating OpenStack: Single-Node Deployment
Documentation
- [Recommended] Neutron with existing external network
- Packstack quickstart: Proof of concept for single node
- Networking
- Floating IP range
- Packstack Cookbook
- Adding a compute node
Guide
- [Recommended] Diving into OpenStack Network Architecture - Part 4 - Connecting to Public Network
- [Recommended] All-In-One Openstack using RDO Packstack with External Public IP’s
References
-
If you want to rename enp0s3 to the eth0 style, see Ifconfig#CentOS7 : Change network interface name. ↩
-
For reference, to modify the settings directly after installation, see here. ↩
-
As an alternative, you can use
packstack –allinone –provision-all-in-one-ovs-bridge=n, but this method is more complicated. ↩