OpenStack Discussions

A way to Create Sandbox environment for the OpenStack

lucielina
2,058 Views

Create Sandbox environment

 

developing a sandbox surroundings with the aid of using VirtualBox and Vagrant allows us to find out and test with the OpenStack Compute provider. VirtualBox offers us the potential to spin up digital machines and networks without affecting the relaxation of our operating surroundings, and is freely available at https://www.virtualbox.org for windows, Mac OS X, and Linux. Vagrant permits us to automate this project, which means we can spend less time creating our check environments and greater time using OpenStack. Vagrant can be set up the use of Ubuntu’s package deal management, however for another operating structures, visit https://www.vagrantup.com/. This test environment is then used for the relaxation of this tutorial. it is assumed that the pc you may be the usage of to run your check environment has enough processing power, along with hardware virtualization support (for example, Intel VT-X and AMD-V has guide with at the least 8 GB RAM). note that we’re growing a virtual gadget which in flip is used to spin up virtual machines, so the more RAM you have got, the better it might be.

 

Getting started out

 

to start with, we ought to download VirtualBox from https://www.virtualbox.org/ and then follow the installation manner as soon as it's miles downloaded. We additionally need to download and set up Vagrant, on the way to be protected in the later segment. the stairs all through the e-book anticipate the underlying running system in an effort to be used to put in OpenStack on Ubuntu 12.04 LTS launch. We don’t need to down load an Ubuntu 12.04 ISO as we use our Vagrant surroundings for this cause.

 

A way to achieve it…

 

To create a sandbox surroundings within VirtualBox, we can use Vagrant to outline a unmarried digital system that allows us to run all of the OpenStack Compute services required to run cloud times. This digital gadget, that we are able to talk to as the OpenStack Controller, can be configured with at the least 2 GB RAM and 20 GB of tough power area and have three community interfaces. Vagrant robotically sets up an interface on our virtual machine, that is, NAT (network deal with Translate), which allows our digital machine to connect to the network outdoor of VirtualBox to down load applications. This NAT interface isn't always stated in our Vagrant document but may be visible on our digital system as ‘eth0’. We configure our first interface for use in our OpenStack environment, with a view to be the public interface of our OpenStack Compute host, a second interface might be for our non-public network that OpenStack Compute uses for internal verbal exchange between one-of-a-kind OpenStack Compute hosts, and a 3rd interface may be used when we take a look at Neutron networking in chapter 8, “OpenStack Networking, as an external provider network”.

 

Carry out the following steps to create a virtual machine with Vagrant that is in turn used to run OpenStack Compute services:
1. Install VirtualBox from https://www.virtualbox.org/ . You will encounter issues if you are using the version shipped with Ubuntu 12.04 LTS
Tip:  The book was written using VirtualBox Version 4.2.16.
2. Install Vagrant from https://www.vagrantup.com/ . You will encounter issues if you are using the version shipped with Ubuntu 12.04 LTS.
Tip: The book was written using Vagrant Version 1.2.7.
3. Once installed, we can define our virtual machine and networking in a file called Vagrant file. To do this, we will create a working directory (for example, creates ~/ cookbook and edit a file in here called Vagrantfile as shown in the following command snippet:

Vagrantfile Command Snippet

4. We can now proceed to configure Vagrant by editing this file with the following code:

 

five. we're now prepared to power on our controller node. We try this by way of genuinely going for walks the following command:
vagrant up controller
be aware
Hurray! we've correctly created the VirtualBox digital machine strolling on Ubuntu 12.04 that's now capable of run OpenStack Controller offerings.

 

The way it works…

 

What we've executed right here is created a virtual device within VirtualBox with the aid of defining it in Vagrant. Vagrant then configures this virtual system, primarily based at the settings given in Vagrantfile in the directory in which we need to save and run our VirtualBox digital machines from. This document is based totally on Ruby syntax, but the traces are exceptionally self-explanatory. we've targeted a number of the subsequent:

 

1. The hostname is called “controller”
2. The VM is based on Precise64, an alias for Ubuntu 12.04 LTS 64-bit
3. We have specified 2GB RAM, 1 CPU, and an extra hard disk attached to our VM called “controller-cinder.vdi” that we will utilize later in our book.

We then launch this VirtualBox VM using Vagrant with the help of the following simple command:

vagrant up

 

This will launch all VMs listed in the Vagrantfile. As we have only one, this VM is the only one that has been started. To log into this new virtual machine, we use the a command as below:

vagrant ssh controller

 

Still more…

A Vagrant and VirtualBox are not the only products for setting up a test environment. There are several numbers of other virtualization products available that are suitable for trying OpenStack, for example, VMware Server, VMware Player, and VMware Fusion etc.

0 REPLIES 0
Public