Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(infra): Upgrade Docsy to 0.7.1; Remove Prism #2104

Merged
merged 6 commits into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 27 additions & 11 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,41 @@ googleAnalytics = 'G-W14B82N2D2'

#disableKinds = ["taxonomy", "taxonomyTerm"]

# Highlighting config
# Highlighting config (copied from the docsy example site, tag v0.7.1)
pygmentsCodeFences = true
pygmentsUseClasses = false
# Use the new Chroma Go highlighter in Hugo.
pygmentsUseClassic = false
#pygmentsOptions = "linenos=table"
# See https://help.farbox.com/pygments.html
pygmentsStyle = "tango"
pygmentsStyle = "dracula"

[markup]
[markup.goldmark]
[markup.goldmark.parser.attribute]
block = true
[markup.goldmark.renderer]
unsafe = true
[markup.highlight]
# See a complete list of available styles at https://xyproto.github.io/splash/docs/all.html
style = "dracula"
# these are defaults https://gohugo.io/getting-started/configuration-markup/#highlight
anchorLineNos = false
codeFences = true
hl_Lines = ''
hl_inline = false
lineAnchors = ''
lineNoStart = 1
lineNos = false
lineNumbersInTable = true
noClasses = true
noHl = false
tabWidth = 4
guessSyntax = true
# Set guessSyntax to true if you want your chosen highlight style used for code blocks without a specified language

# Docsy is now a Go module; need to map theme dirs to local dirs
# 16 Aug 2023 When I remove the module.imports.mounts entries, compilation breaks with a lot of "not found" - can't find shortcodes or refs
[module]
proxy = "direct"

Expand Down Expand Up @@ -112,11 +137,6 @@ languageName ="English"
# Weight used for sorting.
weight = 1

[markup]
[markup.goldmark]
[markup.goldmark.renderer]
unsafe = true

[[menu.main]]
name = "CD-as-a-Service"
weight = 2
Expand Down Expand Up @@ -156,7 +176,6 @@ weight = 1

[params]
# See codenew shortcode
githubWebsiteRaw = "raw.githubusercontent.com/armory/docs"
deploy-engine-plugin-version = "0.16.8"
armory-version = "2.30.x"
#used in air-gapped
Expand Down Expand Up @@ -220,9 +239,6 @@ offlineSearch = true
offlineSearchMaxResults = 50
offlineSearchSummaryLength = 200

# Enable syntax highlighting and copy buttons on code blocks with Prism
prism_syntax_highlighting = true

# Armory Agent plugin versions
[params.kubesvc-plugin]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ The following script generates these files in the `services` directory:
- Certificate and key files for each Golang services (`terraformer.crt` and `terraformer.key`, ...)
- a `tls-passwords` file containing all the passwords. You can store as-is in a bucket.


{{< prism lang="shell" line-numbers="true" >}}
```shell
#!/bin/bash -e

# You can change it to a different method
Expand Down Expand Up @@ -172,12 +171,12 @@ EOF

echo "${svc}: ${password}" >> services/tls-passwords
done
{{< /prism >}}
```

## Troubleshooting

You may encounter the following error if the version of Java you are using to generate the certificates is not the same version that Armory Continuous Deployment is using:

{{< prism lang="shell" >}}
```bash
java.io.IOException: Integrity check failed: java.security.NoSuchAlgorithmException: Algorithm HmacPBESHA256 not available
{{< /prism >}}
```
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The following configuration example shows how to configure Echo to send data to

Add the <b>rest</b> block to the <b>spec.spinnakerConfig.profiles.echo</b> section of your Operator manifest.

{{< prism lang="yaml" >}}
```yaml
apiVersion: spinnaker.armory.io/v1alpha2
kind: SpinnakerService
metadata:
Expand All @@ -43,7 +43,7 @@ spec:
Authorization: "<TOKEN>"
template: '{"event":{{event}} }'
insecure: true
{{< /prism >}}
```


* `SERVICE_URL`: the FQDN of the service; for example `https://splunk.armory.io`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ You have two options for installing the Observability plugin:

The following example adds the Observability Plugin configuration for all services to the `spinnaker-local.yml` file and enables Prometheus:

{{< prism lang="yaml" >}}
```yaml
# These lines are spring-boot configuration to allow access to the metrics
# endpoints. This plugin adds the "aop-prometheus" endpoint on the
# "<service>:<port>/aop-prometheus" path.
Expand All @@ -54,6 +54,6 @@ spinnaker:
repositories:
armory-observability-plugin-releases:
url: https://raw.githubusercontent.com/armory-plugins/armory-observability-plugin-releases/master/repositories.json
{{< /prism >}}
```

