Skip to content

Commit 24a4b39

Browse files
committed
Typos and fixes
1 parent c7be5d6 commit 24a4b39

File tree

2 files changed

+29
-17
lines changed

2 files changed

+29
-17
lines changed

content/modules/ROOT/examples/applicationsets/coolstore-git-appset.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,5 @@ spec:
3838
value: 'gateway-vertx-{{ .values.user }}-{{.path.basename}}'
3939
syncPolicy:
4040
automated:
41-
prune: true
41+
prune: true
42+
selfHeal: true

content/modules/ROOT/pages/04-applicationsets.adoc

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ Before we delve into ApplicatioSets, let's dive into the useful link:https://arg
1111
pattern which predates ApplicationSets.
1212

1313
The concept of App-of-Apps is that you have an Application in Argo CD that points to a location that consists only of Applications. This enables bootstrapping a set of
14-
Applications from a single Application and is useful in use cases such as cluster configuration and multiple environments.
14+
Applications from a single Application and is useful in use cases such as cluster configuration and same app with multiple environments scenarios.
1515

16-
Before we can deploy the App-of-Apps, we first need to deploy a health check for the Application resource which is not included as an included health check in Argo CD at this time.
16+
Before we can deploy the App-of-Apps, we first need to deploy a health check for the Application resource which is not included as a health check in Argo CD at this time.
1717

1818
[NOTE]
1919
This is because in Argo CD 1.x the default Application health check was removed, the author of this workshop link:https://github.com/argoproj/argo-cd/issues/16870[disagrees, window="_blank"] with
@@ -35,7 +35,7 @@ argocd.argoproj.io/argocd patched
3535

3636
Next review the applications that the App-of-Apps will be deploying:
3737

38-
[.console-output]
38+
[.console-input]
3939
[source,bash,subs="attributes+,+macros"]
4040
----
4141
ls -l ~/workshop/content/modules/ROOT/examples/app-of-apps/base/
@@ -54,7 +54,8 @@ total 12
5454
There are three Applications defined, one for each environment, with kustomize being used to manage them. If you look at each
5555
of these Applications note that each environment is tied to a different kustomize overlay matching the destination. This
5656
provides an opportunity to tweak the manifests for anything specific to an environment. For example, if you look at the overlays
57-
the `stage` and `prod` environments are patching the vertx-gateway deployment to have two replicas.
57+
for the `stage` and `prod` environments we are patching the vertx-gateway deployment to have two replicas instead of the default
58+
one replica defined in the base.
5859

5960
[source,yaml,subs="+macros,attributes+"]
6061
----
@@ -76,11 +77,11 @@ application.argoproj.io/coolstore created
7677
----
7778

7879
Go to the Argo CD UI, notice that we have four Applications deployed. These include the `coolstore` App-of-Apps as well as the
79-
three environment Applications that were deployed by `coolstore`.
80+
three environment specific Applications that were deployed by the `coolstore` App-of-Apps.
8081

8182
image::app-of-apps-tiles.png[]
8283

83-
Click on the `coolstore` tile, notice that it has three resources that it deployed which were the environment Applications.
84+
Click on the `coolstore` tile, notice that it has three resources that it deployed which were the environment specific Applications.
8485

8586
image::app-of-apps-resources.png[]
8687

