Skip to content

Commit ccf89a3

Browse files
committed
Re-order content
1 parent 41f0afd commit ccf89a3

File tree

1 file changed

+41
-41
lines changed

1 file changed

+41
-41
lines changed

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

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -274,52 +274,12 @@ Output the ApplicationSet to a file replacing the workshop $USER variable with y
274274
sed 's/$USER/user5/' ~/workshop/content/modules/ROOT/examples/applicationsets/coolstore-git-appset.yaml > ~/appset.yaml
275275
----
276276

277-
Next generate the ApplicationSet locally using the `argocd` CLI:
278-
279-
[.console-input]
280-
[source,sh,subs="attributes",role=execute]
281-
----
282-
argocd appset generate ~/appset.yaml
283-
----
284-
285-
[.console-output]
286-
[source,bash,subs="attributes+,+macros"]
287-
----
288-
NAME CLUSTER NAMESPACE PROJECT STATUS HEALTH SYNCPOLICY CONDITIONS REPO PATH TARGET
289-
{user}-argocd/app-dev in-cluster {user}-dev workshop Auto-Prune <none> https://github.com/OpenShiftDemos/advanced-gitops-workshop content/modules/ROOT/examples/coolstore-web/overlays/dev main
290-
{user}-argocd/app-prod in-cluster {user}-prod workshop Auto-Prune <none> https://github.com/OpenShiftDemos/advanced-gitops-workshop content/modules/ROOT/examples/coolstore-web/overlays/prod main
291-
{user}-argocd/app-stage in-cluster {user}-stage workshop Auto-Prune <none> https://github.com/OpenShiftDemos/advanced-gitops-workshop content/modules/ROOT/examples/coolstore-web/overlays/stage main
292-
----
293-
294-
Three Applications are being generated, one for each environment.
295-
296-
To see the YAML for each Application run the following:
297-
298-
[.console-input]
299-
[source,sh,subs="attributes",role=execute]
300-
----
301-
argocd appset generate ~/appset.yaml -o yaml
302-
----
303-
304-
[IMPORTANT]
305-
Using the CLI to generate Applications is very useful when debugging complex ApplicationSets since
306-
you do not have to spend the time deploying it to the cluster and looking at the Status block to
307-
understand why it isn't working.
308-
309-
Now that the generation has been verified, go ahead and deploy it:
310-
311-
[.console-input]
312-
[source,sh,subs="attributes",role=execute]
313-
----
314-
sed 's/$USER/{user}/' ~/workshop/content/modules/ROOT/examples/applicationsets/coolstore-list-git.yaml | oc apply -n {user}-argocd -f -
315-
----
316-
317277
Let's have a quick look at our new ApplicationSet:
318278

319279
[.console-input]
320280
[source,sh,subs="attributes",role=execute]
321281
----
322-
oc get appset coolstore-web -o yaml -n {user}-argocd | oc neat
282+
cat ~/appset.yaml
323283
----
324284

325285
[.console-output]
@@ -375,6 +335,46 @@ spec:
375335
<6> The full path in the repo for the current directory
376336
<7> Example of using the passed in value for `{user}`
377337

338+
Next test the definition by generating the ApplicationSet locally using the `argocd` CLI:
339+
340+
[.console-input]
341+
[source,sh,subs="attributes",role=execute]
342+
----
343+
argocd appset generate ~/appset.yaml
344+
----
345+
346+
[.console-output]
347+
[source,bash,subs="attributes+,+macros"]
348+
----
349+
NAME CLUSTER NAMESPACE PROJECT STATUS HEALTH SYNCPOLICY CONDITIONS REPO PATH TARGET
350+
{user}-argocd/app-dev in-cluster {user}-dev workshop Auto-Prune <none> https://github.com/OpenShiftDemos/advanced-gitops-workshop content/modules/ROOT/examples/coolstore-web/overlays/dev main
351+
{user}-argocd/app-prod in-cluster {user}-prod workshop Auto-Prune <none> https://github.com/OpenShiftDemos/advanced-gitops-workshop content/modules/ROOT/examples/coolstore-web/overlays/prod main
352+
{user}-argocd/app-stage in-cluster {user}-stage workshop Auto-Prune <none> https://github.com/OpenShiftDemos/advanced-gitops-workshop content/modules/ROOT/examples/coolstore-web/overlays/stage main
353+
----
354+
355+
Note that three Applications are being generated, one for each environment.
356+
357+
To see the YAML for each Application run the following:
358+
359+
[.console-input]
360+
[source,sh,subs="attributes",role=execute]
361+
----
362+
argocd appset generate ~/appset.yaml -o yaml
363+
----
364+
365+
[IMPORTANT]
366+
Using the CLI to generate Applications is very useful when debugging complex ApplicationSets since
367+
you do not have to spend the time deploying it to the cluster and looking at the Status block to
368+
understand why it isn't working.
369+
370+
Now that the generation has been verified, go ahead and deploy it:
371+
372+
[.console-input]
373+
[source,sh,subs="attributes",role=execute]
374+
----
375+
sed 's/$USER/{user}/' ~/workshop/content/modules/ROOT/examples/applicationsets/coolstore-list-git.yaml | oc apply -n {user}-argocd -f -
376+
----
377+
378378
Check that the Applications have been created:
379379

380380
[.console-input]

0 commit comments

Comments
 (0)