Workshop on 15-December. Hosted by Prathidhwani Kochi @ Ahulya InfoPark
-
Laptop should be capable enough to run atleast one Fedora/Centos 7 VM instance.
- 2 GB of RAM should be allocated for the VM
- 2 vCPU should be allocated for the VM
- Atleast 7GB of free space should be available on the partition where the VM image is downloaded or resides.
-
Laptop should have Hypervisors installed Like VirtualBox,HyperV, KVM or Vmware Workstation
-
Download the prebuilt image or download Fedora/Centos cloud image or install the required packages in your existing Virtual
machine. Choose one of the below methods
Import this pre-built image and create a new virtual machine
Image format | OS | hypervisor | Image download Link |
---|---|---|---|
Qcow2 | Linux | KVM | https://goo.gl/fywwKG |
VDI | Windows | VirtualBox | https://goo.gl/Ne6W5b |
VDI | Linux | VirtualBox | https://goo.gl/Ne6W5b |
username: root
password: passw0rd
Outline
- Download Fedora 29 or Centos7 cloud image from the links given below
- Either download a prebuilt cloud init image or prepare one
- Before booting the VM for the first time, cloud init iso image should be attached to the VM
- Credentials for login: username: passowrd
Image format | OS | hypervisor | Image download Link | Credentials |
---|---|---|---|---|
Qcow2 | Linux | KVM | Fedora 29 qcow2 Size 230MB | user: fedora password:passw0rd [sudo enabled] |
Qcow2 | Linux | KVM | Centos 7 qcow2 Size 252MB | user:centos password:passw0rd [sudo enabled] |
- Create Cloud-init ISO file
You can use the pre-built cloud-init iso image by clicking here. If you are downloading the pre-built cloud init image, then proceed to Creating Virtual Machine
- Steps for Preparing cloud init image
Create a directory and two files should be created with the following contents. For example, path shown here is /vm
. Replace the path as per your system configuration
mkdir -p /vm/workshop
cd /vm/workshop
The first file should be named as user-data
. Include the following contents. Note password for the debian user is set as passw0rd
. Change the password as required.
#cloud-config
password: passw0rd
chpasswd: { expire: False }
ssh_pwauth: True
Create another file called meta-data
. Include the following contents. Hostname of the VM is set as debian-node-0
instance-id: workshop0
local-hostname: workshop-node-0
- Create an ISO image using the two files. Execute the following command. This will create an iso image called
cloud-init-workshop.iso
.genisoimage
package should be installed on the system.
genisoimage -output cloud-init-workshop.iso -volid cidata -joliet -rock user-data meta-data
- Download the cloud based image to
/vm/workshop
- Create the VM instance using command line tool. Package
virt-install
should be installed on the node. In the below command, modify the path mentioned after--disk
. You have to modify two --disk paths. First path should point to qcow2 image.
virt-install --import --name workshopvm --memory 2048 --vcpus 1 --disk /vm/workshop/Fedora-Cloud-Base-29-1.2.x86_64.qcow2,format=qcow2,bus=virtio --disk /vm/workshop/cloud-init-workshop.iso,device=cdrom --network bridge=virbr0,model=virtio --noautoconsole
- Execute
virt-manager
to access the VM orvirsh console workshopvm
. In the virsh command,workshopvm
was the name of the VM that was created using thevirt-install
command. To exit fromvirsh command
, useCTRL+]
- To login to the virtual machine, use the credentials mentioned in the above table.
- Proceed to Package installation Instruction mentioned below
- Package installation using yum
yum install podman buildah docker skopeo docker-distribution cri-o
- Additional package
curl -OL https://github.com/wagoodman/dive/releases/download/v0.5.0/dive_0.5.0_linux_amd64.rpm
yum localinstall dive_0.5.0_linux_amd64.rpm
- Download kubeadm as per instruction mentioned in the below document. Choose the appropriate method based on your OS https://kubernetes.io/docs/setup/independent/install-kubeadm/
Note: No need to SElinux to permisive mode at the install time. Just install the package. For Fedora
yum install -y kubelet kubeadm kubectl cri-tools --disableexcludes=kubernetes