SlideShare uma empresa Scribd logo
1 de 26
Baixar para ler offline
Fosdem 2020 Feb. 1-2, 2020
Kubernetes on ARM64
Raspberry PI 4 Kubernetes cloud for a
few Euros!
Kubernetes on ARM64
Raspberry PI 4 Kubernetes cloud for a
few Euros!
Jean-Frederic Clere
@jfclere
Jean-Frederic Clere
@jfclere
TM
401/02/20
Who am I?Who am I?Who am I?Who am I?
Jean-Frederic Clere
● Red Hat
● @JFCLERE email / twitter / slideshare ...
TM
501/02/20
Structure of the RPI kubernetes cloudStructure of the RPI kubernetes cloudStructure of the RPI kubernetes cloudStructure of the RPI kubernetes cloud
Infra stuff:
HTTPD mod_proxy
dhcp server
dns and registry
Hardware clock server
Master: master Node: blueNode: green
Kubernetes stuff:
1 master 2 nodes
Weave plugin network
Pods running tomcat images
Infra: jfcportal
TM
701/02/20
RPI4 kernelRPI4 kernelRPI4 kernelRPI4 kernel
Use git repo:
https://github.com/raspberrypi/linux
CrossCompile on a laptop
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
Build for RPI4 (and fedora/kubernetes)
https://github.com/jfclere/RPI4-Fedora30/blob/master/bcm2711_defconfig.patch
Build
make bcm2711_defconfig
make Image modules dtbs
Prepare SDcard:
Arm-image-installer: Image / ssh key / resizefs / selinux / relabel / (use fedora30 image)
arm-image-installer --image=/home/jfclere/Downloads/Fedora-Workstation-30-1.2.aarch64.raw.xz --target=rpi3 --media=/dev/
mmcblk0 --norootpass --addkey=/home/jfclere/.ssh/id_rsa.pub --resizefs --relabel --selinux=ON
TM
801/02/20
RPI4 kernel installRPI4 kernel installRPI4 kernel installRPI4 kernel install
SDcard 3 partitions
Boot: vfat
Initrd: ext4
Root: ext4 (lvm2 / xfs since fedora31, mount more complex)
Copy the RPI4 files in the boot
copy the fixup4 and start4 files in boot. (from raspbian image and other in boot)
https://github.com/jfclere/RPI4-Fedora30/tree/master/boot
Copy the image
Copy arch/arm64/boot/Image to boot/kernel8.img
Install the modules and symbols in RPI4 root
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_MOD_PATH=/run/media/
jfclere/1a17da7a-d604-4e51-983c-e86d06d995e11
INSTALL_PATH=/run/media/jfclere/1a17da7a-d604-4e51-983c-e86d06d995e11 install
modules_install
TM
901/02/20
RPI4 WIFI boardRPI4 WIFI boardRPI4 WIFI boardRPI4 WIFI board
Boot RPI4 and ssh to it. (nmap and ethernet cable)
Install firmware
cd /usr/lib/firmware/brcm; wget
https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/master/brcm/brcmfmac43455-sdio.txt
Install tools:
NetworkManager-tui etc
Configure wifi and use it.
(note: MAC_ADDRESS_RANDOMIZATION=never)
INFRA for the demo
See http://jfclere.blogspot.com/ (if no internet connection you need hardclock/ dhcp / dns)
TM
1001/02/20
Docker image for ARM64Docker image for ARM64Docker image for ARM64Docker image for ARM64
Easy centos7 or openjdk:8-jre-alpine based
Just need docker/podman on RPI
Maven and Java etc but all is there on fedora30
Need multi platform images:
Manifest-tool: manifest-tool push from-spec tomcat-demo.yaml
Build on the platforms you have ARM64/ADM64
TM
1101/02/20
Multi platform imagesMulti platform imagesMulti platform imagesMulti platform images
on amd64:
docker build -t jfclere/tomcat-demo:amd64 .
docker login docker.io -u jfclere
docker push jfclere/tomcat-demo:amd64
on aarch64: (arm64)
docker build -t jfclere/tomcat-demo:aarch64 .
docker push jfclere/tomcat-demo:aarch64
See tomcat-demo.yaml:
image: jfclere/tomcat-demo:latest
manifests:
-
image: jfclere/tomcat-demo:amd64
platform:
architecture: amd64
os: linux
...
-
image: jfclere/tomcat-demo:aarch64
platform:
architecture: arm64
os: linux
on RPI:
docker build -t jfclere/tomcat-demo:aarch64 .
docker push jfclere/tomcat-demo:aarch64
See tomcat-demo.yaml:
image: jfclere/tomcat-demo:aarch64
platform:
architecture: arm64
os: linux
And use manifest-pool:
manifest-tool push from-spec tomcat-demo.yaml
TM
1201/02/20
MasterMasterMasterMaster
kubeadm reset -f
iptables -A INPUT -p tcp --dport 6443 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p tcp --sport 6443 -m conntrack --ctstate ESTABLISHED -j ACCEPT
swapoff –all
kubeadm init
Start weave network using kubectl:
rm -rf $HOME/.kube
mkdir -p $HOME/.kube
scp root@master:/etc/kubernetes/admin.conf $HOME/.kube/config
kubectl apply -f weave-kube.yaml
TM
1301/02/20
On each nodeOn each nodeOn each nodeOn each node
kubeadm reset -f
Reset iptables
swapoff –all
kubeadm join –token=blabla (get it on master via: kubeadm token create --print-join-command)
Done when get nodes says ready.
kubectl get nodes
TM
1401/02/20
Tomcat ClusterTomcat ClusterTomcat ClusterTomcat Cluster
! Power
COL 1 2 3 4 5 6 7 8 1 2 3 6 25 50 8012
100
10
Ether 10/100
Load balancer
HTTPD
mod_proxy
Tomcat node Tomcat nodeTomcat node
TM
1501/02/20
Session replication in a clusterSession replication in a clusterSession replication in a clusterSession replication in a cluster
HTTP/1.1
No transaction
No persistent connection
Web App:
Using cookies to carry session ID
Store information in the session:
Shopping cart etc.
Multi nodes and dynamic
Route request to right node
Replicate information
TM
1601/02/20
The move from cluster to cloudThe move from cluster to cloud
RHEL RHEL
Broker Node Node Node
RHEL
! Power
COL 1 2 3 4 5 6 7 8 1 2 3 6 25 50 8012
100
10
Ether 10/100
Load balancer Tomcat node Tomcat nodeTomcat node
TM
1701/02/20
Problems for a cluster to cloud...Problems for a cluster to cloud...
Tomcat cluster built-in solution
Peer discovery through multicast
heartbeat messages
Does not work in a cloud environment
Session
Data
Session
Data
Session
Data
Session
Data
Session
Data
Session
Data
Multicast
solution
Peer discovery through Kubernetes
Downward API
Works in all kubernetes clouds
Kubernetes API
TM
1801/02/20
Solutions: KUBEPingSolutions: KUBEPing
Tools for managing a Kubernetes
cluster
Accessible from the pods within
the cluster
GET /api/v1/namespaces/tomcat-in-
the-cloud/pods
➔
Return a JSON representation of all the pods
in the cluster
➔
Requires permissions
TM
1901/02/20
Architecture KUBEPing caseArchitecture KUBEPing case
Tomcat cluster built-in solution
Peer discovery through multicast
heartbeat messages
Does not work in a cloud environment
Session
Data
Session
Data
Session
Data
Session
Data
Session
Data
Session
Data
Multicast
solution
Peer discovery through DNS lookup
Works in all kubernetes clouds
InetAddress.getAllByName(namespace)
TM
2001/02/20
Solutions: DNSPingSolutions: DNSPing
nslookup name-space
Accessible from the pods
within the cluster
InetAddress.getAllByName()
Needs a service.
TM
2101/02/20
THE DEMOTHE DEMO
On JFCPORTAL (INFRA)
Httpd + mod_balancer (include proxy.conf in httpd.conf)
ProxyPass "/" "balancer://local"
ProxyPassReverse "/" "balancer://local"
<Proxy "balancer://local">
BalancerMember "http://master:30306"
BalancerMember "http://green:30306"
BalancerMember "http://blue:30306"
</Proxy>
Docker to do the registry:
docker run -d -p 5000:5000 --restart=always --name registry registry:2
/etc/containers/registries.conf add:
registries = ['jfcportal:5000']
Build the image or get it and push it.
docker pull docker.io/jfclere/tomcat-demo
docker tag ID jfcportal:5000/tomcat-demo:2.2
docker push jfcportal:5000/tomcat-demo:2.2
TM
THE DEMOTHE DEMO
On JFCPORTAL (Deploying)
cd /root/tomcat-openshift
kubectl create namespace tomcat-demo
kubectl config set-context --current --namespace=tomcat-demo
kubectl create -f kube-tomcat-demo.yaml
kubectl create -f service.yaml
kubectl expose deployment tomcat-demo --type=LoadBalancer --name=tomcat-balancer
kubectl get services (to get the service port 30306…)
[root@localhost tomcat-openshift]# kubectl get services
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
tomcat-balancer LoadBalancer 10.105.164.188 <pending> 8080:32439/TCP 15s
tomcat-demo ClusterIP None <none> 80/TCP 15s
On JFCPORTAL (adjust INFRA)
Adjust 30306 to the right value and restart httpd
bash startbrower.sh
Enjoy demo :D
TM
Try 18Try 18
TM
TM
2501/02/20
Katacoda demo using DNSPingKatacoda demo using DNSPing
https://katacoda.com/jfclere/scenarios/dnsping-tomcat
And the sources:
https://github.com/jfclere/intro-katacoda/tree/master/DNSPing-tomcat
Runs everywhere, but requires a service for DNS discovering.
TM
2601/02/20
OperatorOperator
What is a Kubernetes operator
kubernetes definition
Basically it automates the services, routes and build (S2I) process.
What do we have now
We have one written in GO (prototype)
S2I (source to image) just tooling :D
TM
2701/02/20
Katacoda demo using operatorKatacoda demo using operator
Operator demo in Katacoda
And the sources:
https://github.com/jfclere/intro-katacoda/tree/master/war-katacoda
Every thing is created by the operator: pods, services etc.
TM
01/02/20 28
Where we are
Main sites:
– https://github.com/jfclere/tomcat-openshift
– https://github.com/jfclere/kubernetes_f30_demo
– https://github.com/web-servers/tomcat-in-the-cloud
– https://github.com/jfclere/tomcatPI
– https://docs.openshift.com
– https://github.com/apache/tomcat
– tomcat : res/tomcat-maven
– DNSMembershipProvider / KubernetesMembershipProvider
– Tomcat operator and Source 2 Image (S2I)
THANK YOUTHANK YOU
JEAN-FREDERIC CLERE
@jfclere
jfclere@gmail.com
JEAN-FREDERIC CLERE
@jfclere
jfclere@gmail.com

