- Deploy the dev application
- Deploy the prd application
- Create the deployment groups for the demo applications
- Add the clusters into the deployment groups
- Install the backing services
- Create & deploy the kubernetes resources(Secret, ConfigMap, PVC) for the demo applications
- Add & configure & deploy the demo applications into the deployment groups
- Create & deploy the kubernetes resources(Ingress) for the demo applications
- Connect to the demo application
Create a deployment group and deploy it to the cluster to start and run the demo application created in the previous step. Create two deployment groups, dev and prd, and deploy the application to each deployment group in a different cluster.
Deploy the dev application
First, create a dev deployment group and deploy it to the dev cluster.
Create the deployment groups for the demo applications
This is the process of creating a deployment group.
- Click Deployment Groups on the left menu of the console.
- Click the Create Deployment Group button at the top of the screen.
- Enter cloud-movie-dev in the Name field.
- Enter cloud-movie-dev-ns in the Namespace field.
- After checking the entered information, click the Save button to create the deployment group.
Add the clusters into the deployment groups
This is the process of adding and setting up a cluster in the deployment group.Click Clusters among the tabs at the top of the screen.
- Click the Add Cluster button at the top of the screen.
- Select skcc-mp-demo-dev in the Cluster pop-up screen.
- Click the Add Cluster button at the bottom of the screen to complete the save.
4. The added cluster is displayed on the screen.
Add & configure & deploy the demo applications into the deployment groups
This is the process of adding and setting up the demo application in the deployment group. Click the Applications tab at the top of the screen. First, add an application.
- Click the Add Application button at the top of the screen to open the Applications pop-up screen.
- Select cloud-movie in the Choose Application section.
- Select Always in the Yaml Generation Policy section.
- Select develop pipeline in the Pipeline list.
- Click the Add Applications button at the bottom of the screen to complete the save.
- The develop pipeline of the cloud-movie application is displayed on the screen.
Next, set the Deployment Spec of the cloud-movie application.
- Click the Configuration button among the Actions of cloud-movie.
- The Applications Configuration pop-up screen opens and the skcc-mp-demo-dev tab is displayed.
- Enter 80 in the Port section of the Deployment Spec.
- Check the configure combo box in Resources.
- Enter 500 in the CPU Request field and select Millicore.
- Enter 1000 in the CPU Limit field and select Millicore.
- Enter 1 in the Memory Request field and select Gi.
- Enter 2 in the Memory Limit field and select Gi.
- Click the Save button to complete saving and close the pop-up screen.
Deploy the cloud-movie application to the cluster.
- Click the Deploy button in the Actions field of cloud-movie.
- Select the top item in the list of retrieved builds and click the Deploy button.
- The console deploys the application to the skcc-mp-demo-dev cluster and closes the pop-up screen.
- Click the History button in the Actions field of cloud-movie.
- Check the deployment results on the Deploy History screen.
Create & deploy the kubernetes resources(Ingress) for the demo applications
This is the process of creating and deploying an Ingress resource to connect to the demo application. Click Ingress among the tabs at the top of the screen. First, create an Ingress.
- Enter cloud-movie-dev-ingress in the Name field.
- Enter cloud-movie.dev.demo.cloudzcp.net in the Domain field.
- Enter / in the Path field and select cloud-movie.
- Enter kubernetes.io/ingress.class=public-nginx in the Annotation field.
- Click the Save button to complete the save.
Click the Deploy button at the top of the screen to deploy the created Ingress to the cluster.
Connect to the demo application
This is the process of checking whether the cloud-movie application actually starts and runs.
- Click Overview among the tabs at the top of the screen.
- Click http://cloud-movie.dev.demo.cloudzcp.net in the Application URLs on the right side of the screen.
- When the login screen opens, enter admin for Username and 1234 for Password, and click the Login button.
Deploy the prd application
Create a prd deployment group and deploy it to the cluster for prd.
Create the deployment groups for the demo applications
The process is the same as creating the Dev deployment group.
- Enter cloud-movie-prd in the Name field.
- Enter cloud-movie-prd-ns in the Namespace field.
- After confirming the entered information, click the Save button to create the deployment group.
Add the clusters into the deployment groups
The process is the same as adding a cluster to the Dev deployment group.
- Click the Add Cluster button at the top of the screen.
- Select skcc-mp-demo-prd in the Cluster pop-up screen.
- Click the Add Cluster button at the bottom of the screen to complete the save.
Install the backing services
The cloud-movie application in the Prd deployment group uses MariaDB and Redis as backing services.
Connect to the skcc-mp-demo-prd cluster with the locally installed kubectl CLI and enter the following command to install the backing service. $ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm repo add bitnami https://charts.bitnami.com/bitnami ########################### # MariaDB ########################### $ helm install bk-mariadb bitnami/mariadb --namespace=cloud-movie-prd-ns --set auth.rootPassword=Zcp_1234,auth.username=zcp-user,auth.password=Zcp_1234,auth.database=zcp-database,metrics.enabled=true ########################### # Redis ########################### $ helm install bk-redis bitnami/redis --namespace=cloud-movie-prd-ns --set metrics.enabled=true,auth.password=Zcp_1234,master.persistence.enabled=false,slave.persistence.enabled=false
Create & deploy the kubernetes resources(Secret, ConfigMap, PVC) for the demo applications
Create & deploy the kubernetes resources(Secret, ConfigMap, PVC) for the demo applications
This is the process of creating and deploying resources to be used in the demo application. Click Resources among the tabs at the top of the screen.First, create a ConfigMap.
- Click ConfigMaps in the menu on the left side of the screen.
- Enter cloud-movie-prd-cm in the Name field.
- Click the Add Text Type button in the Data field, and enter MARIADB_HOST in the Key field and bk-mariadb.cloud-movie-prd-ns in the Value field.
- Click the same button, enter MARIADB_USER in the Key field and zcp-user in the Value field.
- Click the same button, enter REDIS_HOST in Key, bk-redis-master.cloud-movie-prd-ns in Value.
- Click the same button, enter SPRING_ACTIVE_PROFILE in Key, and stage in Value.
- Click the Save button to complete saving.
Next, create a Secret.
- Click Secrets in the menu on the left side of the screen.
- Enter cloud-movie-prd-secret in the Name field.
- Click the Add Text Type button in the Data field, and enter REDIS_PASSWORD in Key, and Zcp_1234 in Value.
- Click the same button, enter MARIADB_PASSWORD in Key, and Zcp_1234 in Value.
- Click the Save button to complete saving.
Click the Deploy button at the top of the screen to deploy the created resource to the cluster.
Add & configure & deploy the demo applications into the deployment groups
This is the process of adding and configuring the demo application in the Deployment Group. Click Applications among the tabs at the top of the screen. First, add an application. This process is the same as the process of adding an application in the dev deployment group.
- Click the Add Application button at the top of the screen to open the Applications pop-up screen.
- Select cloud-movie in the Choose Application section.
- Select Always in the Yaml Generation Policy section.
- Select the production pipeline in the Pipeline list.
- Click the Add Applications button at the bottom of the screen to complete the save.
- The production pipeline of the cloud-movie application is displayed on the screen.
Next, set the Deployment Spec of the cloud-movie application. This process is the same as the process of adding the Deployment Spec of the dev deployment group.
- Click the Configuration button among the Actions of cloud-movie.
- The Applications Configuration pop-up screen opens and the skcc-mp-demo-prd tab is displayed.
- Enter 80 in the Port section of the Deployment Spec.
- Enter 2 in the Replicas section.
- Check the configure combo box in Resources.
- Enter 1000 in the CPU Request field and select Millicore.
- Enter 1500 in the CPU Limit field and select Millicore.
- Enter 1 in the Memory Request field and select Gi.
- Enter 2 in the Memory Limit field and select Gi.
- Click the Save button to complete saving and close the screen.
The following sets the Environments of the cloud-movie application.
- Click the Configuration button among the Actions of cloud-movie.
- The Applications Configuration pop-up screen opens and the skcc-mp-demo-prd tab is displayed.
- Click Environments among the Advanced… tabs at the bottom of the screen.
- Click the Add from Config Map or Secret button, enter SPRING_ACTIVE_PROFILE in Name, and select cloud-movie-prd-cm and SPRING_ACTIVE_PROFILE in Value.
- Click the same button, enter MARIADB_HOST in Name, select cloud-movie-prd-cm, MARIADB_HOST in Value.
- Click the same button, enter MARIADB_USER in Name, select cloud-movie-prd-cm, MARIADB_USER in Value.
- Click the same button, enter REDIS_HOST in Name, select cloud-movie-prd-cm, REDIS_HOST in Value.
- Click the same button, enter REDIS_PASSWORD in Name, select cloud-movie-prd-secret, REDIS_PASSWORD in Value.
- Click the same button, enter MARIADB_PASSWORD in Name, select cloud-movie-prd-secret, MARIADB_PASSWORD in Value.
- Click the Save button at the bottom to complete saving and close the screen.
Next, deploy the cloud-movie application to the cluster. This process is the same as the application deployment process of the dev deployment group.
- Click the Deploy button among the Actions items of cloud-movie.
- Select the top item from the list of retrieved builds and click the Deploy button.
- The console deploys the application to the skcc-mp-demo-prd cluster and the pop-up screen closes.
- Click the History button among the Actions items of cloud-movie.
- Check the deployment result on the Deploy History screen.
Create & deploy the kubernetes resources(Ingress) for the demo applications
The process is the same as adding an Ingress to the dev deployment group.
- Enter cloud-movie-prd-ingress in the Name field.
- Enter cloud-movie.prd.demo.cloudzcp.net in the Domain field.
- Enter / in the Path field and select cloud-movie.
- Enter kubernetes.io/ingress.class=public-nginx in the Annotation field.
- Click the Save button to complete the save.
- Click the Deploy button at the top of the screen to deploy the generated Ingress to the cluster.
Connect to the demo application
It is the same as the application execution process in the Dev deployment group.
- Click Overview among the tabs at the top of the screen.
- Click http://cloud-movie.prd.demo.cloudzcp.net in the Application URLs on the right side of the screen.
- When the login screen opens, enter admin for Username and 1234 for Password and click the Login button.
Online consultation
Contact us