Vnx-labo-openstack-3nodes-basic-liberty

From VNX
Revision as of 12:17, 29 December 2015 by David (talk | contribs) (Created page with "{{Title|VNX Openstack Liberty 3-nodes-basic laboratory}} == Introduction == This is an Openstack tutorial scenario designed to experiment with Openstack free and open-source...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

VNX Openstack Liberty 3-nodes-basic laboratory

Introduction

This is an Openstack tutorial scenario designed to experiment with Openstack free and open-source software platform for cloud-computing.

The scenario is basically the one described in the Openstack Liberty installation guide for Ubuntu. It is made of three virtual machines: a controller with networking capabilities and two compute nodes, all of them based on KVM. Optionally, a third compute node can be added once the scenario is started.

All virtual machines use Ubuntu 14.04.3 LTS and Openstack Liberty.

The scenario has been inspired by the ones developed by Raul Alvarez to test OpenDaylight-Openstack integration, but instead of using Devstack to configure Openstack nodes, the configuration is done by means of commands integrated into the VNX scenario following Openstack installation recipes in http://docs.openstack.org/kilo/install-guide/install/apt/content/


Requirements

To use the scenario you need a Linux computer (Ubuntu 14.04 or later recommended) with VNX software installed. At least 4Gb of memory are needed to execute the scenario.

See how to install VNX here: http://vnx.dit.upm.es/vnx/index.php/Vnx-install

If already installed, update VNX to the latest version with:

vnx_update

To make startup faster, enable one-pass-autoconfiguration for KVM virtual machines in /etc/vnx.conf:

[libvirt]
...
one_pass_autoconf=yes

Check that KVM nested virtualization is enabled:

cat /sys/module/kvm_intel/parameters/nested
Y

If not enabled, check, for example, http://docs.openstack.org/developer/devstack/guides/devstack-with-nested-kvm.html to enable it.

Installation

Download the scenario with the virtual machines images included and unpack it:

wget http://idefix.dit.upm.es/vnx/openstack_tutorial-liberty_3nodes_basic-v014-with-rootfs.tgz
vnx --unpack openstack_tutorial-v014-with-rootfs.tgz

Alternatively, you can download the much lighter version without the images and create the root filesystems from scratch in your computer:

wget http://idefix.dit.upm.es/cnvr/openstack_tutorial-v014.tgz
vnx --unpack openstack_tutorial-v014.tgz
cd openstack_tutorial-v014/filesystems
./create-kvm_ubuntu64-ostack-compute
./create-kvm_ubuntu64-ostack-network
./create-lxc_ubuntu64-ostack-controller

Starting the scenario

Start the scenario and configure it and load an example cirros image with:

cd openstack_tutorial-v014
vnx -f openstack_tutorial-kilo_4nodes_basic.xml -v -t
vnx -f openstack_tutorial-kilo_4nodes_basic.xml -v -x start-all
vnx -f openstack_tutorial-kilo_4nodes_basic.xml -v -x load-img
Figure 2: Openstack tutorial detailed topology

Once started, you can connect to Openstack Dashboard (admin/xxxx) starting a browser and pointing it to the controller horizon page. For example:

firefox 10.0.10.11/horizon

Access Dashboard page "Project|Network|Network topology" and create a simple demo scenario inside Openstack:

vnx -f openstack_tutorial-kilo_4nodes_basic.xml -v -x create-demo-scenario

You should see the simple scenario as it is being created through the Dashboard.

Once created you should be able to access vm1 console, to ping or ssh from the host to the vm1 or the opposite (see the floating IP assigned to vm1 in the Dashboard, probably 10.0.10.102).

Finally, to allow external Internet access from vm1 you hace to configure a NAT in the host. You can easily do it using vnx_config_nat command distributed with VNX. Just find out the name of the public network interface of your host (i.e eth0) and execute:

vnx_config_nat ExtNet eth0

Stopping or releasing the scenario

To stop the scenario preserving the configuration and the changes made:

vnx -f openstack_tutorial-kilo_4nodes_basic.xml -v --shutdown

To start it again use:

vnx -f openstack_tutorial-kilo_4nodes_basic.xml -v --start

To stop the scenario destroying all the configuration and changes made:

vnx -f openstack_tutorial-kilo_4nodes_basic.xml -v --destroy

To unconfigure the NAT, just execute:

vnx_config_nat -d ExtNet eth0

Adding a third compute node (compute3)

To add a third compute node to the scenario once it is started you can use the VNX modify capacity:

vnx -s openstack_tutorial-kilo_4nodes_basic --modify others/add-compute3.xml -v
vnx -s openstack_tutorial-kilo_4nodes_basic -v -x start-all -M compute3

Once the new node has been joined to the scenario, you must use "-s" option instead of "-f" to manage it (if not, the compute3 node will not be considered). For example,

vnx -s openstack_tutorial-kilo_4nodes_basic -v --destroy

Other useful information

To pack the scenario in a tgz file including the root filesystems use:

bin/pack-scenario --include-rootfs

To pack the scenario without the root filesystems, just delete the "--include-rootfs" parameter.

XML specification of Openstack tutorial scenario