openSUSE Asia Summit 2019 in Bali – Day 1 Recaps

openSUSE Asia Summit 2019 in Bali

In a week ago, i go to openSUSE Asia Summit 2019 in Bali as a speaker and bring a topic with subject Automatic Your WordPress Application with Helm on Kubernetes Cluster. I arrived in Bali at 7 PM and going to Buffalo Surf Camp around 30 min from I Gusti Ngurah Rai Airport. Unfortunately, i can’t go to Speaker and Sponsor Dinner because some trouble in hotel check in. 🙁

Next day, i go to Udayana University Technic Faculty which is venue for openSUSE Asia Summit 2019 and arrived after 15 min from my hotel. I must going to 4th Floor to registration my attend and get some marchendise but unfortunately my marchendise not ready yet but it’s okay for me to wait.

Nugi Abdianysah at openSUSE Asia Summit 2019
Nugi Abdianysah at openSUSE Asia Summit 2019

An amazing opening from all speaker keynote. We start with sing a song of Indonesian National Anthem all together, i have a video and upload it on my Instagram like this:

 

View this post on Instagram

Indonesian National Anthem on openSUSE Asia Summit 2019 in Bali #oSAS2019

A post shared by NA (@nugiabdiansyah) on

At the end of Keynote Speaker, we all take a group photo. We all cheers for an amazing opening.

openSUSE Asia Summit 2019 - Group Photo Day 1
openSUSE Asia Summit 2019 – Group Photo Day 1

After that, we take a coffee break before the class was splitted into six room with many topics, you can see at this link. I stayed at Aula Suastika to get some insight about openSUSE Kubic – The easy and fast way to deploy kubernetes with openSUSE  by Max Huang.

openSUSE Kubic - The easy and fast way to deploy kubernetes with openSUSE  by Max Huang
openSUSE Kubic – The easy and fast way to deploy kubernetes with openSUSE  by Max Huang

openSUSE Kubic make me know how much easier to deploy kubernetes cluster with openSUSE, before that i just only know how to deploy kubernetes with hardest way, see my previous post. And also i take a selfie with Max Huang. 😀

Me and Max Huang
Me and Max Huang

After break, i going to Workshop Class Simulation of OpenStack Ironic Installation using openSUSE Leap by Mr. Utian Ayuba. In this class, i know how to make a baremetal provisioning with OpenStack Ironic. I asked many question to Mr. Utian and got answer for my question.

Simulation of OpenStack Ironic Installation using openSUSE Leap by Mr. Utian Ayuba
Simulation of OpenStack Ironic Installation using openSUSE Leap by Mr. Utian Ayuba

Last class i follow is Provisioning Kubernetes Cluster with Terraform and Ansible on openSUSE Cloud Infrastucture by Mr. Ragil Setianjaya. Unfortunately i don’t have any photos for this class. 🙁

Then i go to Aula Suastika again for closing ceremony Day 1, it was so much fun to learn in all class. After that, i go to hotel to take a bath and take some rest.

Ah, i forgot as a speaker, we take a dinner too. I go with KLAS (Komunitas Linux Arek Suroboyo) from my Hotel to Dinner Place. Thanks for openSUSE Asia Summit Committee for organizing this dinner, so i don’t go expand money for dinner. 😀

openSUSE Asia Summit 2019 Speaker Dinner at Mak Jo
openSUSE Asia Summit 2019 Speaker Dinner at Mak Jo

Then, we all go to hotel and take a rest to prepare for tomorrow. Thanks to all, and see to Day 2 post later. 😀

See you~~

How to Install Kubernetes Cluster in openSUSE Leap 15.1 (Hardest Way)

Last sunday, i go to openSUSE Asia Summit 2019 in Bali, Indonesia as a speaker with topic Automatic Your WordPress Application with Helm on Kubernetes Cluster. Before i go to openSUSE Asia Summit 2019 I only know how to create a kubernetes cluster with a hardest way, but now i know Kubic is easiest way to create it. 🙂 (Thanks to Max Huang a.k.a. SakanaMax)

I choose the hardest way to create kubernetes cluster with openSUSE Leap 15.1. I search in many website but not get any exacly i want. So i choose to experiment on it.

I also search it on Kubernetes Docs, but nope i dont get it. I get frustated in a week before openSUSE Asia Summit 2019, but in an injury time give me an inspiration to create it with CentOS 7 Repo for k8s. So here is the hardest way:

