1

I just started trying out Spinnaker. I have gone through the tutorial, https://www.spinnaker.io/guides/tutorials/codelabs/gcp-kubernetes-source-to-prod/, and got it working without issues.

Now I want to go a bit more advanced and do a rolling release or a canary deployment (https://www.spinnaker.io/concepts/#deployment-strategies), where it is possible, for instance, to only expose a new release to 5% of the customers.

I cannot find any guide on spinnaker.io (or google) on how to set that up. Can anyone guide me in the right direction?

Johan Frick
  • 1,084
  • 1
  • 10
  • 18

1 Answers1

2

I have currently been experimenting and doing PoC's on Spinnaker and Canary Deployments myself of late, and here is what I have found thus far.

To implement a rolling release, just create a Deploy stage in Spinnaker, and set the Deployment Strategy to RollingUpdate in your Server Group config. You will need to make sure that the Deployment checkbox is checked before you can change the Deployment Strategy.

For the Canary Deployment, it is a little more involved. I don't think that the Canary Stage currently supports Kubernetes Deployments(yet), but apparently you can manually deploy a canary(e.g. 1 replica) into the same Kubernetes LoadBalancer where your app is running. This is done using a separate Spinnaker Server Group.

Then you can add a Manual Judgement to your Spinnaker pipeline that will pause until you test/validate the canary. Once the canary has been validated, you "Continue" the Manual Judgement, and the new Server Group gets deployed, and the old Server Group gets disabled, and the canary destroyed.

If you don't want to use a Manual Judgement, and want this fully automated, you can add an ACA Stage(Automated Canary Analysis). This involves setting up a judge, that Spinnaker can connect to, that will gather various metrics and provide an ACA score. You can then use that score to decide whether to proceed with a deployment, or stop the deployment.

grizzthedj
  • 7,131
  • 16
  • 42
  • 62
  • Not sure how that helps me send five percent of the traffic to a new release – Johan Frick Feb 14 '18 at 06:40
  • 1
    If you have 20 replicas of your application running, and you deploy a single replica(I.e the canary) into the same LoadBalancer, then about 5% of traffic that will hit the canary. – grizzthedj Feb 14 '18 at 12:00
  • Wow, that is a lot of replicas! I have started to look at Istio now, and it seems it can give me what I want. I only need one replica of each and still control the traffic down to 5%. – Johan Frick Feb 18 '18 at 14:08
  • Your question was related to Rolling Updates / Canary deploys in Spinnaker(which is why I provided this answer), however I agree. I think Istio is definitely the way to go for canary type deployments etc. – grizzthedj Feb 18 '18 at 14:16
  • Ok, thanks. I have marked your answer as the best one. Even though it means I will not use Spinnaker probably. – Johan Frick Feb 19 '18 at 15:07