Google Cloud Platform for DeVops, by Javier Ramirez @ teowaki

download Google Cloud Platform for DeVops, by Javier Ramirez @ teowaki

If you can't read please download the document

Transcript of Google Cloud Platform for DeVops, by Javier Ramirez @ teowaki

Boom - Cartoon pop art template

Google Cloud Platform for DevOps professionals

javier ramirez - @supercoco9

https://teowaki.com

devops in practice

Google Cloud Platform for DevOps professionals

javier ramirez - @supercoco9

https://teowaki.com

how we developed and deployed software in the 90s

Adding a new server:

* call (using a landline) or send a fax to the provider* pay via bank transfer* wait for a few days/weeks* set up the server on your own server room* hope it won't break

deploying software:

* code locally on your OS* submit to CVS and manually build* send package and SQL separately to IT* wait until the time slot they give you (next week, probably)* test (by hand) everything is working* hope it won't break

systems & development

A platform with interesting tools to dev like an op

Devops work areas

Provisioning infrastructure

Deploying with confidence

Monitoring and alerting

Security and disaster prevention

Self-healing

Performance

Provisioning infrastructure: AppEngine

Zero ops applications. Just deploy and forget*

Of course you still need to worry about monitoring, backups, security.. but infrastructure and scaling are automatic

*you need to adjust to the sandbox

Provisioning infrastructure: Compute Engine

Virtual Machines. Total freedom to do asyou wish.

Powerful networking. Networks, subnetworks, VPNs, forwarding rules,routes...

Provisioning infrastructure: Compute Engine

gcloud compute --project "javier-cp300" instances create "instance-1" --zone "europe-west1-c" --machine-type "n1-standard-1" --network "default" --maintenance-policy "MIGRATE" --scopes default="https://www.googleapis.com/auth/devstorage.read_only","https://www.googleapis.com/auth/logging.write","https://www.googleapis.com/auth/monitoring.write","https://www.googleapis.com/auth/cloud.useraccounts.readonly" --image "/javier-cp300/test-osv" --boot-disk-size "10" --boot-disk-type "pd-ssd" --boot-disk-device-name "instance-1"

** machine types are flexible: choose the CPUs or RAM you really need

POST https://www.googleapis.com/compute/v1/projects/javier-cp300/zones/europe-west1-c/instances{ "name": "instance-1", "zone": "projects/javier-cp300/zones/europe-west1-c", "machineType": "projects/javier-cp300/zones/europe-west1-c/machineTypes/n1-standard-1", "metadata": { "items": [] }, "tags": { "items": [] }, "disks": [ { "type": "PERSISTENT", "boot": true, "mode": "READ_WRITE", "autoDelete": true, "deviceName": "instance-1", "initializeParams": { "sourceImage": "projects/javier-cp300/global/images/test-osv", "diskType": "projects/javier-cp300/zones/europe-west1-c/diskTypes/pd-ssd", "diskSizeGb": "10" } } ], "canIpForward": false, "networkInterfaces": [ { "network": "projects/javier-cp300/global/networks/default", "accessConfigs": [ { "name": "External NAT", "type": "ONE_TO_ONE_NAT" } ] } ], "description": "", "scheduling": { "preemptible": false, "onHostMaintenance": "MIGRATE", "automaticRestart": true }, "serviceAccounts": [ { "email": "default", "scopes": [ "https://www.googleapis.com/auth/devstorage.read_only", "https://www.googleapis.com/auth/logging.write", "https://www.googleapis.com/auth/monitoring.write", "https://www.googleapis.com/auth/cloud.useraccounts.readonly" ] } ]}

Working with images

Working with images

backups: Snapshots

backups: Snapshots

gcloud compute --project "javier-cp300" disks snapshot "jenkins-master" --zone "europe-west1-c" --snapshot-names "snapshot-20160519"

Google Cloud Storage

Static files with free CDN for public contents

Very cheap (up to $0.01 per GB/month)

Convenient command line for copying, managing or rsync

Google Cloud Storage

Self-healing

Managed instance groups with health-checks make sure there are always as many healthy instances asyou configure

Self-healing

Self-healing

Auto scaling

Add auto-scaling capabilities dependingon

* CPU usage* Requests* Your own custom metrics

When self-healing and auto-scaling arenot enough

you know some of the names on relational, traditional, non distributed databases

mysqlmariadboraclepostgresqlsql serveribm db2sqliteSAP HANA

in 2011

A squirrel did take out half of our Santa Clara data centre two years backMike Christian, Yahoo Director of Engineering

A squirrel did take out half of our Santa Clara data centre two years backMike Christian, Yahoo Director of Engineering

2012, at a conference

that's the reason why google wraps submarine fibre cables in kevlar, so shark bites won't damage them

Hayastan Shakarian

a.k.a.The SpadeHacker

Cut-offArmeniafrom the Internetfor almostone day*

* By accident, while scavenging copper

Some data center outages reported in 2015:

* Amazon Web Services* Apple iCloud* Microsoft Azure* IBM Softlayer* Google Cloud Platform

* And of course every hosting with scheduled maintenance operations (rackspace, digitalocean, ovh...)

rackspace was taken down when a truck driver had an accident during a delivery to the data centre

Complex systems can and will fail

hurricanes, truck drivers, sharks eating transoceanic cable, and of course electronic and mechanical failures, human errors, and malicious attacks

With http/https global load balancing

Containers. Container Registry

Container Engine. Managed kubernetes clusters

Container Engine. Managed load balanced kubernetes clusters

Container Engine. Managed load balanced, self healing, auto scaling kubernetes clusters

Container Engine. Managed kubernetes clusters

Automate all the things. Cloud Deployment Manager

Automate all the things. Cloud Deployment Manager

Monitoring

Alerts

Performance analysis

Performance analysis

Storage and big data services

* Cloud SQL: Managed MySQL* Cloud Data Store: NoSQL* BigQuery: BigData analytics* Dataflow: Streaming BigData* Dataproc: Managed Hadoop and Spark* Pub/Sub: High performance message queue

Let's add CDN and DNS

So you can manage all your services from a single point

Why not the cloud

It's too slow

I am limited in what I can do

I will get vendor lock-in

I cannot legally host my data in the cloud

Google will spy on my data

Parameters W and R can also be configured to LOCAL_QUORUM, so they need agreement only from local nodes and not across datacenters

by combining global quorum for reads and local quorum for reads, netflix gets 500 ms from the time it writes on one region until it can be read from another, while keeping very fast reads

Google will spy on my data

* GCP is not Gmail. SLA

* Encryption at rest and in transit

* Bring your own keys

* ISO standards

Cannot host my data on the cloud

public/private hybrid clouds

Cloud carrier interconnect, direct peering and CDN interconnect

you know some of the names on relational, traditional, non distributed databases

mysqlmariadboraclepostgresqlsql serveribm db2sqliteSAP HANA

it's too slow

but it's massively parallel

of course this doesn't give you high availability, but at least prevent from data lost to an extent (depending on your backup practices)

Vendor Lock-in:

Kubernetes

Vendor Lock-in:

terraform forinfrastructureas code

Vendor Lock-inspinnaker for multi-cloud immutable infrastructure anddeployments

Limited in what I can do

Limited in what I can do ?

Limited in what I can do

Serial port output

Serial port output

A platform with interesting tools to dev like an op

javier ramirez - @supercoco9

https://teowaki.com

Ai - Thank you

26/05/16

AUTORE