Hot of the press are our Oslo stickers for the Austin event. Be sure to track down an Oslo core, answer the magic question and add this to your conference swag.
Hot of the press are our Oslo stickers for the Austin event. Be sure to track down an Oslo core, answer the magic question and add this to your conference swag.
As discussed, devstack enables a software developer to run a standalone minimal OpenStack cloud on a virtual machine (VM). In this tutorial we are going to step through the installation of an Ubuntu VM using VirtualBox manually. This is a pre-requisite to installing devstack.
If using Mac OS X or Linux you can obtain a recent .iso release with the command:
$ wget http://releases.ubuntu.com/14.04/ubuntu-14.04.4-server-amd64.iso
To create a virtual machine in VirtualBox select the New icon. This will prompt you for some initial configuration. Use these recommendations:
By default your virtual machine is ready to install however by making the following network recommendation it will be easier to access your running virtual machine and devstack from your host computer.
You are now ready to install the Operating System on the virtual machine with the following instructions.
The new virtual machine will now restart and you will be able to login with the username and password specified (i.e. stack and Openstack).
After successfully logging in run the following commands to complete the Ubuntu installation setup needed as pre-requisites to install devstack.
$ sudo su - # Enter your stack user password $ umask 266 & echo "stack ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/stack $ apt-get update && apt-get upgrade -y $ echo "auto eth1 iface eth1 inet dhcp" >> /etc/network/interfaces $ ifup eth1
You are now ready to download and install devstack.
You can also setup an Ubuntu virtual machine via vagrant which simplifies these instructions.
This blog is a series for the software developer with no experience in OpenStack to experience just the tip of functionality and features to become more interested in the project.
When using VirtualBox for my OpenStack development I always configure two network adapters for ease of development. The first is a NAT adapter that enables the guest VM connectivity to the Internet via the host. The second network adapter is a host-only Adapter that enables my host computer (aka my terminal windows) to SSH directly to the guest VM, or to access a web interface for example. This enables the use of tools like ssh, scp, rsync etc easily with multiple VMs without thinking of different ports.
Having the two adapters is very convenient, however when you install products such as devstack or RDO these require additional steps to manage the interface and configure the installation. These steps are relatively straightforward but they make the most simple instructions more complex.
There are alternatives to using the NAT only adapter and enable port forwarding. For example you can configure port forwarding of port 2222 to the guest 22 with (when VM is not running):
$ VBoxManage modifyvm "vm-name" --natpf1 "guestssh,tcp,,2222,,22" $ VBoxManage startvm "vm-name"
You can now connect to the guest VM via port forwarding on your host, in this case connecting to port 2222.
$ ssh [email protected] -p 2222
Personally I find this a disadvantage. You need to provide port forwarding for all ports you want to communicate on e.g. ssh (22), http (80) and keystone (5000). You need to do it in advance of using your VM, and you also need to do this for each VM.
However, depending on your needs and experience this is a valid alternative.
On Ubuntu, the following configuration file defines two DHCP network adapters.
$ cat /etc/network/interfaces # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet dhcp auto eth1 iface eth1 inet dhcp
You can verify adapter information (e.g. IP address) using
$ ifconfig eth0 Link encap:Ethernet HWaddr 08:00:27:7f:a0:e2 inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0 inet6 addr: fe80::a00:27ff:fe7f:a0e2/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:585 errors:0 dropped:0 overruns:0 frame:0 TX packets:455 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:129820 (129.8 KB) TX bytes:64215 (64.2 KB) eth1 Link encap:Ethernet HWaddr 08:00:27:66:8d:cb inet addr:192.168.56.102 Bcast:192.168.56.255 Mask:255.255.255.0 inet6 addr: fe80::a00:27ff:fe66:8dcb/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:221 errors:0 dropped:0 overruns:0 frame:0 TX packets:152 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:28289 (28.2 KB) TX bytes:19443 (19.4 KB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:371 errors:0 dropped:0 overruns:0 frame:0 TX packets:371 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:90509 (90.5 KB) TX bytes:90509 (90.5 KB)
ip command is also available.
To configure an IP with a fixed address on the host-only adapter network which is useful for many machines, you would use:
auto eth1 iface eth1 inet static address 192.168.56.50 netmask 255.255.255.0 gateway 192.168.56.1
CentOS keeps a configuration file per interface. We start be determining the interface names.
$ ls -l /etc/sysconfig/network-scripts/ifcfg-* -rw-r--r--. 1 root root 310 Mar 30 16:53 /etc/sysconfig/network-scripts/ifcfg-enp0s3 -rw-r--r--. 1 root root 278 Mar 30 17:00 /etc/sysconfig/network-scripts/ifcfg-enp0s8 -rw-r--r--. 1 root root 277 Mar 30 16:53 /etc/sysconfig/network-scripts/ifcfg-enp0s8e -rw-r--r--. 1 root root 254 Sep 16 2015 /etc/sysconfig/network-scripts/ifcfg-lo
And then can review the per interface configuration with:
$ cat /etc/sysconfig/network-scripts/ifcfg-enp0s3 TYPE="Ethernet" BOOTPROTO="dhcp" DEFROUTE="yes" PEERDNS="yes" PEERROUTES="yes" IPV4_FAILURE_FATAL="no" IPV6INIT="yes" IPV6_AUTOCONF="yes" IPV6_DEFROUTE="yes" IPV6_PEERDNS="yes" IPV6_PEERROUTES="yes" IPV6_FAILURE_FATAL="no" NAME="enp0s3" UUID="2c0bdd66-badc-449c-8db8-b2c85a716dab" DEVICE="enp0s3" ONBOOT="yes" $ cat /etc/sysconfig/network-scripts/ifcfg-enp0s8 TYPE=Ethernet BOOTPROTO=dhcp DEFROUTE=yes PEERDNS=yes PEERROUTES=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_PEERDNS=yes IPV6_PEERROUTES=yes IPV6_FAILURE_FATAL=no NAME=enp0s8 UUID=4127685d-a7b9-4b8d-a399-6dcacdb3396d DEVICE=enp0s8 ONBOOT=yes
You can verify the network configuration using the
$ ip addr 1: lo:
mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: enp0s3: mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 08:00:27:32:c0:4c brd ff:ff:ff:ff:ff:ff inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic enp0s3 valid_lft 15876sec preferred_lft 15876sec inet6 fe80::a00:27ff:fe32:c04c/64 scope link valid_lft forever preferred_lft forever 3: enp0s8: mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 08:00:27:43:22:85 brd ff:ff:ff:ff:ff:ff inet 192.168.56.103/24 brd 192.168.56.255 scope global dynamic enp0s8 valid_lft 1056sec preferred_lft 1056sec inet6 fe80::a00:27ff:fe43:2285/64 scope link valid_lft forever preferred_lft forever
CentOS does not provide
ifconfig by default, it’s included in the
net-tools package (RDO for example installs this).
$ sudo yum install -y net-tools $ ifconfig enp0s3: flags=4163
mtu 1500 inet 10.0.2.15 netmask 255.255.255.0 broadcast 10.0.2.255 inet6 fe80::a00:27ff:fe32:c04c prefixlen 64 scopeid 0x20 ether 08:00:27:32:c0:4c txqueuelen 1000 (Ethernet) RX packets 437445 bytes 441847285 (421.3 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 142720 bytes 8897712 (8.4 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 enp0s8: flags=4163 mtu 1500 inet 192.168.56.103 netmask 255.255.255.0 broadcast 192.168.56.255 inet6 fe80::a00:27ff:fe43:2285 prefixlen 64 scopeid 0x20 ether 08:00:27:43:22:85 txqueuelen 1000 (Ethernet) RX packets 14250 bytes 1708162 (1.6 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 15367 bytes 13061787 (12.4 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73 mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 0 (Local Loopback) RX packets 5706360 bytes 778262566 (742.2 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 5706360 bytes 778262566 (742.2 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
VirtualBox is an open source virtualization product that will allow you to create virtual machines on a computer using Linux, Mac OS X or Windows. While the current version is 5.x, older versions will also work if you are already using this software.
Just follow the default prompts.
This additional step will create a network configuration in VirtualBox that is called vboxnet0. This will define a network in the 192.168.56.X range, and will configure a DHCP server that will issue IP addresses starting at 192.168.56.101. This will enable you to more easily access your VMs from your host computer as discussed in VirtualBox networking for beginners.
This guide will assume you have never installed virtualization software, used or configured devstack or even observed a running OpenStack cloud. This guide does assume that you can perform some basic software development instructions as documented.
There are some hardware requirements and various copy/paste command line instructions on a Linux virtual machine. While it would be possible to publish a completed virtual machine you could download and click to run, understanding the underpinnings of the most basic installation and configuration of devstack will provide an appreciation of the complexity of the product and the software development capabilities.
At the end of this process you will have a running OpenStack cloud on your computer that is running on a Linux virtual machine. You will be able to access this with your browser and be able to perform basic cloud infrastructure tasks, such as creating a compute instance. This guide is not intended to talk about the benefits or usages of a cloud.
You will need a computer running Mac OS X, Windows, Linux (see supported list) or Solaris with at least 4GB of RAM and 10GB of available disk drive space in order to complete the following steps.
Without knowing the purpose of following this first-time guide what’s next depends on your. As a software developer you may be interested in looking OpenStack Bugs or contributing to new features of one of the many projects. As an architect you may want to understand a more complex configuration setup as you plan to determine what may be necessary to utilize a cloud infrastructure in your organization. This guide is only intended as the first introduction and hopefully has provided the intended result for the reader to consider what OpenStack can possibly provide.
As a software developer or system architect that is interested in looking at the workings of OpenStack, devstack is one of several different ways to start a personal cloud using the current OpenStack code base.
In it’s most basic form, you can run devstack in a virtual machine and be able to manage your personal cloud via the Horizon web interface (known as the Dashboard), or via several CLI APIs such as the OpenStack client (OSC). You can use this to launch compute services, manage boot images and disk volumes, define networking and configure administrative users, projects and roles.
The benefit of devstack is for the developer and deployer. You can actually see the running cloud software, interact and engage with individual services. devstack is a valuable tool to debug and bugfix services. devstack is used by the OpenStack CI/CD system for testing so it is robust enough to evaluate the core projects and many of the available projects that can be configured to be installed with devstack. You can also configure to use trunk (i.e. master) code, or specific branches or tags for individual services. The CI system for example will install the trunk of services, and the specific branch of a new feature or bug fix for one given project in order to perform user and functional testing.
devstack also enables more complex configuration setups. You can setup devstack with LXC containers, you can run a multi-node setup, you can run with Neutron networking. While devstack installs a small subset of projects including keystone, nova, cinder, glance and horizon, you can use devstack to run other OpenStack projects such as Manila, Trove, Magnum, Sahara, Solum and Heat.
The benefit of devstack is for evaluation of capabilities. devstack is not a product to use to determine a path for production deployment of OpenStack. This process includes many more complex considerations of determining why you want to implement an infrastructure for demand for your organization, and considerations of the most basic technical needs such as uptime and SLA requirements, high availability, monitoring and alerting, security management and upgrade paths of your software.
If you are ready to see what OpenStack could provide and want to run a local cloud, you can start with installing Openstack with devstack, a first-time guide.
OpenStack is a cloud computing software product that is the leading open source platform for creating cloud infrastructure. Used by hundreds of companies to run public, private and hybrid clouds, OpenStack is the second most popular open source project after the Linux Kernel.
There are numerous distributions of OpenStack from leading vendors such as Red Hat, IBM, Canonical, Cisco, SUSE, Oracle and VMware to name a few. Each vendor provide a means of installing and managing an OpenStack cloud and integrates the cloud with a large number of hardware and software products and appliances. Regardless of your preferred host operating system or deployment methodology with ansible, puppet or chef, there is an project or provider to suit your situation.
For the software developer or system architect there are several ways to evaluate the basic features of OpenStack. Free online services such as Mirantis Express and TryStack or production clouds at Rackspace and OVH offer you an infrastructure to handle compute, storage, networking and orchestration features and you can engage with your personal cloud via web and CLI interfaces.
If however you want to delve behind the UI and API’s to see OpenStack in operation there are simple VM based means using devstack, RDO or Ubuntu OpenStack that can operate a running OpenStack on single VM or multiple VMs. You can follow the OpenStack documentation installation guides which cover openSUSE 13.2, SUSE Linux Enterprise Server 12, Red Hat Enterprise Linux 7, CentOS 7 and Ubuntu 14.04 (LTS) to install OpenStack on a number of physical hardware devices (a minimal configuration is three servers).
These options will introduce you to what *may* be possible with OpenStack personally. This is however the very tip of a very large iceberg. Considering a cloud infrastructure for your organization is a much more complex set of decisions about the impact, usefulness and cost-effectiveness for your organisation.
As part of migrating Oslo Incubator code to graduated libraries I have come across several inactive OpenStack projects. (An inactivate project does not mean the project should be retired or removed). However in my case when consulting the mailing list, it was confirmed that the kite project met the criteria to proceed.
There are good procedures to Retiring a project in the Infra manual. In summary these steps are:
As with good version control, the resulting code for the project is not actually removed.
As per the commit comment you simply git checkout HEAD^1 to access the project in question.