SlideShare uma empresa Scribd logo
1 de 15
Baixar para ler offline
Serverless Preview
Environments to the Rescue
test every commit
Joseph Lust mabl engineer @lustcoder
About Me: Joseph Lust
Engineer
■ Building the web for two decades
■ Cloud native since 2011
■ Currently building mabl testing cloud on GCP
■ Co-organizer GDG Cloud Boston Meetup
@lustcoder
Why end 2 end UI test every commit?
■ Rapid developer feedback
▲ Push and forget
■ Visually intractable PRs
▲ Review pixels, not CSS files
■ Confidence on merging to master
▲ Break feature branches, not master
3
* for React Single Space Applications (SPAs)
Why Not?
■ Deployments are slow
■ So many domains/networks!
■ So many servers!
■ So many environments!
■ So much $$$$
4
Serverless to the rescue
■ Deployments are slow
■ So many domains/networks!
■ So many servers!
■ So many environments!
■ So much $$$$
5
Wow, such serverless
Why serverless just works
■ No Provisioning
■ Transparent Scaling
■ Pay only for Use
6
Solving the domains/networking problem
■ You don’t need separate domain/networking per app/version
▲ Even if your SPA expects to be at the root path
■ Use a wildcard domain!
▲ Only one DNS entry ever needed!
▲ One IP address for everything!
■ Map your app and version into the domain
7
a32df28-accounting.preview.acme.com
● a23df28 ← Git Commit (version)
● Accounting ← App Name
Solving the deployment problem
■ Forget about servers
■ Forget about containers
▲ They’re huge!
■ Drop your SPA artifacts in a bucket
▲ e.g. Google Cloud Storage
▲ or AWS S3
▲ or Azure Storage
8
gsutil -m cp -r -Z -a public-read . 
gs://my-previews/${APP_NAME}/${APP_HASH}/
“deploy” in 5 seconds
cli
Solving the server problem
■ Why do you need a server?
■ SPAs only need basic URL rewriting
■ Use a trivial nginx server to rewrite the URLs for ALL apps
■ Run your container on a serverless provider
▲ e.g. Cloud Run or Google Compute Engine
▲ Don’t need Kubernetes
10
nginx URL rewriter
Dockerfile
FROM nginx
COPY html /usr/share/nginx/html
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
COPY nginx/nginx.conf /etc/nginx/nginx.conf
nginx URL rewriter config
nginx.conf
server_name
"~^(?<app_hash>[a-f0-9]{7})-<?<app_name([^.]+)>.preview.acme.com$"
location / {
rewrite ^/$ /$app_name/$app_name/$app_hash/index.html last;
}
location /${app_name} {
proxy_pass https://storage.googleapis.com/my-previews;
}
Just add eye balls 👀
■ GitHub webhook to trigger on each build completion
▲ Everyone can see your preview environment!
▲ You can point your tests @ the preview environment
■ Just use a serverless Cloud Function webhook to send messages
13
Summary: from the top
1. CI/CD builds the commit
2. Push artifact to bucket
3. Use app/commit centric URL
▲ e.g. email, Slack, Pull Request comment
▲ Fire E2E UI Tests!
e.g. https://741004b.preview-dev.mabl.com
14
Questions?

Mais conteúdo relacionado

Mais procurados

WordCamp IL 2016 - WordPress Scale on AWS
WordCamp IL 2016 - WordPress Scale on AWSWordCamp IL 2016 - WordPress Scale on AWS
WordCamp IL 2016 - WordPress Scale on AWSBoaz Ziniman
 
RedMart Migrating from EC2 to VPC with Chef
RedMart Migrating from EC2 to VPC with ChefRedMart Migrating from EC2 to VPC with Chef
RedMart Migrating from EC2 to VPC with ChefRitesh Angural
 
Lightning branches at RedMart (Js conf Asia 2014 Talk)
Lightning branches at RedMart (Js conf Asia 2014  Talk)Lightning branches at RedMart (Js conf Asia 2014  Talk)
Lightning branches at RedMart (Js conf Asia 2014 Talk)Ritesh Angural
 
