You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: instruqt-tracks/cicd-with-ansible-automation-platform-and-jenkins-on-openshift/01-aap-installation-login/assignment.md
Next, to configure Ansible Automation Platform, create an instance of **Automation Controller** from the installed operator.
135
135
136
-
Go to installed operators; you will find Ansible Automation Platform there. Click on it. A couple of options will appear; select **Automation Controller**, click on it, and create an Automation Controller. Give a name to the automation controller. Change "example" to **cd-ansible**.
136
+
Go to installed operators; you will find Ansible Automation Platform there. Click on it. A couple of options will appear; select **Automation Controller**, click on it, and create an Automation Controller. Give a name to the automation controller. Change "example" to **ansible**.
Before you proceed with the next challenge, please take a moment to register for Red Hat Developer. If you already have a Red Hat account, you can use the same login credentials.
15
+
16
+
This will help us assess user satisfaction and enable us to provide more curated content.
17
+
18
+
Click on the `Check` button at the bottom once you have registered or logged in.
echo'{"location":{"conditions":[{"url":"redhat.com","condition":"contains"}]},"innerText":[{"selector":"html \u003e body","value":"Please click on Check button in the bottom right of your screen to continue with the Lab."}]}'> /home/user/checkAssets.json
15
+
until [ -f /home/user/checkResult.json ];do
16
+
sleep 1
17
+
done
18
+
if grep "SUCCESS" /home/user/checkResult.json;then
Copy file name to clipboardexpand all lines: instruqt-tracks/cicd-with-ansible-automation-platform-and-jenkins-on-openshift/03-aap-configure/assignment.md
After a successful installation and login to the Ansible Automation platform, we need to configure it according to our requirements. These requirements could be anything, such as multi-cloud deployment, multi-cluster deployment, or using it for continuous delivery.
12
+
13
+
In this scenario, we will consider the Ansible Automation platform for continuous deployment/delivery.
@@ -100,19 +111,19 @@ You need to extract the token and certificates using the following commands.
100
111
101
112
The token is collected in `containergroup-sa.token` file. You have to copy the context and paste it into AAP credentials page in `API authentication bearer token` block.
cd home && oc get secret cicd -o json | jq '.data.token' | xargs | base64 --decode > containergroup-sa.token
108
117
```
109
118
The certificate is collected in the `containergroup-ca.crt` file. You have to copy the context and paste it in the AAP credentials page in the `Certificate Authority data` block.
@@ -151,6 +162,9 @@ After adding, you can check connectivity with OpenShift cluster by clicking on
151
162
**Project**:
152
163
153
164
The project is an SCM of the project where all playbooks and manifests are available. With the help of the project, we need to fetch it. From the left menu, select a project and click on Add, then give a name to the project.
165
+
> [!IMPORTANT]
166
+
>Kindly fork the following repository into your GitHub account and provide the URL, as shown below, of your GitHub repository.
167
+
154
168
The Source Control Type is Git. In the Source Control URL, fill in the GitHub URL:
Copy file name to clipboardexpand all lines: instruqt-tracks/cicd-with-ansible-automation-platform-and-jenkins-on-openshift/04-jenkins-install/assignment.md
+25-12
Original file line number
Diff line number
Diff line change
@@ -3,18 +3,21 @@ slug: jenkins-install
3
3
id: nztpivixukj5
4
4
type: challenge
5
5
title: Step 3 - Jenkins Installation
6
+
notes:
7
+
- type: text
8
+
contents: |-
9
+
# Jenkins Setup
10
+
In this challenge, we'll delve into the process of setting up the Jenkins pod from the developers catalog.
@@ -49,7 +52,13 @@ To enable continuous build and push, we need to create a build config here using
49
52
```
50
53
oc project dev-game-app
51
54
```
52
-
Before executing the following command, make sure you replace the image name with your container registry.
55
+
> [!IMPORTANT]
56
+
> If you already have an account of container registry such as Quay.io or Dockerhub, use the credentials in the following steps.
57
+
> If you don't have one, kindly visit [quay.io](https://quay.io/) and create an account.
58
+
59
+
Before executing the following command, ensure that you replace the image with your container registry.
60
+
61
+
Example : `name: quay.io/nagesh-redhat/cd:latest`
53
62
```
54
63
cat <<EOF | oc create -f -
55
64
apiVersion: build.openshift.io/v1
@@ -74,7 +83,7 @@ spec:
74
83
dockerfilePath: Dockerfile
75
84
EOF
76
85
```
77
-
Now, create a secret for image building. This secret will help the image to push to the Quay container registry. If you don't have a Quay.io container registry account, check [**here**](https://docs.quay.io/guides/create-repo.html#:~:text=via%20the%20UI-,To%20create%20a%20repository%20in%20the%20Quay.io%20UI%2C%20click,the%20'Create%20Repository'%20button.). Replace the credentials with your container registry account in the following command:
86
+
Now, create a secret for image building. This secret will help the image to push to the Quay container registry. Replace the credentials with your container registry account in the following command:
When the developer commits the code in a repo, we need something in place that can detect the changes and start the pipeline. For that, we have to enable the triggers and polling for every minute.
Copy file name to clipboardexpand all lines: instruqt-tracks/cicd-with-ansible-automation-platform-and-jenkins-on-openshift/05-integration-of-ansible-automation-platform-and-jenkins/assignment.md
# Integration of Ansible Automation Platform & Jenkins
10
+
11
+
We have completed the setup of the Ansible Automation platform and Jenkins continuous integration.
12
+
13
+
To connect the Ansible Automation platform and Jenkins, log in to the Jenkins dashboard and install the **Ansible** and **Ansible Tower** plugins from Manage Jenkins.
## Integration of Ansible Automation Platform & Jenkins
10
28
@@ -39,10 +57,13 @@ Select the build triggers as "Build after other projects are built."
39
57
In Build Triggers, check the "Build after other projects are built" option and add the continuous integration pipeline name.
40
58
41
59
It's time now to see an end-to-end pipeline in action. To do that, you have to clone the GitHub repository in your favorite code editor like VScode or PyCharm.
60
+
> [!IMPORTANT]
61
+
> Kindly consider here the forked repository.
42
62
43
-
Checkout into the git folder and make some minor changes like adding "#" in any file.
63
+
Checkout into the git folder and make some changes in your GitHub repository.
44
64
45
-
After you are done with your changes, it's time to push them to the GitHub repository using git commands:
65
+
66
+
After completing your changes, it's time to push them to the GitHub repository using git commands:
46
67
47
68
```
48
69
git add .
@@ -56,7 +77,7 @@ git commit -m "my changes"
56
77
git push
57
78
```
58
79
59
-
After pushing, check the Jenkins dashboard. The Continuous Integration pipeline will start. It will build and push the container image. Later on, the Continuous Deployment pipeline will start with the help of Ansible Automation Platform, and it will deploy the pod in OpenShift cluster.
80
+
After push, check the Jenkins dashboard. The Continuous Integration pipeline will start. It will build and push the container image. Later on, the Continuous Deployment pipeline will start with the help of Ansible Automation Platform, it will deploy the pod in OpenShift cluster.
0 commit comments