Mais conteúdo relacionado

Mais procurados

Chicago Docker Meetup Presentation - Mediafly
Chicago Docker Meetup Presentation - MediaflyChicago Docker Meetup Presentation - Mediafly
Chicago Docker Meetup Presentation - MediaflyMediafly
 
Karl Grzeszczak: September Docker Presentation at Mediafly
Karl Grzeszczak: September Docker Presentation at MediaflyKarl Grzeszczak: September Docker Presentation at Mediafly
Karl Grzeszczak: September Docker Presentation at MediaflyMediafly
 
Startup Containers in Lightning Speed with Lazy Image Distribution
Startup Containers in Lightning Speed with Lazy Image DistributionStartup Containers in Lightning Speed with Lazy Image Distribution
Startup Containers in Lightning Speed with Lazy Image DistributionKohei Tokunaga
 
containerdの概要と最近の機能
containerdの概要と最近の機能containerdの概要と最近の機能
containerdの概要と最近の機能Kohei Tokunaga
 
Kernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are moneyKernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are moneyAnne Nicolas
 
Faster Container Image Distribution on a Variety of Tools with Lazy Pulling
Faster Container Image Distribution on a Variety of Tools with Lazy PullingFaster Container Image Distribution on a Variety of Tools with Lazy Pulling
Faster Container Image Distribution on a Variety of Tools with Lazy PullingKohei Tokunaga
 
