anchor.diff:  toc::[]
   
   == Overview
  -A deployment in OpenShift is an update to a single replication controller's pod
  -template based on triggered events. The `*deployment*` subsystem provides:
  -
  -- A link:#defining-a-deploymentConfig[deploymentconfig] that drives automated deployments by the system.
  -- link:#triggers[Triggers] which drive new deployments in response to events.
  -- User-customizable link:#strategies[strategies] for deployment rollout behavior, which are responsible for making a deployment live in the cluster.
  +
  +A deployment in OpenShift is a replication controller based on a user defined
  +template called a deployment configuration. Deployments are created manually
  +or in response to triggered events.
  +
  +The deployment system provides:
  +
  +- A link:#creating-a-deployment-configuration[deployment configuration], which is a template for deployments.
  +- link:#triggers[Triggers] that drive automated deployments in response to events.
  +- User-customizable link:#strategies[strategies] to transition from the previous deployment to the new deployment.
   - link:#rollbacks[Rollbacks] to a previous deployment.
  -- Replication link:#scaling[scaling].
  -- An audit history of deployed pod template configurations.
  -
  -The deployment configuration has a version parameter value that increases in increments of one each time a new deployment is created from that configuration. In addition, the cause of the last deployment is added to the configuration.
  -
  -== Defining a deploymentConfig
  -
  -A `*deploymentConfig*` describes a single link:templates.html[template] and a
  -set of link:#triggers[triggers] for when a new deployment should be created.
  -A deployment is simply a specially annotated `*replicationController*`.
  -
  -A `*deploymentConfig*` is a REST object, which can be used in a `POST` to the
  -API server to create a new instance. The following configuration results in a
  -new deployment every time a Docker image tag changes:
  +- Manual replication link:#scaling[scaling].
  +
  +The deployment configuration contains a version number that is incremented
  +each time a new deployment is created from that configuration. In addition,
  +the cause of the last deployment is added to the configuration.
  +
  +== Creating a Deployment Configuration
  +
  +A deployment configuration consists of the following key parts:
  +
  +- A replication controller template which describes the application to be deployed.
  +- The default replica count for the deployment.
  +- A deployment link:#strategies[strategy] which will be used to execute the deployment.
  +- A set of link:#triggers[triggers] which cause deployments to be created automatically.
  +
  +Deployment configurations are `*deploymentConfig*` OpenShift API resources
  +which can be managed with the `oc` command like any other resource. The
  +following is an example of a `*deploymentConfig*` resource:
   
   ====
   
  
positive.code:           "from": {
              "kind": "ImageStreamTag",
              "name": "origin-ruby-sample:latest"
            },
            "lastTriggeredImage": ""
          }
        }
      ],
      "replicas": 1,
      "selector": {
        "name": "frontend"
      },
      "template": {
        "metadata": {
          "labels": {
  
negative.code:         "containers": [
            {
              "name": "helloworld",
              "image": "openshift/origin-ruby-sample"
            }
          ]
        }
      }
      "replicas": 5,
      "selector": {
        "name": "frontend"
      },
      "strategy": {
        "type": "Rolling",
        "recreateParams": {
          "pre": {
            "failurePolicy": "Abort",
  