SlideShare a Scribd company logo
1 of 50
The ARM to z of Multi-
Architecture Microservices
Chris Jones
Open Source Developer, IBM
Christy Norman Perez
Open Source Developer, IBM
InfoQ.com: News & Community Site
• Over 1,000,000 software developers, architects and CTOs read the site world-
wide every month
• 250,000 senior developers subscribe to our weekly newsletter
• Published in 4 languages (English, Chinese, Japanese and Brazilian
Portuguese)
• Post content from our QCon conferences
• 2 dedicated podcast channels: The InfoQ Podcast, with a focus on
Architecture and The Engineering Culture Podcast, with a focus on building
• 96 deep dives on innovative topics packed as downloadable emags and
minibooks
• Over 40 new content items per week
Watch the video with slide
synchronization on InfoQ.com!
https://www.infoq.com/presentations/
microservices-multi-architecture
Purpose of QCon
- to empower software development by facilitating the spread of
knowledge and innovation
Strategy
- practitioner-driven conference designed for YOU: influencers of
change and innovation in your teams
- speakers and topics driving the evolution and innovation
- connecting and catalyzing the influencers and innovators
Highlights
- attended by more than 12,000 delegates since 2007
- held in 9 cities worldwide
Presented at QCon San Francisco
www.qconsf.com
• What is "multi-arch?"
• Challenges
• Benefits
• The path of multi-arch
Agenda
• Demo – Building images
• Demo – Shipping images
• Demo – Running Swarm
• Q&A
What are we talking about?
• User experience
across architectures
is the same
• Expand your project
Goals
Why should you care?
• Grow your project
• Strengths of other platforms
Benefits
Vendor lock-in
Benefits to others
Challenges
$ uname –m
ppc64le
$ docker run –it ubuntu
standard_init_linux.go:178: exec user process caused
“no such file or directory”
$ docker run –it ppc64le/ubuntu *
root@eb7051894530:/#
Usability
$ uname –m
arm64
$ docker run –it rethinkdb
standard_init_linux.go:178: exec user process caused
“no such file or directory”
$ docker run –it arm64/rethinkdb
docker: Error response from daemon: repository
arm64/rethinkdb not found: does not exist or no
pull access.
Availability
• Users have to remember they are on a different
architecture
• Arch-dependent (Devs?) image names harm usability
(ref frozen images script?)
• Siloed projects cause heartbreaks
Summary
Tools
• actual hardware
• cross-compiling
• full-system emulation (QEMU)
• user-mode emulation (binfmt_misc)
Building binaries and images
• Allows you to run ELF binaries that weren’t
compiled on your host architecture
• Maps non-native binaries to arch-specific
interpreters (e.g. QEMU)
• Pre-Configured in Docker for Mac!
binfmt_misc
binfmt_misc
qemu-arm qemu-ppc64le qemu-amd64
qemuX
binfmt_misc
$ uname -m
x86_64
# docker run ppc64le image
$ docker run -it --rm ppc64le/busybox:latest uname -m
ppc64le
Docker for Mac
# build ppc64le image on non-native hardware
$ docker build -v qemu-static-ppc64le -t awesome-app-
ppc64le -f Dockerfile.ppc64le .
Building using binfmt_misc
https://github.com/multiarch/qemu-user-static
Cross-compiling
# go
$ GOOS=linux GOARCH=arm go build
# java
$ javac HelloWorld.java
examples
Cross-Compile Workflow
java-app>
├── Dockerfile.build
├── Dockerfile.arm
├── Dockerfile.amd64
├── Dockerfile.ppc64le
├── Dockerfile.s390x
└── HelloWorld.java
Cross-Compile Workflow
# Dockerfile.build
FROM openjdk
COPY HelloWorld.java HelloWorld.java
RUN javac HelloWorld.java
Dev system (amd64):
$ docker build -t hwj -f Dockerfile.build . # repeatable build env
$ docker run --name hello-world-temp hwj # need container
$ docker cp hello-world-temp:HelloWorld.class . # copy out of container
Cross-Compile Workflow
Dev system (amd64):
$ docker build -t clnperez/hello-world-arm -f Dockerfile.arm .
$ docker push clnperez/hello-world-arm
# Dockerfile.arm
FROM arm32v7/openjdk
COPY HelloWorld.class HelloWorld.class
CMD ["java", "HelloWorld"]
ARM user:
$ docker run clnperez/hello-world-arm
Hello World!
Manifest lists
Manifest list
• A multi-arch "image” *
• Engine decides which to pull
• Extra image detail
• Use in place of image name
anywhere
myrepo/mylist
amd64 image arm image
ppc64le image
*but not
• Create & push manifest list to registry
• "Shallow pull" (inspect) of image
• Inspect manifest lists
`docker manifest` command
# create interactively using cli
$ docker manifest create ubuntu /
arm/ubuntu /
amd64/ubuntu /
ppc64le/ubuntu /
s390x/ubuntu
# push to registry
$ docker manifest push ubuntu
docker manifest
# or create using yaml
$ docker manifest push
-f clnperez_hw.yaml
docker manifest - yaml (soon)
$ docker manifest inspect ubuntu | grep “arch”
"architecture": "amd64",
"architecture": "arm",
"architecture": "arm64",
"architecture": "386",
"architecture": "ppc64le",
"architecture": "s390x",
docker manifest
Project structure
├── Dockerfile.amd64
├── Dockerfile.arm
├── Dockerfile.ppc64le
├── Dockerfile.s390x
├── Dockerfile.windows
Makefiles, Dockerfiles & build scripts
• Multiple Dockerfiles (e.g.
Dockerfile.arm32v7)
• FROM can be passed in as
an ARG
• Can use manifest inspect to
get arch-specific FROM
• Be mindful of hardcoding
arch values
• If you must...
• ifdefs & build constraints
Optimizations
zfs.go:// +build linux freebsd solaris
zfs_unsupported.go:// +build !linux,!freebsd,!solaris
Putting it all together
tophj/qcon
tophj/qcon
• tophj/qcon:arm64
• tophj/qcon:amd64
• tophj/qcon:ppc64le
• tophj/qcon:s390x
├── Dockerfile.armhf
├── Dockerfile.ppc64le
├── Dockerfile.s390x
├── Dockerfile.x86_64
├── img
│ ├── captain_logo.png
│ ├── captain.png
│ ├── christy_logo.png
│ ├── christy.png
│ ├── pink.png
│ └── tophj.png
└── server.go
docker swarm demo
# create our tophj/demo manifest list which points to our
# architecture specific images
$ docker manifest create tophj/demo tophj/x86_64-demo 
tophj/armhf-demo tophj/ppc64le-demo tophj/s390x-demo
docker swarm demo
# annotate to change armhf to arm
$ docker manifest annotate tophj/demo tophj/armhf-demo 
--os linux --arch arm
# finally push the manifest list
$ docker manifest push tophj/demo
docker swarm demo
$ docker node ls
ID HOSTNAME STATUS AVAILABILITY MANAGER
STATUS
3nisms9qfi27ko0683bylxyud s390 Ready Active
7jwo7d5braat1l6n63j8xfue6 * x86_64 Ready Active Leader
n5tqx2yk77123sjiapqwmu14e armhf Ready Active
u30pwzlt5hthwbbsdok8nxyh8 ppc64le Ready Active
docker swarm demo
# start the swarm service using the multi-arch image name
$ docker service create --mode global --name dockercon -p 8082:8080 tophj/demo
# start a simple load-balancer for fun
$ docker run -itd -p 80:81 --name nginx -v /christy/nginx:/etc/nginx nginx
# visit the IP of your load balancer in your browser
# be sure to refresh for multi-arch fun
docker swarm demo
docker swarm demo
• Server image:
https://c1.staticflickr.com/4/3519/3462607995_150a6b2624_b.jpg
• HtcpcpTeapot image:
https://commons.wikimedia.org/wiki/File:Htcpcp_teapot.jpg
• Raspberry Pi is a trademark of the Raspberry Pi Foundation.
• https://github.com/dockersamples/docker-swarm-visualizer
• ARMHF VM from Scaleway
• X86 VM from DigitalOcean
• Gophers: http://gopherize.me
References & Legal
Thank You!
Go forth and multi-arch!
@qcon #qcon
Watch the video with slide
synchronization on InfoQ.com!
https://www.infoq.com/presentations/
microservices-multi-architecture