Docker Networking with New Ipvlan and Macvlan Drivers
Docker Networking with New Ipvlan and Macvlan DriversDocker Networking with New Ipvlan and Macvlan Drivers
Docker Networking with New Ipvlan and Macvlan DriversBrent Salisbury
 
Meet cute-between-ebpf-and-tracing
Meet cute-between-ebpf-and-tracingMeet cute-between-ebpf-and-tracing
Meet cute-between-ebpf-and-tracingViller Hsiao
 
Multi container apps swarm + consul + compose
Multi container apps   swarm + consul + composeMulti container apps   swarm + consul + compose
Multi container apps swarm + consul + composeEueung Mulyana
 
도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)
도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)
도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)Sam Kim
 
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all startedKernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all startedAnne Nicolas
 
Stargz Snapshotter: イメージのpullを省略しcontainerdでコンテナを高速に起動する
Stargz Snapshotter: イメージのpullを省略しcontainerdでコンテナを高速に起動するStargz Snapshotter: イメージのpullを省略しcontainerdでコンテナを高速に起動する
Stargz Snapshotter: イメージのpullを省略しcontainerdでコンテナを高速に起動するKohei Tokunaga
 
Inside Docker for Fedora20/RHEL7
Inside Docker for Fedora20/RHEL7Inside Docker for Fedora20/RHEL7
Inside Docker for Fedora20/RHEL7Etsuji Nakai
 
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...Anne Nicolas
 
Rtl sdr software defined radio
Rtl sdr   software defined radioRtl sdr   software defined radio
Rtl sdr software defined radioEueung Mulyana
 
P2P Container Image Distribution on IPFS With containerd and nerdctl
P2P Container Image Distribution on IPFS With containerd and nerdctlP2P Container Image Distribution on IPFS With containerd and nerdctl
P2P Container Image Distribution on IPFS With containerd and nerdctlKohei Tokunaga
 
BuildKitでLazy Pullを有効にしてビルドを早くする話
BuildKitでLazy Pullを有効にしてビルドを早くする話BuildKitでLazy Pullを有効にしてビルドを早くする話
BuildKitでLazy Pullを有効にしてビルドを早くする話Kohei Tokunaga
 
eStargzイメージとlazy pullingによる高速なコンテナ起動
eStargzイメージとlazy pullingによる高速なコンテナ起動eStargzイメージとlazy pullingによる高速なコンテナ起動
eStargzイメージとlazy pullingによる高速なコンテナ起動Kohei Tokunaga
 
eBPF Perf Tools 2019
eBPF Perf Tools 2019eBPF Perf Tools 2019
eBPF Perf Tools 2019Brendan Gregg
 
Starting up Containers Super Fast With Lazy Pulling of Images
Starting up Containers Super Fast With Lazy Pulling of ImagesStarting up Containers Super Fast With Lazy Pulling of Images
Starting up Containers Super Fast With Lazy Pulling of ImagesKohei Tokunaga
 

Mais procurados (20)