Prerequisite

You must have this:

  • 2 VM openSUSE Leap 15.1
  • Minimum 2 RAM each server
  • Minimum 2 vCPU each server
  • 1 NIC each server
  • 1 Private IP each server
  • Enable Virtualization Technology (Intel VT/AMD-V) (If use phisycal server)

Get Your Own openSUSE ISO

Download an iso in this links:

Setup Server

Get your latest update for your server with this command:

zypper ref && zypper dup -y

Also setup /etc/hosts in each server in order to connecting each server with name, so we don’t install dns for lookup each server. Edit /etc/hosts like this:

127.0.0.1 localhost
192.168.99.101 kube-master.nugi.biz kube-master
192.168.99.102 kube-worker0.nugi.biz kube-worker0

Install Docker

Kubernetes need a container runtime to working, i choose Docker to do it. Latest Docker version for openSUSE Leap 15.1 is 19.03.1_ce but latest kubernetes work only with 18.09 below so i decided to downgrade the docker version. I install with this command:

zypper in docker-18.09.6_ce

Add some line on /etc/docker/daemon.json after { like this:

...
{
  "exec-opts": ["native.cgroupdriver=systemd"],
  "storage-driver": "overlay2",
...

Restart Docker Service, run command:

systemctl restart docker

Add Docker Service to automatic running when boot:

systemctl enable docker

modprobe & sysctl

Run modprobe command:

modprobe overlay
modprobe br_netfilter

Edit /etc/sysctl.conf:

net.ipv4.ip_forward = 1
net.ipv4.conf.all.forwarding = 1
net.bridge.bridge-nf-call-iptables = 1

Run this command to apply:

sysctl -p

ADD k8s Repository

Add newk8s repository, Run command:

zypper addrepo --type yum --gpgcheck-strict --refresh https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64 google-k8s

Add gpg key for repository, run command:

rpm --import https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
rpm --import https://packages.cloud.google.com/yum/doc/yum-key.gpg

Refresh repository, run command:

zypper refresh google-k8s

Install kubeadm,kubectl & kubelet

Install a bundling package to completed your kubernetes cluster:

zypper in kubelet-1.15.4-0 kubernetes-cni kubeadm-1.15.4-0 cri-tools kubectl-1.15.4-0 socat

Ignoring conntrack breakout, just pick:

Solution 2: break kubelet-1.15.4-0.x86_64 by ignoring some of its dependencies Choose from above solutions by number or skip, retry or cancel [1/2/s/r/c] (c): 2 ...

Solution 3: break kubelet-1.13.3-0.x86_64 by ignoring some of its dependencies Choose from above solutions by number or skip, retry or cancel [1/2/3/s/r/c] (c): 3

Disable Swap & Enable kubelet Service on boot

As you know, Kubernetes don’t support swap, we must disable swap manually to install kubernetes.

Check swap with command:

swapon -s

Disable swap with command:

swapoff -a

Enable kubelet service on boot:

systemctl enable kubelet

DO In Master

After we install kubeadm, we must run an init to get kubernetes cluster, so i run kubeadm init like this:

kubeadm init --pod-network-cidr=10.244.14.0/16

Run this command to working with kubectl:

mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config

Watch pods creating process with command:

kubectl get pods --all-namespaces --watch

Hint: Copy kubeadm join to active a worker

After kubeadm was installed, we must install flannel network to connect each master and worker in kubernetes. I run this command:

wget https://raw.githubusercontent.com/coreos/flannel/m aster/Documentation/kube-flannel.yml
kubectl apply -f kube-flannel.yml

Watch pods creating process with command:

kubectl get pods --all-namespaces --watch

Do in Worker

After install flannel and all services was running, so we move to worker server. In this tutorial, i only have 1 worker. If you have 2 more server, you must do it on all worker server. Run command like this each worker server:

kubeadm join 192.168.99.101:6443 --token x8wb20.f8czwt7sdxbvprdh --discovery-token-ca-cert-hash sha256:5226d23fa710d7ca86443ca52665c5b7d0526aced2985da4b88b3cfdcd0deb97

After join get to the master and run this command to check the worker is ready:

kubectl get nodes

Finish

If all services running and you get all nodes ready in master, your kubernetes cluster are ready to serve your service. Yeay we got it…

If any question, do not hesitate to comment 😀