More Related Content

More from C4Media

More from C4Media (20)

Shifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDShifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CD
 
CI/CD for Machine Learning
CI/CD for Machine LearningCI/CD for Machine Learning
CI/CD for Machine Learning
 
Fault Tolerance at Speed
Fault Tolerance at SpeedFault Tolerance at Speed
Fault Tolerance at Speed
 
Architectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsArchitectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep Systems
 
ML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.js
 
Build Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerBuild Your Own WebAssembly Compiler
Build Your Own WebAssembly Compiler
 
User & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleUser & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix Scale
 
Scaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeScaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's Edge
 
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereMake Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home Everywhere
 
The Talk You've Been Await-ing For
The Talk You've Been Await-ing ForThe Talk You've Been Await-ing For
The Talk You've Been Await-ing For
 
Future of Data Engineering
Future of Data EngineeringFuture of Data Engineering
Future of Data Engineering
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
 
Navigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery TeamsNavigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery Teams
 
High Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in AdtechHigh Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in Adtech
 
Rust's Journey to Async/await
Rust's Journey to Async/awaitRust's Journey to Async/await
Rust's Journey to Async/await
 
Opportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven UtopiaOpportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven Utopia
 
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/DayDatadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
 
Are We Really Cloud-Native?
Are We Really Cloud-Native?Are We Really Cloud-Native?
Are We Really Cloud-Native?
 
