### Containerize ### & ### Evolution of Deployment Type ---- # Docker ## Docker Compose ### Kubernetes #### Evolution of Deployment Type ---- ### About Me * TWJUG @Vincent Huang * wide range skill set backend engineer 😎 * research, coding, database, devops, infra. 😵 * mainly write Java but also ❤️ Scala & Kotlin * http://github.jianminhuang.cc 🇹🇼 * xTeam Studio --- <!-- .slide: data-background="#FFFFFF" --> ![](https://i.imgur.com/HiFm0d2.gif) --- <!-- .slide: data-background="#FFFFFF" --> ### What is Docker ? ![](https://i.imgur.com/7xqoevv.png) ---- Docker is a computer program that performs **operating-system-level virtualization**, also known as "**containerization**". It was first released in 2013 and is developed by Docker, Inc. -- from Wikipedia ---- * Hardware Virtualization * DOSBox * Hyper-V * Parallels Desktop for Mac * VirtualBox * VMware * ... ---- <!-- .slide: data-background="#FFFFFF" --> ### System in System in System in ... ![](https://i.imgur.com/fDfNwN2.gif) ---- * operating-system-level virtualization (containerization) * container exist to run a single application (k8s pod ✌) #### Mom ! I'm Here ! 👋 * https://www.vagrantup.com/ ---- ```shell= docker run --name jenkins -d -p 8080:8080 -p 50000:50000 -e "TZ=Asia/Taipei" jenkins/jenkins:lts docker run --name mysql -d -p 3306:3306 -e "TZ=Asia/Taipei" -e MYSQL_ROOT_PASSWORD=rootroot mysql:5.7 docker run -d -p 5900:5900 -e VNC_PASSWORD=password dorowu/ubuntu-desktop-lxde-vnc docker run -d -p 8080:80 asia.gcr.io/himore-linder-boyainc-02/haon-ottol-mobile:0.1.0-rc11 docker run -d -p 8011:8011 -e activeProfiles=test -e "TZ=Asia/Taipei" -e GOOGLE_APPLICATION_CREDENTIALS=/Himore-Linder-Boyainc.json asia.gcr.io/himore-linder-boyainc-02/ottol-api:Slowpoke.1.0.0.201901150330.792851 ``` ---- #### Change for Deployment * Standardize Procedure * Application with Environment * Build Once, Run Anywhere (java say hello ☕) * Eazy to Horizontal Expansion by Yourself (aws say hi 💪) * Base of CI & CD, DevOps, Microservices, Cloud Native, etc. #### # Already supported by frameworks or language !? #### # Anything Java Ecosystem can't do !? #### # Faster, Bigger, Lightweight or Cool(C,B,A) !? --- #### Docker -> Docker Compose ---- <!-- .slide: data-background="#FFFFFF" --> ![](https://i.imgur.com/7xqoevv.png) ---- <!-- .slide: data-background="#FFFFFF" --> ![](https://i.imgur.com/fdgcU1D.png) --- ### Docker Compose * templating 📃 * chef cookbook * ansible playbook * helm chart * terraform infrastructure as code * share network, share volume on same node * centralized management * horizontal expansion (scale agent=3) ---- <!-- .slide: data-background="#FFFFFF" --> ![](https://i.imgur.com/1GHC8sn.jpg) ---- ``` version: "3" services: server: image: jetbrains/teamcity-server:2017.2.4 expose: - 8111 ports: - "8111:8111" volumes: - ./dataDir:/data/teamcity_server/dataDir environment: - TZ=Asia/Taipei networks: - default agent: image: jianminhuang/teamcity-agent:2017.2.4.1 environment: - TZ=Asia/Taipei - SERVER_URL=http://server:8111 volumes: - /var/run/docker.sock:/var/run/docker.sock networks: - default depends_on: - server nexus: image: sonatype/nexus expose: - 8081 ports: - "8081:8081" volumes: - ./nexus-data:/sonatype-work networks: - default networks: default: ``` ---- ![](https://i.imgur.com/F429fn9.png) ---- ### thinking these deploy situation * ~~ancient times~~ (great respect 🦉) * single-module, a few instances -> docker * multi-module, many instances -> docker-compose * different server -> add reverse proxy (cost 😯) * face High Availability, Load Balancing issues * welcome to microservices world (🚀) * freestyle deploy by yourself (OMG 😧) --- ### Docker Compose -> Container Orchestration 🎼 ---- <!-- .slide: data-background="#FFFFFF" --> ![](https://i.imgur.com/fdgcU1D.png) ---- <!-- .slide: data-background="#FFFFFF" --> ![](https://i.imgur.com/HiFm0d2.gif) ---- ### 2W1H, What, Why, How * decentralized design * declarative service model * scaling & load balancing * desired state reconciliation * multi-host networking * service-side service discovery * rolling updates * kubernetes vs docker swarm ---- ![](https://i.imgur.com/ud9jRv8.png) --- <!-- .slide: data-background="#FFFFFF" --> ### Kubernetes ![](https://i.imgur.com/KaEXjDJ.png) #### #GKE #EKS #AKS ---- ![](https://i.imgur.com/sP33bNI.png) ---- ![](https://i.imgur.com/SpPGSJH.png) ---- ![](https://i.imgur.com/KlFJvjR.png) ---- ![](https://i.imgur.com/e08eFZ1.png) ---- ![](https://i.imgur.com/TXKRdTb.png) ---- ![](https://i.imgur.com/bpk00c0.png) ---- ![](https://i.imgur.com/pPJ7i9W.png) ---- ![](https://i.imgur.com/XYEg0uD.png) --- ### Next !? * helm & terraform, speed up (🏃🏃🏃) #### Mom ! I'm Here ! Again ! * https://www.nomadproject.io/ --- ### Conclusion, Evolution of Deployment Type * Client Side * ~~ancient times~~ (great respect 🦉) * __P (CDN), CSR (SPA), SSR * Server Side * ~~ancient times~~ (great respect 🦉) * Ant, Maven, Gradle * run jar or war or docker image * Phsical Machine, VM, IAAS, PAAS * Microservices, Cloud Computing (AWS, GCP, Azure, etc.) * CAAS, Cloud Native (Kubernetes) --- ### References * https://en.wikipedia.org/wiki/Docker_(software) * https://www.hashicorp.com/ * https://www.linux.com/NewS/8-OPEN-SOURCE-CONTAINER-ORCHESTRATION-TOOLS-KNOW * https://www.docker.com/ * https://docs.docker.com/engine/swarm/ * https://medium.com/devopslinks/kubernetes-vs-docker-swarm-whos-the-bigger-and-better-53bbe76b9d11 * https://medium.com/edureka/kubernetes-vs-docker-45231abeeaf1 --- # Q & A --- ### xTeam Studio * gaming start-up, flat organization * free culture, great benefit * do the thing right * cloud everything if we can * zeplin, zenhub, slack * github, travis ci * gcp, aws * open mind, nice to meet everyone * React & Vue Frontend, Java Backend, QA, PM * JD * https://www.cakeresume.com/companies/xteamstudio --- <!-- .slide: data-background="#FFFFFF" --> ### Thanks for your time ![](https://i.imgur.com/4g5oYYl.gif)
{"metaMigratedAt":"2023-06-14T19:50:03.961Z","metaMigratedFrom":"YAML","title":"Containerize & Evolution of Deployment Type","breaks":true,"slideOptions":"{\"transition\":\"zoom\"}","contributors":"[{\"id\":\"9bf0eeb6-c898-41d4-86d2-6d6ca73f3221\",\"add\":24289,\"del\":17934}]","description":"TWJUG @Vincent Huang"}
    2330 views