Week-2 Creating Virtual Machines

Hi everyone. This week, I spent my time to configure Ignite and after that I started running scripts to create containerized virtual machines. After that I started looking into Kubernetes and Docker to improve my understanding on those areas so that I will know how Ignite really works with Kubernetes and Docker. So most of the time spent this week was to have a good foundation of both Kubernetes and Docker for the purpose of the project.

I tried running the above code following a guide, but that didn’t work.

I installed Footloose to solve this problem which will allow me to run containers as VMs in either Ignite or docker.

Below are the codes that I run through this week:

  1. Installing Footloose
export VERSION=0.6.0
curl -sLo footloose https://github.com/weaveworks/footloose/releases/download/${VERSION}/footloose-${VERSION}-linux-x86_64
chmod +x footloose
sudo mv footloose /usr/local/bin/

2. Creating a Footloose API file called footloose.yaml in the directory.

# footloose.yaml
cluster:
  name: cluster
  privateKey: cluster-key
machines:
- count: 3
  spec:
    image: weaveworks/ignite-ubuntu:latest
    name: vm%d
    portMappings:
    - containerPort: 22
    # This is by default "docker". However, just set this to "ignite" and it'll work with Ignite 🙂
    backend: ignite
    # Optional configuration parameters for ignite:
    ignite:
      cpus: 2
      memory: 1GB
      diskSize: 5GB
      kernel: "weaveworks/ignite-kernel:5.4.108"

The above API specifies the specs of the ignite VM. The next stage was creating one virtual machine.

3. Creating Ignite VM

$ footloose create

4. Logging into the VM.

After the virtual machines were created, I could log in to them through SSH.

$ footloose ssh vm2

If you want to exit the VM, just type- exit, in the command line and you will logout. The only thing is that your VM will still be running in the background consuming your computer’s resources. Inorder to shut down the VMs, type the below code.

$ footloose stop

Thats all for this blog. Thank you.

Leave a comment

Design a site like this with WordPress.com
Get started