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
* typo in nav menu
* missing app connect use-case
* fix spell check
* fix build script. cpell and link checker
Signed-off-by: Brian Innes <binnes@uk.ibm.com>
* fix cspell errors
Signed-off-by: Brian Innes <binnes@uk.ibm.com>
* fix broken links
Signed-off-by: Brian Innes <binnes@uk.ibm.com>
* added to documentation - code block info
Signed-off-by: Brian Innes <binnes@uk.ibm.com>
1. Update the cloned repository with your GitHub Organization.
27
+
2. Update the cloned repository with your GitHub Organization.
26
28
- Search and replace all instances of `github.com/cloud-native-toolkit/multi-tenancy-gitops.git` with `github.com/{gitorg}/multi-tenancy-gitops.git`.
27
29
- Commit and push your changes to your fork.
28
-
```bash
30
+
31
+
```shell
29
32
git commit -m "Update github organization"
30
33
git push origin master
31
34
```
32
35
33
36
3. The gitops repository is structured into different layers (ie. `1-apps`, `2-services`, `3-infra`). Each layer is structured in a similar pattern consisting of the following:
34
37
- The `argocd` folder contains a set of ArgoCD Application YAMLs.
35
38
- The set of folder(s) in each layer contains the resource YAMLs which will be deployed.
36
-
```bash
39
+
40
+
```shell
37
41
tree . -L 2
38
42
.
39
43
├── 0-bootstrap
@@ -56,51 +60,60 @@ The following is required before proceeding to the next section.
56
60
├── README.md
57
61
└── bootstrap.yaml
58
62
```
59
-
- Each `argocd` folder contains an `active` and `inactive` sub-folder. For each layer, selectthe ArgoCD Appliation YAMLs to deploy and move them into the `active` folder.
60
-
```bash
61
-
1-apps/argocd/
62
-
├── active
63
-
└── inactive
64
-
65
-
2-services/argocd/
66
-
├── active
67
-
└── inactive
68
-
69
-
3-infra/argocd/
70
-
├── active
71
-
└── inactive
72
-
```
63
+
64
+
- Each `argocd` folder contains an `active` and `inactive` sub-folder. For each layer, selectthe ArgoCD Application YAMLs to deploy and move them into the `active` folder.
65
+
66
+
```text
67
+
1-apps/argocd/
68
+
├── active
69
+
└── inactive
70
+
71
+
2-services/argocd/
72
+
├── active
73
+
└── inactive
74
+
75
+
3-infra/argocd/
76
+
├── active
77
+
└── inactive
78
+
```
79
+
73
80
- Commit and push your changes to your fork.
74
-
```bash
75
-
git commit -m "Update github organization"
76
-
git push origin master
77
-
```
78
81
79
-
1. Install the Red Hat OpenShift GitOps operator using the commands below or directly from the OpenShift Web Console. An instance of ArgoCD will automatically be created in the `openshift-gitops` namespace.
80
-
```bash
82
+
```shell
83
+
git commit -m "Update github organization"
84
+
git push origin master
85
+
```
86
+
87
+
4. Install the Red Hat OpenShift GitOps operator using the commands below or directly from the OpenShift Web Console. An instance of ArgoCD will automatically be created in the `openshift-gitops` namespace.
1. Review and apply the custom ClusterRole permissions to the ArgoCD Application Controller service account. This is required forArgoCD to create the required Kubernetes resourcesin target namespaces.
93
-
```bash
103
+
5. Review and apply the custom ClusterRole permissions to the ArgoCD Application Controller service account. This is required forArgoCD to create the required Kubernetes resourcesin target namespaces.
104
+
105
+
```shell
94
106
oc apply -f 3-infra/clusterrole/
95
107
```
96
108
97
-
1. Create the bootstrap ArgoCD application.
109
+
6. Create the bootstrap ArgoCD application.
98
110
The bootstrap application will create the parent ArgoCD Application foreach layer (YAMLs are locatedin`0-bootstrap` folder).
99
111
The parent ArgoCD Applications will subsequently create the ArgoCD Applications in the `/argocd/active` directory.
100
112
101
113
Depending on what resources have been selected, it will take some timefor the ArgoCD to deploy the resources.
102
-
```bash
114
+
115
+
```shell
103
116
oc apply -f bootstrap.yaml -n openshift-gitops
104
117
```
105
118
106
-
1. From the OpenShift Web Console, verify the resources (ie, operators, namespaces, etc) have been successfully created and/or deployed.
119
+
7. From the OpenShift Web Console, verify the resources (ie, operators, namespaces, etc) have been successfully created and/or deployed.
@@ -42,8 +41,6 @@ To work on documentation and be able to view the rendered web site you need to c
42
41
- To check links in the built site (`mkdocs build` must be run first), use the linkchecker, with command `npm run dev:links`. This command should be run in the root folder of the project, containing the **linkcheckerrc** file.
43
42
- To check spelling `npm run dev:spell` should be run in the root folder of the project, containing the **cspell.json** file.
44
43
45
-
46
-
47
44
The developer guide is created using [MkDocs](http://mkdocs.org){: target="_blank" .external } with the [Materials theme](https://squidfunk.github.io/mkdocs-material/){: target="_blank" .external } theme.
48
45
49
46
MkDocs takes Markdown documents and turns them into a static website, that can be accessed from a filesystem or served from a web server.
@@ -273,13 +270,113 @@ The Admonitions supported by the Material theme are :
273
270
!!! quote
274
271
This is a quote
275
272
273
+
### Code blocks
274
+
275
+
Code blocks allow you to insert code or blocks of text in line or as a block.
276
+
277
+
To use inline you simply enclose the text using a single back quote **\`** character. So a command can be included using **\`oc get pods\`** and will create `oc get pods`
278
+
279
+
When you want to include a block of code you use a *fence*, which is 3 back quote character at the start and end of the block. After the opening quotes you should also specify the content type contained in the block.
280
+
281
+
**\`\`\` shell**
282
+
**oc get pods**
283
+
**\`\`\`**
284
+
285
+
which will produce:
286
+
287
+
```shell
288
+
oc get pods
289
+
```
290
+
291
+
Notice that the block automatically gets the *copy to clipboard* link to allow easy copy and paste.
292
+
293
+
Every code block needs to identify the content. Where there is no content type, then **text** should be used to identify the content as plain text. Some of the common content types are shown in the table below. However, a full link of supported content types can be found [here](https://pygments.org/docs/lexers/){: target="_blank"}, where the short name in the documentation should be used.
294
+
295
+
| type | Content
296
+
|------|--------
297
+
| **shell** | Shell script content
298
+
| **powershell** | Windows Power Shell content
299
+
| **bat** | Windows batch file (.bat or .cmd files)
300
+
| **json** | JSON content
301
+
| **yaml** | YAML content
302
+
| **markdown** or **md** | Markdown content
303
+
| **java** | Java programming language
304
+
| **javascript** or **js** | JavaScript programming language
305
+
| **typescript** or **ts** | TypeScript programming language
306
+
| **text** | Plain text content
307
+
308
+
#### Advanced highlighting of code blocks
309
+
310
+
There are some additional features available due to the highlight plugin installed in MkDocs. Full details can be found in the [MkDocs Materials documentation](https://squidfunk.github.io/mkdocs-material/reference/code-blocks/){: target=_blank}.
311
+
312
+
#### Line numbers
313
+
314
+
You can add line numbers to a code block with the **linenums** directive. You must specify the starting line number, 1 in the example below:
315
+
316
+
````md
317
+
``` javascript linenums="1"
318
+
<script>
319
+
document.getElementById("demo").innerHTML = "My First JavaScript";
320
+
</script>
321
+
```
322
+
````
323
+
324
+
creates
325
+
326
+
```javascript linenums="1"
327
+
<script>
328
+
document.getElementById("demo").innerHTML="My First JavaScript";
329
+
</script>
330
+
```
331
+
332
+
!!!Info
333
+
The line numbers do not get included when the copy to clipboard link is selected
334
+
335
+
#### Code highlighting
336
+
337
+
You can highlight specific lines of code using the **hl_lines** directive. The line numbers starts at 1 for the first line of code. If you want multiple lines highlighted, then provide the line numbers separated with a space. Below lines 1 and 3 are highlighted:
338
+
339
+
````md
340
+
``` javascript hl_lines="1 3"
341
+
<script>
342
+
document.getElementById("demo").innerHTML = "My First JavaScript";
343
+
</script>
344
+
```
345
+
````
346
+
347
+
creates
348
+
349
+
```javascript hl_lines="1 3"
350
+
<script>
351
+
document.getElementById("demo").innerHTML="My First JavaScript";
352
+
</script>
353
+
```
354
+
355
+
It is possible to combine line number and highlighting. Below I start the line numbers at 10 and highlight the second line of code:
356
+
357
+
````md
358
+
``` javascript linenums="10" hl_lines="2"
359
+
<script>
360
+
document.getElementById("demo").innerHTML = "My First JavaScript";
361
+
</script>
362
+
```
363
+
````
364
+
365
+
creates
366
+
367
+
```javascript linenums="10" hl_lines="2"
368
+
<script>
369
+
document.getElementById("demo").innerHTML="My First JavaScript";
370
+
</script>
371
+
```
372
+
276
373
### Redirects
277
374
278
-
To help external sites wanting to link to the documentation there are a number of vanity links maintained using the [redirect plugin](){: target=_blank}. The links are defined in the **mkdocs.yml** file and documented on the [Additional Resources](../resources/resources.md#linking-to-this-site){: target=_blank} page.
375
+
To help external sites wanting to link to the documentation there are a number of vanity links maintained using the [redirect plugin](https://pypi.org/project/mkdocs-redirects/){: target=_blank}. The links are defined in the **mkdocs.yml** file and documented on the [Additional Resources](../resources/resources.md#linking-to-this-site){: target=_blank} page.
279
376
280
377
To ensure the auto-generated link page does not get reported by the link checker, an entry needs to be added to the **nofollow** section of the link checker config file, **linkcheckerrc** in the root directory of the project.
281
378
282
-
E.g. if a link /help was created then an entry in the nofollow section should be ```public/help.html$```.
379
+
E.g. if a link **/help** was created then an entry in the nofollow section should be ```public/help.html$```.
283
380
284
381
## Spell checking
285
382
@@ -304,4 +401,3 @@ here the words *linkchecker*, *linkcheckerrc*, *mkdocs* and *mkdoc* are specifie
304
401
### Adding global words
305
402
306
403
The cSpell configuration file **cspell.json** contains a list of words that should always be considered valid when spell checking. The list of words applies to all files being checked.
Copy file name to clipboardExpand all lines: docs/reference/cli.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
## Invoking the CLI
6
6
7
-
When the [CLI is installed](../learning/dev-setup.html#install-the-cloud-native-toolkit-command-line-interface-cli), it adds an executable named `igc` to the PATH. Running `igc --help` will list
7
+
When the [CLI is installed](../learning/dev-setup.md#install-the-cloud-native-toolkit-command-line-interface-cli), it adds an executable named `igc` to the PATH. Running `igc --help` will list
8
8
the available commands. The output text will be similar to the following:
0 commit comments