Open source and cross platform .net
Open source and cross platform .netOpen source and cross platform .net
Open source and cross platform .netIbon Landa
 
Do things faster and better with WebAssembly - Sendil Kumar Nellaiyapen - Cod...
Do things faster and better with WebAssembly - Sendil Kumar Nellaiyapen - Cod...Do things faster and better with WebAssembly - Sendil Kumar Nellaiyapen - Cod...
Do things faster and better with WebAssembly - Sendil Kumar Nellaiyapen - Cod...Codemotion
 
Web componenet using angular element
Web componenet using angular elementWeb componenet using angular element
Web componenet using angular elementHimanshu Tamrakar
 
DevOps and Hybrid Applications: What You Need to Know
DevOps and Hybrid Applications: What You Need to KnowDevOps and Hybrid Applications: What You Need to Know
DevOps and Hybrid Applications: What You Need to KnowDevOps.com
 
A Lap around ASP.NET 5 - VConf
A Lap around ASP.NET 5 - VConfA Lap around ASP.NET 5 - VConf
A Lap around ASP.NET 5 - VConfSam Basu
 
Putting the 'ctions' in Azure Fun-ctions
Putting the 'ctions' in Azure Fun-ctionsPutting the 'ctions' in Azure Fun-ctions
Putting the 'ctions' in Azure Fun-ctionsNullOps
 
Webpack & React Performance in 16+ Steps
Webpack & React Performance in 16+ StepsWebpack & React Performance in 16+ Steps
Webpack & React Performance in 16+ StepsGrgur Grisogono
 
Desktop server presentation
Desktop server presentationDesktop server presentation
Desktop server presentationKen Kramer
 
Дмитрий Иванов «Мое первое приложение в облаках или почему стоит использовать...
Дмитрий Иванов «Мое первое приложение в облаках или почему стоит использовать...Дмитрий Иванов «Мое первое приложение в облаках или почему стоит использовать...
Дмитрий Иванов «Мое первое приложение в облаках или почему стоит использовать...DataArt
 
Super tools to boost productivity in React dev env!
Super tools to boost productivity in React dev env!Super tools to boost productivity in React dev env!
Super tools to boost productivity in React dev env!Souvik Basu
 
Docker Tooling for Eclipse
Docker Tooling for EclipseDocker Tooling for Eclipse
Docker Tooling for EclipseMax Andersen
 
.ASP NET CORE ON DOCKER
.ASP NET CORE ON DOCKER.ASP NET CORE ON DOCKER
.ASP NET CORE ON DOCKERJosé Barbosa
 
CoffeeScript in hootsuite
CoffeeScript in hootsuiteCoffeeScript in hootsuite
CoffeeScript in hootsuiteujihisa
 
Code and Deploy Angular to the Cloud
Code and Deploy Angular to the CloudCode and Deploy Angular to the Cloud
Code and Deploy Angular to the CloudSimona Cotin
 

Mais procurados (20)

WordCamp IL 2016 - WordPress Scale on AWS
WordCamp IL 2016 - WordPress Scale on AWSWordCamp IL 2016 - WordPress Scale on AWS
WordCamp IL 2016 - WordPress Scale on AWS
 
RedMart Migrating from EC2 to VPC with Chef
RedMart Migrating from EC2 to VPC with ChefRedMart Migrating from EC2 to VPC with Chef
RedMart Migrating from EC2 to VPC with Chef
 
Lightning branches at RedMart (Js conf Asia 2014 Talk)
Lightning branches at RedMart (Js conf Asia 2014  Talk)Lightning branches at RedMart (Js conf Asia 2014  Talk)
Lightning branches at RedMart (Js conf Asia 2014 Talk)
 
Open source and cross platform .net
Open source and cross platform .netOpen source and cross platform .net
Open source and cross platform .net
 
Do things faster and better with WebAssembly - Sendil Kumar Nellaiyapen - Cod...
Do things faster and better with WebAssembly - Sendil Kumar Nellaiyapen - Cod...Do things faster and better with WebAssembly - Sendil Kumar Nellaiyapen - Cod...
Do things faster and better with WebAssembly - Sendil Kumar Nellaiyapen - Cod...
 
