CLOUD DEPLOYMENT
​ Miodrag Lazarevic
Blue/Green deployment 3
Immutable infrastructure 4
Spinnaker Overview 5
Architecture 6
Main components 7
Pipelines 8
Blue/green (immutable) deployment with Spinnaker 9
Disadvantages 10
Immutable vs Mutable Infrastructure (Final words) 11
Useful Links 12
Blue/Green deployment
● All network traffic goes to one (active) group of servers
● New version of code is deployed to inactive group of servers
● Redirect all traffic to new environment
Advantages:
● Easy rollback
● Testing in production
Disadvantages:
● Double price
Immutable infrastructure
● “You want to deploy new version of code?
Build new machine image! “
● Instead of updating, replace completly your
infrastructure with new set of machines
● Scaling automation
● Safer and repeatable deployments
Spinnaker Overview
● open source
● multi-region and multi-cloud continuous delivery
platform
● developed by Netflix
● Microservice architecture
Core features:
● Application deployment
● Application management (resize, disable clusters..)
Architecture
● Composed of 11 independent microservices
● Halyard - Manages all other microservices
● Igor - provides integrations with CI servers(Jenkins,
Travis CI ...)
● Rosco - ​ produces immutable VM images (uses
HashiCorp Packer) 
Main components
Application​:
● Load balancer
● Firewall
● Server group
Every application can conist of multiple Load balancers/server
groups/firewalls.
All resources can be grouped into stack (e.g qa LB/ qa firewall/ qa
server group)
Pipelines
● Sequence of stages provided by Spinnaker
● Can be started both manually and automatically (e.g. after jenkins job
is finished)
● Most common stages:
○ Jenkins (executes jenkins job)
○ Bake (build virtual machine or Docker image)
○ Manual judgement(further pipeline execution depends on user
input)
○ Deploy(you can choose deployment strategy here)
Blue/green (immutable) deployment with Spinnaker
Steps (After baking phase):
● Destroy old (inactive server group)
● Spin up new server group with new version of code
● Enable (new server group)
● Disable current server group(group that serves traffic)
Disadvantages
● Price( Requires minimum 4CPU/8GB ram)
● Usually deployed with Kubernetes, which requires at
least one more instance to create
● Unstable ???
● Hard to setup
● Restricted to Ubuntu 14/16 OS (if we choose non
Docker setup)
Immutable vs Mutable Infrastructure (Final
words)
● Mutable infrastructure is good for configuration/deployment
to small clusters(application with small number of users)
● Mutable infrastructure is bad for deployment to large
clusters(it’ s hard to keep all instances consisted)
● Immutable infrastructure is bad for small clusters
( deployment/plaform maintaining should not cost more than
production environment !!! )
● Immutable infrastructure is great for scalability and large
enterprises (Every machine in the cluster is literally same)
● Great for safe and repatable deployments (Netflix performs
4000 deployments per day)
Useful Links
● Deploying Spinnaker on AWS:
https://s3.amazonaws.com/aws-quickstart/quickstart-spinnaker/doc/spinnaker-on-the-aw
s-cloud.pdf
● Complete guide for installing Spinnaker
https://www.spinnaker.io/setup/install/
● Spinnaker codelabs/tutorials
https://www.spinnaker.io/guides/

Cloud Deployment with Spinnaker

  • 1.
  • 2.
    Blue/Green deployment 3 Immutableinfrastructure 4 Spinnaker Overview 5 Architecture 6 Main components 7 Pipelines 8 Blue/green (immutable) deployment with Spinnaker 9 Disadvantages 10 Immutable vs Mutable Infrastructure (Final words) 11 Useful Links 12
  • 3.
    Blue/Green deployment ● Allnetwork traffic goes to one (active) group of servers ● New version of code is deployed to inactive group of servers ● Redirect all traffic to new environment Advantages: ● Easy rollback ● Testing in production Disadvantages: ● Double price
  • 4.
    Immutable infrastructure ● “Youwant to deploy new version of code? Build new machine image! “ ● Instead of updating, replace completly your infrastructure with new set of machines ● Scaling automation ● Safer and repeatable deployments
  • 5.
    Spinnaker Overview ● opensource ● multi-region and multi-cloud continuous delivery platform ● developed by Netflix ● Microservice architecture Core features: ● Application deployment ● Application management (resize, disable clusters..)
  • 6.
    Architecture ● Composed of11 independent microservices ● Halyard - Manages all other microservices ● Igor - provides integrations with CI servers(Jenkins, Travis CI ...) ● Rosco - ​ produces immutable VM images (uses HashiCorp Packer) 
  • 7.
    Main components Application​: ● Loadbalancer ● Firewall ● Server group Every application can conist of multiple Load balancers/server groups/firewalls. All resources can be grouped into stack (e.g qa LB/ qa firewall/ qa server group)
  • 8.
    Pipelines ● Sequence ofstages provided by Spinnaker ● Can be started both manually and automatically (e.g. after jenkins job is finished) ● Most common stages: ○ Jenkins (executes jenkins job) ○ Bake (build virtual machine or Docker image) ○ Manual judgement(further pipeline execution depends on user input) ○ Deploy(you can choose deployment strategy here)
  • 9.
    Blue/green (immutable) deploymentwith Spinnaker Steps (After baking phase): ● Destroy old (inactive server group) ● Spin up new server group with new version of code ● Enable (new server group) ● Disable current server group(group that serves traffic)
  • 10.
    Disadvantages ● Price( Requiresminimum 4CPU/8GB ram) ● Usually deployed with Kubernetes, which requires at least one more instance to create ● Unstable ??? ● Hard to setup ● Restricted to Ubuntu 14/16 OS (if we choose non Docker setup)
  • 11.
    Immutable vs MutableInfrastructure (Final words) ● Mutable infrastructure is good for configuration/deployment to small clusters(application with small number of users) ● Mutable infrastructure is bad for deployment to large clusters(it’ s hard to keep all instances consisted) ● Immutable infrastructure is bad for small clusters ( deployment/plaform maintaining should not cost more than production environment !!! ) ● Immutable infrastructure is great for scalability and large enterprises (Every machine in the cluster is literally same) ● Great for safe and repatable deployments (Netflix performs 4000 deployments per day)
  • 12.
    Useful Links ● DeployingSpinnaker on AWS: https://s3.amazonaws.com/aws-quickstart/quickstart-spinnaker/doc/spinnaker-on-the-aw s-cloud.pdf ● Complete guide for installing Spinnaker https://www.spinnaker.io/setup/install/ ● Spinnaker codelabs/tutorials https://www.spinnaker.io/guides/