SlideShare a Scribd company logo
Python on 
Cloud Foundry 
Ian Huston, Data Scientist 
@ianhuston 
© Copyright 2014 Pivotal. All rights reserved. 1
Who am I? 
Ÿ Ian Huston 
Ÿ @ianhuston 
Ÿ github.com/ihuston 
Ÿ www.ianhuston.net 
Ÿ Talk resources: 
http://tinyurl.com/pythonCF 
@ianhuston 
Ÿ Data Scientist 
Ÿ Use PyData stack for 
predictive analytics and 
machine learning 
Ÿ Previously a theoretical 
physicist using Python for 
numerical simulations & HPC 
© Copyright 2014 Pivotal. All rights reserved. 2
What is Cloud Foundry? 
@ianhuston 
http://cloudfoundry.org 
Open Source Cloud Platform 
Simple App Deployment, 
Scaling & Availability 
© Copyright 2014 Pivotal. All rights reserved. 3
Cloud Foundry Foundation: Industry Standard 
@ianhuston 
Gold 
Silver 
© Copyright 2014 Pivotal. All rights reserved. 4
CF for data scientists & developers 
Easily deploy your web app 
Scale up and out quickly 
Create and bind services 
cf 
bind-­‐service 
myapp 
redis 
@ianhuston 
cf 
push 
cf 
scale 
myapp 
–i 
5 
–m 
1G 
© Copyright 2014 Pivotal. All rights reserved. 5
Cloud Foundry: From 50 touch points to 1 
1 2 4 4 40 1 
50 Configuration Touches 
1. Register Hostname with DNS (1) 
2. Configure F5 Load Balancing Group (2) 
3. Configure Apache HTTPd Worker Pool (4) 
4. Configure mod_proxy Connector Routing (4) 
5. Configure Tomcat Connector Pool (40) 
@ianhuston 
mod proxy 
1 Configuration Touch 
1. The platform takes care of all the steps on 
the left automatically 
© Copyright 2014 Pivotal. All rights reserved. 6
Python & CF 
@ianhuston 
© Copyright 2014 Pivotal. All rights reserved. 7
Python on Cloud Foundry 
Ÿ First class language (with Go, Java, Ruby, Node.js, PHP) 
Ÿ Automatic app type detection 
Ÿ Buildpack takes care of 
– Installing Python interpreter 
– Installing packages in requirements.txt using pip 
– Starting web app as requested (e.g. python myapp.py) 
@ianhuston 
© Copyright 2014 Pivotal. All rights reserved. 8
Simple Flask App Demo 
Ÿ Simple one page “Hello World” web app 
Ÿ Video: https://www.youtube.com/watch?v=QOfD6tnoAB8 
Ÿ Demonstrates: 
– Installation of requirements 
– Scaling properties 
Ÿ Need to Provide: 
– App files 
– Dependencies listed in requirements.txt file 
– Optional manifest.yml file with configuration for deployment 
@ianhuston 
© Copyright 2014 Pivotal. All rights reserved. 9
Data Services 
Ÿ Easy to bind and scale services 
– Databases, NoSQL, message queues etc. 
$ 
cf 
create-­‐service 
rediscloud 
PLAN_NAME 
INSTANCE_NAME 
$ 
cf 
bind-­‐service 
APP_NAME 
INSTANCE_NAME 
Ÿ Details provided in VCAP_APP_SERVICES env variable: 
{ 
"rediscloud": 
[ 
{ 
"name": 
"rediscloud-­‐42", 
"label": 
"rediscloud", 
"plan": 
"20mb", 
"credentials": 
{ 
"port"": 
"6379", 
"hostname": 
"pub-­‐redis-­‐6379.us-­‐east-­‐1-­‐2.3.ec2.redislabs.com", 
} 
@ianhuston 
"password": 
"your_redis_password” 
} 
} 
] 
© Copyright 2014 Pivotal. All rights reserved. 10
Services now available 
These are available on Pivotal CF (Pivotal’s packaged Cloud Foundry offering). 
See http://run.pivotal.io for the services available on Pivotal Web Services. 
@ianhuston 
© Copyright 2014 Pivotal. All rights reserved. 11
PyData stack on CF: conda 
• Use (mini)conda to provide Python & package 
installation 
• Quickly install needed PyData packages 
• Can even provision your own IPython notebook 
server [at your own risk!] 
CF Buildpack: https://github.com/ihuston/python-conda-buildpack 
@ianhuston 
+ 
© Copyright 2014 Pivotal. All rights reserved. 12
Why? 
@ianhuston 
© Copyright 2014 Pivotal. All rights reserved. 13
Benefits for Data Scientists 
Ÿ Easy to get web apps up and running 
Ÿ Create and bind to your favourite data services 
Ÿ Don’t get locked in to one cloud provider 
Ÿ Python is officially supported 
@ianhuston 
© Copyright 2014 Pivotal. All rights reserved. 14
Try Cloud Foundry today! 
Pivotal Web Services: http://run.pivotal.io 
HP Helion: http://horizon.hpcloud.com 
@ianhuston 
IBM Bluemix: http://bluemix.net 
Anynines: http://anynines.com 
© Copyright 2014 Pivotal. All rights reserved. 15
More info and resources 
Ÿ Material for this talk: http://tinyurl.com/pythonCF 
Ÿ Cloud Foundry: http://cloudfoundry.org 
Ÿ Flask Mega Meta Tutorial for DS: http://tinyurl.com/flaskDS 
Ÿ Twelve Factor Apps: http://12factor.net/ 
Ÿ Meetups: http://cloud-foundry.meetup.com/ 
@ianhuston 
© Copyright 2014 Pivotal. All rights reserved. 16
Appendix 
Docker & Cloud Foundry 
@ianhuston 
© Copyright 2014 Pivotal. All rights reserved. 17
CF and Docker 
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 
@ianhuston 
© Copyright 2014 Pivotal. All rights reserved. 18
Docker Benefit: Customize More Layers of the App 
Dev Provides 
System Provides 
App container 
@ianhuston 
Docker 
application layer 
runtime layer 
OS image 
system brings fixed 
host OS Kernel 
Buildpack 
application layer 
runtime layer* 
OS image 
system brings fixed 
host OS Kernel 
* Devs may bring a custom buildpack 
© Copyright 2014 Pivotal. All rights reserved. 19
Coming soon to Cloud Foundry 
Ÿ Planned to support Cloud Foundry apps from: 
– Linux Buildpacks 
– Windows .NET Buildpacks powered by Iron Foundry 
– Docker images 
Ÿ Docker applications will work similar to apps from buildpacks 
– Same scaling & services bindings, same CLI commands push etc 
@ianhuston 
© Copyright 2014 Pivotal. All rights reserved. 20

