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: content/workshop/_index.adoc
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,10 @@ menu:
6
6
name: Workshop
7
7
---
8
8
9
+
= Welcome to the Validated Patterns Workshop!
10
+
11
+
== Overview
12
+
9
13
**Reference Architectures with Added Value**
10
14
11
15
Validated Patterns are an evolution of how you deploy and manage applications in a hybrid cloud. With a pattern, you can automatically deploy a full application stack through a GitOps-based framework. With this framework, you can create business-centric solutions while maintaining a level of Continuous Integration (CI) over your application.
IMPORTANT: Deploying the pattern through the OpenShift Console or via `pattern.sh` will deploy the patterns operator.
47
32
48
-
=== Element Layering
33
+
== Element Layering
49
34
[#layering]
50
35
51
-
The base component of every Validated Pattern is `common` - which is a link:https://github.com/validatedpatterns/common[Github Repo]
36
+
Architecturally, Patterns share a very similar base structure, as seen below.
52
37
53
38
image::consuming-common.png[common]
54
39
55
-
Without further configuration, common is actually quite boring. So let's add another layer!
56
-
57
-
Your specific industry or use-case is layered into the framework and utilizes the underlying common. In this example the solution includes a bespoke application, cloud-native cluster storage, {rhacs}, and an enterprise container registry. The framework will deploy and configure these components through Helm charts, kustomize manifests or Ansible if necessary.
40
+
Your specific industry or use-case is layered into the framework and utilizes the underlying base structure. In this example, the solution includes a bespoke application, cloud-native cluster storage, {rhacs}, and an enterprise container registry. The framework will deploy and configure these components through Helm charts, Kustomize manifests or Ansible if necessary.
58
41
59
42
image::consuming-common-solution-layering.png[]
60
43
@@ -68,9 +51,70 @@ The following graphic illustrates swapping components in the framework:
So where exactly are these different architectural components defined?
58
+
59
+
=== GitOps
60
+
61
+
link:https://github.com/validatedpatterns/patterns-operator[The {validated-patterns-op}] automatically deploys an instance of {rh-gitops-short} when a Pattern CR is installed on the cluster.
62
+
63
+
Check out an example Pattern CR for an {mcg-pattern} installation:
When the {validated-patterns-op} reconciles this CR, it creates an Argo Application using link:https://github.com/validatedpatterns/clustergroup-chart[the Validated Patterns Clustergroup Chart] and link:https://github.com/validatedpatterns/multicloud-gitops/blob/main/values-hub.yaml[the values-`<.spec.clusterGroupName>`.yaml values] from the CR above.
80
+
81
+
=== Secrets Management
82
+
83
+
The default secrets backend uses link:https://charts.validatedpatterns.io/charts/hashicorp-vault[Vault] and link:https://charts.validatedpatterns.io/charts/openshift-external-secrets[ESO].
84
+
85
+
As you can see in our link:https://github.com/validatedpatterns/multicloud-gitops/blob/main/values-hub.yaml[values-hub.yaml], we provide a namespace, subscription and an application for both of these components.
86
+
87
+
When we run `./pattern.sh make install` it ultimately calls link:https://github.com/validatedpatterns/rhvp.cluster_utils/blob/main/playbooks/load_secrets.yml[the rhvp.cluster_utils.load_secrets playbook] and loads a secrets file from our home directory into Vault as part of the pattern installation process.
88
+
89
+
=== ACM
90
+
91
+
Similar to the secrets management, link:https://charts.validatedpatterns.io/charts/acm[ACM] is provided in `values-hub.yaml` as a namespace, subscription and an application. By providing a `managedClusterGroups` block in our `values-hub.yaml` we are able to provision spoke clusters with the Validated Patterns framework as well.
92
+
93
+
[source,yaml]
94
+
----
95
+
clusterGroup:
96
+
managedClusterGroups:
97
+
exampleRegion:
98
+
name: group-one
99
+
acmlabels:
100
+
- name: clusterGroup
101
+
value: group-one
102
+
----
103
+
104
+
Any cluster that ACM sees labeled with `clusterGroup=group-one` will be provisioned with our link:https://github.com/validatedpatterns/clustergroup-chart[Clustergroup chart] and linkhttps://github.com/validatedpatterns/multicloud-gitops/blob/main/values-group-one.yaml[values-group-one.yaml].
105
+
106
+
=== Imperative Jobs
107
+
108
+
The example imperative job in the {mcg-pattern} is
73
109
74
-
You may be asking yourself ...
110
+
[source,yaml]
111
+
----
112
+
clusterGroup:
113
+
imperative:
114
+
jobs:
115
+
- name: hello-world
116
+
playbook: rhvp.cluster_utils.hello_world
117
+
timeout: 234
118
+
----
75
119
76
-
image::consuming-multipleArgos.png[]
120
+
This gets transformed by link:https://github.com/validatedpatterns/clustergroup-chart/tree/main/templates/imperative[the Clustergroup chart] into several resources. This process is a bit complex and we will cover it in more detail later.
Copy file name to clipboardExpand all lines: content/workshop/creating-patterns.adoc
+96-73Lines changed: 96 additions & 73 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,87 +10,14 @@ weight: 52
10
10
include::modules/comm-attributes.adoc[]
11
11
:imagesdir: /images/workshop
12
12
13
-
= Creating Validated Patterns
14
-
15
-
== Topic Objectives
16
-
17
-
[#objectives]
18
-
In this topic we will discuss:
19
-
20
-
* Understanding `common`
21
-
* Pattern Requirements
22
-
* Creation Process
23
-
24
13
[IMPORTANT]
25
14
.Core Concepts
26
15
====
27
-
* **Creating is Extending** We never really create a new pattern from zero. Instead we extend our basic pattern using artifacts that we have developed along the way
28
16
* **Artifacts** Artifacts can include Helm Charts, Kustomize manifests, or plain Kubernetes manifests
29
17
* **Moving Artifacts into the Validated Patterns framework** Many artifacts require conversion to Helm chart templates and parameterizing certain values
30
18
* **Helm** Helm is a kubernetes package manager that allows you to define, install and manage kubernetes applications as reusable packages called charts
31
19
====
32
20
33
-
[#common]
34
-
== Understanding common
35
-
36
-
What's the role of the **common** repository?
37
-
38
-
* The core components that make up the Validated Patterns framework are contained in the common repository
39
-
* Including:
40
-
** OpenShift GitOps configurations
41
-
** RHACM configuration and Global Policies
42
-
*** Support for **clusterGroup** and **GitOps** policies
43
-
** Validated Pattern build scripts and Makefiles
44
-
** Secrets Management (Hashicorp Vault)
45
-
** Operator CRDs and other assets
46
-
** Various utility scripts
47
-
48
-
What's in common?
49
-
50
-
NOTE: The common repository is where all the common manifests for the Validated Patterns framework live
51
-
52
-
* **acm** - contains the helm charts, which contains policies and is used to configure the deployment of the {rhacm}
53
-
* **clusterGroup** - contains the helm charts used to create namespaces, subscriptions, Argo Project and Applications described in values files. This is the seed for all the patterns.
54
-
* **operator-install** - contains the helm chart used by the Validated Patterns operator to create the openshift-gitops component, creating the initial ArgoCD applications for Validated Patterns.
55
-
56
-
[source,bash]
57
-
----
58
-
common
59
-
├── acm
60
-
├── ansible
61
-
├── Changes.md
62
-
├── clustergroup
63
-
├── common -> .
64
-
├── examples
65
-
├── golang-external-secrets
66
-
├── hashicorp-vault
67
-
├── LICENSE
68
-
├── Makefile
69
-
├── letsencrypt
70
-
├── operator-install
71
-
├── README.md
72
-
├── reference-output.yaml
73
-
├── scripts
74
-
├── super-linter.log
75
-
├── tests
76
-
└── values-global.yaml
77
-
----
78
-
79
-
* **ansible** - this directory contains the ansible roles and modules that support the secrets management for a pattern
80
-
* **hashicorp-vault** - contains the helm chart for {vault}
81
-
* **scripts** - contains utility scripts used by the Validated Patterns Framework
82
-
* **golang-external-secrets** - Helm chart for the {eso}
83
-
84
-
=== What's next for common?
85
-
86
-
* We are in the very early stages of moving the helm charts in common into a public Helm repository
87
-
* Deploying our patterns with multi-source enabled which allows us to use multiple sources for values, which will help reduce the need to have all the charts in the repo
88
-
* Continue to maintain Makefiles, Ansible scripts and other tools in this repo in support of deploying patterns
89
-
90
-
You may be wondering - **why**?
91
-
92
-
We want to maximize modularity in the framework. This will reduce our reliance on the common repository as it is today and will decrease the footprint and complexity of the patterns.
93
-
94
21
[#creation]
95
22
== Creation Process
96
23
@@ -272,3 +199,99 @@ They should be viewed as absolutely hard coded into the pattern.
272
199
- name: ocp_auth.bind_password
273
200
value: "supersecret"
274
201
----
202
+
203
+
== Using Patternizer to create new patterns
204
+
205
+
When creating new patterns you have two options: you can either fork an existing pattern and modify it to suit your purpose or start a new pattern from scratch.
206
+
207
+
link:https://github.com/validatedpatterns/patternizer[The patternizer tool] exists to expedite starting a pattern from scratch.
208
+
209
+
To create a new pattern you merely need to run `podman run --pull=newer -v "$PWD:$PWD:z" -w "$PWD" quay.io/validatedpatterns/patternizer init --with-secrets` (you can omit the `--with-secrets` if you don't need to use the secrets framework.)
210
+
211
+
On an empty directory, named `workshop-pattern`, this currently produces the following files:
212
+
213
+
[source,bash]
214
+
----
215
+
workshop-pattern
216
+
├── ansible.cfg # the default ansible configuration
217
+
├── Makefile # a stub Makefile which includes Makefile-common
218
+
├── Makefile-common # where all the common commands (install, load-secrets, etc) live
This interactive demo walks through installing the Validated Patterns operator and deploying the [Multicloud Gitops](/patterns/multicloud-gitops/) pattern on a fresh OpenShift cluster using the Validated Patterns Catalog.
0 commit comments