Web componenet using angular element
Web componenet using angular elementWeb componenet using angular element
Web componenet using angular element
 
DevOps and Hybrid Applications: What You Need to Know
DevOps and Hybrid Applications: What You Need to KnowDevOps and Hybrid Applications: What You Need to Know
DevOps and Hybrid Applications: What You Need to Know
 
A Lap around ASP.NET 5 - VConf
A Lap around ASP.NET 5 - VConfA Lap around ASP.NET 5 - VConf
A Lap around ASP.NET 5 - VConf
 
Putting the 'ctions' in Azure Fun-ctions
Putting the 'ctions' in Azure Fun-ctionsPutting the 'ctions' in Azure Fun-ctions
Putting the 'ctions' in Azure Fun-ctions
 
Webpack & React Performance in 16+ Steps
Webpack & React Performance in 16+ StepsWebpack & React Performance in 16+ Steps
Webpack & React Performance in 16+ Steps
 
Desktop server presentation
Desktop server presentationDesktop server presentation
Desktop server presentation
 
Дмитрий Иванов «Мое первое приложение в облаках или почему стоит использовать...
Дмитрий Иванов «Мое первое приложение в облаках или почему стоит использовать...Дмитрий Иванов «Мое первое приложение в облаках или почему стоит использовать...
Дмитрий Иванов «Мое первое приложение в облаках или почему стоит использовать...
 
Super tools to boost productivity in React dev env!
Super tools to boost productivity in React dev env!Super tools to boost productivity in React dev env!
Super tools to boost productivity in React dev env!
 
gulp
gulpgulp
gulp
 
Docker Tooling for Eclipse
Docker Tooling for EclipseDocker Tooling for Eclipse
Docker Tooling for Eclipse
 
.ASP NET CORE ON DOCKER
.ASP NET CORE ON DOCKER.ASP NET CORE ON DOCKER
.ASP NET CORE ON DOCKER
 
CoffeeScript in hootsuite
CoffeeScript in hootsuiteCoffeeScript in hootsuite
CoffeeScript in hootsuite
 
ConcourseCi overview
ConcourseCi  overviewConcourseCi  overview
ConcourseCi overview
 
Code and Deploy Angular to the Cloud
Code and Deploy Angular to the CloudCode and Deploy Angular to the Cloud
Code and Deploy Angular to the Cloud
 
Concourse updates
Concourse updatesConcourse updates
Concourse updates
 

Semelhante a Serverless preview environments to the rescue

Serverless Preview Environments @ Boston DevOps
Serverless Preview Environments @ Boston DevOpsServerless Preview Environments @ Boston DevOps
Serverless Preview Environments @ Boston DevOpsJoseph Lust
 
Data Scotland 2019: You can run SQL Server on AWS
Data Scotland 2019: You can run SQL Server on AWSData Scotland 2019: You can run SQL Server on AWS
Data Scotland 2019: You can run SQL Server on AWSJohn McCormack
 
GraphQL vs. (the) REST
GraphQL vs. (the) RESTGraphQL vs. (the) REST
GraphQL vs. (the) RESTcoliquio GmbH
 
Automation of Hadoop cluster operations in Arm Treasure Data
Automation of Hadoop cluster operations in Arm Treasure DataAutomation of Hadoop cluster operations in Arm Treasure Data
Automation of Hadoop cluster operations in Arm Treasure DataYan Wang
 
Dockerize your Symfony application - Symfony Live NYC 2014
Dockerize your Symfony application - Symfony Live NYC 2014Dockerize your Symfony application - Symfony Live NYC 2014
Dockerize your Symfony application - Symfony Live NYC 2014André Rømcke
 
Serverless Apps on Google Cloud: more dev, less ops
Serverless Apps on Google Cloud:  more dev, less opsServerless Apps on Google Cloud:  more dev, less ops
Serverless Apps on Google Cloud: more dev, less opsJoseph Lust
 
