Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Cloud Foundry and Docker

SingaSUG
September 09, 2015

Cloud Foundry and Docker

SingaSUG

September 09, 2015
Tweet

More Decks by SingaSUG

Other Decks in Technology

Transcript

  1. 1 Pivotal Confidential–Internal Use Only 1 Pivotal Confidential–Internal Use Only

    CF & Docker Better Together Wang Yi [email protected] Creating A True PaaS (Platform As a Service)
  2. 2 Pivotal Confidential–Internal Use Only Docker joins the Cloud Foundry

    Foundation in May 2014 to support Cloud Foundry open governance and advance the state of containers in Platform as a Service
  3. 3 Pivotal Confidential–Internal Use Only Cloud Foundry is… The world’s

    leading open source platform-as-a-service. Ÿ  Supported by dozens of major organizations Ÿ  Language and framework agnostic Ÿ  Manages both VMs and containers Ÿ  Orchestrates both applications and data services Ÿ  Abstracts Infrastructure Founded and commercialized by Pivotal, Inc.
  4. 4 Pivotal Confidential–Internal Use Only Open Source Micro   Clouds

      Private   Clouds   Public   Clouds   CUSTOM SERVICES What does “Open” PaaS means? Choice! CUSTOM RUNTIMES
  5. 8 Pivotal Confidential–Internal Use Only Do It With Docker Alone

    docker run --name mysqldb -e MYSQL_USER=mysql -e MYSQL_PASSWORD=mysql -e MYSQL_DATABASE=sample -e MYSQL_ROOT_PASSWORD=supersecret -p 5306:3306 -d mysql data-source add --name=mysqlDS --driver-name=mysql --jndi-name=java:jboss/ datasources/ExampleMySQLDS --connection-url=jdbc:mysql://$MYSQL_HOST: $MYSQL_PORT/sample?useUnicode=true&amp;characterEncoding=UTF-8 -- user-name=mysql --password=mysql --use-ccm=false --max-pool-size=25 -- blocking-timeout-wait-millis=5000 --enabled=true docker run --name mywildfly -e MYSQL_HOST=<IP_ADDRESS> -e MYSQL_PORT=5306 -p 8080:8080 -d arungupta/wildfly-mysql-javaee7 Database Datasource App server
  6. 9 Pivotal Confidential–Internal Use Only here is my source code

    I do not care how run it on the cloud for me What Developer Want
  7. 10 Pivotal Confidential–Internal Use Only 12 Factor Apps I. Codebase

    II. Dependencies III. Configuration IV. Backing services V. Build, release, run VI. Process VII. Port binding VIII. Concurrency IX. Disposability X. Dev/Prod parity XI. Logs XII. Admin Process
  8. 11 Pivotal Confidential–Internal Use Only Do It With CF ---

    applications: - name: spring-music memory: 512M instances: 1 host: spring-music-${random-word} domain: cfapps.io path: build/libs/spring-music.war services: - music-mysql-db
  9. 12 Pivotal Confidential–Internal Use Only Buildpack V.S. Docker runtime layer

    OS image application layer Docker system brings fixed host OS Kernel * Devs may bring a custom buildpack runtime layer* OS image application layer Buildpack system brings fixed host OS Kernel App container System Provides Dev Provides
  10. 13 Pivotal Confidential–Internal Use Only DB Router Service credentials reserve

    resources obtain connection data CLI Cloud Controller Service Broker Data Service Runtime create service (HTTP) bind service (HTTP) create service (HTTP) bind service (HTTP) Service create and bind