Chicago Docker Meetup Presentation - Mediafly
Chicago Docker Meetup Presentation - MediaflyChicago Docker Meetup Presentation - Mediafly
Chicago Docker Meetup Presentation - Mediafly
 
Karl Grzeszczak: September Docker Presentation at Mediafly
Karl Grzeszczak: September Docker Presentation at MediaflyKarl Grzeszczak: September Docker Presentation at Mediafly
Karl Grzeszczak: September Docker Presentation at Mediafly
 
Startup Containers in Lightning Speed with Lazy Image Distribution
Startup Containers in Lightning Speed with Lazy Image DistributionStartup Containers in Lightning Speed with Lazy Image Distribution
Startup Containers in Lightning Speed with Lazy Image Distribution
 
containerdの概要と最近の機能
containerdの概要と最近の機能containerdの概要と最近の機能
containerdの概要と最近の機能
 
Kernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are moneyKernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are money
 
Faster Container Image Distribution on a Variety of Tools with Lazy Pulling
Faster Container Image Distribution on a Variety of Tools with Lazy PullingFaster Container Image Distribution on a Variety of Tools with Lazy Pulling
Faster Container Image Distribution on a Variety of Tools with Lazy Pulling
 
Docker Networking with New Ipvlan and Macvlan Drivers
Docker Networking with New Ipvlan and Macvlan DriversDocker Networking with New Ipvlan and Macvlan Drivers
Docker Networking with New Ipvlan and Macvlan Drivers
 
Meet cute-between-ebpf-and-tracing
Meet cute-between-ebpf-and-tracingMeet cute-between-ebpf-and-tracing
Meet cute-between-ebpf-and-tracing
 
Multi container apps swarm + consul + compose
Multi container apps   swarm + consul + composeMulti container apps   swarm + consul + compose
Multi container apps swarm + consul + compose
 
도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)
도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)
도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)
 
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all startedKernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
 
Stargz Snapshotter: イメージのpullを省略しcontainerdでコンテナを高速に起動する
Stargz Snapshotter: イメージのpullを省略しcontainerdでコンテナを高速に起動するStargz Snapshotter: イメージのpullを省略しcontainerdでコンテナを高速に起動する
Stargz Snapshotter: イメージのpullを省略しcontainerdでコンテナを高速に起動する
 
Inside Docker for Fedora20/RHEL7
Inside Docker for Fedora20/RHEL7Inside Docker for Fedora20/RHEL7
Inside Docker for Fedora20/RHEL7
 
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
 
Rtl sdr software defined radio
Rtl sdr   software defined radioRtl sdr   software defined radio
Rtl sdr software defined radio
 
P2P Container Image Distribution on IPFS With containerd and nerdctl
P2P Container Image Distribution on IPFS With containerd and nerdctlP2P Container Image Distribution on IPFS With containerd and nerdctl
P2P Container Image Distribution on IPFS With containerd and nerdctl
 
BuildKitでLazy Pullを有効にしてビルドを早くする話
BuildKitでLazy Pullを有効にしてビルドを早くする話BuildKitでLazy Pullを有効にしてビルドを早くする話
BuildKitでLazy Pullを有効にしてビルドを早くする話
 
eStargzイメージとlazy pullingによる高速なコンテナ起動
eStargzイメージとlazy pullingによる高速なコンテナ起動eStargzイメージとlazy pullingによる高速なコンテナ起動
eStargzイメージとlazy pullingによる高速なコンテナ起動
 
eBPF Perf Tools 2019
eBPF Perf Tools 2019eBPF Perf Tools 2019
eBPF Perf Tools 2019
 
Starting up Containers Super Fast With Lazy Pulling of Images
Starting up Containers Super Fast With Lazy Pulling of ImagesStarting up Containers Super Fast With Lazy Pulling of Images
Starting up Containers Super Fast With Lazy Pulling of Images
 

Semelhante a Cloud RPI4 tomcat ARM64

TomcatCon: from a cluster to the cloud
TomcatCon: from a cluster to the cloudTomcatCon: from a cluster to the cloud
TomcatCon: from a cluster to the cloudJean-Frederic Clere
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionBen Hall
 
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境謝 宗穎
 
Installing Component Pack 6.0.0.6
Installing Component Pack 6.0.0.6Installing Component Pack 6.0.0.6
Installing Component Pack 6.0.0.6LetsConnect
 
Linux hpc-cluster-setup-guide
Linux hpc-cluster-setup-guideLinux hpc-cluster-setup-guide
Linux hpc-cluster-setup-guidejasembo
 
Scaling docker with kubernetes
Scaling docker with kubernetesScaling docker with kubernetes
Scaling docker with kubernetesLiran Cohen
 
Component pack 6006 install guide
Component pack 6006 install guideComponent pack 6006 install guide
Component pack 6006 install guideRoberto Boccadoro
 
Flutter Vikings 2022 - Full Stack Dart
Flutter Vikings 2022  - Full Stack DartFlutter Vikings 2022  - Full Stack Dart
Flutter Vikings 2022 - Full Stack DartChris Swan
 
