傻瓜也會用的容器集群管理Sammy @ Container Summit 2016 (2016/9/21)
HELLOI am Sammy Linsammylin tw@SammyLinTwsammylintw@gmail.com
CURRENTDevOps Engineer @ commandp Inc.Organizer @ DevOps TaiwanEXPERIENCESpeaker @ 2016 DevOps SummitPanelist @ 2016 AWS Cloud Kata TaipeiProfessional Specialist Faculty @ PCCUTAGsDevOps, Jenkins, AWS, Ruby, HTML, Chef, Vim,Infrasture
Why Container?
Why Container?Immutable
Why Container?Isolation
Why Container?Lightweight
docker run -v /some/content:/usr/share/nginx/html:ro -p 8080:80 -d nginx
noitcudoI n PrSource: https://flipboard.com/topic/container
How to manage multiple docker containers?
Amazon EC2 Container Service (ECS)
Amazon EC2 Container Service (ECS) Amazon EC2 Container Registry (ECR)
()
()
()
ECS are not available in China
Open Source
Visualization
Access Control
Audit Logs
Support Kubernetes & Mesos & Swarm
Rancher LabsContainer Summit 2015
Installation
Installing Rancher Server(Single Node) sudo docker run -d --restart unless-stopped -p 8080:8080 rancher/server
Installing Rancher Server(Single Node) sudo docker run -d --restart unless-stopped -p 8080:8080 rancher/serverBIND MOUNT MYSQL VOLUME sudo docker run -d -v (pwd)/mysql:/var/lib/mysql \--restart unless-stopped \-p 8080:8080 \rancher/server
Installing Rancher Server(Single Node) sudo docker run -d --restart unless-stopped -p 8080:8080 rancher/serverBIND MOUNT MYSQL VOLUME sudo docker run -d -v (pwd)/mysql:/var/lib/mysql \--restart unless-stopped \-p 8080:8080 \rancher/serverUSING AN EXTERNAL DATABASE sudo docker run -d --restart unless-stopped -p 8080:8080 \-e CATTLE DB CATTLE MYSQL HOST hostname or IP of MySQL instance \-e CATTLE DB CATTLE MYSQL PORT port \-e CATTLE DB CATTLE MYSQL NAME Name of Database \-e CATTLE DB CATTLE USERNAME Username \-e CATTLE DB CATTLE PASSWORD Password \rancher/server
Installing Rancher Server(Single Node) sudo docker run -d --restart unless-stopped -p 8080:8080 rancher/serverBIND MOUNT MYSQL VOLUME sudo docker run -d -v (PWD)/mysql:/var/lib/mysql \--restart unless-stopped \-p 8080:8080 \rancher/serverUSING AN EXTERNAL DATABASE sudo docker run -d --restart unless-stopped -p 8080:8080 \-e CATTLE DB CATTLE MYSQL HOST hostname or IP of MySQL instance \-e CATTLE DB CATTLE MYSQL PORT port \-e CATTLE DB CATTLE MYSQL NAME Name of Database \-e CATTLE DB CATTLE USERNAME Username \-e CATTLE DB CATTLE PASSWORD Password \rancher/server
Installing Rancher Server(Multi Nodes)1 Node: Not really HA3 Nodes: Any one host can fail5 Nodes: Any two hosts can fail
Rancher ServerRancherHostRancherHostRancher Agent(Docker)Rancher Agent(Docker)RancherHostRancher Agent(Docker)
Add Hosts
Add Hosts Amazon ]
Add Hosts(Custom Hosts)
Add Hosts(Custom Hosts)
Add Hosts(Custom Hosts) sudo docker run \-d \--privileged \-v /var/run/docker.sock:/var/run/docker.sock rancher/agent:v1.0.2 \http:// rancher-server-ip :8080/v1/scripts/ registrationToken
Rancher ServerRancher Agent(Docker)Rancher Agent(Docker)STACK 1STACK 2STACK [n]Rancher Agent(Docker)
StackRancher LoadBalancerAPPRedisAPPNetwork AgentNetwork AgentThrough IPsec (UDP 500 & 4500)Network Agent
Catalog
Rancher API KeysManipulate to specific Environment (Environment API keys)Manipulate to All Environment (Accout API keys)
Rancher API Keys
Rancher Compose ToolThe Rancher Compose tool is a multi-host version of DockerCompose.
Rancher Compose ToolInstillation through Web UI
Rancher Compose ToolInstillation through Github
Rancher Compose ToolSetting up export RANCHER URL http:// server ip :8080/v1 export RANCHER ACCESS KEY accessKey of account api key export RANCHER SECRET KEY secretKey of account api key Install (ubuntu) wget .6.tar.gz tar zxvf rancher-compose-linux-amd64-v0.8.6.tar.gz cd rancher-compose-v0.8.6 ./rancher-compose
DEMO
CI/CD FlowGithub changeJenkins TriggerDocker build&pushDeploy Rancher
CI/CD Flow (commandp)Docker RegistryAWS S3Docker PullProxy ServerDocker ancher (China)
DockerfileWebsiteNginx
CI/CD Task Definition File(ECS)Donʼt use only the “latest” tag
CI/CD Script (ECS)
CI/CD Docker-compose.yml (Rancher)
CI/CD Script (Rancher)Rancher-compose doc: cher-compose/commands/
ReferenceRancher Official Website: http://rancher.com/Rancher Tutorials: http://rancher.com/learn/GO Simple Tunnel(Gost): https://github.com/ginuerzh/gostGost (Docker): https://github.com/pahud/gost-docker
DevOps Taiwanhttps://www.facebook.com/groups/DevOpsTaiwan
Thankssammylin tw@SammyLinTwsammylintw@gmail.com
DevOps Engineer @ commandp Inc. Organizer @ DevOps Taiwan EXPERIENCE Speaker @ 2016 DevOps Summit Panelist @ 2016 AWS Cloud Kata Taipei Professional Specialist Faculty @ PCCU TAGs DevOps, Jenkins, AWS, Ruby, HTML, Chef, Vim, Infrasture
455 Rancher, 455e Rancher, 460 Rancher EN Operator's manual 2-40 ES-MX Manual del usuario 41-84 FR-CA Manuel d’utilisation 85-127
455 Rancher 460 Rancher Oper ator’s manual (EPA II) Please r ead the operator’s manual carefully and make sure you understand the instructions before using the machine. KEY T O SYMBOLS 2 – English Symbols on the mac . Husqvarna is based on a tradition that dates back to 1689,
455 Rancher 460 Rancher Oper ator’s manual Please read the operator’s manual carefully and make sure you understand the instructions before using the machine. EEnngglliisshh. KEY T O SYMBOLS 2 – English 1153137-95 Rev.2 2009-12-29 Symbols on the machine: W
source technologies. Rancher is not a Docker orchestration tool—it is the most complete container management platform. CERTIFIED AND SUPPORTED KUBERNETES DISTRIBUTION The certified and supported Kubernetes distribution included with Rancher makes it easy for you to take advantage of proven, stable Kubernetes features. To ensure a
SERVICE Spare parts Ersatzteile Pièces détachées Reserve onderdelen Repuestos Reservdelar I0400113 IPL, 455 Rancher, 2004-10, 106 40 11-61 455 Rancher
Name Husqvarna 16” Chainsaw Recommended Use Cutting Firewood up to 250 mm diameter Section 1: Equipment Details . This SOP based on information contained in the Husqvarna 455e Rancher 455 Rancher 460 Rancher operators manual reference 1153137
Since all the configuration of resources, such as security, policies, etc., exist within Rancher, these resources can be easily spun up elsewhere and a simple DNS update completes the application migration. Rancher also provides the complete set of tools required to manage all aspects of the application lifecycle on the platform.
Honda TRX420TM/FM FOURTRAX RANCHER 420/4 4 OWNER’S MANUAL FOR OFF-ROAD USE ONLY This vehicle is designed and manufactured for off-road use only. USA only: It conforms to US EPA Noise Emission regulations, but does not conform to Federal Motor Vehicle Safety Standards or US EPA On Highway Exhaust Emission regulations, and operation on public .