Top Banner
Hybrid and Automation System Architecture @Author: Quanpc - [email protected] System Administrator From: Topica Edumall
33

ContainerDayVietnam2016: Hybrid and Automation System Architecture

Apr 12, 2017

Download

Technology

Docker-Hanoi
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: ContainerDayVietnam2016: Hybrid and Automation System Architecture

Hybrid and Automation System Architecture

@Author:Quanpc - [email protected] AdministratorFrom:Topica Edumall

Page 2: ContainerDayVietnam2016: Hybrid and Automation System Architecture

SomeproblemwithOPs

• Physicalsystemissohardtoscale• Conflictwithapplicationsenvironment• ConflictbetweenDevelopersandSysadmin• ….• =>Needasolutionstocontrolandsolve all problem

Page 3: ContainerDayVietnam2016: Hybrid and Automation System Architecture

Automation Workflow and Hybrid System

Page 4: ContainerDayVietnam2016: Hybrid and Automation System Architecture

• ReleaseRailsAppwithGitlab whenappliedDocker• (CI– CDworkflowwithRailsAppwhenapplyDocker)

• Designauto-scalesystemwithDockeronKubernetesandAWSCloud• ScalablesystemwhenusingonlyAWSCloud• Auto-scalesystemonKubernetesandAWSCloud

Page 5: ContainerDayVietnam2016: Hybrid and Automation System Architecture

Dockerize RailsApps

- Dockerfile- EnvironmentVariables- Gem requirement- Specify Gem with Gemfile and

Gemfile.lock

Page 6: ContainerDayVietnam2016: Hybrid and Automation System Architecture
Page 7: ContainerDayVietnam2016: Hybrid and Automation System Architecture

Gitlab-CI & Gitlab-multi-runner

- Autotest- AutoQ/A- MultipleEnvironmentTesting- AutoReleaseImages- AutodeliveryDockerImagestoDocker-Hub- Autodeployment

Page 8: ContainerDayVietnam2016: Hybrid and Automation System Architecture

CI-CDworkflowwithDocker

Developerpushanewcommittogitlab

Gitlab Trigger Gitlab Runnerfetchandpullrepo

Gitlab-runnerbuildDockerimagefromDockerfile

ExcutetestonalltargetWithall“RAILS_ENV”

DeliveryimagestoDockerhubOrPrivateregistry

DeploytoK8sCluster

Page 9: ContainerDayVietnam2016: Hybrid and Automation System Architecture

CI– CDworkflowwithDev

• DeveloperwriteDockerfileandpushesthecommittoGitlab• GitlabnotifyGitlab-runnerbytrigger• Gitlab-runnerfetchandpullrepo,buildDockerImagewithDockerfile• Gitlab-runnerruncontainerwithcommandtest,andallRAILS_ENV,environmentspecifyonconfigfile

• IFthispassalltest-case,itwillbepushedtodockerhubordockerprivateregistry• Afterthat,Gitlab-runnerwillrollingupdatepods,service,replicationcontrolleronK8sClusterwithnewdocker-images

Page 10: ContainerDayVietnam2016: Hybrid and Automation System Architecture
Page 11: ContainerDayVietnam2016: Hybrid and Automation System Architecture

Auto-scalesystemwithDockerandKubernestesonAWS

Page 12: ContainerDayVietnam2016: Hybrid and Automation System Architecture

HybridAuto-scalesystemonAWS

Page 13: ContainerDayVietnam2016: Hybrid and Automation System Architecture

Auto-Scaling

• Makethesystemeasierwithscalable• Alltheactionswith automation• Policy scale-up and scale-down

Page 14: ContainerDayVietnam2016: Hybrid and Automation System Architecture
Page 15: ContainerDayVietnam2016: Hybrid and Automation System Architecture
Page 16: ContainerDayVietnam2016: Hybrid and Automation System Architecture
Page 17: ContainerDayVietnam2016: Hybrid and Automation System Architecture
Page 18: ContainerDayVietnam2016: Hybrid and Automation System Architecture
Page 19: ContainerDayVietnam2016: Hybrid and Automation System Architecture
Page 20: ContainerDayVietnam2016: Hybrid and Automation System Architecture
Page 21: ContainerDayVietnam2016: Hybrid and Automation System Architecture

AutoHealing

• Auto define unexpected event of infrastructure• Auto fix

Page 22: ContainerDayVietnam2016: Hybrid and Automation System Architecture
Page 23: ContainerDayVietnam2016: Hybrid and Automation System Architecture
Page 24: ContainerDayVietnam2016: Hybrid and Automation System Architecture
Page 25: ContainerDayVietnam2016: Hybrid and Automation System Architecture
Page 26: ContainerDayVietnam2016: Hybrid and Automation System Architecture

KubernetesArchitecture• Kubernetes isanopen-sourcesystemforautomatingdeployment,scaling,andmanagementofcontainerizedapplications.

• “Writeoncerunforever”

Page 27: ContainerDayVietnam2016: Hybrid and Automation System Architecture
Page 28: ContainerDayVietnam2016: Hybrid and Automation System Architecture

Features focus• Pods• Replication Controller • Services• LBaaS• HPA – Horizontal Pods Autoscaling• Constraint• Label• Namespace• …

Page 29: ContainerDayVietnam2016: Hybrid and Automation System Architecture

HybridsystemArchitecture

• DEV:• MakeITsimple• Easytouse• DocumentsasCode• Notneedtosetup

• OPS• Easytomaintain• Becomehumanops

Page 30: ContainerDayVietnam2016: Hybrid and Automation System Architecture
Page 31: ContainerDayVietnam2016: Hybrid and Automation System Architecture

Disadventage

• Workflow: • Developer must know about system – Devops • Can’t apply docker to all old services• Dockerize old big system is so hard• Personal know-how

Page 32: ContainerDayVietnam2016: Hybrid and Automation System Architecture

YOUR GOAL• Hybrid system with HA, AUTO-HEALING, AUTO-SCALING, AUTO-

DEPLOYMENT…• Easy with “OPS”• Easy with “DEV”

Page 33: ContainerDayVietnam2016: Hybrid and Automation System Architecture

Q&A