-
Notifications
You must be signed in to change notification settings - Fork 54
Release related docs updates
- Add a docs version
- Update version and build numbers for release
- Archive docs and create offline PDFs
- Update build for Katacoda scenarios
Minor releases of Sensu Go require you to create a new copy of the docs, update the front matter, and update the site config.
- Create a copy of the latest version directory (ex:
content/sensu-go/5.19
) and rename it with the new version number (ex:content/sensu-go/5.20
). - Update the front matter with find-and-replace within your new directory for the following:
-
version: "x.x"
(one change per page) -
product-name-x.x:
(one change per page) -
menu: "product-name-x.x"
(one change per top-level page)
Available product name:
sensu-go
.
- In config.toml, list the new version (and applicable platforms) under the product parameters. For example: add:
[[params.products.sensu_go.versions]]
version = "5.20"
platforms = []
under:
[params.products.sensu_go]
identifier = "sensu-go"
name = "Sensu Go"
description = "The next-generation monitoring event pipeline"
weight = 1
latest = "5.19"
- After merging the PR to create the new version, go through open PRs and select the "update branch" button on each one. This ensures that existing pull requests are able to update new versions. Contributors will need to delete their local branch and re-fetch the branch from GitHub.
When you're ready to promote the new version as the latest version, create a PR with the following changes:
- Update the version number for the
latest
parameter (ex:latest = "5.20"
) in config.toml and static.json.
- In config.toml:
latest = "5.20"
- In static.json:
"~ ^/sensu-go/5.20/?((?<=\/).*)?$": {
- Update the Algolia search version in https://github.com/sensu/sensu-docs/blob/master/layouts/partials/footer_js.html
- Update https://github.com/sensu/sensu-docs/blob/master/layouts/index.html to update the Sensu Go tile to the latest version number for the Go docs.
For each release, the Customer Reliability rep is responsible for updating the version and build numbers in docs.sensu.io site pages.
- In a Terminal (bash or zsh) window, clone the website:
git clone https://github.com/sensu/sensu-docs.git && cd sensu-docs
- Run the
scripts/update-sensu-version.sh
script to update the version and build numbers in the appropriate docs version:
$ ./scripts/update-sensu-version.sh OLD_VERSION_NUMBER OLD_BUILD_NUMBER NEW_VERSION_NUMBER NEW_BUILD_NUMBER DOCS_VERSION
For example:
$ ./scripts/update-sensu-version.sh 5.18.0 9470 5.19.0 9999 5.18
Updating Sensu version from 5.18.0 (build 9470) to 5.19.0 (build 9999) for docs version 5.18
This script makes the following updates:
- /sensu-go/{version}/installation/install-sensu.md (build numbers)
- /sensu-go/{version}/installation/platforms.md (version numbers in AWS links)
NOTE: If you run the script but git status
doesn't list any changes to the build number on your branch, it may be because the new doc set was created from an earlier release (not the most recent release) and uses that release's build number. Check the Windows links under https://docs.sensu.io/sensu-go/latest/installation/install-sensu/#agent-download for the old build number to use in the script.
When we add a new minor version of Sensu Go or remove docs that are more than three minor versions old from the docs.sensu.io website, we create an offline PDF copy of the docs and update the Supported Versions page. This section describes how.
Follow these steps to create an offline PDF copy of a version of the docs:
- Clone a local copy of the docs repo, /sensu-docs.
- Run a local hugo server with offline layouts:
yarn
yarn run server --layoutDir=offline
- Navigate to http://localhost:1313/ and select the product and version you want to PDF. Copy the local URL.
- Open Acrobat and navigate to File → Create → PDF from Web Page to open the Create PDF from Web Page window.
- Paste the local URL in the URL: field.
- Click Capture Multiple Levels and select the following Settings options:
- Leave Get only ... level(s) selected and change the number of levels to 10.
- Select Stay on same path and Stay on same server.
- Click the Settings... button to open the Web Page Conversion Settings window. Make sure the File type is HTML. Under PDF Settings, select only Create bookmarks.
- In the Web Page Conversion Settings window, click OK.
- In the Create PDF from Web Page window, click Create.
- Save the generated PDF file with this naming convention:
sensu-go-5-12_sensu-docs
- Save the PDF in Sensu's Amazon S3 account in the
sensu-docs
bucket, inside thepdfs
folder.
Here's how to remove a version of the docs from docs.sensu.io:
-
Clone a local copy of the docs repo, /sensu-docs, and cd in.
-
Create the archived and product directory. Run:
mkdir -p archived/sensu-go
The sensu-docs site already includes this folder, so if you're archiving a Sensu Go docs version, you can skip this step.
-
Use git to move the target version into the archive:
git mv content/sensu-go/5.0/ archived/sensu-go/
-
Edit config.toml to remove the version being archived:
vi config.toml
-
i
to insert -
esc
to exit insert -
:w
to write and:q
to quit vim
-
Edit static.json to update the regex to include the version being archived:
vi static.json
-
i
to insert - In
"~ ^/sensu-go/5.1[0-2]/?((?<=\/).*)?$": {
, update the range inside[]
to include the version being archived. For example, to archive version 5.13, update to[0-3]
. -
esc
to exit insert -
:w
to write and:q
to quit vim
-
Commit changes to the sensu-docs repo and create a pull request.
If you need to re-create the offline PDF of an archived version of the docs (for example, if you make a major correction in the docs), here's how:
-
Clone a local copy of the docs repo, /sensu-docs, and cd in.
-
Symlink the archived version into the live site content for local server usage.
a. Change working directory to the product root:
cd content/sensu-go
b. Create a relative symlink to the archived doc content:
ln -sfv ../../archived/sensu-go/5.0
-
Run
yarn
andyarn run server --layoutDir=offline
-
Open
http://localhost:1313/sensu-go/5.0/
and create the offline PDF.
Update the supported versions page (versions.md) each time we release a version of Sensu Go. The required updates depend on whether the release is a new minor version or a patch release:
- If the release is a new minor version (with a new version of documentation):
- Create an offline PDF of the new docs version.
- Add a row in the versions.md table for the new minor version.
- Update the link to the release notes and the offline PDF copy in AWS.
- Mark the fourth previous version as "Not supported" in the versions.md table. For example, if you add version 5.15, mark version 5.12 as "Not supported."
- If the release is a patch release (e.g., 5.x.x with no new version of documentation):
- Add a row in the versions.md table for the new release.
- Update the link to the release notes for the new version. Use the link for the offline PDF copy in AWS as for the last minor version. For example, the 5.14.2 release should link to the same offline PDF copy as 5.14.1 and 5.14.0.
For every Sensu Go release:
- Trigger new build by merging a change to https://github.com/sensu/katacoda-scenarios/blob/master/environments/sensu-docker-sandbox/build/1_setup.sh
- Wait for build to complete. You can still check this at https://dashboard.katacoda.com/environments/builds/sensu
- Confirm the build didn't break the scenario by testing through beta.katacoda.com/sensu
- Back at https://dashboard.katacoda.com/environments/builds/sensu, if the beta environment testing is OK, click "Promote" for the build
- Wait 24 hours for an email from Katacoda confirming that the build is in production