Skip to content

Commit 47c2daa

Browse files
committed
TELCODOCS-2228 Updates based on audit travelops
1 parent 5b3e6ed commit 47c2daa

File tree

2 files changed

+92
-27
lines changed

2 files changed

+92
-27
lines changed

modules/mcg-deploying-mcg-pattern.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ $ cd /path/to/your/repository
249249
+
250250
[source,terminal]
251251
----
252-
$ oc login --token=sha256~AUv_4DGQoFMVzmdO3cg3v4vnUuaV3lYcy6N2SCwVOz4 --server=https://api.<your-cluster>.<domain>:6443
252+
$ oc login --token=<retrieved-token> --server=https://api.<your-cluster>.<domain>:6443
253253
----
254254

255255
. Alternatively log in by running the following command:

modules/trvlops-deploying.adoc

Lines changed: 91 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,25 @@
88

99
* An OpenShift cluster
1010
** To create an OpenShift cluster, go to the https://console.redhat.com/[Red Hat Hybrid Cloud console].
11-
** Select *Services \-> Containers \-> Create cluster*.
12-
** The cluster must have a dynamic `StorageClass` to provision `PersistentVolumes`. See link:../../multicloud-gitops/mcg-cluster-sizing[sizing your cluster].
11+
** Select *OpenShift \-> Red Hat OpenShift Container Platform \-> Create cluster*.
12+
** The cluster must have a dynamic `StorageClass` to provision `PersistentVolumes`. Verify that a dynamic `StorageClass` exists before creating one by running the following command:
13+
+
14+
[source,terminal]
15+
----
16+
$ oc get storageclass -o custom-columns=NAME:.metadata.name,PROVISIONER:.provisioner,DEFAULT:.metadata.annotations."storageclass\.kubernetes\.io/is-default-class"
17+
----
18+
+
19+
.Example output
20+
+
21+
[source,terminal]
22+
----
23+
NAME PROVISIONER DEFAULT
24+
gp2-csi ebs.csi.aws.com <none>
25+
gp3-csi ebs.csi.aws.com true
26+
----
27+
+
28+
For more information about creating a dynamic `StorageClass`, see the https://docs.openshift.com/container-platform/latest/storage/dynamic-provisioning.html[Dynamic provisioning] documentation.
29+
1330
* Optional: A second OpenShift cluster for multicloud demonstration.
1431
//Replaced git and podman prereqs with the tooling dependencies page
1532
* https://validatedpatterns.io/learn/quickstart/[Install the tooling dependencies].
@@ -22,22 +39,57 @@ public or private cloud by using https://console.redhat.com/openshift/create[Red
2239
.Procedure
2340

2441
. Fork the https://github.com/validatedpatterns-sandbox/travelops[travelops] repository on GitHub.
42+
2543
. Clone the forked copy of this repository.
2644
+
2745
[source,terminal]
2846
----
29-
git clone [email protected]:your-username/travelops.git
47+
$ git clone [email protected]:your-username/travelops.git
3048
----
3149

50+
. Go to your repository: Ensure you are in the root directory of your Git repository by using:
51+
+
52+
[source,terminal]
53+
----
54+
$ cd /path/to/your/repository
55+
----
56+
57+
. Run the following command to set the upstream repository:
58+
+
59+
[source,terminal]
60+
----
61+
$ git remote add -f upstream [email protected]:validatedpatterns-sandbox/travelops.git
62+
----
63+
64+
. Verify the setup of your remote repositories by running the following command:
65+
+
66+
[source,terminal]
67+
----
68+
$ git remote -v
69+
----
70+
+
71+
.Example output
72+
+
73+
[source,terminal]
74+
----
75+
origin [email protected]:<your-username>/travelops.git (fetch)
76+
origin [email protected]:<your-username>/travelops.git (push)
77+
upstream https://github.com/validatedpatterns-sandbox/travelops.git (fetch)
78+
upstream https://github.com/validatedpatterns-sandbox/travelops.git (push)
79+
----
80+
3281
. Create a local copy of the secret values file that can safely include credentials. Run the following commands:
3382
+
3483
[source,terminal]
3584
----
36-
cp values-secret.yaml.template ~/values-secret-travelops.yaml
85+
$ cp values-secret.yaml.template ~/values-secret-travelops.yaml
3786
----
3887
+
3988
[source,yaml]
4089
----
90+
# A more formal description of this format can be found here:
91+
# https://github.com/hybrid-cloud-patterns/common/tree/main/ansible/roles/vault_utils#values-secret-file-format
92+
4193
version: "2.0"
4294
# Ideally you NEVER COMMIT THESE VALUES TO GIT (although if all passwords are
4395
# automatically generated inside the vault this should not really matter)
@@ -50,74 +102,87 @@ secrets:
50102
- name: rootpasswd
51103
onMissingValue: generate
52104
vaultPolicy: validatedPatternDefaultPolicy
53-
54-
# Uncomment the following if you want to enable HTPasswd oAuth
55-
# - name: htpasswd
56-
# vaultPrefixes:
57-
# - global
58-
# fields:
59-
# - name: htpasswd
60-
# path: '/path/to/users.htpasswd'
61105
----
62106
+
63107
[WARNING]
64108
====
65109
Do not commit this file. You do not want to push personal credentials to GitHub. If you do not want to customize the secrets, these steps are not needed. The framework generates a random password for the config-demo application.
66110
====
67111