Check the version with fixes. Link in description
Check the version with fixes. Link in descriptionCheck the version with fixes. Link in description
Check the version with fixes. Link in descriptionPrzemyslaw Koltermann
 
Kubernetes laravel and kubernetes
Kubernetes   laravel and kubernetesKubernetes   laravel and kubernetes
Kubernetes laravel and kubernetesWilliam Stewart
 
DevOpSec_DockerNPodMan-20230220.pdf
DevOpSec_DockerNPodMan-20230220.pdfDevOpSec_DockerNPodMan-20230220.pdf
DevOpSec_DockerNPodMan-20230220.pdfkanedafromparis
 
9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_training9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_trainingvideos
 
Dayta AI Seminar - Kubernetes, Docker and AI on Cloud
Dayta AI Seminar - Kubernetes, Docker and AI on CloudDayta AI Seminar - Kubernetes, Docker and AI on Cloud
Dayta AI Seminar - Kubernetes, Docker and AI on CloudJung-Hong Kim
 
Delivering Docker & K3s worloads to IoT Edge devices
Delivering Docker & K3s worloads to IoT Edge devicesDelivering Docker & K3s worloads to IoT Edge devices
Delivering Docker & K3s worloads to IoT Edge devicesAjeet Singh Raina
 
k8s practice 2023.pptx
k8s practice 2023.pptxk8s practice 2023.pptx
k8s practice 2023.pptxwonyong hwang
 

Semelhante a Cloud RPI4 tomcat ARM64 (20)

TomcatCon: from a cluster to the cloud
TomcatCon: from a cluster to the cloudTomcatCon: from a cluster to the cloud
TomcatCon: from a cluster to the cloud
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and Production
 
kubernetes for beginners
kubernetes for beginnerskubernetes for beginners
kubernetes for beginners
 
From a cluster to the Cloud
From a cluster to the CloudFrom a cluster to the Cloud
From a cluster to the Cloud
 
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
 
Installing Component Pack 6.0.0.6
Installing Component Pack 6.0.0.6Installing Component Pack 6.0.0.6
Installing Component Pack 6.0.0.6
 
Linux hpc-cluster-setup-guide
Linux hpc-cluster-setup-guideLinux hpc-cluster-setup-guide
Linux hpc-cluster-setup-guide
 
Scaling docker with kubernetes
Scaling docker with kubernetesScaling docker with kubernetes
Scaling docker with kubernetes
 
Component pack 6006 install guide
Component pack 6006 install guideComponent pack 6006 install guide
Component pack 6006 install guide
 
Flutter Vikings 2022 - Full Stack Dart
Flutter Vikings 2022  - Full Stack DartFlutter Vikings 2022  - Full Stack Dart
Flutter Vikings 2022 - Full Stack Dart
 
Check the version with fixes. Link in description
Check the version with fixes. Link in descriptionCheck the version with fixes. Link in description
Check the version with fixes. Link in description
 
Kubernetes laravel and kubernetes
Kubernetes   laravel and kubernetesKubernetes   laravel and kubernetes
Kubernetes laravel and kubernetes
 
DevOpSec_DockerNPodMan-20230220.pdf
DevOpSec_DockerNPodMan-20230220.pdfDevOpSec_DockerNPodMan-20230220.pdf
DevOpSec_DockerNPodMan-20230220.pdf
 
Learning Docker with Thomas
Learning Docker with ThomasLearning Docker with Thomas
Learning Docker with Thomas
 
9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_training9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_training
 
Dayta AI Seminar - Kubernetes, Docker and AI on Cloud
Dayta AI Seminar - Kubernetes, Docker and AI on CloudDayta AI Seminar - Kubernetes, Docker and AI on Cloud
Dayta AI Seminar - Kubernetes, Docker and AI on Cloud
 
Delivering Docker & K3s worloads to IoT Edge devices
Delivering Docker & K3s worloads to IoT Edge devicesDelivering Docker & K3s worloads to IoT Edge devices
Delivering Docker & K3s worloads to IoT Edge devices
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Docker as an every day work tool
Docker as an every day work toolDocker as an every day work tool
Docker as an every day work tool
 
k8s practice 2023.pptx
k8s practice 2023.pptxk8s practice 2023.pptx
k8s practice 2023.pptx
 

Mais de Jean-Frederic Clere

03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdfJean-Frederic Clere
 
03_clere_Proxing to tomcat with httpd.pdf
03_clere_Proxing to tomcat with httpd.pdf03_clere_Proxing to tomcat with httpd.pdf
03_clere_Proxing to tomcat with httpd.pdfJean-Frederic Clere
 
01_clere_Having fun with a solar panel, camera and raspberry. How with a few ...
01_clere_Having fun with a solar panel, camera and raspberry. How with a few ...01_clere_Having fun with a solar panel, camera and raspberry. How with a few ...
01_clere_Having fun with a solar panel, camera and raspberry. How with a few ...Jean-Frederic Clere
 
Apache Httpd and TLS certificates validations
Apache Httpd and TLS certificates validationsApache Httpd and TLS certificates validations
Apache Httpd and TLS certificates validationsJean-Frederic Clere
 
