SlideShare a Scribd company logo
1 of 21
Download to read offline
Second Skin:
Real-time Retheming a Legacy Web Application
with Diazo in the Cloud
Chris Shenton
CTO V! Studios
chris@v-studios.com
@shentonfreude
Talk Overview
● Tech talk for developer rather than designers
● The Challenge
● The Solution: Diazo
● Architecture Drill Down
● Toolchain
● Results
● A Warning
Servers, Software, Development (not theming)
● This talk focuses on Servers, Software, Development and Deployment
environments
○ Tools for front-end and full-stack developers
○ Building the AWS network and server infrastructure
○ Nginx configuration
○ XSLT module (patched for Diazo)
○ Deploying into AWS in a high-availability cluster of inexpensive servers
● We will not address building Diazo themes here
○ That’s already covered by training and talks at this conference, and docs online
The Challenge: site did not age well
● 15-year old ASP/VBScript
● We proposed a rewrite
○ Did a prototype in Pyramid
○ Customer didn’t have the time or budget
● Legacy back-end application was working fine
Client: “Can’t we just give it a new look and feel??”
● No: ASP is like PHP and JSP:
○ UI and code are intertwingled
○ Can’t separate front-end from logic
Wait, We’ve Done This Before!
● We used Diazo to create mobile.nasa.gov
● Gave a mobile friendly face to the
non-responsive origin content
● Without changing www.nasa.gov
“Can’t we just give it a new look and feel?” Yes, with Diazo!
● Modern theme
● Responsive
● Mobile-Friendly
● Faster
● Redundant front-end
● IPv6 accessible
● No changes to ASP
application
1000 Foot Meter View: Overall Architecture, Data Flow
DNS
TTT Diazo:
rules, theme
TTT
Origin
tradetotravel.com
GET /search GET /search
100 Meter View: Cloud Architecture
TTT Diazo
TTT
Origin
AWS
ELB
Auto-Scaling Group
EC2: t2.micro
Ubuntu
Nginx: cache, XSLT
Diazo rules, theme
EC2: t2.micro
Ubuntu
Nginx: cache, XSLT
Diazo rules, theme
10 Meter View: Nginx Cache and XSLT
Ubuntu
TTT
Origin
AWS
ELB
Nginx
80, 443: Cache
server_name tttdiazo_cache
proxy_pass http://127.0.0.1:8888
8888: XSLT
server_name tttdiazo
root theme/
xslt_stylesheet etc/theme.xsl
Tools Make Building Easier, More Reliable
● AWS Cloudformation and Troposphere
● Make
● Buildout
● CircleCI
● AWS CodeDeploy
Troposphere, CloudFormation: Infrastructure as Code
● Troposphere: Python library to create CloudFormation templates
● CloudFormation: AWS mechanism to define cloud resources in JSON/YAML
● net-infra.py
○ Builds the network the application components live in
○ VPC; Security Groups for SSH, ELB; Gateway; Routing Table; Default Route; Subnets; IAM Roles
and Policies; DNS; CodeDeploy
● app-infra.py
○ Defines the application server cluster
○ Security Group; IAM Roles and Policies; auto-scaling LaunchConfig, Groups, policies, alarms,
actions; SNS notifications; ELB; DNS; S3; CodeDeploy role, deploymentgroup, IAM user policy
Makefile
Developer-friendly wrappers around buildout, docker, paster, testing
$ make help
Front-end developer targets: clean, build, run, test, test_browser
Fullstack developer targets: clean, fullstack, fullstack_run, fullstack_test,
fullstack_stop
Production targets: clean, prod, prod_run, prod_test
Docker targets: docker, docker_start, docker_curl, docker_stop
If you just say 'make' it will run the 'build' target.
"make test" should test paster, fullstack and docker runs, as they should all
listen on 5000.
You don't need to install or invoke the virtualenv, it's done for you.
Buildout: Builds Everything for Development, Production
● buildout.cfg
○ Default for buildout, extends buildout-base
● buildout-base.cfg
○ Defines everything, used by fullstack and prod configs
○ Installs libxml2, libxslt
○ Compiles diazo theme
○ Builds Nginx configuration
○ Compiles Nginx with patches to support XSLT for HTML
(thanks to Lawrence Rowe and David Beitey)
● buildout-fullstack.cfg
○ Builds all the parts defined in base needed for development
● buildout-prod.cfg
○ Extends fullstack to add Nginx log rotation
Nginx Config
● Created by buildout
○ For local development
○ For stage and prod deployment
● Main server on 80 and 443
○ Redirects DNS aliases
○ Creates a cache
○ Proxy_cache to XSLT engine
● XSLT engine on 8888
○ Enable xslt_html_parser for HTML
○ proxy_pass to origin server (ASP application)
○ Avoid theming /static-images, /fonts, /scripts, /styles, origin’s sitemap.xml
CircleCI: Continuous Integration and Deployment
● circle.yml
● Uses “make docker_build” to build on Circle’s servers
● Runs tox and integration tests
● Instructs Circle CI to deploy commits to servers via AWS CodeDeploy
○ only if tests pass!
○ branch ‘develop’ gets sent to Stage deployment group
○ branch ‘master’ gets sent to Prod deployment group
AWS CodeDeploy
● Deploy code to existing servers
● Separate Stage and Prod server groups
● appspec.yml
1. ApplicationStop.sh: kills nginx
2. BeforeInstall.sh: apt-get installs prerequisites, virtualenv
3. AfterInstall.sh: uses “make prod_build” to build diazo, nginx
4. ApplicationStart.sh: uses “make prod_run” to start nginx
5. ValidateService.sh: uses “make prod_test”
Results: Toolchain helps a lot
● CloudFormation, Troposphere
○ Repeatable, fast deployment of AWS cloud infrastructure
● Makefile
○ Greatly simplifies developer chores
○ Leveraged by Docker and CircleCI
● Docker
○ Really helpful for local full-stack development
○ Used for CircleCI builds
● CircleCI
○ Makes testing and deployment easy (with CodeDeploy)
● CodeDeploy
○ Reliable deployment to AWS for Stage and Prod
Results: Performance is Excellent (mostly)
● Running in Docker is surprisingly fast (compiled theme)
● Running in Production is very fast (compiled theme)
○ Sometimes faster than the origin server itself
○ Probably due to Nginx cache we’re using
○ Very little CPU load on server
○ Even on a tiny t2.micro EC2
● Compiled theme.xsl
○ 855 KB
● Running under Paster, for front-end devs, is disappointingly slow :-(
○ About 5 seconds to render a page
○ Likely due to 28MB of theme, HTML, CSS, JavaSCript, images
● Legacy back-end is still a single point of failure
Warning: Too Much Flexibility
● Diazo is intended to theme content living on the origin server
○ all content changes should be done on origin
● Diazo themes can also contain content
○ “Our admin is out, can’t we just insert a new paragraph?”
○ “Can we add a new page or two here, and here?”
○ We should have said “No.”
● Now the content is partly on the origin and partly in the Diazo theme
● This means we’re now in the content editing business
● And all our theme content updates require a deployment to Production
● Don’t do this, be firm: it’s OK to say “No.” if you explain why
Code in GitHub, Reach Out
We’ve cloned the repo minus the client’s theme so you can see how
all the pieces fit together. You should be able to run it under paster,
local full-stack build (only tested on Mac), or local Docker full-stack
build.
https://github.com/v-studios/PloneConf2017-second-skin-diazo
Have any questions? need some help? Reach out and let’s chat:
● Email: chris@v-studios.com
● Twitter/GitHub/LinkedIn: shentonfreude

More Related Content

What's hot

Remote secured storage
Remote secured storageRemote secured storage
Remote secured storageSalo Shp
 
Ceph and cloud stack apr 2014
Ceph and cloud stack   apr 2014Ceph and cloud stack   apr 2014
Ceph and cloud stack apr 2014Ian Colle
 
#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers
#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers
#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With ContainersHanoi MagentoMeetup
 
High Performance Scaling Techniques in Golang Using Go Assembly
High Performance Scaling Techniques in Golang Using Go AssemblyHigh Performance Scaling Techniques in Golang Using Go Assembly
High Performance Scaling Techniques in Golang Using Go AssemblyMinio
 
Node.js Internals and V8 / Operating System Interaction
Node.js Internals and V8 / Operating System InteractionNode.js Internals and V8 / Operating System Interaction
Node.js Internals and V8 / Operating System InteractionGlobalLogic Ukraine
 
Infrastructure Management in GCP
Infrastructure Management in GCPInfrastructure Management in GCP
Infrastructure Management in GCPDana Hoffman
 
Manuel Hurtado. Couchbase paradigma4oct
Manuel Hurtado. Couchbase paradigma4octManuel Hurtado. Couchbase paradigma4oct
Manuel Hurtado. Couchbase paradigma4octParadigma Digital
 
Docker primer and tips
Docker primer and tipsDocker primer and tips
Docker primer and tipsSamuel Chow
 
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...Nicolas Brousse
 
New vision in server administration
New vision in server administrationNew vision in server administration
New vision in server administrationVladimir Melnic
 
Scylla Summit 2018: What's New in Scylla Manager?
Scylla Summit 2018: What's New in Scylla Manager?Scylla Summit 2018: What's New in Scylla Manager?
Scylla Summit 2018: What's New in Scylla Manager?ScyllaDB
 
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...Wong Hoi Sing Edison
 
Introducing docker
Introducing dockerIntroducing docker
Introducing dockerBill Wang
 
Adobe Advertising Cloud: The Reality of Cloud Bursting with OpenStack
Adobe Advertising Cloud: The Reality of Cloud Bursting with OpenStackAdobe Advertising Cloud: The Reality of Cloud Bursting with OpenStack
Adobe Advertising Cloud: The Reality of Cloud Bursting with OpenStackNicolas Brousse
 
以 Kubernetes 部屬 Spark 大數據計算環境
以 Kubernetes 部屬 Spark 大數據計算環境以 Kubernetes 部屬 Spark 大數據計算環境
以 Kubernetes 部屬 Spark 大數據計算環境inwin stack
 
[BarCamp2018][20180915][Tips for Virtual Hosting on Kubernetes]
[BarCamp2018][20180915][Tips for Virtual Hosting on Kubernetes][BarCamp2018][20180915][Tips for Virtual Hosting on Kubernetes]
[BarCamp2018][20180915][Tips for Virtual Hosting on Kubernetes]Wong Hoi Sing Edison
 
OSv at Usenix ATC 2014
OSv at Usenix ATC 2014OSv at Usenix ATC 2014
OSv at Usenix ATC 2014Don Marti
 
Kubernetes Summit 2018 - Kubernetes: Stateless -> Stateful
Kubernetes Summit 2018 - Kubernetes: Stateless -> StatefulKubernetes Summit 2018 - Kubernetes: Stateless -> Stateful
Kubernetes Summit 2018 - Kubernetes: Stateless -> Statefulsmalltown
 
Openstack CPI cloudfoundry
Openstack CPI cloudfoundryOpenstack CPI cloudfoundry
Openstack CPI cloudfoundryYitao Jiang
 

What's hot (20)

Remote secured storage
Remote secured storageRemote secured storage
Remote secured storage
 
Ceph and cloud stack apr 2014
Ceph and cloud stack   apr 2014Ceph and cloud stack   apr 2014
Ceph and cloud stack apr 2014
 
#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers
#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers
#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers
 
High Performance Scaling Techniques in Golang Using Go Assembly
High Performance Scaling Techniques in Golang Using Go AssemblyHigh Performance Scaling Techniques in Golang Using Go Assembly
High Performance Scaling Techniques in Golang Using Go Assembly
 
Node.js Internals and V8 / Operating System Interaction
Node.js Internals and V8 / Operating System InteractionNode.js Internals and V8 / Operating System Interaction
Node.js Internals and V8 / Operating System Interaction
 
Infrastructure Management in GCP
Infrastructure Management in GCPInfrastructure Management in GCP
Infrastructure Management in GCP
 
what is docker
what is dockerwhat is docker
what is docker
 
Manuel Hurtado. Couchbase paradigma4oct
Manuel Hurtado. Couchbase paradigma4octManuel Hurtado. Couchbase paradigma4oct
Manuel Hurtado. Couchbase paradigma4oct
 
Docker primer and tips
Docker primer and tipsDocker primer and tips
Docker primer and tips
 
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
 
New vision in server administration
New vision in server administrationNew vision in server administration
New vision in server administration
 
Scylla Summit 2018: What's New in Scylla Manager?
Scylla Summit 2018: What's New in Scylla Manager?Scylla Summit 2018: What's New in Scylla Manager?
Scylla Summit 2018: What's New in Scylla Manager?
 
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...
 
Introducing docker
Introducing dockerIntroducing docker
Introducing docker
 
Adobe Advertising Cloud: The Reality of Cloud Bursting with OpenStack
Adobe Advertising Cloud: The Reality of Cloud Bursting with OpenStackAdobe Advertising Cloud: The Reality of Cloud Bursting with OpenStack
Adobe Advertising Cloud: The Reality of Cloud Bursting with OpenStack
 
以 Kubernetes 部屬 Spark 大數據計算環境
以 Kubernetes 部屬 Spark 大數據計算環境以 Kubernetes 部屬 Spark 大數據計算環境
以 Kubernetes 部屬 Spark 大數據計算環境
 
[BarCamp2018][20180915][Tips for Virtual Hosting on Kubernetes]
[BarCamp2018][20180915][Tips for Virtual Hosting on Kubernetes][BarCamp2018][20180915][Tips for Virtual Hosting on Kubernetes]
[BarCamp2018][20180915][Tips for Virtual Hosting on Kubernetes]
 
OSv at Usenix ATC 2014
OSv at Usenix ATC 2014OSv at Usenix ATC 2014
OSv at Usenix ATC 2014
 
Kubernetes Summit 2018 - Kubernetes: Stateless -> Stateful
Kubernetes Summit 2018 - Kubernetes: Stateless -> StatefulKubernetes Summit 2018 - Kubernetes: Stateless -> Stateful
Kubernetes Summit 2018 - Kubernetes: Stateless -> Stateful
 
Openstack CPI cloudfoundry
Openstack CPI cloudfoundryOpenstack CPI cloudfoundry
Openstack CPI cloudfoundry
 

Similar to Second Skin: Real-Time Retheming a Legacy Web Application with Diazo in the Cloud

PyConIE 2017 Writing and deploying serverless python applications
PyConIE 2017 Writing and deploying serverless python applicationsPyConIE 2017 Writing and deploying serverless python applications
PyConIE 2017 Writing and deploying serverless python applicationsCesar Cardenas Desales
 
Intro to creating kubernetes operators
Intro to creating kubernetes operators Intro to creating kubernetes operators
Intro to creating kubernetes operators Juraj Hantak
 
Netflix Container Scheduling and Execution - QCon New York 2016
Netflix Container Scheduling and Execution - QCon New York 2016Netflix Container Scheduling and Execution - QCon New York 2016
Netflix Container Scheduling and Execution - QCon New York 2016aspyker
 
Scheduling a fuller house - Talk at QCon NY 2016
Scheduling a fuller house - Talk at QCon NY 2016Scheduling a fuller house - Talk at QCon NY 2016
Scheduling a fuller house - Talk at QCon NY 2016Sharma Podila
 
Writing and deploying serverless python applications
Writing and deploying serverless python applicationsWriting and deploying serverless python applications
Writing and deploying serverless python applicationsCesar Cardenas Desales
 
Polyglot persistence @ netflix (CDE Meetup)
Polyglot persistence @ netflix (CDE Meetup) Polyglot persistence @ netflix (CDE Meetup)
Polyglot persistence @ netflix (CDE Meetup) Roopa Tangirala
 
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...javier ramirez
 
To Russia with Love: Deploying Kubernetes in Exotic Locations On Prem
To Russia with Love: Deploying Kubernetes in Exotic Locations On PremTo Russia with Love: Deploying Kubernetes in Exotic Locations On Prem
To Russia with Love: Deploying Kubernetes in Exotic Locations On PremCloudOps2005
 
Making your app soar without a container manifest
Making your app soar without a container manifestMaking your app soar without a container manifest
Making your app soar without a container manifestLibbySchulze
 
Where is my cache? Architectural patterns for caching microservices by example
Where is my cache? Architectural patterns for caching microservices by exampleWhere is my cache? Architectural patterns for caching microservices by example
Where is my cache? Architectural patterns for caching microservices by exampleRafał Leszko
 
Automating using Ansible
Automating using AnsibleAutomating using Ansible
Automating using AnsibleAlok Patra
 
Where is my cache architectural patterns for caching microservices by example
Where is my cache architectural patterns for caching microservices by exampleWhere is my cache architectural patterns for caching microservices by example
Where is my cache architectural patterns for caching microservices by exampleRafał Leszko
 
Boosting Sitecore Development With Sitecore Docker
Boosting Sitecore Development With Sitecore DockerBoosting Sitecore Development With Sitecore Docker
Boosting Sitecore Development With Sitecore DockerPeter Nazarov
 
OpenEBS hangout #4
OpenEBS hangout #4OpenEBS hangout #4
OpenEBS hangout #4OpenEBS
 
Container orchestration and microservices world
Container orchestration and microservices worldContainer orchestration and microservices world
Container orchestration and microservices worldKarol Chrapek
 
What's New with Ceph - Ceph Day Silicon Valley
What's New with Ceph - Ceph Day Silicon ValleyWhat's New with Ceph - Ceph Day Silicon Valley
What's New with Ceph - Ceph Day Silicon ValleyCeph Community
 
CON6423: Scalable JavaScript applications with Project Nashorn
CON6423: Scalable JavaScript applications with Project NashornCON6423: Scalable JavaScript applications with Project Nashorn
CON6423: Scalable JavaScript applications with Project NashornMichel Graciano
 

Similar to Second Skin: Real-Time Retheming a Legacy Web Application with Diazo in the Cloud (20)

PyConIE 2017 Writing and deploying serverless python applications
PyConIE 2017 Writing and deploying serverless python applicationsPyConIE 2017 Writing and deploying serverless python applications
PyConIE 2017 Writing and deploying serverless python applications
 
Intro to creating kubernetes operators
Intro to creating kubernetes operators Intro to creating kubernetes operators
Intro to creating kubernetes operators
 
Netflix Container Scheduling and Execution - QCon New York 2016
Netflix Container Scheduling and Execution - QCon New York 2016Netflix Container Scheduling and Execution - QCon New York 2016
Netflix Container Scheduling and Execution - QCon New York 2016
 
Scheduling a fuller house - Talk at QCon NY 2016
Scheduling a fuller house - Talk at QCon NY 2016Scheduling a fuller house - Talk at QCon NY 2016
Scheduling a fuller house - Talk at QCon NY 2016
 
Writing and deploying serverless python applications
Writing and deploying serverless python applicationsWriting and deploying serverless python applications
Writing and deploying serverless python applications
 
Polyglot persistence @ netflix (CDE Meetup)
Polyglot persistence @ netflix (CDE Meetup) Polyglot persistence @ netflix (CDE Meetup)
Polyglot persistence @ netflix (CDE Meetup)
 
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
 
To Russia with Love: Deploying Kubernetes in Exotic Locations On Prem
To Russia with Love: Deploying Kubernetes in Exotic Locations On PremTo Russia with Love: Deploying Kubernetes in Exotic Locations On Prem
To Russia with Love: Deploying Kubernetes in Exotic Locations On Prem
 
Making your app soar without a container manifest
Making your app soar without a container manifestMaking your app soar without a container manifest
Making your app soar without a container manifest
 
Where is my cache? Architectural patterns for caching microservices by example
Where is my cache? Architectural patterns for caching microservices by exampleWhere is my cache? Architectural patterns for caching microservices by example
Where is my cache? Architectural patterns for caching microservices by example
 
Automating using Ansible
Automating using AnsibleAutomating using Ansible
Automating using Ansible
 
App Deployment on Cloud
App Deployment on CloudApp Deployment on Cloud
App Deployment on Cloud
 
[AWS Builders] Effective AWS Glue
[AWS Builders] Effective AWS Glue[AWS Builders] Effective AWS Glue
[AWS Builders] Effective AWS Glue
 
Where is my cache architectural patterns for caching microservices by example
Where is my cache architectural patterns for caching microservices by exampleWhere is my cache architectural patterns for caching microservices by example
Where is my cache architectural patterns for caching microservices by example
 
Boosting Sitecore Development With Sitecore Docker
Boosting Sitecore Development With Sitecore DockerBoosting Sitecore Development With Sitecore Docker
Boosting Sitecore Development With Sitecore Docker
 
OpenEBS hangout #4
OpenEBS hangout #4OpenEBS hangout #4
OpenEBS hangout #4
 
Nodejs
NodejsNodejs
Nodejs
 
Container orchestration and microservices world
Container orchestration and microservices worldContainer orchestration and microservices world
Container orchestration and microservices world
 
What's New with Ceph - Ceph Day Silicon Valley
What's New with Ceph - Ceph Day Silicon ValleyWhat's New with Ceph - Ceph Day Silicon Valley
What's New with Ceph - Ceph Day Silicon Valley
 
CON6423: Scalable JavaScript applications with Project Nashorn
CON6423: Scalable JavaScript applications with Project NashornCON6423: Scalable JavaScript applications with Project Nashorn
CON6423: Scalable JavaScript applications with Project Nashorn
 

More from Chris Shenton

Orchestrating complex workflows with aws step functions
Orchestrating complex workflows with aws step functionsOrchestrating complex workflows with aws step functions
Orchestrating complex workflows with aws step functionsChris Shenton
 
Automating EVA Workflows with AWS Step Functions
Automating EVA Workflows with AWS Step FunctionsAutomating EVA Workflows with AWS Step Functions
Automating EVA Workflows with AWS Step FunctionsChris Shenton
 
Creating Serverless apps for NASA in GovCloud
Creating Serverless apps for NASA in GovCloudCreating Serverless apps for NASA in GovCloud
Creating Serverless apps for NASA in GovCloudChris Shenton
 
Squeezing Machine Learning into Serverless for Image Recognition - AWS Meetup...
Squeezing Machine Learning into Serverless for Image Recognition - AWS Meetup...Squeezing Machine Learning into Serverless for Image Recognition - AWS Meetup...
Squeezing Machine Learning into Serverless for Image Recognition - AWS Meetup...Chris Shenton
 
Scaffolding for Serverless: lightning talk for AWS Arlington Meetup
Scaffolding for Serverless: lightning talk for AWS Arlington MeetupScaffolding for Serverless: lightning talk for AWS Arlington Meetup
Scaffolding for Serverless: lightning talk for AWS Arlington MeetupChris Shenton
 
Serverless Optical Character Recognition in support of Astronaut Safety AWS M...
Serverless Optical Character Recognition in support of Astronaut Safety AWS M...Serverless Optical Character Recognition in support of Astronaut Safety AWS M...
Serverless Optical Character Recognition in support of Astronaut Safety AWS M...Chris Shenton
 
Serverless OCR for NASA EVA: AWS Meetup DC 2017-12-12
Serverless OCR for NASA EVA: AWS Meetup DC 2017-12-12Serverless OCR for NASA EVA: AWS Meetup DC 2017-12-12
Serverless OCR for NASA EVA: AWS Meetup DC 2017-12-12Chris Shenton
 
Deploying Serverless Cloud Optical Character Recognition in Support of NASA A...
Deploying Serverless Cloud Optical Character Recognition in Support of NASA A...Deploying Serverless Cloud Optical Character Recognition in Support of NASA A...
Deploying Serverless Cloud Optical Character Recognition in Support of NASA A...Chris Shenton
 
PloneConf2017: serverless python for astronaut safety
PloneConf2017:  serverless python for astronaut safetyPloneConf2017:  serverless python for astronaut safety
PloneConf2017: serverless python for astronaut safetyChris Shenton
 
[AWS DC Meetup] Not Your Father’s WebApp: The Cloud-Native Architecture of im...
[AWS DC Meetup] Not Your Father’s WebApp: The Cloud-Native Architecture of im...[AWS DC Meetup] Not Your Father’s WebApp: The Cloud-Native Architecture of im...
[AWS DC Meetup] Not Your Father’s WebApp: The Cloud-Native Architecture of im...Chris Shenton
 
Not Your Father’s Web App: The Cloud-Native Architecture of images.nasa.gov
Not Your Father’s Web App: The Cloud-Native Architecture of images.nasa.govNot Your Father’s Web App: The Cloud-Native Architecture of images.nasa.gov
Not Your Father’s Web App: The Cloud-Native Architecture of images.nasa.govChris Shenton
 

More from Chris Shenton (11)

Orchestrating complex workflows with aws step functions
Orchestrating complex workflows with aws step functionsOrchestrating complex workflows with aws step functions
Orchestrating complex workflows with aws step functions
 
Automating EVA Workflows with AWS Step Functions
Automating EVA Workflows with AWS Step FunctionsAutomating EVA Workflows with AWS Step Functions
Automating EVA Workflows with AWS Step Functions
 
Creating Serverless apps for NASA in GovCloud
Creating Serverless apps for NASA in GovCloudCreating Serverless apps for NASA in GovCloud
Creating Serverless apps for NASA in GovCloud
 
Squeezing Machine Learning into Serverless for Image Recognition - AWS Meetup...
Squeezing Machine Learning into Serverless for Image Recognition - AWS Meetup...Squeezing Machine Learning into Serverless for Image Recognition - AWS Meetup...
Squeezing Machine Learning into Serverless for Image Recognition - AWS Meetup...
 
Scaffolding for Serverless: lightning talk for AWS Arlington Meetup
Scaffolding for Serverless: lightning talk for AWS Arlington MeetupScaffolding for Serverless: lightning talk for AWS Arlington Meetup
Scaffolding for Serverless: lightning talk for AWS Arlington Meetup
 
Serverless Optical Character Recognition in support of Astronaut Safety AWS M...
Serverless Optical Character Recognition in support of Astronaut Safety AWS M...Serverless Optical Character Recognition in support of Astronaut Safety AWS M...
Serverless Optical Character Recognition in support of Astronaut Safety AWS M...
 
Serverless OCR for NASA EVA: AWS Meetup DC 2017-12-12
Serverless OCR for NASA EVA: AWS Meetup DC 2017-12-12Serverless OCR for NASA EVA: AWS Meetup DC 2017-12-12
Serverless OCR for NASA EVA: AWS Meetup DC 2017-12-12
 
Deploying Serverless Cloud Optical Character Recognition in Support of NASA A...
Deploying Serverless Cloud Optical Character Recognition in Support of NASA A...Deploying Serverless Cloud Optical Character Recognition in Support of NASA A...
Deploying Serverless Cloud Optical Character Recognition in Support of NASA A...
 
PloneConf2017: serverless python for astronaut safety
PloneConf2017:  serverless python for astronaut safetyPloneConf2017:  serverless python for astronaut safety
PloneConf2017: serverless python for astronaut safety
 
[AWS DC Meetup] Not Your Father’s WebApp: The Cloud-Native Architecture of im...
[AWS DC Meetup] Not Your Father’s WebApp: The Cloud-Native Architecture of im...[AWS DC Meetup] Not Your Father’s WebApp: The Cloud-Native Architecture of im...
[AWS DC Meetup] Not Your Father’s WebApp: The Cloud-Native Architecture of im...
 
Not Your Father’s Web App: The Cloud-Native Architecture of images.nasa.gov
Not Your Father’s Web App: The Cloud-Native Architecture of images.nasa.govNot Your Father’s Web App: The Cloud-Native Architecture of images.nasa.gov
Not Your Father’s Web App: The Cloud-Native Architecture of images.nasa.gov
 

Recently uploaded

Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.soniya singh
 
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...SUHANI PANDEY
 
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...SUHANI PANDEY
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceDelhi Call girls
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024APNIC
 
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort ServiceBusty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort ServiceDelhi Call girls
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445ruhi
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024APNIC
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...APNIC
 
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...SUHANI PANDEY
 
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...SUHANI PANDEY
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersDamian Radcliffe
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls DubaiDubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubaikojalkojal131
 

Recently uploaded (20)

Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
 
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
 
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
 
Russian Call Girls in %(+971524965298 )# Call Girls in Dubai
Russian Call Girls in %(+971524965298  )#  Call Girls in DubaiRussian Call Girls in %(+971524965298  )#  Call Girls in Dubai
Russian Call Girls in %(+971524965298 )# Call Girls in Dubai
 
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024
 
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort ServiceBusty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
 
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
 
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
 
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
 
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
 
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls DubaiDubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
 

Second Skin: Real-Time Retheming a Legacy Web Application with Diazo in the Cloud

  • 1. Second Skin: Real-time Retheming a Legacy Web Application with Diazo in the Cloud Chris Shenton CTO V! Studios chris@v-studios.com @shentonfreude
  • 2. Talk Overview ● Tech talk for developer rather than designers ● The Challenge ● The Solution: Diazo ● Architecture Drill Down ● Toolchain ● Results ● A Warning
  • 3. Servers, Software, Development (not theming) ● This talk focuses on Servers, Software, Development and Deployment environments ○ Tools for front-end and full-stack developers ○ Building the AWS network and server infrastructure ○ Nginx configuration ○ XSLT module (patched for Diazo) ○ Deploying into AWS in a high-availability cluster of inexpensive servers ● We will not address building Diazo themes here ○ That’s already covered by training and talks at this conference, and docs online
  • 4. The Challenge: site did not age well ● 15-year old ASP/VBScript ● We proposed a rewrite ○ Did a prototype in Pyramid ○ Customer didn’t have the time or budget ● Legacy back-end application was working fine
  • 5. Client: “Can’t we just give it a new look and feel??” ● No: ASP is like PHP and JSP: ○ UI and code are intertwingled ○ Can’t separate front-end from logic
  • 6. Wait, We’ve Done This Before! ● We used Diazo to create mobile.nasa.gov ● Gave a mobile friendly face to the non-responsive origin content ● Without changing www.nasa.gov
  • 7. “Can’t we just give it a new look and feel?” Yes, with Diazo! ● Modern theme ● Responsive ● Mobile-Friendly ● Faster ● Redundant front-end ● IPv6 accessible ● No changes to ASP application
  • 8. 1000 Foot Meter View: Overall Architecture, Data Flow DNS TTT Diazo: rules, theme TTT Origin tradetotravel.com GET /search GET /search
  • 9. 100 Meter View: Cloud Architecture TTT Diazo TTT Origin AWS ELB Auto-Scaling Group EC2: t2.micro Ubuntu Nginx: cache, XSLT Diazo rules, theme EC2: t2.micro Ubuntu Nginx: cache, XSLT Diazo rules, theme
  • 10. 10 Meter View: Nginx Cache and XSLT Ubuntu TTT Origin AWS ELB Nginx 80, 443: Cache server_name tttdiazo_cache proxy_pass http://127.0.0.1:8888 8888: XSLT server_name tttdiazo root theme/ xslt_stylesheet etc/theme.xsl
  • 11. Tools Make Building Easier, More Reliable ● AWS Cloudformation and Troposphere ● Make ● Buildout ● CircleCI ● AWS CodeDeploy
  • 12. Troposphere, CloudFormation: Infrastructure as Code ● Troposphere: Python library to create CloudFormation templates ● CloudFormation: AWS mechanism to define cloud resources in JSON/YAML ● net-infra.py ○ Builds the network the application components live in ○ VPC; Security Groups for SSH, ELB; Gateway; Routing Table; Default Route; Subnets; IAM Roles and Policies; DNS; CodeDeploy ● app-infra.py ○ Defines the application server cluster ○ Security Group; IAM Roles and Policies; auto-scaling LaunchConfig, Groups, policies, alarms, actions; SNS notifications; ELB; DNS; S3; CodeDeploy role, deploymentgroup, IAM user policy
  • 13. Makefile Developer-friendly wrappers around buildout, docker, paster, testing $ make help Front-end developer targets: clean, build, run, test, test_browser Fullstack developer targets: clean, fullstack, fullstack_run, fullstack_test, fullstack_stop Production targets: clean, prod, prod_run, prod_test Docker targets: docker, docker_start, docker_curl, docker_stop If you just say 'make' it will run the 'build' target. "make test" should test paster, fullstack and docker runs, as they should all listen on 5000. You don't need to install or invoke the virtualenv, it's done for you.
  • 14. Buildout: Builds Everything for Development, Production ● buildout.cfg ○ Default for buildout, extends buildout-base ● buildout-base.cfg ○ Defines everything, used by fullstack and prod configs ○ Installs libxml2, libxslt ○ Compiles diazo theme ○ Builds Nginx configuration ○ Compiles Nginx with patches to support XSLT for HTML (thanks to Lawrence Rowe and David Beitey) ● buildout-fullstack.cfg ○ Builds all the parts defined in base needed for development ● buildout-prod.cfg ○ Extends fullstack to add Nginx log rotation
  • 15. Nginx Config ● Created by buildout ○ For local development ○ For stage and prod deployment ● Main server on 80 and 443 ○ Redirects DNS aliases ○ Creates a cache ○ Proxy_cache to XSLT engine ● XSLT engine on 8888 ○ Enable xslt_html_parser for HTML ○ proxy_pass to origin server (ASP application) ○ Avoid theming /static-images, /fonts, /scripts, /styles, origin’s sitemap.xml
  • 16. CircleCI: Continuous Integration and Deployment ● circle.yml ● Uses “make docker_build” to build on Circle’s servers ● Runs tox and integration tests ● Instructs Circle CI to deploy commits to servers via AWS CodeDeploy ○ only if tests pass! ○ branch ‘develop’ gets sent to Stage deployment group ○ branch ‘master’ gets sent to Prod deployment group
  • 17. AWS CodeDeploy ● Deploy code to existing servers ● Separate Stage and Prod server groups ● appspec.yml 1. ApplicationStop.sh: kills nginx 2. BeforeInstall.sh: apt-get installs prerequisites, virtualenv 3. AfterInstall.sh: uses “make prod_build” to build diazo, nginx 4. ApplicationStart.sh: uses “make prod_run” to start nginx 5. ValidateService.sh: uses “make prod_test”
  • 18. Results: Toolchain helps a lot ● CloudFormation, Troposphere ○ Repeatable, fast deployment of AWS cloud infrastructure ● Makefile ○ Greatly simplifies developer chores ○ Leveraged by Docker and CircleCI ● Docker ○ Really helpful for local full-stack development ○ Used for CircleCI builds ● CircleCI ○ Makes testing and deployment easy (with CodeDeploy) ● CodeDeploy ○ Reliable deployment to AWS for Stage and Prod
  • 19. Results: Performance is Excellent (mostly) ● Running in Docker is surprisingly fast (compiled theme) ● Running in Production is very fast (compiled theme) ○ Sometimes faster than the origin server itself ○ Probably due to Nginx cache we’re using ○ Very little CPU load on server ○ Even on a tiny t2.micro EC2 ● Compiled theme.xsl ○ 855 KB ● Running under Paster, for front-end devs, is disappointingly slow :-( ○ About 5 seconds to render a page ○ Likely due to 28MB of theme, HTML, CSS, JavaSCript, images ● Legacy back-end is still a single point of failure
  • 20. Warning: Too Much Flexibility ● Diazo is intended to theme content living on the origin server ○ all content changes should be done on origin ● Diazo themes can also contain content ○ “Our admin is out, can’t we just insert a new paragraph?” ○ “Can we add a new page or two here, and here?” ○ We should have said “No.” ● Now the content is partly on the origin and partly in the Diazo theme ● This means we’re now in the content editing business ● And all our theme content updates require a deployment to Production ● Don’t do this, be firm: it’s OK to say “No.” if you explain why
  • 21. Code in GitHub, Reach Out We’ve cloned the repo minus the client’s theme so you can see how all the pieces fit together. You should be able to run it under paster, local full-stack build (only tested on Mac), or local Docker full-stack build. https://github.com/v-studios/PloneConf2017-second-skin-diazo Have any questions? need some help? Reach out and let’s chat: ● Email: chris@v-studios.com ● Twitter/GitHub/LinkedIn: shentonfreude