Answers: <p>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.</p>
  
  <p><a href="https://i.sstatic.net/cHE9M.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/cHE9M.png" alt="blueocean"></a></p>
  
  <p>Here's an example of the pipeline code (declarative) used to create the example:</p>
  
  <pre class="lang-java prettyprint-override"><code>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')])
        }
      }
    }
  }
  </code></pre>
  
  <p>Other tools that provide similar capabilities are Rundeck, Stackstorm or Ansible Tower.</p>
  
Answers: CC BY-SA 3.0
Answers: 2018-02-26T08:52:52.693Z
Answers: 2018-02-26T08:52:52.693Z
Answers: casey vega
Answers: <p>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.</p>
  
Answers: CC BY-SA 3.0
Answers: 2018-04-17T04:27:40.347Z
Answers: 2018-04-17T04:27:40.347Z
Answers: Stanislav Hordiyenko
Body: <p>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.</p>
  
  <p>So:</p>
  
  <ol>
  <li>Web site is deployed to staging environment (i.e. green);</li>
  <li>QA test it and confirm that everything is fine;</li>
  <li>QA navigate to some UI to make green instance live and blue to staging;</li>
  </ol>
  
  <p>Are there any tools on the market for this?</p>
  
  <p>Thank you.</p>
  
Tags: <kubernetes>
Title: Switching between blue / green services in Kubernetes using UI page
UserDisplayName: Stanislav Hordiyenko
ThreadText: # Switching between blue / green services in Kubernetes using UI page
  
  (Asked by: username_0 on 2018-02-26)
  
  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.
  
  **Tags:** kubernetes
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-02-26. Score: 1 | Accepted answer
  
  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](https://i.sstatic.net/cHE9M.png)](https://i.sstatic.net/cHE9M.png)
  
  Here's an example of the pipeline code (declarative) used to create the example:
  
  ```java
  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.
  
  
  ---
  
  ### Answer by username_0 on 2018-04-17. Score: 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.
  
  
  ---
  
  