Serverless Apps on Google Cloud: more dev, less ops
Serverless Apps on Google Cloud: more dev, less opsServerless Apps on Google Cloud: more dev, less ops
Serverless Apps on Google Cloud: more dev, less opsmabl
 
Chef on SmartOS
Chef on SmartOSChef on SmartOS
Chef on SmartOSEric Saxby
 
Deploying Perl apps on dotCloud
Deploying Perl apps on dotCloudDeploying Perl apps on dotCloud
Deploying Perl apps on dotClouddaoswald
 
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...eZ Systems
 
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...Sébastien Morel
 
Firebase Cloud Functions: a quick overview
Firebase Cloud Functions: a quick overviewFirebase Cloud Functions: a quick overview
Firebase Cloud Functions: a quick overviewmabl
 
Firebase Cloud Functions: a quick overview
Firebase Cloud Functions: a quick overviewFirebase Cloud Functions: a quick overview
Firebase Cloud Functions: a quick overviewJoseph Lust
 
Running Containerized Node.js Services on AWS Elastic Beanstalk
Running Containerized Node.js Services on AWS Elastic BeanstalkRunning Containerized Node.js Services on AWS Elastic Beanstalk
Running Containerized Node.js Services on AWS Elastic Beanstalkzupzup.org
 
Using Databases and Containers From Development to Deployment
Using Databases and Containers  From Development to DeploymentUsing Databases and Containers  From Development to Deployment
Using Databases and Containers From Development to DeploymentAerospike, Inc.
 
faastRuby - Building a FaaS platform with Redis (RedisConf19)
faastRuby - Building a FaaS platform with Redis (RedisConf19)faastRuby - Building a FaaS platform with Redis (RedisConf19)
faastRuby - Building a FaaS platform with Redis (RedisConf19)Paulo Arruda
 
Building A FaaA Platform With Redis: Paulo Arruda
Building A FaaA Platform With Redis: Paulo ArrudaBuilding A FaaA Platform With Redis: Paulo Arruda
Building A FaaA Platform With Redis: Paulo ArrudaRedis Labs
 

Semelhante a Serverless preview environments to the rescue (20)

Serverless Preview Environments @ Boston DevOps
Serverless Preview Environments @ Boston DevOpsServerless Preview Environments @ Boston DevOps
Serverless Preview Environments @ Boston DevOps
 
Data Scotland 2019: You can run SQL Server on AWS
Data Scotland 2019: You can run SQL Server on AWSData Scotland 2019: You can run SQL Server on AWS
Data Scotland 2019: You can run SQL Server on AWS
 
GraphQL vs. (the) REST
GraphQL vs. (the) RESTGraphQL vs. (the) REST
GraphQL vs. (the) REST
 
Automation of Hadoop cluster operations in Arm Treasure Data
Automation of Hadoop cluster operations in Arm Treasure DataAutomation of Hadoop cluster operations in Arm Treasure Data
Automation of Hadoop cluster operations in Arm Treasure Data
 
Dockerize your Symfony application - Symfony Live NYC 2014
Dockerize your Symfony application - Symfony Live NYC 2014Dockerize your Symfony application - Symfony Live NYC 2014
Dockerize your Symfony application - Symfony Live NYC 2014
 
Node.js an Exectutive View
Node.js an Exectutive ViewNode.js an Exectutive View
Node.js an Exectutive View
 
Serverless Apps on Google Cloud: more dev, less ops
Serverless Apps on Google Cloud:  more dev, less opsServerless Apps on Google Cloud:  more dev, less ops
Serverless Apps on Google Cloud: more dev, less ops
 
Serverless Apps on Google Cloud: more dev, less ops
Serverless Apps on Google Cloud: more dev, less opsServerless Apps on Google Cloud: more dev, less ops
Serverless Apps on Google Cloud: more dev, less ops
 
Chef on SmartOS
Chef on SmartOSChef on SmartOS
Chef on SmartOS
 
