nulecule packaging distributing and deploying multi
play

Nulecule: Packaging, Distributing and Deploying Multi-Container - PowerPoint PPT Presentation

Nulecule: Packaging, Distributing and Deploying Multi-Container Applications the Cloud Way ContainerCon North America 2016 Charlie Drage Container Tools / Project Atomic @ Red Hat cdrage @ http://projectatomic.io Wait, whats Project


  1. Nulecule: Packaging, Distributing and Deploying Multi-Container Applications the Cloud Way ContainerCon North America 2016

  2. Charlie Drage Container Tools / Project Atomic @ Red Hat cdrage @ http://projectatomic.io

  3. Wait, what’s Project Atomic? Lightweight OS designed with the sole purpose of deploying containerized applications Container tools such as the Atomic CLI to deploy your applications GUI tools such as the Cockpit Project to help manage

  4. What’s the current problem? Multiple standards in multi-container deployment orchestrators (Kubernetes, OpenShift, Docker Compose, Mesos, Nomad, Dokku, Flynn, etc..) Even though… We’re slowly converging to a single standard in the container front (single image and runtime spec) via the OCI (Open Container Initiative) e.g. rkt + docker https://www.opencontainers.org/

  5. Nulecule && Atomic App A simple way of deploying multi-container applications to provider-agnostic environments Nulecule = specification Atomic App = implementation "Well, it all starts when a nulecule comes out of its nest...” - Homer

  6. Issues with container distribution / orchestration As awesome as container orchestration tools are, (imo) they’ve got a high learning curve. What distribution, parameterization methods? How do I deploy a Kubernetes example as simple as `docker run -p 80:80 nginx`?

  7. Containers galore Over 941 different MariaDB containers on Docker Hub So many varieties and yet only one that people should use * Last checked August 3rd 2016

  8. How we help Creating a multi-container application for say, ex. Ops to deploy Building a single image for deployment Deploy and undeploy from multiple providers Distributing parameterized apps Composability to multiple orchestration providers Atomic App is packaged into a single deployment container

  9. Multi-container applications

  10. Composability Import and use an official container into your application *Similar to “Docker Compose”

  11. Metadata Most environment variables require some sort of change

  12. Metadata and various orchestrators Metadata: No common way to distribute metadata from ops to devs and vice-versa. Unable to provide environment variables at deployment time (have to specify in an .env file) Orchestrators: Multiple deployment tools and file formats

  13. --- Creating your first specversion: 0.0.2 id: helloapache-app Nulecule file metadata: name: Hello Apache App appversion: 0.0.1 description: Atomic app for deploying a really basic Apache HTTP It’s super easy! “Hello world” server location: docker.io/projectatomic/helloapache params: Includes: specification, - name: provider composability, distribution, description: The specified default provider. default: kubernetes parametrization, orchestrator graph: agnostic - name: helloapache-app params: - name: image description: The webserver image default: centos/httpd - name: hostport description: The host TCP port as the external endpoint default: 80 artifacts: docker: - file://artifacts/docker/hello-apache-pod_run kubernetes: - file://artifacts/kubernetes/hello-apache-pod.json marathon: - file://artifacts/marathon/helloapache.json

  14. Another spec?

  15. Let’s build an Etherpad example with MariaDB

  16. Identifier and Specification Version --- specversion: "0.0.2" id: etherpad-app Give the ID that will be used for import into different applications as well as the current spec version

  17. metadata: Metadata name: etherpad-app appversion: 0.0.1 description: Etherpad demo location: docker.io/user/etherpad-app Included metadata available for scraping

  18. params: Params - name: provider description: Default provider default: kubernetes Global parameters

  19. graph: Graph - name: mariadb-centos7-atomicapp ... - name: etherpad-app ... The “bread and butter” of the Nulecule file format. Define application components and dependencies.

  20. Graph Source graph: - name: mariadb-centos7-atomicapp source: docker://user/mariadb-atomicapp ... Import an already pre-made Nulecule application

  21. graph: ... - name: etherpad-app params: - name: image description: Container image default: centos/etherpad - name: hostport description: Host TCP Port Graph Params default: 9001 - name: db_user description: Database User - name: db_pass Provide the correct values at description: Database Password - name: db_name deployment time description: Database Name - name: db_host description: Database hostname/IP default: mariadb - name: db_port description: Database service port default: 3306

  22. [general] provider = kubernetes Answers file [etherpad-app] db_user = foo db_host = bar Graph parameters can be ... pre-defined prior to deployment instead of “answered”

  23. graph: ... - name: etherpad-app params: ... Graph Artifacts artifacts: docker: ... kubernetes: - file://artifacts/kubernetes/etherpad-rc.yaml Metadata templates for - file://artifacts/kubernetes/etherpad-svc.yaml different orchestrators openshift: - i nherit: - kubernetes

  24. --- apiVersion: v1 kind: ReplicationController metadata: name: etherpad labels: name: etherpad spec: replicas: 1 selector: name: etherpad template: metadata: labels: Graph Params in name: etherpad spec: kubernetes/etherpad-rc.yaml containers: - name: etherpad image: $image Dollar sign variable ports: - name: etherpad-server replacement in each artifact containerPort: $hostport env: file - name: DB_HOST value: $db_host - name: DB_DBID value: $db_name - name: DB_PASS value: $db_pass - name: DB_PORT value: $db_port - name: DB_USER value: $db_user

  25. Atomic App Reference implementation of Nulecule Installer, manager, container builder, single command deployment

  26. Create a Nulecule application in one FROM projectatomic/atomicapp:0.6.1 MAINTAINER Red Hat, Inc. <container-tools@redhat.com> container LABEL io.projectatomic.nulecule.providers="kubernetes" \ io.projectatomic.nulecule.specversion="0.0.2" Build your app on top of our ADD /Nulecule /Dockerfile README.md /application-entity/ ADD /artifacts /application-entity/artifacts Atomic App base image

  27. DEMO

  28. Learn more at Project: http://projectatomic.io Github: http://github.com/projectatomic/nulecule http://github.com/projectatomic/atomicapp IRC: #nulecule @ freenode Mailing list: container-tools@redhat.com Charlie Drage, @cdrage, cdrage@redhat.com

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend