SlideShare a Scribd company logo
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 1/48
PG OPEN CLOUD
Portable PG applications
http://bit.ly/1eddml6
http://ryanjarvinen.com/presentations/pg_open_cloud
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 2/48
presented by
/ryan jarvinen @ryanj
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 3/48
Open Platforms Engineer
at
Red Hat
ryanj@redhat.com
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 4/48
AGENDA
1. Open Cloud Overview
2. Learn how to write for the Open Cloud
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 5/48
the Cloud
"what is it made of?"
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 6/48
The cloud is:
hot air?
a series of tubes?
mostly cat photos✓
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 7/48
INFRASTRUCTURE
Communications: fiber, switches, wireless
Storage and Compute: chips, servers, disks, databases
…
DevOps (and friction)
…
Software as a Service: Dropbox, Gmail
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 8/48
IAAS
Amazon EC2
RackSpace
Linode
BlueHost
* Many are VM / VPS-based services
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 9/48
BUILDING WITH POSTGRES NORMALLY LOOKS LIKE:
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 10/48
1. Install Apache with Mod_WSGI
2. Make sure we have all the Python extensions set so
Apache can see them
3. Configure firewall so that only http, https, and ssh are
available to outside world
4. Install Postgresql, and plugins
5. update PG_hba.conf, create db user, create db user
password, set up access privs, and a test account
6. Create DB, give user permissions to the DB
7. Set up a git repository and then figure out how to
structure and deploy
8. Now I can write code - hello world, then database
connection, then real app
9. Get it working with a public DNS
10. Now you are stuck maintaining the machine
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 11/48
OR - if your Ops team offers pre-built VMs:
1. Fill out a mile high stack of request forms for a VM
from Ops and wait
2. Then realize it's not configured properly, submit ticket
and wait
3. Repeat same information, and wait
4. Your ops person moves to a different group, GOTO
Line 1....
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 12/48
As a sysadmin:
1. We're busy keeping the site up, we'll need to provision
your VM later
2. Developers always want to try a new language or
datastore that they don't know how to install, let alone
manage
3. There is whole bunch of account creation and
lockdown for each VM. I'll need to give them Sudo or
they'll annoy me all the time
4. Each machine ends up with a wildly different config
5. Developers never give up the resources from their
VMs - spreadsheets and emails
6. If there is a security fix I need to go into each VM and
update it
7. I don't want to spend my time updating DNS tables
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 13/48
PLATFORMS PROVIDE A PEACEFUL ENVIRONMENT FOR
DEVS AND SYSADMINS
Operations can ensure stability and performance
Developers can self-provision environments without
waiting
The discussion shifts toward establishing policies for
scaling
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 14/48
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 15/48
PUBLIC / HOSTED PAAS
Heroku
EngineYard
Google App Engine
Amazon BeanStalk
* usually VM-based or proprietary application container
technologies
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 16/48
the public cloud
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 17/48
This all sounds great, but what about…
LOCK-IN?
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 18/48
THE OPEN CLOUD
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 19/48
IAAS
OpenStack
Eucalptus
CloudStack
Or, roll your own
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 20/48
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 21/48
OPEN PAAS
OpenShift
Cloud Foundry
Built around Containers
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 22/48
TRIUMPH OF THE OPEN CLOUD
When "Big Cloud" fails you, you can always decide to host
your own
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 23/48
TINYTINYRSS
Reusable, Redeployable code - host it anywhere
https://github.com/openshift-quickstart/tiny_tiny_rss-
openshift-quickstart
rhc app create rss php-5 postgresql-9 cron-1.4 --from-code=https:/
/github.com/openshift-quickstart/tiny_tiny_rss-openshift-quickstar
t.git
https://rss-shifter.rhcloud.com/
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 24/48
ADDING POSTGRES TO EXISTING APPLICATIONS:
done!
rhc cartridge add postgres-8.4
rhc cartridge add postgres-9.2
blog post: PostgreSQL 9.2 Comes to OpenShift
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 25/48
Or, while connected over ssh:
rhc app show rss
env | grep DB
OPENSHIFT_POSTGRESQL_DB_PASSWORD=lXcFVx4hIZgR
OPENSHIFT_POSTGRESQL_DB_SOCKET=/var/lib/openshift/523672f7e0b8cd02
d70003bc/postgresql/socket/
OPENSHIFT_POSTGRESQL_DB_HOST=127.7.8.130
OPENSHIFT_POSTGRESQL_DB_PID=/var/lib/openshift/523672f7e0b8cd02d70
003bc/postgresql/pid/postgres.pid
OPENSHIFT_POSTGRESQL_DB_USERNAME=adminpahue6e
OPENSHIFT_POSTGRESQL_DB_URL=postgresql://adminpahue6e:lXcFVx4hIZgR
@127.7.8.130:5432
OPENSHIFT_POSTGRESQL_DB_PORT=5432
OPENSHIFT_POSTGRESQL_DB_LOG_DIR=/var/lib/openshift/523672f7e0b8cd0
2d70003bc/postgresql/log/
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 26/48
TERMINOLOGY (RED HAT)
Broker – Management host, orchestration of Nodes
Node – Compute host containing Gears
Gear – Allocation of fixed memory, compute, and
storage resources for running applications
Cartridge – A technology/framework (Python, Ruby,
Javascript, PHP, Perl, Java/JEE, PG, MySQL, etc.) for
application service dependencies
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 27/48
GEARS: SECURE AND EFFICIENT
,SELinux Cgroups
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 28/48
AN OPEN CARTRIDGE FORMAT
cart developer's guide
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 29/48
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 30/48
OPEN, AND WORKING IN THE UPSTREAM
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 31/48
WRITING APPS FOR THE OPEN CLOUD
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 32/48
TODO APP
(FLASK AND SQLALCHEMY)
https://github.com/shekhargulati/todo-flask-openshift-
quickstart
blog post: Build Your App on OpenShift Using Flask,
SQLAlchemy, and PostgreSQL 9.2
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 33/48
rhc app create -s task python-2.7 postgresql-9.2 --from-code=https
://github.com/shekhargulati/todo-flask-openshift-quickstart.git
http://task-shifter.rhcloud.com/
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 34/48
OPENSHIFT SCALING HOOKS
Setting a min and max scale from the command line
rhc cartridge-scale python-2.7 -a task --min 3 --max 5
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 35/48
SCALING WEB UI
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 36/48
HAPROXY SCALING HOOKS
Adding and removing instances / scaling up and down
HAProxy on / off switches
These hooks are available on the command line within
your gear, and via a REST API
haproxy_ctld --up
haproxy_ctld --down
haproxy_ctld_daemon start
haproxy_ctld_daemon stop
haproxy_ctld_daemon restart
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 37/48
HAPROXY WEB UI
http://$YOUR_APP_DNS/haproxy-status/
HAPROXY RAW DATA
http://$YOUR_APP_DNS/haproxy-status/;csv
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 38/48
LIVING IN THE CLOUDS
Code for America
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 39/48
ADOPT A CAUSE
This app should be using PostGIS for spatial queries:
https://github.com/openshift-quickstart/adopt-a-
hydrant-openshift-quickstart
blog post: More Spatial in Your Database with PostGIS
2.0
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 40/48
Persist configuration details,
while keeping your source clean:
rhc app create hydrant ruby-1.9 postgresql-8.4 --from=code=http://
github.com/ryanj/adopt-a-hydrant.git --env SECRET_TOKEN="YOUR_SECR
ET_TOKEN"
http://hydrant-shifter.rhcloud.com/
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 41/48
ENVIRONMENT VARIABLES
Listing your custom env vars:
Setting a variable:
Help with configuration:
cd hydrant
rhc env list
rhc env set SECRET_TOKEN="a1fdacc3b1d14d6a92ed1219ed304d02529f5350
85262a90c39f072ef6de0ee9fe3a3d0194f02a2a8eb3"
rhc help env
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 42/48
DEPENDENCIES
Automatic support for dependency resolution using
standard packaging, native to each language:
(ruby), (python), and (node.js)gems eggs npm modules
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 43/48
ACTION HOOKS
1. enable postgis
2. bootstrap your db
https://github.com/ryanj/pg_parks/tree/master/.openshift/action_ho
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 44/48
BANNERS?
http://citibike-shifter.rhcloud.com/
rhc env set CITIBIKE_NEARBY_STATIONS="268,257,258" -a citibikes
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 45/48
DISTRIBUTED MULTI-CLOUD FEDERATED APPLICATIONS
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 46/48
JOIN THE COMMUNITY
Meritocracy for our pull requests
Help with anything from core, quickstarts, and
cartridges, to small typo fixes in the command line tools
PEPs for major feature enhancements
Contribution Guidelines
Public Trello cards
Public Test plans
Public Bugzilla
Vote on Features
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 47/48
Check out the upstream source:
Try our hosted solution (3 apps free):
Request an evaluation for:
OpenShift Origin
OpenShift Online
OpenShift Enterprise
9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud
ryanjarvinen.com/presentations/pg_open_cloud/#/ 48/48
Thanks for following along! --ryanj
slides: http://bit.ly/1eddml6

More Related Content

Viewers also liked

Gurjeet Singh - How Postgres is Different From (Better Tha) Your RDBMS @ Post...
Gurjeet Singh - How Postgres is Different From (Better Tha) Your RDBMS @ Post...Gurjeet Singh - How Postgres is Different From (Better Tha) Your RDBMS @ Post...
Gurjeet Singh - How Postgres is Different From (Better Tha) Your RDBMS @ Post...PostgresOpen
 
Keith Fiske - When PostgreSQL Can't, You Can @ Postgres Open
Keith Fiske - When PostgreSQL Can't, You Can @ Postgres OpenKeith Fiske - When PostgreSQL Can't, You Can @ Postgres Open
Keith Fiske - When PostgreSQL Can't, You Can @ Postgres OpenPostgresOpen
 
Keith Paskett - Postgres on ZFS @ Postgres Open
Keith Paskett - Postgres on ZFS @ Postgres OpenKeith Paskett - Postgres on ZFS @ Postgres Open
Keith Paskett - Postgres on ZFS @ Postgres OpenPostgresOpen
 
Henrietta Dombrovskaya - A New Approach to Resolve Object-Relational Impedanc...
Henrietta Dombrovskaya - A New Approach to Resolve Object-Relational Impedanc...Henrietta Dombrovskaya - A New Approach to Resolve Object-Relational Impedanc...
Henrietta Dombrovskaya - A New Approach to Resolve Object-Relational Impedanc...PostgresOpen
 
Selena Deckelmann - Sane Schema Management with Alembic and SQLAlchemy @ Pos...
Selena Deckelmann - Sane Schema Management with  Alembic and SQLAlchemy @ Pos...Selena Deckelmann - Sane Schema Management with  Alembic and SQLAlchemy @ Pos...
Selena Deckelmann - Sane Schema Management with Alembic and SQLAlchemy @ Pos...PostgresOpen
 
Islamabad PUG - 7th Meetup - performance tuning
Islamabad PUG - 7th Meetup - performance tuningIslamabad PUG - 7th Meetup - performance tuning
Islamabad PUG - 7th Meetup - performance tuning
Umair Shahid
 
Robert Haas Query Planning Gone Wrong Presentation @ Postgres Open
Robert Haas Query Planning Gone Wrong Presentation @ Postgres OpenRobert Haas Query Planning Gone Wrong Presentation @ Postgres Open
Robert Haas Query Planning Gone Wrong Presentation @ Postgres OpenPostgresOpen
 
Islamabad PUG - 7th meetup - performance tuning
Islamabad PUG - 7th meetup - performance tuningIslamabad PUG - 7th meetup - performance tuning
Islamabad PUG - 7th meetup - performance tuning
Umair Shahid
 
Out of the box replication in postgres 9.4(pg confus)
Out of the box replication in postgres 9.4(pg confus)Out of the box replication in postgres 9.4(pg confus)
Out of the box replication in postgres 9.4(pg confus)
Denish Patel
 
Steve Singer - Managing PostgreSQL with Puppet @ Postgres Open
Steve Singer - Managing PostgreSQL with Puppet @ Postgres OpenSteve Singer - Managing PostgreSQL with Puppet @ Postgres Open
Steve Singer - Managing PostgreSQL with Puppet @ Postgres OpenPostgresOpen
 
Michael Bayer Introduction to SQLAlchemy @ Postgres Open
Michael Bayer Introduction to SQLAlchemy @ Postgres OpenMichael Bayer Introduction to SQLAlchemy @ Postgres Open
Michael Bayer Introduction to SQLAlchemy @ Postgres OpenPostgresOpen
 
PoPostgreSQL Web Projects: From Start to FinishStart To Finish
PoPostgreSQL Web Projects: From Start to FinishStart To FinishPoPostgreSQL Web Projects: From Start to FinishStart To Finish
PoPostgreSQL Web Projects: From Start to FinishStart To Finishelliando dias
 
Koichi Suzuki - Postgres-XC Dynamic Cluster Management @ Postgres Open
Koichi Suzuki - Postgres-XC Dynamic Cluster  Management @ Postgres OpenKoichi Suzuki - Postgres-XC Dynamic Cluster  Management @ Postgres Open
Koichi Suzuki - Postgres-XC Dynamic Cluster Management @ Postgres OpenPostgresOpen
 
Gbroccolo pgconfeu2016 pgnfs
Gbroccolo pgconfeu2016 pgnfsGbroccolo pgconfeu2016 pgnfs
Gbroccolo pgconfeu2016 pgnfs
Giuseppe Broccolo
 
PostgreSQL HA
PostgreSQL   HAPostgreSQL   HA
PostgreSQL HA
haroonm
 
Michael Paquier - Taking advantage of custom bgworkers @ Postgres Open
Michael Paquier - Taking advantage of custom bgworkers @ Postgres OpenMichael Paquier - Taking advantage of custom bgworkers @ Postgres Open
Michael Paquier - Taking advantage of custom bgworkers @ Postgres OpenPostgresOpen
 
PostgreSQL replication from setup to advanced features.
 PostgreSQL replication from setup to advanced features. PostgreSQL replication from setup to advanced features.
PostgreSQL replication from setup to advanced features.
Pivorak MeetUp
 
Logical replication with pglogical
Logical replication with pglogicalLogical replication with pglogical
Logical replication with pglogical
Umair Shahid
 
On The Building Of A PostgreSQL Cluster
On The Building Of A PostgreSQL ClusterOn The Building Of A PostgreSQL Cluster
On The Building Of A PostgreSQL Cluster
Srihari Sriraman
 

Viewers also liked (20)

Gurjeet Singh - How Postgres is Different From (Better Tha) Your RDBMS @ Post...
Gurjeet Singh - How Postgres is Different From (Better Tha) Your RDBMS @ Post...Gurjeet Singh - How Postgres is Different From (Better Tha) Your RDBMS @ Post...
Gurjeet Singh - How Postgres is Different From (Better Tha) Your RDBMS @ Post...
 
Keith Fiske - When PostgreSQL Can't, You Can @ Postgres Open
Keith Fiske - When PostgreSQL Can't, You Can @ Postgres OpenKeith Fiske - When PostgreSQL Can't, You Can @ Postgres Open
Keith Fiske - When PostgreSQL Can't, You Can @ Postgres Open
 
Keith Paskett - Postgres on ZFS @ Postgres Open
Keith Paskett - Postgres on ZFS @ Postgres OpenKeith Paskett - Postgres on ZFS @ Postgres Open
Keith Paskett - Postgres on ZFS @ Postgres Open
 
Henrietta Dombrovskaya - A New Approach to Resolve Object-Relational Impedanc...
Henrietta Dombrovskaya - A New Approach to Resolve Object-Relational Impedanc...Henrietta Dombrovskaya - A New Approach to Resolve Object-Relational Impedanc...
Henrietta Dombrovskaya - A New Approach to Resolve Object-Relational Impedanc...
 
Selena Deckelmann - Sane Schema Management with Alembic and SQLAlchemy @ Pos...
Selena Deckelmann - Sane Schema Management with  Alembic and SQLAlchemy @ Pos...Selena Deckelmann - Sane Schema Management with  Alembic and SQLAlchemy @ Pos...
Selena Deckelmann - Sane Schema Management with Alembic and SQLAlchemy @ Pos...
 
Islamabad PUG - 7th Meetup - performance tuning
Islamabad PUG - 7th Meetup - performance tuningIslamabad PUG - 7th Meetup - performance tuning
Islamabad PUG - 7th Meetup - performance tuning
 
Robert Haas Query Planning Gone Wrong Presentation @ Postgres Open
Robert Haas Query Planning Gone Wrong Presentation @ Postgres OpenRobert Haas Query Planning Gone Wrong Presentation @ Postgres Open
Robert Haas Query Planning Gone Wrong Presentation @ Postgres Open
 
Islamabad PUG - 7th meetup - performance tuning
Islamabad PUG - 7th meetup - performance tuningIslamabad PUG - 7th meetup - performance tuning
Islamabad PUG - 7th meetup - performance tuning
 
Out of the box replication in postgres 9.4(pg confus)
Out of the box replication in postgres 9.4(pg confus)Out of the box replication in postgres 9.4(pg confus)
Out of the box replication in postgres 9.4(pg confus)
 
Steve Singer - Managing PostgreSQL with Puppet @ Postgres Open
Steve Singer - Managing PostgreSQL with Puppet @ Postgres OpenSteve Singer - Managing PostgreSQL with Puppet @ Postgres Open
Steve Singer - Managing PostgreSQL with Puppet @ Postgres Open
 
Michael Bayer Introduction to SQLAlchemy @ Postgres Open
Michael Bayer Introduction to SQLAlchemy @ Postgres OpenMichael Bayer Introduction to SQLAlchemy @ Postgres Open
Michael Bayer Introduction to SQLAlchemy @ Postgres Open
 
PoPostgreSQL Web Projects: From Start to FinishStart To Finish
PoPostgreSQL Web Projects: From Start to FinishStart To FinishPoPostgreSQL Web Projects: From Start to FinishStart To Finish
PoPostgreSQL Web Projects: From Start to FinishStart To Finish
 
Koichi Suzuki - Postgres-XC Dynamic Cluster Management @ Postgres Open
Koichi Suzuki - Postgres-XC Dynamic Cluster  Management @ Postgres OpenKoichi Suzuki - Postgres-XC Dynamic Cluster  Management @ Postgres Open
Koichi Suzuki - Postgres-XC Dynamic Cluster Management @ Postgres Open
 
Gbroccolo pgconfeu2016 pgnfs
Gbroccolo pgconfeu2016 pgnfsGbroccolo pgconfeu2016 pgnfs
Gbroccolo pgconfeu2016 pgnfs
 
PostgreSQL HA
PostgreSQL   HAPostgreSQL   HA
PostgreSQL HA
 
Michael Paquier - Taking advantage of custom bgworkers @ Postgres Open
Michael Paquier - Taking advantage of custom bgworkers @ Postgres OpenMichael Paquier - Taking advantage of custom bgworkers @ Postgres Open
Michael Paquier - Taking advantage of custom bgworkers @ Postgres Open
 
Geometria Projetiva
Geometria ProjetivaGeometria Projetiva
Geometria Projetiva
 
PostgreSQL replication from setup to advanced features.
 PostgreSQL replication from setup to advanced features. PostgreSQL replication from setup to advanced features.
PostgreSQL replication from setup to advanced features.
 
Logical replication with pglogical
Logical replication with pglogicalLogical replication with pglogical
Logical replication with pglogical
 
On The Building Of A PostgreSQL Cluster
On The Building Of A PostgreSQL ClusterOn The Building Of A PostgreSQL Cluster
On The Building Of A PostgreSQL Cluster
 

Similar to Ryan Jarvinen Open Shift Talk @ Postgres Open 2013

Phone gap
Phone gapPhone gap
Phone gap
Madhura Keskar
 
The Big Cloud native FaaS Lebowski
The Big Cloud native FaaS LebowskiThe Big Cloud native FaaS Lebowski
The Big Cloud native FaaS Lebowski
QAware GmbH
 
Cloud Computing Presentation
Cloud Computing PresentationCloud Computing Presentation
Cloud Computing Presentation
Ashish Kumar Singh
 
WebAssembly - czy dzisiaj mi się to przyda do pracy?
WebAssembly - czy dzisiaj mi się to przyda do pracy?WebAssembly - czy dzisiaj mi się to przyda do pracy?
WebAssembly - czy dzisiaj mi się to przyda do pracy?
Brainhub
 
CA Performance Manager Agility by using Docker Containers for Network Manag...
CA Performance Manager Agility by using Docker Containers for Network Manag...CA Performance Manager Agility by using Docker Containers for Network Manag...
CA Performance Manager Agility by using Docker Containers for Network Manag...
CA Technologies
 
DCEU 18: Developing with Docker Containers
DCEU 18: Developing with Docker ContainersDCEU 18: Developing with Docker Containers
DCEU 18: Developing with Docker Containers
Docker, Inc.
 
Building a data warehouse with Pentaho and Docker
Building a data warehouse with Pentaho and DockerBuilding a data warehouse with Pentaho and Docker
Building a data warehouse with Pentaho and Docker
Wellington Marinho
 
stackconf 2022: Data Management in Kubernetes – Backup, DR, HA
stackconf 2022: Data Management in Kubernetes – Backup, DR, HAstackconf 2022: Data Management in Kubernetes – Backup, DR, HA
stackconf 2022: Data Management in Kubernetes – Backup, DR, HA
NETWAYS
 
Scaleable PHP Applications in Kubernetes
Scaleable PHP Applications in KubernetesScaleable PHP Applications in Kubernetes
Scaleable PHP Applications in Kubernetes
Robert Lemke
 
DMCA #25: Jenkins - Docker & Android: Comment Docker peu faciliter la créatio...
DMCA #25: Jenkins - Docker & Android: Comment Docker peu faciliter la créatio...DMCA #25: Jenkins - Docker & Android: Comment Docker peu faciliter la créatio...
DMCA #25: Jenkins - Docker & Android: Comment Docker peu faciliter la créatio...
Olivier Destrebecq
 
PT-4142, Porting and Optimizing OpenMP applications to APU using CAPS tools, ...
PT-4142, Porting and Optimizing OpenMP applications to APU using CAPS tools, ...PT-4142, Porting and Optimizing OpenMP applications to APU using CAPS tools, ...
PT-4142, Porting and Optimizing OpenMP applications to APU using CAPS tools, ...
AMD Developer Central
 
[DSC DACH 23] Creating Production-Ready Shiny Apps - Mario Annau
[DSC DACH 23] Creating Production-Ready Shiny Apps - Mario Annau[DSC DACH 23] Creating Production-Ready Shiny Apps - Mario Annau
[DSC DACH 23] Creating Production-Ready Shiny Apps - Mario Annau
DataScienceConferenc1
 
如何让开源软件用得更放心
如何让开源软件用得更放心如何让开源软件用得更放心
如何让开源软件用得更放心
Onward Security
 
Build and Manage Serverless APIs (APIDays Nordic, May 19th 2016)
Build and Manage Serverless APIs (APIDays Nordic, May 19th 2016)Build and Manage Serverless APIs (APIDays Nordic, May 19th 2016)
Build and Manage Serverless APIs (APIDays Nordic, May 19th 2016)
3scale
 
Docker @ Data Science Meetup
Docker @ Data Science MeetupDocker @ Data Science Meetup
Docker @ Data Science Meetup
Daniel Nüst
 
Sentiment Analysis using Big Data
Sentiment Analysis using Big Data Sentiment Analysis using Big Data
Sentiment Analysis using Big Data
Rajat Mittal
 
Using Docker For Development
Using Docker For DevelopmentUsing Docker For Development
Using Docker For Development
Laura Frank Tacho
 
Concourse x Spinnaker #concourse_tokyo
Concourse x Spinnaker #concourse_tokyoConcourse x Spinnaker #concourse_tokyo
Concourse x Spinnaker #concourse_tokyo
Toshiaki Maki
 
Release webinar architecture
Release webinar   architectureRelease webinar   architecture
Release webinar architecture
BigData_Europe
 
IBM Bluemix Hackathon Accelerator
IBM Bluemix Hackathon AcceleratorIBM Bluemix Hackathon Accelerator
IBM Bluemix Hackathon Accelerator
gjuljo
 

Similar to Ryan Jarvinen Open Shift Talk @ Postgres Open 2013 (20)

Phone gap
Phone gapPhone gap
Phone gap
 
The Big Cloud native FaaS Lebowski
The Big Cloud native FaaS LebowskiThe Big Cloud native FaaS Lebowski
The Big Cloud native FaaS Lebowski
 
Cloud Computing Presentation
Cloud Computing PresentationCloud Computing Presentation
Cloud Computing Presentation
 
WebAssembly - czy dzisiaj mi się to przyda do pracy?
WebAssembly - czy dzisiaj mi się to przyda do pracy?WebAssembly - czy dzisiaj mi się to przyda do pracy?
WebAssembly - czy dzisiaj mi się to przyda do pracy?
 
CA Performance Manager Agility by using Docker Containers for Network Manag...
CA Performance Manager Agility by using Docker Containers for Network Manag...CA Performance Manager Agility by using Docker Containers for Network Manag...
CA Performance Manager Agility by using Docker Containers for Network Manag...
 
DCEU 18: Developing with Docker Containers
DCEU 18: Developing with Docker ContainersDCEU 18: Developing with Docker Containers
DCEU 18: Developing with Docker Containers
 
Building a data warehouse with Pentaho and Docker
Building a data warehouse with Pentaho and DockerBuilding a data warehouse with Pentaho and Docker
Building a data warehouse with Pentaho and Docker
 
stackconf 2022: Data Management in Kubernetes – Backup, DR, HA
stackconf 2022: Data Management in Kubernetes – Backup, DR, HAstackconf 2022: Data Management in Kubernetes – Backup, DR, HA
stackconf 2022: Data Management in Kubernetes – Backup, DR, HA
 
Scaleable PHP Applications in Kubernetes
Scaleable PHP Applications in KubernetesScaleable PHP Applications in Kubernetes
Scaleable PHP Applications in Kubernetes
 
DMCA #25: Jenkins - Docker & Android: Comment Docker peu faciliter la créatio...
DMCA #25: Jenkins - Docker & Android: Comment Docker peu faciliter la créatio...DMCA #25: Jenkins - Docker & Android: Comment Docker peu faciliter la créatio...
DMCA #25: Jenkins - Docker & Android: Comment Docker peu faciliter la créatio...
 
PT-4142, Porting and Optimizing OpenMP applications to APU using CAPS tools, ...
PT-4142, Porting and Optimizing OpenMP applications to APU using CAPS tools, ...PT-4142, Porting and Optimizing OpenMP applications to APU using CAPS tools, ...
PT-4142, Porting and Optimizing OpenMP applications to APU using CAPS tools, ...
 
[DSC DACH 23] Creating Production-Ready Shiny Apps - Mario Annau
[DSC DACH 23] Creating Production-Ready Shiny Apps - Mario Annau[DSC DACH 23] Creating Production-Ready Shiny Apps - Mario Annau
[DSC DACH 23] Creating Production-Ready Shiny Apps - Mario Annau
 
如何让开源软件用得更放心
如何让开源软件用得更放心如何让开源软件用得更放心
如何让开源软件用得更放心
 
Build and Manage Serverless APIs (APIDays Nordic, May 19th 2016)
Build and Manage Serverless APIs (APIDays Nordic, May 19th 2016)Build and Manage Serverless APIs (APIDays Nordic, May 19th 2016)
Build and Manage Serverless APIs (APIDays Nordic, May 19th 2016)
 
Docker @ Data Science Meetup
Docker @ Data Science MeetupDocker @ Data Science Meetup
Docker @ Data Science Meetup
 
Sentiment Analysis using Big Data
Sentiment Analysis using Big Data Sentiment Analysis using Big Data
Sentiment Analysis using Big Data
 
Using Docker For Development
Using Docker For DevelopmentUsing Docker For Development
Using Docker For Development
 
Concourse x Spinnaker #concourse_tokyo
Concourse x Spinnaker #concourse_tokyoConcourse x Spinnaker #concourse_tokyo
Concourse x Spinnaker #concourse_tokyo
 
Release webinar architecture
Release webinar   architectureRelease webinar   architecture
Release webinar architecture
 
IBM Bluemix Hackathon Accelerator
IBM Bluemix Hackathon AcceleratorIBM Bluemix Hackathon Accelerator
IBM Bluemix Hackathon Accelerator
 

Recently uploaded

FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 

Ryan Jarvinen Open Shift Talk @ Postgres Open 2013

  • 1. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 1/48 PG OPEN CLOUD Portable PG applications http://bit.ly/1eddml6 http://ryanjarvinen.com/presentations/pg_open_cloud
  • 2. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 2/48 presented by /ryan jarvinen @ryanj
  • 3. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 3/48 Open Platforms Engineer at Red Hat ryanj@redhat.com
  • 4. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 4/48 AGENDA 1. Open Cloud Overview 2. Learn how to write for the Open Cloud
  • 5. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 5/48 the Cloud "what is it made of?"
  • 6. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 6/48 The cloud is: hot air? a series of tubes? mostly cat photos✓
  • 7. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 7/48 INFRASTRUCTURE Communications: fiber, switches, wireless Storage and Compute: chips, servers, disks, databases … DevOps (and friction) … Software as a Service: Dropbox, Gmail
  • 8. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 8/48 IAAS Amazon EC2 RackSpace Linode BlueHost * Many are VM / VPS-based services
  • 9. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 9/48 BUILDING WITH POSTGRES NORMALLY LOOKS LIKE:
  • 10. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 10/48 1. Install Apache with Mod_WSGI 2. Make sure we have all the Python extensions set so Apache can see them 3. Configure firewall so that only http, https, and ssh are available to outside world 4. Install Postgresql, and plugins 5. update PG_hba.conf, create db user, create db user password, set up access privs, and a test account 6. Create DB, give user permissions to the DB 7. Set up a git repository and then figure out how to structure and deploy 8. Now I can write code - hello world, then database connection, then real app 9. Get it working with a public DNS 10. Now you are stuck maintaining the machine
  • 11. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 11/48 OR - if your Ops team offers pre-built VMs: 1. Fill out a mile high stack of request forms for a VM from Ops and wait 2. Then realize it's not configured properly, submit ticket and wait 3. Repeat same information, and wait 4. Your ops person moves to a different group, GOTO Line 1....
  • 12. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 12/48 As a sysadmin: 1. We're busy keeping the site up, we'll need to provision your VM later 2. Developers always want to try a new language or datastore that they don't know how to install, let alone manage 3. There is whole bunch of account creation and lockdown for each VM. I'll need to give them Sudo or they'll annoy me all the time 4. Each machine ends up with a wildly different config 5. Developers never give up the resources from their VMs - spreadsheets and emails 6. If there is a security fix I need to go into each VM and update it 7. I don't want to spend my time updating DNS tables
  • 13. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 13/48 PLATFORMS PROVIDE A PEACEFUL ENVIRONMENT FOR DEVS AND SYSADMINS Operations can ensure stability and performance Developers can self-provision environments without waiting The discussion shifts toward establishing policies for scaling
  • 14. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 14/48
  • 15. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 15/48 PUBLIC / HOSTED PAAS Heroku EngineYard Google App Engine Amazon BeanStalk * usually VM-based or proprietary application container technologies
  • 16. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 16/48 the public cloud
  • 17. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 17/48 This all sounds great, but what about… LOCK-IN?
  • 18. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 18/48 THE OPEN CLOUD
  • 19. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 19/48 IAAS OpenStack Eucalptus CloudStack Or, roll your own
  • 20. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 20/48
  • 21. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 21/48 OPEN PAAS OpenShift Cloud Foundry Built around Containers
  • 22. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 22/48 TRIUMPH OF THE OPEN CLOUD When "Big Cloud" fails you, you can always decide to host your own
  • 23. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 23/48 TINYTINYRSS Reusable, Redeployable code - host it anywhere https://github.com/openshift-quickstart/tiny_tiny_rss- openshift-quickstart rhc app create rss php-5 postgresql-9 cron-1.4 --from-code=https:/ /github.com/openshift-quickstart/tiny_tiny_rss-openshift-quickstar t.git https://rss-shifter.rhcloud.com/
  • 24. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 24/48 ADDING POSTGRES TO EXISTING APPLICATIONS: done! rhc cartridge add postgres-8.4 rhc cartridge add postgres-9.2 blog post: PostgreSQL 9.2 Comes to OpenShift
  • 25. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 25/48 Or, while connected over ssh: rhc app show rss env | grep DB OPENSHIFT_POSTGRESQL_DB_PASSWORD=lXcFVx4hIZgR OPENSHIFT_POSTGRESQL_DB_SOCKET=/var/lib/openshift/523672f7e0b8cd02 d70003bc/postgresql/socket/ OPENSHIFT_POSTGRESQL_DB_HOST=127.7.8.130 OPENSHIFT_POSTGRESQL_DB_PID=/var/lib/openshift/523672f7e0b8cd02d70 003bc/postgresql/pid/postgres.pid OPENSHIFT_POSTGRESQL_DB_USERNAME=adminpahue6e OPENSHIFT_POSTGRESQL_DB_URL=postgresql://adminpahue6e:lXcFVx4hIZgR @127.7.8.130:5432 OPENSHIFT_POSTGRESQL_DB_PORT=5432 OPENSHIFT_POSTGRESQL_DB_LOG_DIR=/var/lib/openshift/523672f7e0b8cd0 2d70003bc/postgresql/log/
  • 26. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 26/48 TERMINOLOGY (RED HAT) Broker – Management host, orchestration of Nodes Node – Compute host containing Gears Gear – Allocation of fixed memory, compute, and storage resources for running applications Cartridge – A technology/framework (Python, Ruby, Javascript, PHP, Perl, Java/JEE, PG, MySQL, etc.) for application service dependencies
  • 27. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 27/48 GEARS: SECURE AND EFFICIENT ,SELinux Cgroups
  • 28. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 28/48 AN OPEN CARTRIDGE FORMAT cart developer's guide
  • 29. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 29/48
  • 30. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 30/48 OPEN, AND WORKING IN THE UPSTREAM
  • 31. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 31/48 WRITING APPS FOR THE OPEN CLOUD
  • 32. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 32/48 TODO APP (FLASK AND SQLALCHEMY) https://github.com/shekhargulati/todo-flask-openshift- quickstart blog post: Build Your App on OpenShift Using Flask, SQLAlchemy, and PostgreSQL 9.2
  • 33. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 33/48 rhc app create -s task python-2.7 postgresql-9.2 --from-code=https ://github.com/shekhargulati/todo-flask-openshift-quickstart.git http://task-shifter.rhcloud.com/
  • 34. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 34/48 OPENSHIFT SCALING HOOKS Setting a min and max scale from the command line rhc cartridge-scale python-2.7 -a task --min 3 --max 5
  • 35. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 35/48 SCALING WEB UI
  • 36. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 36/48 HAPROXY SCALING HOOKS Adding and removing instances / scaling up and down HAProxy on / off switches These hooks are available on the command line within your gear, and via a REST API haproxy_ctld --up haproxy_ctld --down haproxy_ctld_daemon start haproxy_ctld_daemon stop haproxy_ctld_daemon restart
  • 37. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 37/48 HAPROXY WEB UI http://$YOUR_APP_DNS/haproxy-status/ HAPROXY RAW DATA http://$YOUR_APP_DNS/haproxy-status/;csv
  • 38. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 38/48 LIVING IN THE CLOUDS Code for America
  • 39. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 39/48 ADOPT A CAUSE This app should be using PostGIS for spatial queries: https://github.com/openshift-quickstart/adopt-a- hydrant-openshift-quickstart blog post: More Spatial in Your Database with PostGIS 2.0
  • 40. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 40/48 Persist configuration details, while keeping your source clean: rhc app create hydrant ruby-1.9 postgresql-8.4 --from=code=http:// github.com/ryanj/adopt-a-hydrant.git --env SECRET_TOKEN="YOUR_SECR ET_TOKEN" http://hydrant-shifter.rhcloud.com/
  • 41. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 41/48 ENVIRONMENT VARIABLES Listing your custom env vars: Setting a variable: Help with configuration: cd hydrant rhc env list rhc env set SECRET_TOKEN="a1fdacc3b1d14d6a92ed1219ed304d02529f5350 85262a90c39f072ef6de0ee9fe3a3d0194f02a2a8eb3" rhc help env
  • 42. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 42/48 DEPENDENCIES Automatic support for dependency resolution using standard packaging, native to each language: (ruby), (python), and (node.js)gems eggs npm modules
  • 43. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 43/48 ACTION HOOKS 1. enable postgis 2. bootstrap your db https://github.com/ryanj/pg_parks/tree/master/.openshift/action_ho
  • 44. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 44/48 BANNERS? http://citibike-shifter.rhcloud.com/ rhc env set CITIBIKE_NEARBY_STATIONS="268,257,258" -a citibikes
  • 45. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 45/48 DISTRIBUTED MULTI-CLOUD FEDERATED APPLICATIONS
  • 46. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 46/48 JOIN THE COMMUNITY Meritocracy for our pull requests Help with anything from core, quickstarts, and cartridges, to small typo fixes in the command line tools PEPs for major feature enhancements Contribution Guidelines Public Trello cards Public Test plans Public Bugzilla Vote on Features
  • 47. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 47/48 Check out the upstream source: Try our hosted solution (3 apps free): Request an evaluation for: OpenShift Origin OpenShift Online OpenShift Enterprise
  • 48. 9/21/13 Writing portable postgreSQL-backed applications for the Open Cloud ryanjarvinen.com/presentations/pg_open_cloud/#/ 48/48 Thanks for following along! --ryanj slides: http://bit.ly/1eddml6