Share
Embed
Transcript
14 slides
-
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 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 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 Pivotal Confidential–Internal Use Only Open Source Micro Clouds
Private Clouds Public Clouds CUSTOM SERVICES What does “Open” PaaS means? Choice! CUSTOM RUNTIMES -
7 Pivotal Confidential–Internal Use Only While Provisioning Multiple Layers App
apps apps services routing -
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&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 -
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 -
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 -
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 -
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 -
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