green cloud
play

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


  1. Green Cloud Sustainable Open Source Cloud Architecture on ARM64 @KurtStam, PhD Red Hat Middleware Engineering Saturn 2018

  2. Kubernetes on RaspberryPi

  3. Low Power ARM64 Cloud 1. Run your cloud infrastructure on ARM64: Docker and Kubernetes/OpenShift 2. Ship your applications on ARM64 Containers

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

  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

  6. 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/

  7. 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

  8. Continuous Integration Builds How to build Docker Images on your existing x86_64 CI infrastructure? Travis CI, ● Circle CI, ● Jenkins ●

  9. 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/

  10. 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/

  11. 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/

  12. OpenVPN on Travis CI https://travis-ci.org/PiBeach/docker-openvpn

  13. 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

  14. 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/

Recommend


More recommend