You can find more options for management endpoints and the plugin in the [plugin's README](https://github.com/armory-plugins/armory-observability-plugin).
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ For example, to ensure that a `ConfigMap` is present on all Spinnaker services,
you would add the following configuration block to your `SpinnakerService`
config:

{{< prism lang="yaml" line="5-9" >}}
{{< highlight yaml "linenos=table,hl_lines=5-9" >}}
apiVersion: spinnaker.armory.io/v1alpha2
kind: SpinnakerService
metadata:
Expand All @@ -105,7 +105,7 @@ spec:
mountPath: /opt/spinnaker/config/foo
type: configMap
name: custom-volume
{{< /prism >}}
{{< /highlight >}}

The previous configuration sample indicates how to specify patches in the
[`patchesJson6902`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ version](https://spinnaker.io/community/releases/versions/) that you want to
deploy, such as `{{< param "armory-version-exact" >}}` (Armory Continuous Deployment) or
`1.25.3` (Spinnaker).

{{< prism lang="yaml" line="8" >}}
{{< highlight yaml "linenos=table,hl_lines=8" >}}
kind: SpinnakerService
metadata:
name: spinnaker
spec:
spinnakerConfig:
config:
version: {{< param "armory-version-exact" >}}
{{< /prism >}}
{{< /highlight >}}

### Verify resources

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ description: >

The structure of the manifest file is the same whether you are using the Armory Operator or the Spinnaker Operator. The value of certain keys, though, depends on whether you are deploying Armory Continuous Deployment or Spinnaker. The following snippet is the first several lines from a `spinnakerservice.yml` manifest that deploys Armory Continuous Deployment.

{{< prism lang="yaml" line="1,8" >}}
{{< highlight yaml "linenos=table,hl_lines=1 8" >}}
apiVersion: spinnaker.armory.io/{{< param "operator-extended-crd-version" >}}
kind: SpinnakerService
metadata:
Expand All @@ -34,7 +34,7 @@ spec:
s3:
bucket: <s3-bucket-name>
rootFolder: front50
{{< /prism >}}
{{< /highlight >}}

* Line 1: `apiVersion` is the CRD version of the `SpinnakerService` custom resource.
* If you are deploying Armory Continuous Deployment, the value is `spinnaker.armory.io/{{< param "operator-extended-crd-version" >}}`; if you change this value, the Armory Operator won't process the manifest file.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ Each subdirectory in the `profiles` directory contains a `<service-name>.yml` pr

If you need to change your Docker registry, you can manually edit the `<armory-version>.yml` file located under `halconfig/bom`. Update the value for the key `artifactSources.dockerRegistry`.

{{< prism lang="yaml" line="18" >}}
{{< highlight yaml "linenos=table,hl_lines=18" >}}
version: 2.25.0
timestamp: "2021-03-25 09:28:32"
services:
Expand All @@ -163,7 +163,7 @@ dependencies:
version: 2:2.8.4-2
artifactSources:
dockerRegistry: my.jfrog.io/myteam/armory
{{< /prism >}}
{{< /highlight >}}

## Copy the BOM

Expand Down Expand Up @@ -257,7 +257,7 @@ From the `spinnaker-kustomize-patches/operator` folder, execute the `operatorima
You also need to update Armory Operator configuration to include the secret access key for MinIO.
Locate `spinnaker-kustomize-patches/operator/patch-config.yml` and update the `AWS_SECRET_ACCESS_KEY` value with the `minioAccessKey` value you created in the [Deploy MinIO to host the BOM](#deploy-minio-to-host-the-bom) section.

{{< prism lang="yaml" line="14, 24" >}}
{{< highlight yaml "linenos=table,hl_lines=14 24" >}}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -291,13 +291,13 @@ spec:
defaultMode: 420
name: operator-config
name: operator-config
{{< /prism >}}
{{< /highlight >}}

### Update Halyard configuration

The Armory Operator uses its own Halyard installation to deploy and manage Armory Continuous Deployment. You need to configure the new BOM location in `spinnaker-kustomize-patches/operator/halyard-local.yml`. Update your `halyard-local.yml` to match the content of the highlighted lines in the following example:

{{< prism lang="yaml" line="8-14" >}}
{{< highlight yaml "linenos=table,hl_lines=8-14" >}}
halyard:
halconfig:
directory: /home/spinnaker/.hal
Expand All @@ -312,7 +312,7 @@ spinnaker:
enablePathStyleAccess: true # If you are using a platform that does not support PathStyleAccess, such as MinIO, switch this to true (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro).
endpoint: http://minio.spinnaker:9000
anonymousAccess: false
{{< /prism >}}
{{< /highlight >}}


## Deploy the Armory Operator
Expand Down
13 changes: 7 additions & 6 deletions content/en/contribute/create/guides/diagram-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: Diagram Guide
weight: 3
description: >
Use Mermaid to create diagrams and charts in your content pages.
draft: true
---

## {{% heading "prereq" %}}
Expand Down Expand Up @@ -58,7 +59,7 @@ Additional Mermaid resources:
```

<details><summary>Show me the code.</summary>
{{< prism >}}
{{< highlight >}}
```mermaid
graph TB

Expand Down Expand Up @@ -95,7 +96,7 @@ Additional Mermaid resources:
classDef external fill:#c0d89d,stroke:#39546a;
class deck,api external
```
{{< /prism >}}
{{< /highlight >}}
</details>

### Flowchart examples
Expand Down Expand Up @@ -126,7 +127,7 @@ flowchart LR
```

<details><summary>Show me the code.</summary>
{{< prism >}}
{{< highlight >}}
```mermaid
flowchart LR
id0<--"REST API"-->id2
Expand All @@ -151,7 +152,7 @@ flowchart LR
class id2,id3,id0 armory
class outside ext
```
{{< /prism >}}
{{< /highlight >}}
</details>

<br>
Expand Down Expand Up @@ -182,7 +183,7 @@ flowchart TB
```

<details><summary>Show me the code.</summary>
{{< prism >}}
{{< highlight >}}
```mermaid
flowchart TB
A --> B
Expand All @@ -205,7 +206,7 @@ flowchart TB
E[Callback to Deployment]
end
```
{{< /prism >}}
{{< /highlight >}}
</details>


Expand Down
5 changes: 0 additions & 5 deletions content/en/contribute/create/guides/docs-style-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,3 @@ When in doubt, check the company’s website.
| Elastic Compute Cloud | EC2 | Spinnaker can deploy EC2 instances after baking an AMI for them. |
| NGINX, NGINX Plus, NGINX Controller| | |


## {{% heading "nextSteps" %}}

{{< linkWithTitle "diagram-guide.md" >}}
<br><br>
71 changes: 0 additions & 71 deletions content/en/contribute/create/guides/prism.md

This file was deleted.

Loading
Loading