More Related Content

PDF
Massively Parallel Processing with Procedural Python (PyData London 2014)
PDF
Massively Parallel Processing with Procedural Python by Ronert Obst PyData Be...
PDF
InfluxDB Client Libraries and Applications by Ivan Kudibal, Engineering Manag...
PPTX
Introduction to Pig | Pig Architecture | Pig Fundamentals
PDF
IoT Edge Data Processing with NVidia Jetson Nano oct 3 2019
PPTX
Seattle spark-meetup-032317
PDF
Everything as Code with Terraform
PDF
Hadoop {Submarine} Project: Running Deep Learning Workloads on YARN
Massively Parallel Processing with Procedural Python (PyData London 2014)
Massively Parallel Processing with Procedural Python by Ronert Obst PyData Be...
InfluxDB Client Libraries and Applications by Ivan Kudibal, Engineering Manag...
Introduction to Pig | Pig Architecture | Pig Fundamentals
IoT Edge Data Processing with NVidia Jetson Nano oct 3 2019
Seattle spark-meetup-032317
Everything as Code with Terraform
Hadoop {Submarine} Project: Running Deep Learning Workloads on YARN

What's hot (20)

PDF
SpringCamp 2016 - Apache Geode 와 Spring Data Gemfire
PDF
Using the FLaNK Stack for edge ai (flink, nifi, kafka, kudu)
PPTX
Terraform on Azure
PDF
CF Korea Meetup - Spring Cloud Services
PDF
Infrastructure-as-Code with Puppet Enterprise in the Cloud - PuppetConf 2014
PPTX
Episode 3: Kubernetes and Big Data Services
PDF
The Power of Intelligent Flows: Real-Time IoT Botnet Classification with Apac...
PDF
Sql saturday pig session (wes floyd) v2
PDF
Incrementally streaming rdbms data to your data lake automagically
PDF
Hadoop Present - Open Enterprise Hadoop
PPTX
LLAP: Building Cloud First BI
PDF
Using FLiP with influxdb for edgeai iot at scale 2022
PPTX
HDF Kita Lab: JupyterLab + HDF Service
PPSX
HDFEOS.org User Analsys, Updates, and Future
PDF
Hadoop in adtech
PPTX
Getting Started with Apache Geode
PPTX
Future of Apache Storm
PDF
Real-time Streaming Pipelines with FLaNK
PPTX
Hadoop summit 2016
PDF
Mm.. FLaNK Stack (MiNiFi MXNet Flink NiFi Kudu Kafka)
SpringCamp 2016 - Apache Geode 와 Spring Data Gemfire
Using the FLaNK Stack for edge ai (flink, nifi, kafka, kudu)
Terraform on Azure
CF Korea Meetup - Spring Cloud Services
Infrastructure-as-Code with Puppet Enterprise in the Cloud - PuppetConf 2014
Episode 3: Kubernetes and Big Data Services
The Power of Intelligent Flows: Real-Time IoT Botnet Classification with Apac...
Sql saturday pig session (wes floyd) v2
Incrementally streaming rdbms data to your data lake automagically
Hadoop Present - Open Enterprise Hadoop
LLAP: Building Cloud First BI
Using FLiP with influxdb for edgeai iot at scale 2022
HDF Kita Lab: JupyterLab + HDF Service
HDFEOS.org User Analsys, Updates, and Future
Hadoop in adtech
Getting Started with Apache Geode
Future of Apache Storm
Real-time Streaming Pipelines with FLaNK
Hadoop summit 2016
Mm.. FLaNK Stack (MiNiFi MXNet Flink NiFi Kudu Kafka)
Ad

