Deploy Lab
This lab provides a practical, hands-on experience in deploying an application to a target server.
Explore the comprehensive dashboard provided by DevOps Deploy, which displays key information about deployment successes and failures
Note:
- Agent-Based Installation Support: DevOps Deploy works on agent-based deployments, allowing you to deploy applications across various environments—including On-Premises, IBM Cloud, Microsoft Azure, AWS, Google Cloud Platform (GCP), Mainframes, and more.
- Demo Environment: In this demonstration, the deployment agent is running on IBM Cloud. Therefore, the application will be deployed to an IBM Cloud environment.
Configuration
DevOps Deploy is a rich tool and provides excellent mechanisms to control the deployment of application. A simple architecture is Application > Environment(DEV, QA, PROD, etc.) > Components
Important Note: This is a shared lab environment. To ensure a smooth experience for everyone, please only modify the applications, components, or processes that you create during your lab session. Kindly avoid making changes to any existing applications or configurations visible in DevOps Deploy, as they may be in use by others
In order to deploy application, please download the Application file directly (if you are using the repo localy) or from GitHub Link (if you are using the web) open it on your preferred editor, and update the following in the file.
- Search for
"name": "PizzaApp-01"
and replace it with your student code (xx appended to your email id. eg.,"name": "PizzaApp-02"
) - Search all the occurances for
PizzaApp-Container-01
and replace it with your student code (xx appended to your email id. eg.,PizzaApp-Container-02
) - Search for
"commandOptions": "-d -p 3001:8000"
and replace the3002
with your student code (30xx appended with to email id. eg.,"commandOptions": "-d -p 3002:8000"
) . Troubleshooting: If you see any issue, try to update the port like 3016,3017, etc... - Save the file.
Upload this to DevOps Deploy
Go to DevOps Deploy > Applications > Import Application > (Scroll down) Choose File > Select your updated file > Submit
Once you import the application, you would be able to see additional application listes like:
Now, Click on your application(PizzaApp-XX) > Switch Tab to Components > Click on PizzaApp-Container-XX > Switch tab to Process > Click on "Deploy PizzaApp"
It will show you the process designer:
Now click on edit button available on the individual process:
Now click edit on Stop Docker Container
and change the Docker Container edit field from pizzaapp
to : pizzaapp-01 (note: 01 should be replaced with you student id) and save it.
Now Edit Remove Docker Container
: pizzaapp-01 (note: 01 should be replaced with you student id) and save it.
Now edit Run Pizza App Container
:
- Update container name to
pizzaapp-01
(note: 01 should be replaced with you student id) and save it.
Now Click on save button on the screen.
Build image and publish to Deploy
- Open http://165.192.86.196:8080/
- Click on New Item and fill
Enter an item name
with : App-01 (01 should be replaced with your student ID as mentioned in your email) - Choose
pipeline
, press Ok - Copy the content available on: https://github.com/DevOpsAutomationLabs/End2End/blob/main/files/Jenkins
-
Paste it to any editor and update the text as below:
- Search for
COMPONENT = "PizzaApp-Container-XX"
and Update XX with your student id. Eg.COMPONENT = "PizzaApp-Container-02"
- Search for all the occurances of
XX
and replace it with your student id. Eg.02
- Search for
<YOUR DEVOPS CONTROL EMAIL>"
and replace it with your email id shown in DevOps Control. Eg.student02-labs.com
- Search for
-
Now, switch back to Jenkins, and scroll down and find the pipeline script textbox.
- Copy the upadted content and Paste the copied text in
pipeline script
- Click Save
-
Jenkins Credential Setup (Optional): This has been already configured. So skip it. If you face issue while running jenkins build, then follow the below steps} Go to Jenkins Dashboard → Manage Jenkins → Credentials. Choose the right scope (e.g., "Global"). Click Add Credentials. Use these settings:
- Kind: Username with password
- Username: your Devops Control email id (Eg. student01-ibm.com)
- Password: the GitHub token (paste it here) (Note: You can get this by opening
DevOps Control
> Click onProfile
>Settings
> On left panel selectAccess token
> Give token name : “labs” > Select all permissions (Read and Write) >Generate Token
> Copy and paste in the password field in jenkins credentials) - ID: github-token-creds-xx (Note: xx is your student id ans should match with pipeline script)
-
Click
Build Now
on Jenkins and wait until the image link is pushed to DevOps Deploy Troubleshooting
: If your jenkins build fails, check if your control has the repository cloned or not. It is important to clone before you start build.
Update the resource Tree
Do not forget to do this important step once you can successfully run the Jenkins command:
- Navigate to DevOps Deploy > Find Resources on the left Pane and click on that >
Resource Tree
> Click onMain
> locate row showingonline
> Click on 3 dots >Add Component
(your component name. Eg.PizzaApp-Container-02
) - Back to Deploy Dashboard.
Final steps for Deployment
- Click on Application on the left panel
- Click on your application. Eg.
PizzApp-02
- Switch Tab to Processes > Click on
Deploy App
- Click on Edit symbol on
install Component Install: "PizzaApp-Container-01"
- Under Component section, click the dopdown and Select your component. Eg.
PizzaApp-Container-02
- Click Ok and then Click Save.
- Click on Application on the left panel again.
- Click on your application. Eg.
PizzApp-02
- Locate DEV > Request Process > Click
"Request Process"
-
Click
"Choose Component Version"
-
A right panel will open, click on
Add
, the drop-down"By Version Lookup"
Select the first available - Click on Submit
- Expand the process and check the deployment process. Note: You might see failure in
Stop Docker Container
andRemove Docker Container
those are fine as you are running this process for the first time and you don't have after we have the running container. - Check your running application at: http://165.192.86.196:30XX (Note: XX should be relaced with your student id)