Multi-Cloud Infrastructure Management by Infrakit Yuji Oshima NTT
Who I am. Yuji Oshima Software Engineer in NTT A maintainer of Infrakit @YujiOshima @overs_5121
Agenda - Introduction to Infrakit - Multi AZ/Region/Cloud Architecture design with Infrakit - Demo - Summary
Enterprise Cloud Strategy No plans 1% Single public 9% Multi-Cloud 85% Single private 5% https://www.rightscale.com/lp/2017-state-of-the-cloud-report
Motivation for Multi AZ/Region/Cloud ühigh Availability üavoid cloud lock in ücost Optimization
Two points to manage the multi-cloud üabstracting Cloud Providers üdesigning auto-healing infrastructure across Clouds Infra Manager Abstracting Interface Cloud A Cloud B Cloud C
Docker Everywhere On-Premise
Cluster Everywhere? On-Premise
Infrakit A OSS project in moby project Toolkit for Cluster infrastructure orchestration Enable auto-healing infrastructure
Infrakit Components Groups Instances Flavors Cluster Configuration Scaling Policy Comprised of Instances & Flavor Combination Logical Cluster Instance i.e. EC2 instance, GCE instance Vagrant VM, Physical Host Role & Health-check for Cluster i.e. Swarm master & node, ZooKeeper
Moby and Kubernetes community Infrakit support Kubernetes flavor now!
Infrakit Architecture
Infrakit Architecture Group Default RPC RPC Flavor Kubernetes Docker Swarm Group : Default Instance : AWS Flavor : Docker Swarm master 2 worker 4 Group 2 AWS EC2 GCP GCE API Instance
Infrakit Architecture Group Default Flavor Kubernetes Docker Swarm Group : Default Instance : AWS Flavor : Docker Swarm master 2 worker 4 Group 2 AWS EC2 GCP GCE Instance
Infrakit Architecture How many instances do you have? Group Default RPC RPC Flavor Kubernetes Docker Swarm I have 0 instance! Group : Default Instance : AWS Flavor : Docker Swarm master 2 worker 4 Group 2 AWS EC2 GCP GCE Instance
Infrakit Architecture Group Create 2 masters and 4 workers for Docker swarm! Flavor Default RPC RPC Kubernetes Docker Swarm Group : Default Instance : AWS Flavor : Docker Swarm master 2 worker 4 Group 2 AWS EC2 GCP GCE API Instance
Infrakit Architecture Group Default RPC RPC Flavor Kubernetes Docker Swarm Group : Default Instance : AWS Flavor : Docker Swarm master 2 worker 4 Group 2 AWS EC2 GCP GCE API Instance
Infrakit Architecture Group Default Flavor Kubernetes Docker Swarm Group : Default Instance : AWS Flavor : Docker Swarm master 2 worker 4 Group 2 AWS EC2 GCP GCE Instance
Infrakit Architecture Group How many instances do you have? Flavor Default RPC RPC Kubernetes Docker Swarm Group : Default Instance : AWS Flavor : Docker Swarm master 2 worker 4 Group 2 AWS EC2 GCP GCE API Instance
Infrakit Architecture Group How many instances do you have? Flavor I have 2 masters and 3 workers instance! Default RPC RPC Kubernetes Docker Swarm Group : Default Instance : AWS Flavor : Docker Swarm master 2 worker 4 Group 2 AWS EC2 GCP GCE API Instance
Infrakit Architecture Group Create more one worker for Docker swarm! Flavor Default RPC RPC Kubernetes Docker Swarm Group : Default Instance : AWS Flavor : Docker Swarm master 2 worker 4 Group 2 AWS EC2 GCP GCE API Instance
Selector Instance Plugin Group Default Selector AWS EC2 GCP GCE Select Instance plug-in with some policy Default : spread weighted tiered Group 2 Instance
Spread Selector Group Default Selector AWS EC2 Select the instance plug-in that has the least number of instances. GCP GCE Group 2 Instance
Weighted Selector Group Default Selector AWS EC2 GCP GCE weight each plug-ins as you like. For example Provider A : 20 Provider B : 70 Provider C : 10 Group 2 Instance
Tiered Selector Group Default Selector 1 2 AWS EC2 Go through the list of choices one by one until an instance is successfully provisioned. 3 GCP GCE Group 2 Instance
Your own Selector
Optimizing Cost by AWS Spot Instance ü Often receive big discount compare to On-Demand instances ü The price is changeable ü Your instances will be interrupted due to price or system event
Optimizing Cost by AWS Spot Instance P2.xlarge Instance price history in AP-Northeast
Optimizing Cost by AWS Spot Instance g3.8xlarge Instance price history in AP-Northeast
A Cluster Across Multi AZ Availability Zone A Availability Zone B Master Server Node Node Node Node Node
Optimizing Cost by AWS Spot Instance Infrakit Availability Zone A Availability Zone B Master Server Spot Instance Node Node Node Node Node
Optimizing Cost by AWS Spot Instance Infrakit Availability Zone A Availability Zone B Master Server Spot Instance Node Node Node Node Node
Optimizing Cost by AWS Spot Instance Infrakit Availability Zone A Gather Info Instance number Price Availability Zone B Master Server Spot Instance Node Node Node Node
Optimizing Cost by AWS Spot Instance Infrakit Availability Zone A Availability Zone B Master Server Spot Instance Node Node Node Node Node
Points üallocate minimum instances with On-Demand Instance üuse several instance type
Optimizing Cost by Infrakit üinfrakit is not specified to AWS ügcp has similar service Preemptible VMs üyou can use the same logic on GCP with little modify
A Cluster Across Multi Cloud Provider? Provider A Provider B Master Server Node Node Node Node Node
A Cluster Across Multi Cloud Provider? Provider A Provider B Master Server VPN Node Node Node Node Node
Kubernetes Cloud Federation Federation Control Plane Cloud Provider A Cloud Provider B Master Server Master Server Node Node Node Node Node
Demo eu-west-1a eu-west-1b Master Server 50:50 Spot Instance Node Node Node Node Node
Next Step of Infrakit Bootstrapping Improve starting process of Infrakit cluster Kubernetes + Prometheus Integration Automation of node cordon and drain during scale down or update Improve kubeadm integration Support HA/ multi-master Export stats to Prometheus Cloud federation support Enterprise/ on-premise use case Oracle Clouds, Cisco UCS, Vsphere/ VCenter Better testing +hardening More end-to-enttests Automated testing on different infrastructure platform
Summary üinfrakit is the toolkit for cluster infrastructure orchestration üyou can design infrastructure as a code ümulti AZ/Region/Cloud management is not so difficult but healing logic and infrastructure design is important. üinfrakit is a good tool for design and management for clusters.
Thank you! Github : https://github.com/docker/infrakit Slack : https://dockercommunity.slack.com #infrakit