Posted in Cloud, Linux, network

Quick Steps to build your own lab using VirtualBox and Vagrant

Many times we need test lab which includes two or more virtual machines and which should be built quickly on our laptop and test different scenarios of docker, Kubernetes and Ansible and tear down once done.

I used to install VirtualBox on my laptop and then install CentOS manually and then clone it for two or three VMs, this also works fine but it is time-consuming as my aim was to learn the docker, Kubernetes concepts or test Ansible playbooks, once done tear down the setup and start new one for other test cases.

There is one simple solution out there where we can use VirtualBox and Vagrant to set up a multinode environment using the configuration file and start the lab in a few mins.

I have summarized a few steps to quickly set up your own lab with VirtualBox and Vagrant.

You can create as many virtual machines you want but you need enough RAM on your laptop/desktop.

1. Download the VirtualBox software using the following link. Just check the latest/stable release wget https://download.virtualbox.org/virtualbox/6.0.4/VirtualBox-6.0-6.0.4_128413_el7-1.x86_64.rpm

      Install the VirtualBox #rpm -ivh VirtualBox-6.0-6.0.4_128413_el7-1.x86_64.rpm

Posted in network, Openstack, Security

Neutron Validation Testing Part 3

External/Floating outgoing/incoming network

I have used following steps to test this.

  • Create tenant network, tenant subnet
  • Create shared router
  • For external network, I have created external network ext-net outside of script because we have to do some manual stuff here. For external networking make sure physical Ethernet port is added into external bridge br-ex and network configuration file ifcfg-br-ex and ifcfg-ethX is created with relevant info.
  • Add tenant network interface to router and set gateway of router to external network.
  • Create VM instance into tenant network.
  • Create and assign floating IP to VM
  • Add security rule for PING and SSH testing.
  • For external/outgoing access ping to 8.8.8.8 (google DNS) from VM and for floating incoming access ssh to VM using floating IP from outside.

n5

Continue reading “Neutron Validation Testing Part 3”

Posted in Cloud, network, Openstack

Neutron Validation Testing Part 2

Tenant to tenant networking with different subnet

For tenant to tenant networking I used following steps.

  • Create first tenant, tenant network, tenant subnet
  • Create second tenant, tenant network, tenant subnet
  • Create router in admin tenant and add both tenant interface to it.
  • Create 2 VMs instance into two different tenant network.
  • Add security rule for PING and SSH testing.
  • Ping to each other using network namespace.

n4

Continue reading “Neutron Validation Testing Part 2”

Posted in Cloud, network, Openstack

Neutron Validation Testing Part 1

All test are performed from standalone VM outside of the OpenStack cloud. First, establish passwordless SSH authentication between Standalone VM and OpenStack controller. Use following method to invoke the script from standalone VM which will run o on controller VM and get the details.

ssh –T <controller hostname/ip>  < script.sh

Here –T Disable pseudo-tty allocation from VM

External and Internal API networking.

  • To access external API and internal API network I used curl utility to make API calls.
  •  Using curl generate a new token first by providing tenant name, username, password and controller IP. We can be used admin auth_token as well but that token will fetch details related to admin tenant only. Here we can generate a token for any tenant.n1
  • This generates endpoint list with a token in the bottom.n2
  • Continue reading “Neutron Validation Testing Part 1”

Posted in Cloud, network, Openstack

Basic networking in Openstack Part 1

Once you install Openstack in single node or multinode setup next thing is to setup network. To understand networking in Openstack is little tedious job. This post is to describe basic Openstack networking concept by creating internal/external networking and testing the same.

First delete all default network like public and private which were created by default after Openstack installation using

#neutron net-delete <net-name>

Let us create new internal network first.

1

Create subnet for network private-net with subnet address 10.0.0.0/24

2

Continue reading “Basic networking in Openstack Part 1”

Posted in Linux, network

Network Configuration in RHEL 7/Centos 7

In this post I am going to show how to do network configuration in rhel7/centos7. We have ip command introduced in linux way back but we never used it. In this post we will use ip related commands which isnot easy to use as it has many options need to provide to get relevant output.

to see IP address details normally we used ifconfig command we check the same using ip addr show command.

1

Here we an see ipv4 address of eth0 interface along with ipv6 address and network UP status and mtu size.
Continue reading “Network Configuration in RHEL 7/Centos 7”