68-
. Customize the deployment for your cluster. Run the following command:
112+
. Customize the deployment for your cluster by following these steps:
113+
114+
.. Creates a new branch named my-branch and switch to it by running the following command:
69115
+
70116
[source,terminal]
71117
----
72-
git switch -c my-branch
118+
$ git switch -c my-branch
73119
----
120+
121+
.. Edit the `values-hub.yaml` file to customize the deployment for your cluster by running the following command:
74122
+
75123
[source,terminal]
76124
----
77-
vi values-hub.yaml
125+
$ vi values-hub.yaml
78126
----
127+
128+
.. Commit the changes to the `values-hub.yaml` file by running the following commands:
79129
+
80130
[source,terminal]
81131
----
82-
git add values-hub.yaml
132+
$ git add values-hub.yaml
83133
----
134+
135+
.. Commit the changes to the `values-hub.yaml` file by running the following commands:
84136
+
85137
[source,terminal]
86138
----
87-
git commit values-hub.yaml
139+
$ git commit values-hub.yaml
88140
----
141+
142+
.. Push the changes to the `values-hub.yaml` file by running the following command:
89143
+
90144
[source,terminal]
91145
----
92-
git push origin my-branch
146+
$ git push origin my-branch
93147
----
94148

95149
. Deploy the pattern by running `./pattern.sh make install` or by using the link:/infrastructure/using-validated-pattern-operator/[Validated Patterns Operator].
96150

97151
[id="deploying-cluster-using-patternsh-file"]
98-
== Deploying the cluster by using the pattern.sh file
152+
== Deploying the cluster by using the pattern.sh script
99153

100-
To deploy the cluster by using the `pattern.sh` file, complete the following steps:
154+
To deploy the cluster by using the `pattern.sh` script, complete the following steps:
101155

102-
. Login to your cluster by running the following command:
156+
. Navigate to the root directory of the cloned repository by running the following command:
103157
+
104158
[source,terminal]
105159
----
106-
oc login
160+
$ cd /path/to/your/repository
107161
----
162+
163+
. Log in to your cluster by running the following this procedure:
164+
165+
.. Obtain an API token by visiting https://oauth-openshift.apps.<your-cluster>.<domain>/oauth/token/request
166+
167+
.. Log in with this retrieved token by running the following command:
108168
+
109-
Optional: Set the `KUBECONFIG` variable for the `kubeconfig` file path:
169+
[source,terminal]
170+
----
171+
$ oc login --token=<retrieved-token> --server=https://api.<your-cluster>.<domain>:6443
172+
----
173+
174+
. Alternatively log in by running the following command:
110175
+
111176
[source,terminal]
112177
----
113-
export KUBECONFIG=~/<path_to_kubeconfig>
178+
$ export KUBECONFIG=~/<path_to_kubeconfig>
114179
----
115180

116-
. Deploy the pattern to your cluster. Run the following command:
181+
. Deploy the pattern to your cluster by running the following command:
117182
+
118183
[source,terminal]
119184
----
120-
./pattern.sh make install
185+
$ ./pattern.sh make install
121186
----
122187

123188
[id="verify-trvlops-pattern-install"]

0 commit comments

Comments
 (0)