@@ -134,7 +135,7 @@ and link:https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset
134135
[#appsets-static]
135136
=== Static Generation with List Generator
136137
137-
Let's look at a simple example of an Application that uses a List generator to create Applications for different environments
138+
First let's look at a simple example of an Application that uses a List generator to create Applications for different environments
138139
for the `coolstore` Application. This will be a similar use case to what we saw with App-of-Apps but done
139140
with ApplicationSets.
140141
@@ -231,16 +232,24 @@ where they really shine, dynamic generation based on external sources.
231232
[#appsets-dynamic]
232233
=== Dynamic Generation with git Generator
233234
234-
A common pattern when deploying an application with kustomize with multiple environments is to have a repository that contains the following structure:
235+
In this example we will deploy the front-end of the coolstore using an ApplicationSet with the git generator. The
236+
git generator supports two modes, file and directory. In our case we will leverage the directory mode to
237+
point the generator at a set of kustomize overlays in the repository.
238+
239+
For those not familiar with kustomize, a common pattern when deploying an application with kustomize for multiple
240+
environments is to have a repository that contains a `base` and `overlays` folders. The base folder contains
241+
all of the manifests to be deployed. The `overlays` are used to patch the base to handle any
242+
environment specific differences.
243+
244+
The structure of `base` and `overlays` we will be using in this example is as follows:
235245
236246
* *base*: the common assets that we want to deploy
237247
* *overlays*:
238248
** *dev*: specific values that will override the ones in the base for the "dev" environment
239249
** *stage*: specific values that will override the ones in the base for the "stage" environment
240250
** *prod*: specific values that will override the ones in the base for the "prod" environment
241251
242-
We will be deploying the web frontend for the backend we deployed in the previous section, view the
243-
structure in the cloned repository:
252+
View this structure in the repository that was cloned earlier:
244253
245254
[.console-input]
246255
[source,sh,subs="attributes",role=execute]
@@ -266,15 +275,16 @@ find ~/workshop/content/modules/ROOT/examples/coolstore-web -print | sort|sed -e
266275
| | | | | | | | | | |--kustomization.yaml
267276
----
268277
269-
Let's deploy these applications using an ApplicationSet as we did previously but this time we will use a git generator. However
270-
the git generator is somewhat more complex, let's test it locally first.
278+
Let's deploy these applications using an ApplicationSet using the git generator. However
279+
the git generator is somewhat more complex then the previous static list example so let's test
280+
it locally first to verify that it works.
271281
272282
Output the ApplicationSet to a file replacing the workshop $USER variable with your user:
273283
274284
[.console-input]
275285
[source,sh,subs="attributes",role=execute]
276286
----
277-
sed 's/$USER/user5/' ~/workshop/content/modules/ROOT/examples/applicationsets/coolstore-git-appset.yaml > ~/appset.yaml
287+
sed 's/$USER/{user}/' ~/workshop/content/modules/ROOT/examples/applicationsets/coolstore-git-appset.yaml > ~/appset.yaml
278288
----
279289
280290
Let's have a quick look at our new ApplicationSet:
@@ -292,7 +302,7 @@ apiVersion: argoproj.io/v1alpha1
292302
kind: ApplicationSet
293303
metadata:
294304
name: coolstore-web
295-
namespace: $USER-argocd
305+
namespace: {user}-argocd
296306
spec:
297307
goTemplate: true
298308
goTemplateOptions: ["missingkey=error"]
@@ -303,7 +313,7 @@ spec:
303313
repoURL: https://github.com/OpenShiftDemos/advanced-gitops-workshop <3>
304314
revision: HEAD
305315
values:
306-
user: $USER <4>
316+
user: {user} <4>
307317
template:
308318
metadata:
309319
name: coolstore-web-{{.path.basename}} <5>
@@ -329,6 +339,7 @@ spec:
329339
syncPolicy:
330340
automated:
331341
prune: true
342+
selfHeal: true
332343
----
333344
<1> We are using the git generator to create an Application for every directory in the target repository and path
334345
<2> The target path, each sub-directory in this path will be used to create an application. In our case the `dev` and `prod` overlays
@@ -375,7 +386,7 @@ Now that the generation has been verified, go ahead and deploy it:
375386
[.console-input]
376387
[source,sh,subs="attributes",role=execute]
377388
----
378-
sed 's/$USER/{user}/' ~/workshop/content/modules/ROOT/examples/applicationsets/coolstore-appset-git.yaml | oc apply -n {user}-argocd -f -
389+
sed 's/$USER/{user}/' ~/workshop/content/modules/ROOT/examples/applicationsets/coolstore-git-appset.yaml | oc apply -n {user}-argocd -f -
379390
----
380391
381392
Check that the Applications have been created:

0 commit comments

Comments
 (0)