Deploying Perl apps on dotCloud
Deploying Perl apps on dotCloudDeploying Perl apps on dotCloud
Deploying Perl apps on dotCloud
 
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
 
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
 
SD Times - Docker v2
SD Times - Docker v2SD Times - Docker v2
SD Times - Docker v2
 
Firebase Cloud Functions: a quick overview
Firebase Cloud Functions: a quick overviewFirebase Cloud Functions: a quick overview
Firebase Cloud Functions: a quick overview
 
Firebase Cloud Functions: a quick overview
Firebase Cloud Functions: a quick overviewFirebase Cloud Functions: a quick overview
Firebase Cloud Functions: a quick overview
 
Running Containerized Node.js Services on AWS Elastic Beanstalk
Running Containerized Node.js Services on AWS Elastic BeanstalkRunning Containerized Node.js Services on AWS Elastic Beanstalk
Running Containerized Node.js Services on AWS Elastic Beanstalk
 
Using Databases and Containers From Development to Deployment
Using Databases and Containers  From Development to DeploymentUsing Databases and Containers  From Development to Deployment
Using Databases and Containers From Development to Deployment
 
faastRuby - Building a FaaS platform with Redis (RedisConf19)
faastRuby - Building a FaaS platform with Redis (RedisConf19)faastRuby - Building a FaaS platform with Redis (RedisConf19)
faastRuby - Building a FaaS platform with Redis (RedisConf19)
 
Building A FaaA Platform With Redis: Paulo Arruda
Building A FaaA Platform With Redis: Paulo ArrudaBuilding A FaaA Platform With Redis: Paulo Arruda
Building A FaaA Platform With Redis: Paulo Arruda
 
Autolab Workshop
Autolab WorkshopAutolab Workshop
Autolab Workshop
 

Mais de Joseph Lust

GitLab Commit 2020: Ubiquitous quality through continuous testing pipelines
GitLab Commit 2020: Ubiquitous quality through continuous testing pipelinesGitLab Commit 2020: Ubiquitous quality through continuous testing pipelines
GitLab Commit 2020: Ubiquitous quality through continuous testing pipelinesJoseph Lust
 
Making CLIs with Node.js
Making CLIs with Node.jsMaking CLIs with Node.js
Making CLIs with Node.jsJoseph Lust
 
mabl's Machine Learning Implementation on Google Cloud Platform
mabl's Machine Learning Implementation on Google Cloud Platformmabl's Machine Learning Implementation on Google Cloud Platform
mabl's Machine Learning Implementation on Google Cloud PlatformJoseph Lust
 
Going Microserverless on Google Cloud @ mabl
Going Microserverless on Google Cloud @ mablGoing Microserverless on Google Cloud @ mabl
Going Microserverless on Google Cloud @ mablJoseph Lust
 
Going Microserverless on Google Cloud
Going Microserverless on Google CloudGoing Microserverless on Google Cloud
Going Microserverless on Google CloudJoseph Lust
 
Kubernetes & Google Container Engine @ mabl
Kubernetes & Google Container Engine @ mablKubernetes & Google Container Engine @ mabl
Kubernetes & Google Container Engine @ mablJoseph Lust
 
Embracing Serverless with Google
Embracing Serverless with GoogleEmbracing Serverless with Google
Embracing Serverless with GoogleJoseph Lust
 

Mais de Joseph Lust (7)

GitLab Commit 2020: Ubiquitous quality through continuous testing pipelines
GitLab Commit 2020: Ubiquitous quality through continuous testing pipelinesGitLab Commit 2020: Ubiquitous quality through continuous testing pipelines
GitLab Commit 2020: Ubiquitous quality through continuous testing pipelines
 
Making CLIs with Node.js
Making CLIs with Node.jsMaking CLIs with Node.js
Making CLIs with Node.js
 
mabl's Machine Learning Implementation on Google Cloud Platform
mabl's Machine Learning Implementation on Google Cloud Platformmabl's Machine Learning Implementation on Google Cloud Platform
mabl's Machine Learning Implementation on Google Cloud Platform
 
