Lab C - Deploy Frontend
Goals
We’ll add a new stage for deployment including easy-to-use deployment strategies, see how variables facilitate reusability, and effortlessly create and deploy kubernetes workloads.
Lab Guide
-
If you see the edit pipeline button top right, click to return to the Pipeline Studio.
Add the new deployment stage
-
In pipeline studio: 1 click Add Stage, 2 Deploy as the Stage Type
-
In the stage pane: 1 enter name
frontend
, 2 click Kubernetes for Deployment Type, 3 click Set Up Stage -
In the service pane: 1 click +Add Service
-
In the new service pane: 1 name the manifest
frontend
, 2 click Add Manifest -
Click k8s manifest then click Continue.
-
Click Code then click Continue.
Add manifest
-
In the details page:
1 give the manifests the nametemplates
2 pickharnessrepo
from the repository dropdown
3 usemain
for the branch
4 In the File/Folder Path paste the value:5 Under Values.yaml, Click +Add File
6 In the Values.yaml field, paste the value:7 Click Submit
Add the artifact
-
Back in the service setup page: 1 Click Add Artifact Source
-
In the Artifact Repository Type: click Docker Registry, then Continue
-
In Connector selection page: pick
DockerHub
from the list, then Apply Selected, then Continue -
In the artifact details pane:
1 name the artifactfrontend
2 in the Image Path field, paste the value:3 Click the field type box and change it to Expression
4 In the tag field, paste the value: -
On the New Service page: Click Save
Leverage platform team provided Environment and Infrastructure
-
back in Pipeline Studio: 1 click Environment, 2 select prod from environment list, 3 k8s from the Infrastructure list, 4 click Continue
-
In the Execution Strategies popup: Click Rolling in the top left, then Use Strategy in the bottom right.
Run updated pipeline
-
Back in Pipeline Studio (top right): 1 Click **Save*, 2 Click **Run**