HTTP/2, HTTP/3 and SSL/TLS State of the Art in Our Servers
HTTP/2, HTTP/3 and SSL/TLS State of the Art in Our ServersHTTP/2, HTTP/3 and SSL/TLS State of the Art in Our Servers
HTTP/2, HTTP/3 and SSL/TLS State of the Art in Our ServersJean-Frederic Clere
 
Apache httpd reverse proxy and Tomcat
Apache httpd reverse proxy and TomcatApache httpd reverse proxy and Tomcat
Apache httpd reverse proxy and TomcatJean-Frederic Clere
 
Apache httpd and TLS/SSL certificates validation
Apache httpd and TLS/SSL certificates validationApache httpd and TLS/SSL certificates validation
Apache httpd and TLS/SSL certificates validationJean-Frederic Clere
 
Tomcat from a cluster to the cloud on RP3
Tomcat from a cluster to the cloud on RP3Tomcat from a cluster to the cloud on RP3
Tomcat from a cluster to the cloud on RP3Jean-Frederic Clere
 
Having fun with Raspberry(s) and Apache projects
Having fun with Raspberry(s) and Apache projectsHaving fun with Raspberry(s) and Apache projects
Having fun with Raspberry(s) and Apache projectsJean-Frederic Clere
 
Having fun with Raspberry and Apache projects
Having fun with Raspberry and Apache projectsHaving fun with Raspberry and Apache projects
Having fun with Raspberry and Apache projectsJean-Frederic Clere
 
HTTP/2 and SSL/TLS state of art in ASF servers
HTTP/2 and SSL/TLS state of art in ASF serversHTTP/2 and SSL/TLS state of art in ASF servers
HTTP/2 and SSL/TLS state of art in ASF serversJean-Frederic Clere
 

Mais de Jean-Frederic Clere (17)

Panama.pdf
Panama.pdfPanama.pdf
Panama.pdf
 
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
 
03_clere_Proxing to tomcat with httpd.pdf
03_clere_Proxing to tomcat with httpd.pdf03_clere_Proxing to tomcat with httpd.pdf
03_clere_Proxing to tomcat with httpd.pdf
 
01_clere_Having fun with a solar panel, camera and raspberry. How with a few ...
01_clere_Having fun with a solar panel, camera and raspberry. How with a few ...01_clere_Having fun with a solar panel, camera and raspberry. How with a few ...
01_clere_Having fun with a solar panel, camera and raspberry. How with a few ...
 
Apache Httpd and TLS certificates validations
Apache Httpd and TLS certificates validationsApache Httpd and TLS certificates validations
Apache Httpd and TLS certificates validations
 
HTTP/2, HTTP/3 and SSL/TLS State of the Art in Our Servers
HTTP/2, HTTP/3 and SSL/TLS State of the Art in Our ServersHTTP/2, HTTP/3 and SSL/TLS State of the Art in Our Servers
HTTP/2, HTTP/3 and SSL/TLS State of the Art in Our Servers
 
Apache httpd reverse proxy and Tomcat
Apache httpd reverse proxy and TomcatApache httpd reverse proxy and Tomcat
Apache httpd reverse proxy and Tomcat
 
Apache httpd and TLS/SSL certificates validation
Apache httpd and TLS/SSL certificates validationApache httpd and TLS/SSL certificates validation
Apache httpd and TLS/SSL certificates validation
 
Tomcat from a cluster to the cloud on RP3
Tomcat from a cluster to the cloud on RP3Tomcat from a cluster to the cloud on RP3
Tomcat from a cluster to the cloud on RP3
 
Having fun with Raspberry(s) and Apache projects
Having fun with Raspberry(s) and Apache projectsHaving fun with Raspberry(s) and Apache projects
Having fun with Raspberry(s) and Apache projects
 
Tomcat openssl
Tomcat opensslTomcat openssl
Tomcat openssl
 
Tomcat next
Tomcat nextTomcat next
Tomcat next
 
Having fun with Raspberry and Apache projects
Having fun with Raspberry and Apache projectsHaving fun with Raspberry and Apache projects
Having fun with Raspberry and Apache projects
 
HTTP/2 and SSL/TLS state of art in ASF servers
HTTP/2 and SSL/TLS state of art in ASF serversHTTP/2 and SSL/TLS state of art in ASF servers
HTTP/2 and SSL/TLS state of art in ASF servers
 
Tomcat next
Tomcat nextTomcat next
Tomcat next
 
Native 1.2.8
Native 1.2.8Native 1.2.8
Native 1.2.8
 
Tomcat openssl
Tomcat opensslTomcat openssl
Tomcat openssl
 

Último

Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfYashikaSharma391629
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 

Último (20)

Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 

