Green Cloud Sustainable Open Source Cloud Architecture on ARM64 - - PowerPoint PPT Presentation

green cloud
SMART_READER_LITE
LIVE PREVIEW

Green Cloud Sustainable Open Source Cloud Architecture on ARM64 - - PowerPoint PPT Presentation

Green Cloud Sustainable Open Source Cloud Architecture on ARM64 @KurtStam, PhD Red Hat Middleware Engineering Saturn 2018 Kubernetes on RaspberryPi Low Power ARM64 Cloud 1. Run your cloud infrastructure on ARM64: Docker and


slide-1
SLIDE 1

Green Cloud

Sustainable Open Source Cloud Architecture on ARM64 @KurtStam, PhD

Red Hat Middleware Engineering

Saturn 2018

slide-2
SLIDE 2

Kubernetes on RaspberryPi

slide-3
SLIDE 3

Low Power ARM64 Cloud

  • 1. Run your cloud infrastructure on ARM64: Docker and

Kubernetes/OpenShift

  • 2. Ship your applications on ARM64 Containers
slide-4
SLIDE 4

Project31: OpenShift on ARM64

https://project31.github.io/ Centos 7 (https://wiki.centos.org/Download) Docker Containers OpenShift (Kubernetes Implementation)

slide-5
SLIDE 5

/etc/yum.repo.d/centos-origin.repo

[openshift-multiarch-aarch64] name=added from: https://cbs.centos.org/repos/paas7-openshift-multiarch-candidate/aarch64/os/Packages/ baseurl=https://cbs.centos.org/repos/paas7-openshift-multiarch-candidate/aarch64/os/ enabled=1 gpgcheck=0

slide-6
SLIDE 6
slide-7
SLIDE 7
slide-8
SLIDE 8

Docker Images

Same Linux Distros on different chip architectures

multiarch/alpine

armhf-v3.7 Arm64-v3.7 x86_64-v3.7

https://hub.docker.com/r/multiarch/alpine/

slide-9
SLIDE 9

Docker Manifest

Usage: docker manifest COMMAND Manage Docker image manifests and manifest lists Options: Commands: annotate Add additional information to a local image manifest create Create a local manifest list for annotating and pushing to a registry inspect Display an image manifest, or manifest list push Push a manifest list to a repository

https://github.com/estesp/manifest-tool docker manifest inspect project31/docker-openvpn

slide-10
SLIDE 10
slide-11
SLIDE 11

Continuous Integration Builds

How to build Docker Images on your existing x86_64 CI infrastructure?

  • Travis CI,
  • Circle CI,
  • Jenkins
slide-12
SLIDE 12

Static Qemu

%GOARCH=arm go build ./hello.go % qemu-arm-static ./hello Hello, world! https://resin.io/blog/building-arm-containers-on-any-x86-machine-even-dockerhub/

slide-13
SLIDE 13

Static Qemu in DockerFile (1)

FROM resin/armv7hf-debian RUN [ "/usr/bin/qemu-arm-static", "apt-get", "update" ] RUN [ "/usr/bin/qemu-arm-static", "apt-get", "install", "python-pip" ] https://resin.io/blog/building-arm-containers-on-any-x86-machine-even-dockerhub/

slide-14
SLIDE 14

Static Qemu in DockerFile (2)

FROM docker.io/project31/aarch64-alpine-qemu:3.5.4 RUN [ "cross-build-start" ] ... whatever you need to do in your Dockerfile ... RUN [ "cross-build-end" ]

https://hub.docker.com/r/project31/aarch64-alpine-qemu/

slide-15
SLIDE 15

OpenVPN on Travis CI

https://travis-ci.org/PiBeach/docker-openvpn

slide-16
SLIDE 16

Travis Build Stages : travis.yml

env: global:

  • BASEIMAGE=project31/docker-openvpn
  • VERSION=latest

matrix:

  • ARCH=amd64 FROM=multiarch/alpine:amd64-latest-stable IMAGE=$BASEIMAGE:amd64-$VERSION
  • ARCH=arm64 FROM=multiarch/alpine:arm64-latest-stable IMAGE=$BASEIMAGE:arm64-$VERSION
  • if [ $ARCH != 'amd64' ]; then docker run --rm --privileged multiarch/qemu-user-static:register --reset; fi
  • docker run -v /var/run/docker.sock:/var/run/docker.sock --rm project31/docker-manifest /bin/bash -c "docker login
  • u=$DOCKER_USERNAME -p=$DOCKER_PASSWORD; docker manifest create $BASEIMAGE:$VERSION

$BASEIMAGE:amd64-$VERSION $BASEIMAGE:arm64-$VERSION; docker manifest annotate $BASEIMAGE:$VERSION $BASEIMAGE:arm64-$VERSION --os linux --arch arm64; docker manifest annotate $BASEIMAGE:$VERSION $BASEIMAGE:amd64-$VERSION --os linux --arch amd64; docker manifest push $BASEIMAGE:$VERSION"

https://raw.githubusercontent.com/PiBeach/docker-openvpn/master/.travis.yml

slide-17
SLIDE 17

Conclusions

1. We can now build containers for alternative architectures using our current CI infrastructure. 2. Using docker manifest Kubernetes/OpenShift is agnostic to what the architecture of the Docker images is. It simply asks Docker to fire it up. Docker pulls the correct image for its chip architecture. 3. Kubernetes/OpenShift can now run on ARM64 chip architecture which is designed with power efficiency in mind. These clouds can be powered more easily with solar and batteries and do not need huge cooling capacity.

See also: https://www.packet.net/blog/arming-the-world-with-an-arm64-bare-metal-server/