Similar to Python on Cloud Foundry (20)

PDF
Cloud Foundry for Data Science
PDF
Ian huston getting started with cloud foundry
PDF
Ian Huston - "Deploying your data driven web app on Cloud Foundry"
PDF
Review: Cloud Foundry brings power and polish to PaaS
PDF
Manchester geek night pcf 101
PPTX
Spring Boot & Spring Cloud on k8s and PCF
PPTX
Cloud Foundry Vancouver Meetup July 2016
PPTX
Cloud foundry
KEY
Django deployment with PaaS
PDF
Despliegue Cloud-Native Simplificado: Infraestructura, Servicios y GenAI en m...
PDF
quickguide-einnovator-4-cloudfoundry
PDF
The Cloud Foundry Story on OpenStack
KEY
20120317 CloudFoundry #pyfes
PDF
Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)
PDF
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
PDF
Cloud Foundry Overview
PDF
Pivotal CenturyLink Cloud Platform Seminar Presentation: The Developer Experi...
PDF
SV Cloud Meetup
PDF
LyonJUG - Combo - Quick Cloud Foundry Intro + Cloud Best Practices
PDF
Cloud Foundry the definitive guide develop deploy and scale First Edition Winn
Cloud Foundry for Data Science
Ian huston getting started with cloud foundry
Ian Huston - "Deploying your data driven web app on Cloud Foundry"
Review: Cloud Foundry brings power and polish to PaaS
Manchester geek night pcf 101
Spring Boot & Spring Cloud on k8s and PCF
Cloud Foundry Vancouver Meetup July 2016
Cloud foundry
Django deployment with PaaS
Despliegue Cloud-Native Simplificado: Infraestructura, Servicios y GenAI en m...
quickguide-einnovator-4-cloudfoundry
The Cloud Foundry Story on OpenStack
20120317 CloudFoundry #pyfes
Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Cloud Foundry Overview
Pivotal CenturyLink Cloud Platform Seminar Presentation: The Developer Experi...
SV Cloud Meetup
LyonJUG - Combo - Quick Cloud Foundry Intro + Cloud Best Practices
Cloud Foundry the definitive guide develop deploy and scale First Edition Winn
Ad

