Instant Deploys
Using
Pycon Pakistan 2019
Mashhood Rastgar
@mashhoodr
Hello!
I am Mashhood.
I lead the engineering team at Sastaticket.pk and am the lead conference organiser for Pycon Pakistan 2019. Also a Google Developer Expert.
2
What is serverless?
Let’s define the problem.
Managing infrastructure is hard!
Deployment is an important part of app development.
You can have a single huge deployment (and single huge failure)
Once in production, you need to scale.
Can be scaled vertically or horizontally.
Can we do better?
A developer is mainly focused on building the product. Managing devops becomes a distraction.
#pyconpk
Microservices?
Better, but not quite there.
But...
We are still dependant on managing servers
And this requires effort, resources and expertise.
Serverless of Present
What is FaaS?
Every provider supports it.
FaaS has issues
Starting from breaking your whole app down into functions, restricted environments and limits on execution environments.
#pyconpk
Google Cloud Run
Containers
Docker
What are containers?
How do I deploy them?
Goal: to isolate an application and its dependencies into a self-contained unit that can run anywhere.
Docker is the most common way of running building and running containers.
Virtual Machine
Containers
Kubernetes Overview
Helps with deploying your code
Google backed tool announced in 2014.�
It is an open-source container-orchestration system for automating application deployment, scaling, and management.
What if we did not have to manage Kubernetes?
Google Cloud Run
Cloud Run is a managed compute platform that automatically scales your stateless containers.
#pyconpk
Why Google Cloud Run?
Let’s try it out!
Next up, create an image
Setup and deploy to GCP
Can I automate this?
Github Actions to rescue!
Configuring the Action
Push to master...
Summary
Thank You!
#pyconpk
Mashhood Rastgar
GDE Web / Angular
@mashhoodr
Slides: http://bit.ly/pyconpk19-gcloud-slides
Code: http://bit.ly/pyconpk19-gcloud-demo
Colors & Fonts
Google Sans 104px
Google Sans 64px
Google Sans 40px
Google Sans 30px
Color
#4285f4
#34a853
#fbbc05
#ea4335
Typography
#202124
#FFA65C
#D65BAD
#2254AF
#2DC4C0
#F8F9FA
#D2E3FC
#CEEAD6
#FEEFC3
#FAD2CF
Template Slides Below
Headline goes here.
Subhead goes here.
This is body copy and it goes a little like this and Lorem ipsum dolor sit amet, consectetur adipiscing elit. This is body copy and it goes a little like this and Lorem ipsum dolor sit amet, consectetur adipiscing elit.
protected void onTryUpdate(int reason) throws RetryException {
// Do some awesome stuff
int foo = 15;
publishArtwork(new Artwork.Builder()
.title(photo.name)
.imageUri(Uri.parse(photo.image_url))
.viewIntent(new Intent(Intent.ACTION_VIEW,
Uri.parse(“http://500px.com/photo/" + photo.id)))
.build());
scheduleUpdate(System.currentTimeMillis() + ROTATE_TIME_MILLIS);
}
Headline goes here.
Subhead goes here.
Chart Data Source Info
End
Step
Step
Step
This is a headline
This is body copy and it goes �a little like this and Lorem ipsum �dolor sit amet, consectetur.
#GDESummit2019
This is a headline
This is body copy and it goes �a little like this and Lorem ipsum �dolor sit amet, consectetur.
#GDESummit2019
This is a headline
This is body copy and it goes �a little like this and Lorem ipsum �dolor sit amet, consectetur.
#GDESummit2019
This is a headline
This is body copy and it goes �a little like this and Lorem ipsum �dolor sit amet, consectetur.
#GDESummit2019
Half screen photo slide if �text is necessary
Thank You!
GDE Summit 2019
Speaker Name
GDE New York
@twitterhandle
Graphics & Icons
Device Library
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
Proprietary + Confidential
Proprietary + Confidential
Device Library
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
Proprietary + Confidential
Proprietary + Confidential
Device Library
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
Proprietary + Confidential
Proprietary + Confidential
Logo Library
Logos can be scaled to any size
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
Proprietary + Confidential
Proprietary + Confidential
Logo Library
Logos can be scaled to any size
Proprietary + Confidential
Proprietary + Confidential
Shape Library
Text
Text
Text
Text
Text
Text
Text
Text
Text
Text
Text
Text
Lorem Ipsum
Lorem Ipsum
Lorem Ipsum
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
Proprietary + Confidential
Proprietary + Confidential
Shape Library
Text
Text
Text
Text
Text
Text
Text
Text
Text
Text
75%
25%
Proprietary + Confidential
Proprietary + Confidential
Shape Library
30%
60%
63,096
54,537
36,910
33,492
12,038
A
B
C
D
E
24% of women
55% of men
75%
25%
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
Proprietary + Confidential
Proprietary + Confidential
Shape Library
Text
Text
Text
Proprietary + Confidential
Proprietary + Confidential
Charts & Maps
Icon Library
Modify color of the country by clicking on the icon and select fill from the menu
Proprietary + Confidential
Proprietary + Confidential
Icon Library
Modify color of the area by clicking on the icon and select fill from the menu
Lorem Ipsum
Lorem Ipsum
Lorem Ipsum
Lorem Ipsum
Proprietary + Confidential
Proprietary + Confidential
Icon Library
Modify color of the country by clicking on the icon and select fill from the menu
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
Proprietary + Confidential
Proprietary + Confidential
Icon Library
Modify color of the state by clicking on the icon and select fill from the menu
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
Proprietary + Confidential
Proprietary + Confidential
Icon Library
Accessibility
Expand
Late
Credit card
Extension
Thumb Up
Remove
Verified
Q&A
Finance
Android
Turn in
Trash
Actions
Download
History
Store
List
Wallet
Announcement
Backup
Document
Favorite 1
Open
Home
Swap
Account
Ratio
Tag
Server
Favorite 2
Grade/rate
Lock
Language
Receipt
Add shopping
Chart
Bug
Event
Find Page
Page view
Basket
Time
Work
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
Proprietary + Confidential
Proprietary + Confidential
Icon Library
Alarm
Assessment
Sync
Exit App
Movie
Visibility
Trolley
Open
Location
Settings
Assignment
Check
Explore
Thumb Down
Today
Perm Media
People
search
Airplane
Signal
Photo
Play 1
Block
Send
Smartphone
Style
Walk
Bluetooth
WiFi
Upload
Play 2
Laptop
iPhone
Controls
Bike
Pie Chart
Money
Attachment
Video
Business
Chromebook
Security
Notification
Bus
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
Proprietary + Confidential
Proprietary + Confidential
Icon Library
Developer
Write
Cloud
Audio
Key
Desktop Mac
Watch
Person
Car
Devices
Quote
Folder
Web Page
Archive
Desktop PC
Flag
World
Boat
Software
Emotion
Mic
Call
Cut
headphones
Camera
Education
Train
Weather
Link
Movie
Chart
Paste
Keyboard
TV
MMS
Subway
Hotel
Laundry
Location History
Layers
Offer
Map
Bar
Pizza
Web
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
Proprietary + Confidential
Proprietary + Confidential
Icon Library
Cafe
Theatre
Gaming
Florist
Restaurant
Gas
Delivery
Hospital
Taxi
Radio
Stream
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
Proprietary + Confidential
Proprietary + Confidential