Configuring Deployments


This section shows how the application developer can configure the deployment information for applications to be published.

Prerequisite

Before creating a new deployment, you need to complete the application creation and the basic application configuration. For the detailed steps, see Creating an Application.

Creating Deployment

The deployment information of the application can be configured using two modes: Config and Yaml. Using the Config mode as an example, create a new deployment for the application with the following steps.

  1. In the project list, click on the project name to enter the project space.

  2. Select Container > Deployments.

  3. Click the New Deployment button and provide details for the following.

    • Application Name: Select the application to be deployed.

    • Environment: Select the application deployment, for which dev, alpha, beta, ppe, and prod environments are supported currently.

    • Cluster: Select the cluster where the application is deployed. Note that the cluster is already pre-configured by the system.

    • Replicas: Enter the number of replicas required.


  4. Configure the Resource Quota required to run the application, which includes the CPU and memory quota.

    ../../../_images/deployment_config.png


  5. (Optional) Set the Environment Variable and value for running the application.

  6. (Optional) Set the Node Selector label and value for the pods to run on. If not specified, the pods will run on the nodes in the cluster randomly.

  7. (Optional) Select the Config Map that needs to be injected into the container and enter the mount path. For details on configuring the Config Map, see Configuring Config Maps.

  8. (Optional) Select the Secrets that needs to be injected into the container and its mount path. For details on configuring the Secrets, see Configuring Config Maps.

  9. (Optional) Select the Storage for the application and enter the mount path. For details on configuring the storage, see Configuring Storage.

  10. (Recommended) Configure the Readiness Probe for the container to check if the container is ready. The configuration information of the readiness probe includes the detection task timeout time (in seconds), the detection period (in seconds), the number of retry times, the detection initial delay (in seconds), and the handler and parameters of the probe. For details about container probes, see Container probes.

    ../../../_images/probe.png


  11. (Optional) Configure the Liveness Probe for the container. The configuration information is similar to the Readiness Probe.

  12. Set the Minimum Ready Seconds of the container (in seconds).

  13. Enter the description for the deployment.

  14. Click the OK button to complete the configuration.

Managing Deployment

After the application deployment configuration is created, you can clone, publish, rollback, scale, edit, or delete the deployment.

../../../_images/edit_deployment.gif


  • Edit by Yaml:Click … > Edit by Yaml,Or Click the application name in the list, go to the application details page, switch to the Yaml tab, and edit the Yaml configuration information.

  • Rolling Update: Click Rolling Update to go to the Rolling Update publish form. Follow the steps in Publishing an Application by Rolling Update to publish the application.

  • Blue/Green Deployment: Click Blue/Green Deployment to go to the Blue/Green Deployment publish form. Follow the steps in Publishing an Application by Blue/Green Deployment to publish the application.

  • Clone: Click Clone to reuse the deployment configuration information and quickly create a new deployment.

  • History Records: Click History Records to view all the history operations of the deployment. Click the View icon view to view the history configuration of the deployment, or click Rollback to roll the current deployment back to the selected configuration.

    ../../../_images/rollback_deployment.png


  • View: Click View to view the configuration details of the deployment.

  • Autoscaler: Click Autoscaler to change the configuration of replicas, average CPU utilization, and average memory.

  • Edit: Click the Edit icon edit to update the deployment configuration information.

  • Delete: Click the Delete icon delete to delete the deployment configuration information.