More from Ian Huston (9)

PDF
CFSummit: Data Science on Cloud Foundry
PDF
Data Science Amsterdam - Massively Parallel Processing with Procedural Languages
PDF
Driving the Future of Smart Cities - How to Beat the Traffic (Pivotal talk at...
PDF
Calculating Non-adiabatic Pressure Perturbations during Multi-field Inflation
PDF
Second Order Perturbations - National Astronomy Meeting 2011
PDF
Second Order Perturbations During Inflation Beyond Slow-roll
PDF
Inflation as a solution to the problems of the Big Bang
PDF
Cosmological Perturbations and Numerical Simulations
PDF
Cosmo09 presentation
CFSummit: Data Science on Cloud Foundry
Data Science Amsterdam - Massively Parallel Processing with Procedural Languages
Driving the Future of Smart Cities - How to Beat the Traffic (Pivotal talk at...
Calculating Non-adiabatic Pressure Perturbations during Multi-field Inflation
Second Order Perturbations - National Astronomy Meeting 2011
Second Order Perturbations During Inflation Beyond Slow-roll
Inflation as a solution to the problems of the Big Bang
Cosmological Perturbations and Numerical Simulations
Cosmo09 presentation

Recently uploaded (20)

PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Encapsulation theory and applications.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Approach and Philosophy of On baking technology
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Programs and apps: productivity, graphics, security and other tools
MIND Revenue Release Quarter 2 2025 Press Release
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Review of recent advances in non-invasive hemoglobin estimation
Reach Out and Touch Someone: Haptics and Empathic Computing
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Dropbox Q2 2025 Financial Results & Investor Presentation
The AUB Centre for AI in Media Proposal.docx
Encapsulation theory and applications.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Unlocking AI with Model Context Protocol (MCP)
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Empathic Computing: Creating Shared Understanding
Building Integrated photovoltaic BIPV_UPV.pdf
Approach and Philosophy of On baking technology
Chapter 3 Spatial Domain Image Processing.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy

Python on Cloud Foundry

  • 1. Python on Cloud Foundry Ian Huston, Data Scientist @ianhuston © Copyright 2014 Pivotal. All rights reserved. 1
  • 2. Who am I? Ÿ Ian Huston Ÿ @ianhuston Ÿ github.com/ihuston Ÿ www.ianhuston.net Ÿ Talk resources: http://tinyurl.com/pythonCF @ianhuston Ÿ Data Scientist Ÿ Use PyData stack for predictive analytics and machine learning Ÿ Previously a theoretical physicist using Python for numerical simulations & HPC © Copyright 2014 Pivotal. All rights reserved. 2
  • 3. What is Cloud Foundry? @ianhuston http://cloudfoundry.org Open Source Cloud Platform Simple App Deployment, Scaling & Availability © Copyright 2014 Pivotal. All rights reserved. 3
  • 4. Cloud Foundry Foundation: Industry Standard @ianhuston Gold Silver © Copyright 2014 Pivotal. All rights reserved. 4
  • 5. CF for data scientists & developers Easily deploy your web app Scale up and out quickly Create and bind services cf bind-­‐service myapp redis @ianhuston cf push cf scale myapp –i 5 –m 1G © Copyright 2014 Pivotal. All rights reserved. 5
  • 6. Cloud Foundry: From 50 touch points to 1 1 2 4 4 40 1 50 Configuration Touches 1. Register Hostname with DNS (1) 2. Configure F5 Load Balancing Group (2) 3. Configure Apache HTTPd Worker Pool (4) 4. Configure mod_proxy Connector Routing (4) 5. Configure Tomcat Connector Pool (40) @ianhuston mod proxy 1 Configuration Touch 1. The platform takes care of all the steps on the left automatically © Copyright 2014 Pivotal. All rights reserved. 6
  • 7. Python & CF @ianhuston © Copyright 2014 Pivotal. All rights reserved. 7
  • 8. Python on Cloud Foundry Ÿ First class language (with Go, Java, Ruby, Node.js, PHP) Ÿ Automatic app type detection Ÿ Buildpack takes care of – Installing Python interpreter – Installing packages in requirements.txt using pip – Starting web app as requested (e.g. python myapp.py) @ianhuston © Copyright 2014 Pivotal. All rights reserved. 8
  • 9. Simple Flask App Demo Ÿ Simple one page “Hello World” web app Ÿ Video: https://www.youtube.com/watch?v=QOfD6tnoAB8 Ÿ Demonstrates: – Installation of requirements – Scaling properties Ÿ Need to Provide: – App files – Dependencies listed in requirements.txt file – Optional manifest.yml file with configuration for deployment @ianhuston © Copyright 2014 Pivotal. All rights reserved. 9
  • 10. Data Services Ÿ Easy to bind and scale services – Databases, NoSQL, message queues etc. $ cf create-­‐service rediscloud PLAN_NAME INSTANCE_NAME $ cf bind-­‐service APP_NAME INSTANCE_NAME Ÿ Details provided in VCAP_APP_SERVICES env variable: { "rediscloud": [ { "name": "rediscloud-­‐42", "label": "rediscloud", "plan": "20mb", "credentials": { "port"": "6379", "hostname": "pub-­‐redis-­‐6379.us-­‐east-­‐1-­‐2.3.ec2.redislabs.com", } @ianhuston "password": "your_redis_password” } } ] © Copyright 2014 Pivotal. All rights reserved. 10
  • 11. Services now available These are available on Pivotal CF (Pivotal’s packaged Cloud Foundry offering). See http://run.pivotal.io for the services available on Pivotal Web Services. @ianhuston © Copyright 2014 Pivotal. All rights reserved. 11
  • 12. PyData stack on CF: conda • Use (mini)conda to provide Python & package installation • Quickly install needed PyData packages • Can even provision your own IPython notebook server [at your own risk!] CF Buildpack: https://github.com/ihuston/python-conda-buildpack @ianhuston + © Copyright 2014 Pivotal. All rights reserved. 12
  • 13. Why? @ianhuston © Copyright 2014 Pivotal. All rights reserved. 13
  • 14. Benefits for Data Scientists Ÿ Easy to get web apps up and running Ÿ Create and bind to your favourite data services Ÿ Don’t get locked in to one cloud provider Ÿ Python is officially supported @ianhuston © Copyright 2014 Pivotal. All rights reserved. 14
  • 15. Try Cloud Foundry today! Pivotal Web Services: http://run.pivotal.io HP Helion: http://horizon.hpcloud.com @ianhuston IBM Bluemix: http://bluemix.net Anynines: http://anynines.com © Copyright 2014 Pivotal. All rights reserved. 15
  • 16. More info and resources Ÿ Material for this talk: http://tinyurl.com/pythonCF Ÿ Cloud Foundry: http://cloudfoundry.org Ÿ Flask Mega Meta Tutorial for DS: http://tinyurl.com/flaskDS Ÿ Twelve Factor Apps: http://12factor.net/ Ÿ Meetups: http://cloud-foundry.meetup.com/ @ianhuston © Copyright 2014 Pivotal. All rights reserved. 16
  • 17. Appendix Docker & Cloud Foundry @ianhuston © Copyright 2014 Pivotal. All rights reserved. 17
  • 18. CF and Docker 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 @ianhuston © Copyright 2014 Pivotal. All rights reserved. 18
  • 19. Docker Benefit: Customize More Layers of the App Dev Provides System Provides App container @ianhuston Docker application layer runtime layer OS image system brings fixed host OS Kernel Buildpack application layer runtime layer* OS image system brings fixed host OS Kernel * Devs may bring a custom buildpack © Copyright 2014 Pivotal. All rights reserved. 19
  • 20. Coming soon to Cloud Foundry Ÿ Planned to support Cloud Foundry apps from: – Linux Buildpacks – Windows .NET Buildpacks powered by Iron Foundry – Docker images Ÿ Docker applications will work similar to apps from buildpacks – Same scaling & services bindings, same CLI commands push etc @ianhuston © Copyright 2014 Pivotal. All rights reserved. 20