This is a continuation of my previous blog on macvlan and ipvlan Linux network drivers. In this blog, I will cover usage of macvlan and ipvlan network plugins with CoreOS Rkt Container runtime and CNI(Container network interface).
Rkt and CNI
Rkt is another Container runtime similar to Docker. CNI is Container networking standard proposed by CoreOS and few other companies. CNI exposes standard APIs that network plugins needs to implement. CNI supports plugins like ptp, bridge, macvlan, ipvlan and flannel. IPAM can be managed by a second level plugin that CNI plugin calls.
We can either use multi-node CoreOS cluster or a single node CoreOS for the macvlan example used in this blog. I have created three CoreOS cluster using Vagrant. Following is the cloud-config user-data that I used.
macvlan and ipvlan config
Following is the relevant section of Cloud-config for macvlan:
- path: "/etc/rkt/net.d/20-lannet.conf"
In the above cloud-config, we specify the properties of macvlan plugin that includes the parent interface over which macvlan will reside. We use IPAM type as “host-local” here, this means IP address will be assigned from within the range “184.108.40.206/24” as specified in the configuration. The macvlan type defaults to “bridge”.
Following is the relevant section of cloud-config for ipvlan:
Continue reading Macvlan and ipvlan in CoreOS
Contiv is an Open source project driven primarily by Cisco for policy based networking, storage and cluster management for containerized applications. In this blog, I will cover some of the hands-on stuff that I tried with Contiv Networking. I used the sample examples provided in Contiv documentation as starting point. For Contiv networking basics, you can refer to my previous blog here.
I followed the “Contiv getting started” guide to setup a two node Contiv cluster with Vagrant. I started the cluster in Packet baremetal cloud. Contiv netmaster runs in one of the nodes, Contiv netplugin is installed in both the nodes.
git clone https://github.com/contiv/netplugin
cd netplugin; make demo
Following command shows the 2 node Vagrant cluster:
root@contiv:~/netplugin# vagrant status
Current machine states:
netplugin-node1 running (virtualbox)
netplugin-node2 running (virtualbox)
Following are the business details of the sample application that I have used in this blog:
Continue reading Contiv Networking policy Hands-on
I have used and loved Vagrant for a long time and I recently used Consul and I was very impressed by both these Devops tools. Recently, I saw some of the videos of Hashiconf and I learnt that Hashicorp has an ecosystem of tools addressing Devops needs and that these tools can be chained together to create complete application delivery platform from development to production. Atlas is Hashicorp’s product that combines its open source tools into a platform and it has a commercial version as well. In this blog, I will cover a development to production workflow for a LAMP application stack using Atlas, Vagrant, Packer and Terraform.
Overview of Vagrant, Packer, Terraform and Atlas
Vagrant provides a repeatable VM development environment. Vagrant integrates well with major hypervisors like Virtualbox, VMWare, HyperV. “Vagrantfile” describes the VM settings as well as initial bootstrap provisioning that needs to be done on the VM. Vagrant also integrates well with other provisioning tools like Chef, Ruby and Ansible to describe the provisioning. Simply by doing “vagrant up”, the complete VM environment is exactly reproduced. The typical problems like “it does not work for me even though its working in your machine” goes away.
Packer is a tool to create machine images for providers like Virtualbox, VMWare, AWS, Google cloud. Packer configuration is described as a JSON file and images for multiple providers can be created in parallel. The typical workflow is for developer to create development environment in Vagrant and once it becomes stable, the production image can be built from Packer. Since the provisioning part is baked into the image, the deployment of production images becomes much faster. Following link describes how Vagrant and Packer fits well together.
Continue reading Hashicorp Atlas workflow with Vagrant, Packer and Terraform
Openstack is a Cloud Orchestration software. Devstack script provides a development environment for Openstack. Devstack provides a great way to get hands-on with Openstack. I had written 2 earlier blogs on installing Devstack for Openstack Icehouse and Openstack Juno. I received multiple queries on installation related issues. To make this simple, I created Vagrant images for different Openstack releases. With this, VM creation and Devstack installation can all be done with a single script. In this blog, I will walk-thru the steps for the installation.
Vagrant makes it easier to create and share VMs and this makes Vagrant Devops friendly. For getting started on Vagrant, you can refer to my earlier blog on Vagrant.
My Development environment:
Windows 7 machine with Virtualbox 4.3.28 and Vagrant 1.7.2.
Following are typical issues I have seen folks facing when running Devstack:
- There are some pre-requisite software that needs to be installed before running Devstack like setting up Python environment etc.
- It is needed to setup VM with atleast 4G RAM and 8G hard disk. Otherwise, either Stacking will fail or instance creation will fail.
Continue reading Vagrant and Devstack
Recently, I came across this tool called Vagrant that eases the creation and sharing of VM work environment. I played with it and found it very useful. Vagrant integrates with VM hosting providers like Virtualbox, Vmware and AWS. Different devops tools like Chef, Puppet, Ansible are integrated with Vagrant. In this blog, I will cover high level overview and use cases of Vagrant, Vagrant workflow and an application that I created using Vagrant. In the application, I have created a Vagrant Opendaylight(ODL) box using Ubuntu 12.04 as baseline. I will describe the steps that I followed to create the Vagrant ODL box and how it can be used.
Vagrant Use cases:
- Easier to share VM and this allows for better collaboration. Rather than sharing large OVA files, Vagrant configuration files can be shared.
- Same VM base can be used for different applications. For example, Vagrant box can be a Ubuntu OS which contains the OS alone. Vagrant box could also be Ubuntu OS plus LAMP stack, this base box can be used for developers wanting to develop applications on top of LAMP stack.
- VagrantCloud can be used to find base VMs for a lot of different use cases. The same site can be used to host new base VMs. Free VagrantCloud account does not allow hosting.
- Vagrant integrates well with devops tools like Chef, Puppet and Ansible and this makes the recipe installation easier.
Continue reading Vagrant – Overview and Opendaylight Vagrant Image
In this blog, I will cover steps to install Openstack Icehouse release using Devstack. I will cover Single node installation as well as Multi-node installation. In a single node installation, both control and compute instance runs in the same VM. In multi-node install, control and compute instance runs in 1 VM/host and a compute instance runs in another separate VM/host. In multi-node install, we can spin as many compute instances as needed. With 12GB RAM in my host, I was running out of memory with single control and compute instance and a bunch of host applications running in my system.
- Windows 7 with Virtualbox 4.3.10
- 12 GB RAM
I have created OVA files for both the controller and compute instance that can be downloaded from below links. Import the OVA files into any VM manager software like Virtualbox to try this out. These VMs are running Ubuntu 12.04.
Alternate locations for downloading VMs in case the Dropbox link above does not work:
Following are the steps that I did to create the VMs above. If you are downloading the OVA files, you don’t need to follow the steps below. Continue reading Openstack Icehouse install using Devstack
In 1 of the previous posts, I had indicated that its difficult to resize the VM hard disk that was created during VM creation. My friend pointed me to few links on how to do this. It turned out be pretty straightforward.
Also, I learnt that when we try different applications and different configurations in the VM, its very easy for the VM OS to be screwed up and it is necessary to either take snapshots, backups, clones and restore them to be on the safe side.
In this blog, I will try to cover some of the common tasks that we would need from VM management perspective like VM backup and restore, resizing VM hard disk. I will say this in the context of Virtualbox, lot of these would apply to other VM hosting software like VMware player, etc. Also, I will cover some things that I have learnt in Virtual box along the way..
Continue reading Virtualbox and VM management