CockroachDB: Architecture of a Geo-Distributed SQL Database
CockroachDB: Architecture of a Geo-Distributed SQL DatabaseCockroachDB: Architecture of a Geo-Distributed SQL Database
CockroachDB: Architecture of a Geo-Distributed SQL Database
 
A Dive into Streams @LinkedIn with Brooklin
A Dive into Streams @LinkedIn with BrooklinA Dive into Streams @LinkedIn with Brooklin
A Dive into Streams @LinkedIn with Brooklin
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Recently uploaded (20)

CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 

The ARM to Z of Multi-Architecture Microservices

  • 1. The ARM to z of Multi- Architecture Microservices Chris Jones Open Source Developer, IBM Christy Norman Perez Open Source Developer, IBM
  • 2. InfoQ.com: News & Community Site • Over 1,000,000 software developers, architects and CTOs read the site world- wide every month • 250,000 senior developers subscribe to our weekly newsletter • Published in 4 languages (English, Chinese, Japanese and Brazilian Portuguese) • Post content from our QCon conferences • 2 dedicated podcast channels: The InfoQ Podcast, with a focus on Architecture and The Engineering Culture Podcast, with a focus on building • 96 deep dives on innovative topics packed as downloadable emags and minibooks • Over 40 new content items per week Watch the video with slide synchronization on InfoQ.com! https://www.infoq.com/presentations/ microservices-multi-architecture
  • 3. Purpose of QCon - to empower software development by facilitating the spread of knowledge and innovation Strategy - practitioner-driven conference designed for YOU: influencers of change and innovation in your teams - speakers and topics driving the evolution and innovation - connecting and catalyzing the influencers and innovators Highlights - attended by more than 12,000 delegates since 2007 - held in 9 cities worldwide Presented at QCon San Francisco www.qconsf.com
  • 4. • What is "multi-arch?" • Challenges • Benefits • The path of multi-arch Agenda • Demo – Building images • Demo – Shipping images • Demo – Running Swarm • Q&A
  • 5. What are we talking about?
  • 6.
  • 7.
  • 8. • User experience across architectures is the same • Expand your project Goals
  • 10. • Grow your project • Strengths of other platforms Benefits
  • 13.
  • 15. $ uname –m ppc64le $ docker run –it ubuntu standard_init_linux.go:178: exec user process caused “no such file or directory” $ docker run –it ppc64le/ubuntu * root@eb7051894530:/# Usability
  • 16. $ uname –m arm64 $ docker run –it rethinkdb standard_init_linux.go:178: exec user process caused “no such file or directory” $ docker run –it arm64/rethinkdb docker: Error response from daemon: repository arm64/rethinkdb not found: does not exist or no pull access. Availability
  • 17.
  • 18. • Users have to remember they are on a different architecture • Arch-dependent (Devs?) image names harm usability (ref frozen images script?) • Siloed projects cause heartbreaks Summary
  • 19. Tools
  • 20. • actual hardware • cross-compiling • full-system emulation (QEMU) • user-mode emulation (binfmt_misc) Building binaries and images
  • 21. • Allows you to run ELF binaries that weren’t compiled on your host architecture • Maps non-native binaries to arch-specific interpreters (e.g. QEMU) • Pre-Configured in Docker for Mac! binfmt_misc
  • 23. $ uname -m x86_64 # docker run ppc64le image $ docker run -it --rm ppc64le/busybox:latest uname -m ppc64le Docker for Mac
  • 24. # build ppc64le image on non-native hardware $ docker build -v qemu-static-ppc64le -t awesome-app- ppc64le -f Dockerfile.ppc64le . Building using binfmt_misc https://github.com/multiarch/qemu-user-static
  • 26. # go $ GOOS=linux GOARCH=arm go build # java $ javac HelloWorld.java examples
  • 27. Cross-Compile Workflow java-app> ├── Dockerfile.build ├── Dockerfile.arm ├── Dockerfile.amd64 ├── Dockerfile.ppc64le ├── Dockerfile.s390x └── HelloWorld.java
  • 28. Cross-Compile Workflow # Dockerfile.build FROM openjdk COPY HelloWorld.java HelloWorld.java RUN javac HelloWorld.java Dev system (amd64): $ docker build -t hwj -f Dockerfile.build . # repeatable build env $ docker run --name hello-world-temp hwj # need container $ docker cp hello-world-temp:HelloWorld.class . # copy out of container
  • 29. Cross-Compile Workflow Dev system (amd64): $ docker build -t clnperez/hello-world-arm -f Dockerfile.arm . $ docker push clnperez/hello-world-arm # Dockerfile.arm FROM arm32v7/openjdk COPY HelloWorld.class HelloWorld.class CMD ["java", "HelloWorld"] ARM user: $ docker run clnperez/hello-world-arm Hello World!
  • 31. Manifest list • A multi-arch "image” * • Engine decides which to pull • Extra image detail • Use in place of image name anywhere myrepo/mylist amd64 image arm image ppc64le image *but not
  • 32. • Create & push manifest list to registry • "Shallow pull" (inspect) of image • Inspect manifest lists `docker manifest` command
  • 33. # create interactively using cli $ docker manifest create ubuntu / arm/ubuntu / amd64/ubuntu / ppc64le/ubuntu / s390x/ubuntu # push to registry $ docker manifest push ubuntu docker manifest
  • 34. # or create using yaml $ docker manifest push -f clnperez_hw.yaml docker manifest - yaml (soon)
  • 35. $ docker manifest inspect ubuntu | grep “arch” "architecture": "amd64", "architecture": "arm", "architecture": "arm64", "architecture": "386", "architecture": "ppc64le", "architecture": "s390x", docker manifest
  • 37. ├── Dockerfile.amd64 ├── Dockerfile.arm ├── Dockerfile.ppc64le ├── Dockerfile.s390x ├── Dockerfile.windows Makefiles, Dockerfiles & build scripts • Multiple Dockerfiles (e.g. Dockerfile.arm32v7) • FROM can be passed in as an ARG • Can use manifest inspect to get arch-specific FROM • Be mindful of hardcoding arch values
  • 38. • If you must... • ifdefs & build constraints Optimizations zfs.go:// +build linux freebsd solaris zfs_unsupported.go:// +build !linux,!freebsd,!solaris
  • 39. Putting it all together
  • 41. tophj/qcon • tophj/qcon:arm64 • tophj/qcon:amd64 • tophj/qcon:ppc64le • tophj/qcon:s390x
  • 42. ├── Dockerfile.armhf ├── Dockerfile.ppc64le ├── Dockerfile.s390x ├── Dockerfile.x86_64 ├── img │ ├── captain_logo.png │ ├── captain.png │ ├── christy_logo.png │ ├── christy.png │ ├── pink.png │ └── tophj.png └── server.go docker swarm demo
  • 43. # create our tophj/demo manifest list which points to our # architecture specific images $ docker manifest create tophj/demo tophj/x86_64-demo tophj/armhf-demo tophj/ppc64le-demo tophj/s390x-demo docker swarm demo
  • 44. # annotate to change armhf to arm $ docker manifest annotate tophj/demo tophj/armhf-demo --os linux --arch arm # finally push the manifest list $ docker manifest push tophj/demo docker swarm demo
  • 45. $ docker node ls ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS 3nisms9qfi27ko0683bylxyud s390 Ready Active 7jwo7d5braat1l6n63j8xfue6 * x86_64 Ready Active Leader n5tqx2yk77123sjiapqwmu14e armhf Ready Active u30pwzlt5hthwbbsdok8nxyh8 ppc64le Ready Active docker swarm demo
  • 46. # start the swarm service using the multi-arch image name $ docker service create --mode global --name dockercon -p 8082:8080 tophj/demo # start a simple load-balancer for fun $ docker run -itd -p 80:81 --name nginx -v /christy/nginx:/etc/nginx nginx # visit the IP of your load balancer in your browser # be sure to refresh for multi-arch fun docker swarm demo
  • 48. • Server image: https://c1.staticflickr.com/4/3519/3462607995_150a6b2624_b.jpg • HtcpcpTeapot image: https://commons.wikimedia.org/wiki/File:Htcpcp_teapot.jpg • Raspberry Pi is a trademark of the Raspberry Pi Foundation. • https://github.com/dockersamples/docker-swarm-visualizer • ARMHF VM from Scaleway • X86 VM from DigitalOcean • Gophers: http://gopherize.me References & Legal
  • 49. Thank You! Go forth and multi-arch! @qcon #qcon
  • 50. Watch the video with slide synchronization on InfoQ.com! https://www.infoq.com/presentations/ microservices-multi-architecture