Difference between revisions of "Vnx-labo-openstack"

From VNX
Jump to: navigation, search
(Starting the scenario)
(20 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Title|VNX Openstack laboratory}}
+
{{Title|VNX Openstack laboratories}}
  
== Introduction ==
+
This is a set of Openstack tutorial scenarios designed to experiment with [http://openstack.org Openstack] free and open-source software platform for cloud-computing.
  
This is an Openstack tutorial scenario designed to experiment with Openstack free and open-source
+
Several tutorial scenarios are available covering Kilo, Liberty and Mitaka Openstack versions and several deployment configurations:
software platform for cloud-computing.
 
  
The scenario is made of four virtual machines: a controller based on LXC and a network node and two
+
<ul>
compute nodes based on KVM. Optionally, a third compute node can be added once the scenario is started.
+
<li>Openstack Ocata:</li>
 +
<ul>
 +
<li>[[Vnx-labo-openstack-4nodes-classic-ovs-ocata|Four-nodes-classic-openvswitch]]: a basic scenario using Openstack Ocata made of four virtual machines: a controller, a network node and two compute nodes all based on LXC. The deployement scenario used is [http://docs.openstack.org/mitaka/networking-guide/scenario-classic-ovs.html Classic with Open vSwitch]</li>
 +
</ul>
  
All virtual machines use Ubuntu 14.04.3 LTS and Openstack Kilo.
+
<li>Openstack Mitaka:</li>
 +
<ul>
 +
<li>[[Vnx-labo-openstack-4nodes-classic-ovs-mitaka|Four-nodes-classic-openvswitch]]: a basic scenario using Openstack Mitaka made of four virtual machines: a controller based on LXC and a network and two compute nodes based on KVM. The deployement scenario used is [http://docs.openstack.org/mitaka/networking-guide/scenario-classic-ovs.html Classic with Open vSwitch]</li>
 +
</ul>
  
The scenario has been inspired by the ones developed by Raul Alvarez to test OpenDaylight-Openstack
+
<li>Openstack Liberty:</li>
integration, but instead of using Devstack to configure Openstack nodes, the configuration is done
+
<ul>
by means of commands integrated into the VNX scenario following Openstack installation recipes in
+
<li>[[Vnx-labo-openstack-3nodes-basic-liberty|Liberty 3-nodes-basic]]: a basic scenario using Openstack Liberty made of three KVM virtual machines: a controller with networking capabilities and two compute nodes.</li>
http://docs.openstack.org/kilo/install-guide/install/apt/content/
+
<li>[[Vnx-labo-openstack-4nodes-basic-liberty|Liberty 4-nodes-legacy-openvswitch]]: a basic scenario using Openstack Liberty made of four virtual machines: a controller based on LXC and a network and two compute nodes based on KVM. The deployement scenario used is [http://docs.openstack.org/networking-guide/scenario_legacy_ovs.html Legacy with Open vSwitch]</li>
 +
</ul>
  
[[File:Openstack_tutorial.png|center|thumb|600px|<div align=center>
+
<li>Openstack Kilo:</li>
'''Figure 1: Openstack tutorial scenario'''</div>]]
+
<ul>
 +
<li>[[Vnx-labo-openstack-4nodes-basic-kilo|Kilo 4-nodes-basic]]: a basic scenario using Openstack Kilo made of four virtual machines: a controller based on LXC and a network node and two compute nodes based on KVM.</li>
 +
</ul>
  
== Requirements ==
+
</ul>
 
 
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/cnvr/openstack_tutorial-v013-with-rootfs.tgz
 
vnx --unpack openstack_tutorial-v013.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-v013-with-rootfs.tgz
 
vnx --unpack openstack_tutorial-v013.tgz
 
cd openstack_tutorial-v013/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:
 
 
 
vnx -f openstack_tutorial-4nodes.xml -v -t
 
vnx -f openstack_tutorial-4nodes.xml -v -x start-all
 
vnx -f openstack_tutorial-4nodes.xml -v -x load-img
 
 
 
[[File:Openstack_tutorial2.png|center|thumb|600px|<div align=center>
 
'''Figure 2: Openstack tutorial detailed topology'''</div>]]
 
 
 
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-4nodes.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-4nodes.xml -v --shutdown
 
 
 
To start it again use:
 
 
 
vnx -f openstack_tutorial-4nodes.xml -v --start
 
 
 
To stop the scenario destroying all the configuration and changes made:
 
 
 
vnx -f openstack_tutorial-4nodes.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-4nodes --modify others/add-compute3.xml -v
 
vnx -s openstack_tutorial-4nodes -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-4nodes -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.
 

Revision as of 00:30, 13 November 2018

VNX Openstack laboratories

This is a set of Openstack tutorial scenarios designed to experiment with Openstack free and open-source software platform for cloud-computing.

Several tutorial scenarios are available covering Kilo, Liberty and Mitaka Openstack versions and several deployment configurations:

  • Openstack Ocata:
  • Openstack Mitaka:
  • Openstack Liberty:
    • Liberty 3-nodes-basic: a basic scenario using Openstack Liberty made of three KVM virtual machines: a controller with networking capabilities and two compute nodes.
    • Liberty 4-nodes-legacy-openvswitch: a basic scenario using Openstack Liberty made of four virtual machines: a controller based on LXC and a network and two compute nodes based on KVM. The deployement scenario used is Legacy with Open vSwitch
  • Openstack Kilo:
    • Kilo 4-nodes-basic: a basic scenario using Openstack Kilo made of four virtual machines: a controller based on LXC and a network node and two compute nodes based on KVM.