Web App Service (Web+) enables you to build an exclusive environment based on an application configuration template. In the application configuration template, you can customize basic information used by applications, such as the resources, network environment, and program path. This topic describes how to build a deployment environment in the Web+ console based on a Jenkins template.


Activate related services and authorize roles

Step 1: Download the Jenkins deployment package

Download the Generic Java package (.war), namely, jenkins.war from the official website of Jenkins.

Step 2: Create and deploy an application

  1. Log on to the Web App Service console and select the required region in the upper-left corner of the page.
  2. In the Basic Information step, configure basic information about the application and click Next.
    Parameter Description
    Tech Stack Type The type of the technology stack. Select a technology stack based on your business needs. In this example, select Java.
    Application Name The name of the application. In this example, enter Jenkins-demo.
    Application Description The description of the application. This parameter is optional.
    Use Free Storage Space If you enable the Use Free Storage Space feature, uploaded deployment packages, collected logs, and diagnostic information in the lifecycle of the application are all stored in the free storage space. This minimizes storage costs. If you require a high level of data privacy, you can disable this feature. After this feature is disabled, all data is stored in your Object Storage Service (OSS) bucket.
  3. In the Environment Information step, configure information about the deployment environment and deployment package. After the configuration is complete, click Next.
    Parameter Description
    Tech Stack Version The version of the technology stack. Select a version from the drop-down list.
    Environment Name The name of the deployment environment. In this example, enter doc-test-env.
    Environment Description The description of the deployment environment. This parameter is optional.
    Package Source The source of the deployment package. You can select Upload Local Application or Use Sample Application. In this example, select Upload Local Application and upload the jenkins.war package downloaded in Step 1: Download the Jenkins deployment package.
    Package Version The version of the deployment package. Web+ provides a default deployment package version. You can change the default deployment package version.
    Version Description The description of the deployment package version. This parameter is optional.
  4. In the Configurations step, select Preset Configuration in the Custom field. After you complete the following configuration, click Create with Custom Configuration. In the Actions dialog box, click OK.
    1. In the architecture diagram of the Environment section, click Host Instance.
    2. On the Host Instance page, use default settings for parameters such as the selected Elastic Compute Service (ECS) instance specifications.
    3. Scroll down the Host Instance page to the Logon Credential section. Select Password and specify a password for the root user of the ECS instance.Logon Credential
      Notice Remember your password, which is required when you log on to the ECS instance to obtain the initial administrator password of Jenkins.
  5. In the Finish step, click View environment Logs.
  6. In the Change Events dialog box, wait until the changes are complete. Close the dialog box to go to the details page of the deployment environment. Then click the URL on the right side of Public Address.

Step 3: Install and configure Jenkins

After the application is created and deployed, you can connect to Jenkins to install and configure Jenkins.

  1. Wait until the following logon page appears after Jenkins is initialized.
    1. Log on to the ECS instance with the password for the root user of the ECS instance.
    2. Run the following command on the ECS instance:
      cat /home/admin/.jenkins/secrets/initialAdminPassword
    3. On the Unlock Jenkins page, enter the command output in the Administrator password field and click Continue.
  2. Select Install suggested plugins or Select plugins to install as needed. Wait until the plug-ins are installed.
    Note It may take some time to install the plug-ins.
  3. On the Create First Admin User page, enter the logon username and password and click Save and Continue.
  4. On the Instance Configuration page, confirm the Jenkins URL and click Save and Finish.
  5. On the Jenkins is almost ready! page, click Restart. Jenkins is installed and configured.