Skip to content

Commit 82e2914

Browse files
committed
updating guidance to be clear 5
1 parent 8e7c698 commit 82e2914

File tree

3 files changed

+148
-11
lines changed

3 files changed

+148
-11
lines changed

content/patterns/multicloud-gitops/mcg-demo-script.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,13 @@ make a small change to the `hello-world` application to see how the GitOps frame
7373
Hub Cluster domain is '{{ .Values.global.hubClusterDomain }}' <br>
7474
----
7575

76+
. Add the changes to the staging area by running the following command:
77+
+
78+
[source,terminal]
79+
----
80+
$ git add -u
81+
----
82+
7683
. Commit this change by running the following command:
7784
+
7885
[source,terminal]

modules/mcg-about-customizing-pattern.adoc

Lines changed: 136 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,148 @@ One of the major goals of the Validated Patterns development process is to creat
99
You can customize this demo in different ways.
1010

1111
[id="split-config-demo"]
12-
== Split the config-demo across hub and regional clusters
12+
== Customizing the config-demo across hub and regional clusters
1313

1414
Currently hub and regional clusters are reusing the exact same helm chart found at `charts/all/config-demo`.
1515

16-
The first customization step could be to split the demo app in two separate charts:
16+
Follow this procedure to split the `config-demo` application across the `hub` and `regional` clusters:
1717

18-
* One in `charts/hub/config-demo`
19-
* One in `charts/region/config-demo`.
18+
. Ensure you are in your locally created feature branch by running the following command:
19+
+
20+
[source,terminal]
21+
----
22+
$ git checkout my-branch main
23+
----
2024

21-
`charts/all/config-demo` has been copied to `charts/hub/config-demo` and `charts/region/config-demo`, you need to include them in the respective `values-hub.yaml` and `values-region-one.yaml`, respectively.
25+
. Run the following commands to create the `charts/hub` directory (the region directory already exists):
26+
+
27+
[source,terminal]
28+
----
29+
$ mkdir -p charts/hub
30+
----
2231

