-
Notifications
You must be signed in to change notification settings - Fork 15
Allow self-hosting of custom site-specific user and operator documentation #200
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
Changes from all commits
d0928ea
60e7e58
85bbd1b
1fc44d8
37cf41b
6bf7cfd
edc7cd9
3019388
4a959ef
c683207
8d972cf
0cecd97
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,25 +1,78 @@ | ||
| # Local customisations | ||
|
|
||
| Azimuth allows a few site-specific customisations to be made to the user interface, if required. | ||
| Azimuth allows a few site-specific customisations to be made, if required. | ||
|
|
||
| ## Documentation link | ||
| ## User and Operator Documentation | ||
|
|
||
| The Azimuth UI includes a documentation link in the navigation bar at the top of the page. | ||
| By default, this link points to the | ||
| [generic Azimuth user documentation](https://azimuth-cloud.github.io/azimuth-user-docs/) that | ||
| covers usage of the reference appliances. | ||
| As part of the standard Azimuth deployment procedure, a copy of the generic user and operator | ||
| documentation sites are published on separate subdomains of the Azimuth ingress URL. For an Azimuth | ||
| instance hosted at `portal.azimuth.example.com`, the documentation can be accessed at | ||
| `user.docs.azimuth.example.com` and `admin.docs.azimuth.example.com` respectively. The operator | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it make sense to use operator.docs.azimuth.example.com instead of admin.docs.azimuth.example.com? Would match how it's being referred to in this section.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah probably, I flip-flopped between admin and operator a few times while putting this together. I guess we should settle on one or the other for consistency before finalising the changes.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I fact, that's a mistake in the docs because I also changed my mind and went for
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do like "Azimuth operator" but consistency across the docs is best, whatever we choose. |
||
| documentation is protected by the same username and password as the | ||
| [admin dashboards](../configuration/14-monitoring.md#accessing-web-interfaces). | ||
|
|
||
| However it is recommended to change this link to point at local documentation that is specific | ||
| to your site, where possible. This documentation can include additional information, e.g. | ||
| how to get an account to use with Azimuth, which is out-of-scope for the generic documentation. | ||
| ### Site-specific documentation | ||
|
|
||
| To change the documentation link, use the following variable: | ||
| The default configuration for the user and operator documentation will build a local copy | ||
| of the [upstream documentation](https://github.com/azimuth-cloud/azimuth-config/tree/stable/docs); | ||
| however, the following configuration can be used to instead build the documentation from a | ||
| downstream azimuth-config repository: | ||
|
|
||
| ```yaml title="environments/my-site/inventory/group_vars/all/variables.yml" | ||
| azimuth_documentation_url: https://docs.example.org/azimuth | ||
| mkdocs_operator_docs_repo: https://<your-github-or-gitlab-repo> | ||
| mkdocs_operator_docs_branch: <optional-non-default-branch> | ||
| mkdocs_user_docs_repo: https://<your-github-or-gitlab-repo> | ||
| mkdocs_user_docs_branch: <optional-non-default-branch> | ||
| ``` | ||
|
|
||
| ## Theming | ||
| This allows Azimuth operators to build up their own set of internal documentation pages specific to | ||
| their Azimuth deployment. A set of | ||
| [example files](https://github.com/azimuth-cloud/azimuth-config/tree/stable/docs/site-example/) | ||
| are provided as part of the upstream repository as a starting point for structuring your site-specific | ||
| operator documentation. You will also need to uncomment (or add your own items to) the relevant `nav` | ||
| entries in your local [mkdocs.yml](https://github.com/azimuth-cloud/azimuth-config/tree/stable/mkdocs.yml) | ||
| file. For more information on how to customise your local documentation see the official | ||
| [MkDocs website](https://www.mkdocs.org). | ||
|
|
||
| !!! tip | ||
|
|
||
| In order to minimise the potential for merge conflicts when synchronising the latest upstream changes | ||
| into a downstream azimuth-config repository, it is recommended that any site specific docs are placed | ||
| in a separate set of files / folders under the `docs` directory. An example structure is provided | ||
| [here](https://github.com/azimuth-cloud/azimuth-config/tree/stable/docs/site-example/). | ||
|
|
||
| If the downstream configuration is hosted in a private repository, then SSH-based authentication | ||
| must be used to allow the documentation build process *read-only* access to the repository. To set | ||
| up this authentication, an SSH keypair must first be created using (a command similar to): | ||
|
|
||
| ```sh | ||
| ssh-keygen -t ed25519 -f azimuth-docs-key -N "" -C "-- Azimuth config repository deploy key" | ||
| ``` | ||
|
|
||
| The generated private key should then be stored as an encrypted secret inside the environment's | ||
| `secrets.yml` file: | ||
|
|
||
| ```yaml title="environments/my-site/inventory/group_vars/all/secrets.yml" | ||
| mkdocs_deploy_ssh_private_key: | | ||
| <private-key> | ||
| ``` | ||
|
|
||
| and the public key must be added to the config repository as a 'deploy key' (see relevant | ||
| [GitHub](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/managing-deploy-keys#deploy-keys) | ||
| or [GitLab](https://docs.gitlab.com/ee/user/project/deploy_keys/) docs for more details). | ||
|
|
||
| Finally, the target repository URL(s) should be updated to use an SSH-based git remote address e.g. `[email protected]:my-org/azimuth-config` instead of `https://github.com/my-org/azimuth-config`. | ||
|
|
||
| !!! tip | ||
|
|
||
| The documentation publishing feature works by checking out a local copy of the repository inside a Kubernetes | ||
| init container and then running `mkdocs`. To debug authentication or build issues, start by checking the logs | ||
| of the relevant `operator_docs` or `user_docs` init container on the Azimuth management cluster. | ||
|
|
||
| <!-- TODO: Think about how to refresh docs when docs change but mkdocs Helm release values don't. --> | ||
| <!-- When working with site-specific documentation for deployments managed via GitLab [CI/CD](../deployment/automation.md) it is also advisable to edit the `.gitlab-ci.yml` workflow file to include the `docs/` directory in the list of watched files for the production deployment job (i.e. the `changes` list in the `deploy_production` section). This ensures that any changes made to site-specific documentation will be automatically incorporated into the published documentation pages. --> | ||
|
|
||
| ## User Interface Theming | ||
|
|
||
| The Azimuth UI is built using the [Bootstrap frontend toolkit](https://getbootstrap.com/), | ||
| which provides a grid system and several built-in components. | ||
|
|
@@ -41,7 +94,7 @@ azimuth_theme_bootstrap_css_url: https://bootswatch.com/5/zephyr/bootstrap.css | |
| ``` | ||
| !!! tip | ||
|
|
||
| In order for the theming changes to take effect you may need to do a hard refresh of | ||
| In order for the theming changes to take effect you may need to do a hard refresh of | ||
| the page due to the aggressive nature of CSS caching. | ||
|
|
||
| Mac: <kbd>⇧ Shift</kbd> + <kbd>⌘ Command</kbd> + <kbd>R</kbd> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # **_example-cloud_** Azimuth Operator Documentation | ||
|
|
||
| _Add any site-specific operator documentation such as information about custom applications | ||
| in the Azimuth app catalog or other important information that Azimuth operators should be | ||
| aware of._ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # Operator Quickstart | ||
|
|
||
| This is an operator quickstart guide for the **_example-cloud_** Azimuth deployment. | ||
|
|
||
| ## Getting started | ||
|
|
||
| To start working with the **_example-cloud_** Azimuth deployment a new operator first must be | ||
| granted access to the configuration repository's [encrypted secrets](../repository/secrets.md). | ||
| The recommended way to do so is using [GPG keys](../repository/secrets.md#granting-access-to-others). | ||
|
|
||
| The **_example-cloud_** Azimuth configuration is managed via CI/CD, meaning that the correct process for | ||
| applying configuration changes is to create a pull request into the **_example-cloud_** azimuth-config | ||
| repository and have it reviewed by another team member. Once the change has been approved, merging the | ||
| pull request will trigger an automatic deployment of the updated configuration to the Azimuth staging | ||
| environment. Once a change has been deployed and tested in staging, the equivalent CI job for deploying | ||
| the change to the production Azimuth environment should be triggered manually by an operator via the | ||
| **_GitLab-or-GitHub_** UI. | ||
|
|
||
| ## Useful links | ||
|
|
||
| The **_example-cloud_** Azimuth includes a useful set of monitoring dashboards and tools for operators. | ||
| A general overview of the available tools can be found | ||
| [here](https://azimuth-config.readthedocs.io/en/stable/configuration/14-monitoring/) and the | ||
| _example-cloud_ instances can be accessed using the following links: | ||
|
|
||
| - _Insert list of links to Grafana, Alert Manager etc._ | ||
|
|
||
| For an introduction to the available configuration options within an Azimuth deployment, see | ||
| [here](https://azimuth-config.readthedocs.io/en/stable/configuration/). | ||
|
|
||
| ## Custom **_example-cloud_** Azimuth Apps | ||
|
|
||
| _Optional: Describe any custom site-specific Azimuth apps here and link to the relevant configuration | ||
| sections in the downstream azimuth-config repository._ | ||
|
|
||
| ## Notable **_example-cloud_** configuration | ||
|
|
||
| _Optional: Desribe any important ways in which this downstream configuration differs from the upstream Azimuth | ||
| defaults, e.g. custom networking or storage integrations or explicitly enabled or disabled experimental | ||
| features._ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ | |
| collections: | ||
| - name: https://github.com/azimuth-cloud/ansible-collection-azimuth-ops.git | ||
| type: git | ||
| version: 0.13.2 | ||
| version: feat/mkdocs # 0.13.2 | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO: Revert this before merging. |
||
| # For local development | ||
| # - type: dir | ||
| # source: ../ansible-collection-azimuth-ops | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this, isn't it available by ingress anyway?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's useful for doing development work on the Azimuth UI because you can just run a port-forward to the API and then start the UI on localhost with
npm run devrather than having to do the full tilt-based development setup. Not really part of this PR but just a local change I had lying around that I accidentally included here. I can move it to a separate PR instead.