openstack_architecture_admin0_virtual

OpenStack all-in-one development server.

  • Get a good server with a fair amount of CPU and RAM. This also depends on the number of instances you plan to run on it. For a basic minimum, you need at least 1 vyos, 1 controller and 1 compute … You might be able to get away with 8 or 16 gb of RAM, but you will not be able to run full tests. I recommend at least 32 gb of RAM. The more the merrier.
  • You can also buy servers on ebay/auction and use them. A single network card is enough.
  • Or contact me and I can arrange something for you ?? A ready-made test/dev infrastructure \o/
  • generate a ssh key (without password) which you add later to the instances to login automatically
  • add your own ssh key for you to login to this server
  • disable password authentication
  • install necessary software
you will see the bridges virbr0 and lxcbr0

brctl show

ifconfig

Great .. Now lets create the br-net

Your /etc/network/interfaces will look something like this

Change it to

to active the bridge, do

ifup br-net
brctl show

Now lets define the bridges to be used for openstack
Create the following files ( in your current directory )

pxe.xml

mgmt.xml

stor.xml

vlan.xml

vxlan.xml

active the networks

set the networks to auto-start

start the networks

virsh net-list –all

brctl show

Now setup VYOS using vnc or virt-manager
Assign the VYOS to the following bridges respectively

  • eth0 => br-net
  • eth1 => os-pxe
  • eth2 => os-mgmt
  • eth3 => os-stor
  • eth4 => os-vlan
  • eth5 => os-vxlan

Sample Vyos Config

 

Setup nginx for making installations local

test if things are working

curl -I http://10.11.12.2/ubuntu/install/filesystem.squashfs

 

I create 80GB volumes for my test. In your case, you might use files.

lvscan

create /usr/share/nginx/html/ksUbuntu.txt kickstart file

Make sure you copy your ssh keys for yourself, this dev server and deploy-lxc container in there

change the number of hosts you want to create in this loop

create recreate.sh file

if you run recreate.sh, it will now create new VMS everytime .. keeping the IPs the same for you that start with 10.11.12.x ..

Lets create the deploy server

login to the deploy server

from the deploy server, you should now be able to ping all these ips:

  • 10.11.12.1  , 10.11.12.2
  • 172.29.236.1  , 172.29.236.2
  • 172.29.240.1  , 172.29.240.2
  • 172.29.244.1  , 172.29.244.2

Add this to your /etc/hosts of the deploy server

 

If you created any VMS using the recreate.sh script, they might be in shut-off state after installation is done

you just need to do virsh start c11  ; virsh start c12 etc

if everything is properly done,  you should now be able to ping them using ping c11x  c12x etc

add this to your /root/.ssh/config

Now lets create the hostname template file

create file called hostname_loop

create another file called interfaces_loop

Now lets play with some loops

you will have files like hostname.11  and interfaces.11  in your folder

assuming that all your VMS are up, lets copy over the files

more loops:

login to a few to check if all is fine, and then activate them

and wait for all to reboot.

After they are up, from the deploy server, you should be able to ping them as ping c11 and ssh directly like ssh c11 ..

With this, you get re-usable infrastructure all the time.

 

 

 

 

 

 

About The Author