Going Microserverless on Google Cloud @ mabl
Going Microserverless on Google Cloud @ mablGoing Microserverless on Google Cloud @ mabl
Going Microserverless on Google Cloud @ mabl
 
Going Microserverless on Google Cloud
Going Microserverless on Google CloudGoing Microserverless on Google Cloud
Going Microserverless on Google Cloud
 
Kubernetes & Google Container Engine @ mabl
Kubernetes & Google Container Engine @ mablKubernetes & Google Container Engine @ mabl
Kubernetes & Google Container Engine @ mabl
 
Embracing Serverless with Google
Embracing Serverless with GoogleEmbracing Serverless with Google
Embracing Serverless with Google
 

Último

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 

Último (20)

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 

Serverless preview environments to the rescue

  • 1. Serverless Preview Environments to the Rescue test every commit Joseph Lust mabl engineer @lustcoder
  • 2. About Me: Joseph Lust Engineer ■ Building the web for two decades ■ Cloud native since 2011 ■ Currently building mabl testing cloud on GCP ■ Co-organizer GDG Cloud Boston Meetup @lustcoder
  • 3. Why end 2 end UI test every commit? ■ Rapid developer feedback ▲ Push and forget ■ Visually intractable PRs ▲ Review pixels, not CSS files ■ Confidence on merging to master ▲ Break feature branches, not master 3 * for React Single Space Applications (SPAs)
  • 4. Why Not? ■ Deployments are slow ■ So many domains/networks! ■ So many servers! ■ So many environments! ■ So much $$$$ 4
  • 5. Serverless to the rescue ■ Deployments are slow ■ So many domains/networks! ■ So many servers! ■ So many environments! ■ So much $$$$ 5 Wow, such serverless
  • 6. Why serverless just works ■ No Provisioning ■ Transparent Scaling ■ Pay only for Use 6
  • 7. Solving the domains/networking problem ■ You don’t need separate domain/networking per app/version ▲ Even if your SPA expects to be at the root path ■ Use a wildcard domain! ▲ Only one DNS entry ever needed! ▲ One IP address for everything! ■ Map your app and version into the domain 7 a32df28-accounting.preview.acme.com ● a23df28 ← Git Commit (version) ● Accounting ← App Name
  • 8. Solving the deployment problem ■ Forget about servers ■ Forget about containers ▲ They’re huge! ■ Drop your SPA artifacts in a bucket ▲ e.g. Google Cloud Storage ▲ or AWS S3 ▲ or Azure Storage 8
  • 9. gsutil -m cp -r -Z -a public-read . gs://my-previews/${APP_NAME}/${APP_HASH}/ “deploy” in 5 seconds cli
  • 10. Solving the server problem ■ Why do you need a server? ■ SPAs only need basic URL rewriting ■ Use a trivial nginx server to rewrite the URLs for ALL apps ■ Run your container on a serverless provider ▲ e.g. Cloud Run or Google Compute Engine ▲ Don’t need Kubernetes 10
  • 11. nginx URL rewriter Dockerfile FROM nginx COPY html /usr/share/nginx/html COPY nginx/default.conf /etc/nginx/conf.d/default.conf COPY nginx/nginx.conf /etc/nginx/nginx.conf
  • 12. nginx URL rewriter config nginx.conf server_name "~^(?<app_hash>[a-f0-9]{7})-<?<app_name([^.]+)>.preview.acme.com$" location / { rewrite ^/$ /$app_name/$app_name/$app_hash/index.html last; } location /${app_name} { proxy_pass https://storage.googleapis.com/my-previews; }
  • 13. Just add eye balls 👀 ■ GitHub webhook to trigger on each build completion ▲ Everyone can see your preview environment! ▲ You can point your tests @ the preview environment ■ Just use a serverless Cloud Function webhook to send messages 13
  • 14. Summary: from the top 1. CI/CD builds the commit 2. Push artifact to bucket 3. Use app/commit centric URL ▲ e.g. email, Slack, Pull Request comment ▲ Fire E2E UI Tests! e.g. https://741004b.preview-dev.mabl.com 14