Cloud RPI4 tomcat ARM64

  • 1. Fosdem 2020 Feb. 1-2, 2020 Kubernetes on ARM64 Raspberry PI 4 Kubernetes cloud for a few Euros! Kubernetes on ARM64 Raspberry PI 4 Kubernetes cloud for a few Euros! Jean-Frederic Clere @jfclere Jean-Frederic Clere @jfclere
  • 2. TM 401/02/20 Who am I?Who am I?Who am I?Who am I? Jean-Frederic Clere ● Red Hat ● @JFCLERE email / twitter / slideshare ...
  • 3. TM 501/02/20 Structure of the RPI kubernetes cloudStructure of the RPI kubernetes cloudStructure of the RPI kubernetes cloudStructure of the RPI kubernetes cloud Infra stuff: HTTPD mod_proxy dhcp server dns and registry Hardware clock server Master: master Node: blueNode: green Kubernetes stuff: 1 master 2 nodes Weave plugin network Pods running tomcat images Infra: jfcportal
  • 4. TM 701/02/20 RPI4 kernelRPI4 kernelRPI4 kernelRPI4 kernel Use git repo: https://github.com/raspberrypi/linux CrossCompile on a laptop make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- Build for RPI4 (and fedora/kubernetes) https://github.com/jfclere/RPI4-Fedora30/blob/master/bcm2711_defconfig.patch Build make bcm2711_defconfig make Image modules dtbs Prepare SDcard: Arm-image-installer: Image / ssh key / resizefs / selinux / relabel / (use fedora30 image) arm-image-installer --image=/home/jfclere/Downloads/Fedora-Workstation-30-1.2.aarch64.raw.xz --target=rpi3 --media=/dev/ mmcblk0 --norootpass --addkey=/home/jfclere/.ssh/id_rsa.pub --resizefs --relabel --selinux=ON
  • 5. TM 801/02/20 RPI4 kernel installRPI4 kernel installRPI4 kernel installRPI4 kernel install SDcard 3 partitions Boot: vfat Initrd: ext4 Root: ext4 (lvm2 / xfs since fedora31, mount more complex) Copy the RPI4 files in the boot copy the fixup4 and start4 files in boot. (from raspbian image and other in boot) https://github.com/jfclere/RPI4-Fedora30/tree/master/boot Copy the image Copy arch/arm64/boot/Image to boot/kernel8.img Install the modules and symbols in RPI4 root make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_MOD_PATH=/run/media/ jfclere/1a17da7a-d604-4e51-983c-e86d06d995e11 INSTALL_PATH=/run/media/jfclere/1a17da7a-d604-4e51-983c-e86d06d995e11 install modules_install
  • 6. TM 901/02/20 RPI4 WIFI boardRPI4 WIFI boardRPI4 WIFI boardRPI4 WIFI board Boot RPI4 and ssh to it. (nmap and ethernet cable) Install firmware cd /usr/lib/firmware/brcm; wget https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/master/brcm/brcmfmac43455-sdio.txt Install tools: NetworkManager-tui etc Configure wifi and use it. (note: MAC_ADDRESS_RANDOMIZATION=never) INFRA for the demo See http://jfclere.blogspot.com/ (if no internet connection you need hardclock/ dhcp / dns)
  • 7. TM 1001/02/20 Docker image for ARM64Docker image for ARM64Docker image for ARM64Docker image for ARM64 Easy centos7 or openjdk:8-jre-alpine based Just need docker/podman on RPI Maven and Java etc but all is there on fedora30 Need multi platform images: Manifest-tool: manifest-tool push from-spec tomcat-demo.yaml Build on the platforms you have ARM64/ADM64
  • 8. TM 1101/02/20 Multi platform imagesMulti platform imagesMulti platform imagesMulti platform images on amd64: docker build -t jfclere/tomcat-demo:amd64 . docker login docker.io -u jfclere docker push jfclere/tomcat-demo:amd64 on aarch64: (arm64) docker build -t jfclere/tomcat-demo:aarch64 . docker push jfclere/tomcat-demo:aarch64 See tomcat-demo.yaml: image: jfclere/tomcat-demo:latest manifests: - image: jfclere/tomcat-demo:amd64 platform: architecture: amd64 os: linux ... - image: jfclere/tomcat-demo:aarch64 platform: architecture: arm64 os: linux on RPI: docker build -t jfclere/tomcat-demo:aarch64 . docker push jfclere/tomcat-demo:aarch64 See tomcat-demo.yaml: image: jfclere/tomcat-demo:aarch64 platform: architecture: arm64 os: linux And use manifest-pool: manifest-tool push from-spec tomcat-demo.yaml
  • 9. TM 1201/02/20 MasterMasterMasterMaster kubeadm reset -f iptables -A INPUT -p tcp --dport 6443 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT iptables -A OUTPUT -p tcp --sport 6443 -m conntrack --ctstate ESTABLISHED -j ACCEPT swapoff –all kubeadm init Start weave network using kubectl: rm -rf $HOME/.kube mkdir -p $HOME/.kube scp root@master:/etc/kubernetes/admin.conf $HOME/.kube/config kubectl apply -f weave-kube.yaml
  • 10. TM 1301/02/20 On each nodeOn each nodeOn each nodeOn each node kubeadm reset -f Reset iptables swapoff –all kubeadm join –token=blabla (get it on master via: kubeadm token create --print-join-command) Done when get nodes says ready. kubectl get nodes
  • 11. TM 1401/02/20 Tomcat ClusterTomcat ClusterTomcat ClusterTomcat Cluster ! Power COL 1 2 3 4 5 6 7 8 1 2 3 6 25 50 8012 100 10 Ether 10/100 Load balancer HTTPD mod_proxy Tomcat node Tomcat nodeTomcat node
  • 12. TM 1501/02/20 Session replication in a clusterSession replication in a clusterSession replication in a clusterSession replication in a cluster HTTP/1.1 No transaction No persistent connection Web App: Using cookies to carry session ID Store information in the session: Shopping cart etc. Multi nodes and dynamic Route request to right node Replicate information
  • 13. TM 1601/02/20 The move from cluster to cloudThe move from cluster to cloud RHEL RHEL Broker Node Node Node RHEL ! Power COL 1 2 3 4 5 6 7 8 1 2 3 6 25 50 8012 100 10 Ether 10/100 Load balancer Tomcat node Tomcat nodeTomcat node
  • 14. TM 1701/02/20 Problems for a cluster to cloud...Problems for a cluster to cloud... Tomcat cluster built-in solution Peer discovery through multicast heartbeat messages Does not work in a cloud environment Session Data Session Data Session Data Session Data Session Data Session Data Multicast solution Peer discovery through Kubernetes Downward API Works in all kubernetes clouds Kubernetes API
  • 15. TM 1801/02/20 Solutions: KUBEPingSolutions: KUBEPing Tools for managing a Kubernetes cluster Accessible from the pods within the cluster GET /api/v1/namespaces/tomcat-in- the-cloud/pods ➔ Return a JSON representation of all the pods in the cluster ➔ Requires permissions
  • 16. TM 1901/02/20 Architecture KUBEPing caseArchitecture KUBEPing case Tomcat cluster built-in solution Peer discovery through multicast heartbeat messages Does not work in a cloud environment Session Data Session Data Session Data Session Data Session Data Session Data Multicast solution Peer discovery through DNS lookup Works in all kubernetes clouds InetAddress.getAllByName(namespace)
  • 17. TM 2001/02/20 Solutions: DNSPingSolutions: DNSPing nslookup name-space Accessible from the pods within the cluster InetAddress.getAllByName() Needs a service.
  • 18. TM 2101/02/20 THE DEMOTHE DEMO On JFCPORTAL (INFRA) Httpd + mod_balancer (include proxy.conf in httpd.conf) ProxyPass "/" "balancer://local" ProxyPassReverse "/" "balancer://local" <Proxy "balancer://local"> BalancerMember "http://master:30306" BalancerMember "http://green:30306" BalancerMember "http://blue:30306" </Proxy> Docker to do the registry: docker run -d -p 5000:5000 --restart=always --name registry registry:2 /etc/containers/registries.conf add: registries = ['jfcportal:5000'] Build the image or get it and push it. docker pull docker.io/jfclere/tomcat-demo docker tag ID jfcportal:5000/tomcat-demo:2.2 docker push jfcportal:5000/tomcat-demo:2.2
  • 19. TM THE DEMOTHE DEMO On JFCPORTAL (Deploying) cd /root/tomcat-openshift kubectl create namespace tomcat-demo kubectl config set-context --current --namespace=tomcat-demo kubectl create -f kube-tomcat-demo.yaml kubectl create -f service.yaml kubectl expose deployment tomcat-demo --type=LoadBalancer --name=tomcat-balancer kubectl get services (to get the service port 30306…) [root@localhost tomcat-openshift]# kubectl get services NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE tomcat-balancer LoadBalancer 10.105.164.188 <pending> 8080:32439/TCP 15s tomcat-demo ClusterIP None <none> 80/TCP 15s On JFCPORTAL (adjust INFRA) Adjust 30306 to the right value and restart httpd bash startbrower.sh Enjoy demo :D
  • 21. TM
  • 22. TM 2501/02/20 Katacoda demo using DNSPingKatacoda demo using DNSPing https://katacoda.com/jfclere/scenarios/dnsping-tomcat And the sources: https://github.com/jfclere/intro-katacoda/tree/master/DNSPing-tomcat Runs everywhere, but requires a service for DNS discovering.
  • 23. TM 2601/02/20 OperatorOperator What is a Kubernetes operator kubernetes definition Basically it automates the services, routes and build (S2I) process. What do we have now We have one written in GO (prototype) S2I (source to image) just tooling :D
  • 24. TM 2701/02/20 Katacoda demo using operatorKatacoda demo using operator Operator demo in Katacoda And the sources: https://github.com/jfclere/intro-katacoda/tree/master/war-katacoda Every thing is created by the operator: pods, services etc.
  • 25. TM 01/02/20 28 Where we are Main sites: – https://github.com/jfclere/tomcat-openshift – https://github.com/jfclere/kubernetes_f30_demo – https://github.com/web-servers/tomcat-in-the-cloud – https://github.com/jfclere/tomcatPI – https://docs.openshift.com – https://github.com/apache/tomcat – tomcat : res/tomcat-maven – DNSMembershipProvider / KubernetesMembershipProvider – Tomcat operator and Source 2 Image (S2I)
  • 26. THANK YOUTHANK YOU JEAN-FREDERIC CLERE @jfclere jfclere@gmail.com JEAN-FREDERIC CLERE @jfclere jfclere@gmail.com