1

The project is going with a new technology stack and I need to do a new CI / CD implementation. I started to play with Kubernetes and how to do blue / green deployment via command line. I managed to do switch manually via command line changing label selector in the service to filter green or blue pods. Now, what exactly I am looking for is kind of UI page where QA guys could do a switch between blue and green instances once they finished to test the application on staging server.

So:

  1. Web site is deployed to staging environment (i.e. green);
  2. QA test it and confirm that everything is fine;
  3. QA navigate to some UI to make green instance live and blue to staging;

Are there any tools on the market for this?

Thank you.

1

Jenkins allows you to construct a CI/CD pipeline that meets your requirements. Here's an example of a pipeline using an input step to decide which environment to deploy to. All you would need to do is wire the stages together.

blueocean

Here's an example of the pipeline code (declarative) used to create the example:

pipeline {
  agent any
  stages {
    stage('Deploy Staging') {
      steps {
        echo 'deploying to staging'
      }
    }
    stage('Test Staging') {
      steps {
        echo 'testing staging env'
      }
    }
    stage('Blue/Green?') {
      steps {
        input(message: 'Blue/Green?', id: 'deploy', ok: 'deploy?', parameters: [choice(choices: 'blue\ngreen', description: 'Select an environment', name: 'PROD_ENV')])
      }
    }
  }
}

Other tools that provide similar capabilities are Rundeck, Stackstorm or Ansible Tower.

1

After a while, I decided to proceed with TeamCity+Octopus as I did for the previous .NET stack. QA / Dev teams got accustomed to the way they are doing deployments. Even though Octopus doesn't have a first-class Kubernetes support, I implemented my own way to do releases to Kubernetes clusters via custom linux target with Calamari. Blue / Green deployments were implemented using manual intervention step in Octopus.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.