23-
After completing this configuration, you can start customizing the two apps and make them output a different web page entirely depending if the pod is running on the hub or on the cluster.
32+
. Copy the `charts/all/config-demo` to `charts/hub/config-demo` by running the following command:
33+
+
34+
[source,terminal]
35+
----
36+
$ cp -r charts/all/config-demo charts/hub/config-demo
37+
----
38+
39+
. Copy the `charts/all/config-demo` to `charts/region/config-demo` by running the following command:
40+
+
41+
[source,terminal]
42+
----
43+
$ cp -r charts/all/config-demo charts/region/config-demo
44+
----
45+
46+
. Edit `config-demo-cm.yaml` in `charts/hub/config-demo/templates` add the line `This is the hub cluster patched version via git`:
47+
+
48+
[source,terminal]
49+
----
50+
</head>
51+
<body>
52+
<h1>
53+
This is the hub cluster patched version via git <br>
54+
Hub Cluster domain is '{{ .Values.global.hubClusterDomain }}' <br>
55+
Pod is running on Local Cluster Domain '{{ .Values.global.localClusterDomain }}' <br>
56+
</h1>
57+
<h2>
58+
The secret is <a href="/secret/secret">secret</a>
59+
----
60+
61+
. Edit `config-demo-cm.yaml` in `charts/hub/config-demo/templates` add the line `This is the hub cluster patched version via git`:
62+
+
63+
[source,terminal]
64+
----
65+
</head>
66+
<body>
67+
<h1>
68+
This is the hub cluster patched version via git <br>
69+
Hub Cluster domain is '{{ .Values.global.hubClusterDomain }}' <br>
70+
Pod is running on Local Cluster Domain '{{ .Values.global.localClusterDomain }}' <br>
71+
</h1>
72+
<h2>
73+
The secret is <a href="/secret/secret">secret</a>
74+
----
75+
76+
. In the root directory of your repository, edit the `values-hub.yaml` file and modify the path as follows:
77+
+
78+
[source,yaml]
79+
----
80+
config-demo:
81+
name: config-demo
82+
namespace: config-demo
83+
project: config-demo
84+
path: charts/hub/config-demo
85+
----
86+
87+
. In the root directory of your repository, edit the `values-group-one.yaml` file and modify the path as follows:
88+
+
89+
[source,yaml]
90+
----
91+
config-demo:
92+
name: config-demo
93+
namespace: config-demo
94+
project: config-demo
95+
path: charts/region/config-demo
96+
----
97+
98+
. Add the changes to the staging area by running the following command:
99+
+
100+
[source,terminal]
101+
----
102+
$ git add .
103+
----
104+
105+
. Commit the changes by running the following command:
106+
+
107+
[source,terminal]
108+
----
109+
$ git commit -a -m "test another change"
110+
----
111+
112+
. Push the change to the remote repository by running the following command:
113+
+
114+
[source,terminal]
115+
----
116+
$ git push origin my-branch
117+
----
118+
119+
ArgoCD will apply the change to the `config-demo` application.
120+
121+
Verify that the update to the *config-demo* application is successfully applied to your hub cluster as follows:
122+
123+
. In the OpenShift console associated with your hub cluster go to the *Networking* -> *Routes* menu options.
124+
125+
. From the *Project:* drop down select the *config-demo* project.
126+
127+
. Click the *Location* URL. This should reveal the following:
128+
+
129+
[source,terminal]
130+
----
131+
This is the hub cluster patched version via git
132+
Hub Cluster domain is 'apps.kevstestcluster.aws.validatedpatterns.io'
133+
Pod is running on Local Cluster Domain 'apps.kevstestcluster.aws.validatedpatterns.io'
134+
135+
The secret is secret
136+
----
137+
138+
Verify that the update to the *config-demo* application is successfully applied to your managed cluster as follows:
139+
140+
. In the OpenShift console associated with your hub cluster go to the *Networking* -> *Routes* menu options.
141+
142+
. From the *Project:* drop down select the *config-demo* project.
143+
144+
. Click the *Location* URL. This should reveal the following:
145+
+
146+
[source,terminal]
147+
----
148+
This is the managed cluster
149+
Hub Cluster domain is 'apps.kevstestcluster.aws.validatedpatterns.io'
150+
Pod is running on Local Cluster Domain 'apps.ci-ln-cf2475b-76ef8.aws-2.ci.openshift.org'
151+
152+
The secret is secret
153+
----
24154

25155
== Rest API addition
26156

modules/mcg-deploying-managed-cluster-using-rhacm.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ After RHACM is installed, a message regarding a *Web console update is available
1919

2020
.Procedure
2121

22-
. In the left navigation panel of web console, click *local-cluster*. Select *All Clusters*. The RHACM web console is displayed with *Cluster** on the left navigation panel.
23-
. On the *Managed clusters* tab, click *Import cluster*.
24-
. On the *Import an existing cluster* page:
22+
. In the left navigation panel of the web console associated with your deployed hub cluster, click *local-cluster*. Select *All Clusters*. The RHACM web console is displayed.
23+
. In the *Managing clusters just got easier* window, click *Import an existing cluster*.
2524
.. Enter the cluster name (you can get this from the login token string for example https://api.<cluster-name>.<domain>:6443)
2625
.. You can leave the *Cluster set* blank.
2726
.. In the *Additional labels* dialog box enter the `key=value` as `clusterGroup=group-one`.
2827
.. Choose *KubeConfig* as the "Import mode".
29-
.. In the *KubeConfig* window paste your KubeConfig content.
30-
. Click *Import*.
28+
.. In the *KubeConfig* window paste your KubeConfig content. Click *Next*.
29+
. You can skip the *Automation* screen. Click *Next*.
30+
. Review the summary details and click *Import*.

0 commit comments

Comments
 (0)