Source for the istio.io site
Go to file
Hongyi Zhang 583d8ff0f7
Automate release process (#7601)
* script part one

* first draft

* save progress

* update README (i)

* try script

* add more echos

* even more echos

* complete list of git add

* change git add to --all

* separate remake archive

* change --all to -A

* fix path

* add credential helper

* fix path

* build an archive of v1.6 in tori-release

* add master variable

* build an archive of v1.6 in tori-release

* update data/versions.yml and archive index page

* finish redo_archive

* add patch release

* git add

* fix go command

* complete scripts

* make linters happy

* update readme

* update readme

* add script for prepare release

* add security patch arg

* fix release note path

* fix param expansion

* update readme

* fix typo

* refine patch release script

* add git pull to make sure everything is up to date

* ensure idempotence

* add dry run option

* fix func arg

* fix brackets

* allow existing branches

* fix arg bug

* remove git config

* update readme

* update readme

* remove unnecessary note

* update readme

* update readme

* fix indentation

* fix format bug

* force mv

* fix mv command

* rm previous archive

* fix extra char

* update readme

* change 1.4 example to 1.7; remove 'the'

* change 'set -e' position

* add function doc; do git pull --ff-only

* rename target to fetch-archive

* rename to PRIVATE_PATCH; remove release note template

* update readme

* add archive build in new release dry run

* rename to build_old_archive

* build archive before edit

* set upstream

* fix language

* rm set upstream

* delete dry run branch if exists

* change wordings

* make linter happy

* patch release changes

* rm args.yml edit

* change wordings

* change heading

* change gcse in readme

* Update README.md

* rm patch release automation

* Update README.md
2020-07-10 09:27:23 -07:00
.github Update reference docs. (#4552) 2019-06-24 17:02:04 -07:00
archetypes add zh in /zh、update lintcheck ci、fix conflicts (#5823) 2019-11-24 21:47:38 -08:00
archive Change links to /latest and include archive versions in the release site (#7567) 2020-06-15 11:29:02 -07:00
assets/inline_images [ImgBot] Optimize images (#5167) 2019-10-17 10:05:01 -07:00
bin Update istio/istio ref and reenable tests (#7669) 2020-07-09 13:29:32 -07:00
common Automator: update common-files@master in istio/istio.io@master (#7702) 2020-07-09 21:18:58 -07:00
content networking: add inbound tunnel port (#7701) 2020-07-10 06:24:30 -07:00
data Automator: update istio.io@ reference docs (#7661) 2020-07-03 10:32:54 -07:00
i18n Started translation to portuguese brazil (#6230) 2020-01-07 21:25:08 -05:00
layouts Change links to /latest and include archive versions in the release site (#7567) 2020-06-15 11:29:02 -07:00
pkg/test More cleanup of the test framework (#7640) 2020-06-28 12:24:19 -07:00
prow Update test framework to use 1.6.0-beta.0 (#7214) 2020-05-06 10:49:27 -07:00
scripts Automate release process (#7601) 2020-07-10 09:27:23 -07:00
src Change links to /latest and include archive versions in the release site (#7567) 2020-06-15 11:29:02 -07:00
static add proxy repo as vanity url (#7362) 2020-05-20 09:28:33 -07:00
test Remove old snippet examples (#7594) 2020-06-19 06:55:46 -07:00
tests Kubernetes Ingress Test + fixes (#7662) 2020-07-06 07:54:35 -07:00
.gitattributes Update common files. (#5052) 2019-09-25 06:56:54 -07:00
.gitignore Change links to /latest and include archive versions in the release site (#7567) 2020-06-15 11:29:02 -07:00
.spelling 1.5.8 and 1.6.5 release notes (#7692) 2020-07-09 13:15:21 -07:00
BUGS-AND-FEATURE-REQUESTS.md Update common files. (#4770) 2019-08-06 14:03:36 -07:00
CODEOWNERS Set codeowners for istio.io tests (#6523) 2020-02-20 11:28:35 -08:00
CONTRIBUTING.md Import common files into this repo. (#4246) 2019-05-31 05:01:37 -07:00
LICENSE Automator: update common-files@master in istio/istio.io@master (#6365) 2020-01-31 08:04:41 -08:00
Makefile Automator: update common-files@master in istio/istio.io@master (#7018) 2020-04-01 12:47:51 -07:00
Makefile.core.mk Automate release process (#7601) 2020-07-10 09:27:23 -07:00
Makefile.overrides.mk Allow specifying additional CONTAINER_OPTIONS to help running (#7075) 2020-04-14 07:29:43 -07:00
README.md Automate release process (#7601) 2020-07-10 09:27:23 -07:00
SUPPORT.md Site improvements. (#6003) 2019-12-06 06:59:22 -08:00
config.toml Started translation to portuguese brazil (#6230) 2020-01-07 21:25:08 -05:00
go.mod Update istio/istio ref and reenable tests (#7669) 2020-07-09 13:29:32 -07:00
go.sum Update istio/istio ref and reenable tests (#7669) 2020-07-09 13:29:32 -07:00
mdl.rb Update common files. (#5052) 2019-09-25 06:56:54 -07:00
netlify.toml Apply netlify best practices (#6381) 2020-01-31 07:18:43 -08:00
tsconfig.json Stop checking in the "generated" directory. (#4365) 2019-06-12 19:48:49 +00:00

README.md

Site Status
istio.io Netlify Status
preliminary.istio.io Netlify Status
archive.istio.io Netlify Status

istio.io

This repository contains the source code for istio.io and preliminary.istio.io.

Please see the main Istio README file to learn about the overall Istio project and how to get in touch with us. To learn how you can contribute to any of the Istio components, please see the Istio contribution guidelines.

Editing and building

To learn how to edit and build this repo's content, please refer to Creating and Editing Pages.

Versions and releases

Istio maintains two variations of its public site.

  • istio.io is the main site, showing documentation for the current release of the product. istio.io/archive contains snapshots of the documentation for previous releases of the product. This is useful for customers still using these older releases.

  • preliminary.istio.io contains the actively updated documentation for the next release of the product.

The user can trivially navigate between the different variations of the site using the gear menu in the top right of each page. Both sites are hosted on Netlify.

How versioning works

  • Documentation changes are primarily committed to the master branch of istio.io. Changes committed to this branch are automatically reflected on preliminary.istio.io.

  • The content of istio.io is taken from the latest release-XXX branch. The specific branch that is used is determined by the istio.io Netlify project's configuration.

Publishing content immediately

Checking in updates to the master branch will automatically update preliminary.istio.io, and will only be reflected on istio.io the next time a release is created, which can be several weeks in the future. If you'd like some changes to be immediately reflected on istio.io, you need to check your changes both to the master branch and to the current release branch (named release-<MAJOR>.<MINOR> such as release-1.7).

This process can be taken care of automatically by our infrastructure. If you submit a PR to the master branch and annotate the PR with the actions/merge-to-release-branch label, then as soon as your PR is merged into master, it will be merged into the current release branch.

Creating a major/minor release

Here are the steps necessary to create a new documentation version. Let's assume the current version of Istio is 1.6 and you wish to introduce 1.7 which has been under development.

When Istio source code is branched

Run make prepare-1.7.0, and that's it. This will grab the latest material from the new istio source branch.

On the day of the release

  1. Run make release-1.7.0. This make target will change some variables in master and release-1.6 as needed, and create a new branch release-1.7 for the new version.

    • For a dry run before official release, run make release-1.7.0-dry-run, which will only create a new branch release-1.7-dry-run, and not touch any other branches.
  2. Go to the istio.io project on Netlify and do the following:

    • Change the branch that is built from the previous release's branch to the new release branch, in this case release-1.7 (or release-1.7-dry-run as appropriate).

    • Select the option to trigger an immediate rebuild and redeployment.

    • Once deployment is done, browse istio.io and make sure everything looks good.

  3. Go to the Google Custom Search Engine and do the following:

    • Download the istio.io CSE context file from the Advanced tab.

    • Add a new FacetItem at the top of the file containing the previous release's version number. In this case, this would be V1.6.

    • Upload the updated CSE context file to the site.

    • In the Setup section, add a new site that covers the previous release's archive directory. In this case, the site URL would be istio.io/v1.6/*. Set the label of this site to the name of the facet item created above (V1.6 in this case).

Creating a patch release

A few days before the patch release, the release managers should notify the Doc WG that the release is built and is starting it's long running qualification test. At this time, move the doc automation tests to use the new release to verify automated doc testing passes.

To move to a new release (make sure you are in the patch's release branch):

  1. Run go get istio.io/istio@A.X.Y && go mod tidy.

  2. Create a PR with the go.* changes.

Creating a new patch release involves modifying a few files:

  1. Edit data/args.yml and change the full_version field to "A.X.Y".

  2. Complete the release note for the release by editing the markdown file content/en/news/releases/A.X.x/announcing-A.X.Y/index.md. This is where you describe the changes in the release. Please look at other existing files for example content and layout.

  3. Run make update_ref_docs to get the latest reference docs.

Updating an archive

If the archived version in a newer branch (e.g., release-1.7:archive/v1.6) needs to be updated due to changes in the old release branch (release-1.6 in this case), you can run build-old-archive-1.6.0 in the release-1.7 branch, which will re-archive release-1.6 and substitute it for the previous archive in the current branch.

Multi-language support

The site is translated into multiple languages. Source of truth is the English content, while other languages are derived and so tend to lag behind slightly. Each site language gets its own fully self-contained content directory and translation table file. Languages are identified using their international 2-letter language code. The main site content is located in content/<language code> (e.g. content/en), and the translation table is a TOML-format file in i18n\<language code>.toml (e.g. i18n/en.toml).

Getting started with translation is fairly simple:

  • Create a full copy of the content/en directory for your language. For example, you'd copy content/en to content/fr if you were doing a French translation.

  • Update all the links in your new content directory to point to your content directory instead of to the English content. For example, if you were doing a French translation you would change links such as [a doc](/docs/a/b/c) to [a doc](/fr/docs/a/b/c).

  • Remove all the aliases directives in the front-matter of all content pages. Aliases are used when moving a page to a new location, so they're not desirable for brand new content.

  • Create a copy of the i18n/en.toml file for your language. For example, you'd copy i18n/en.toml to i18n/fr.toml if you were doing a French translation. This file contains the text that is displayed by the site infrastructure for things like menus, and other standard material.

  • Edit the file config.toml to list your new language. Search for the [languages] entry and just add a new entry. This tells the Hugo site generator to process your content.

  • Edit the file scripts/lint_site.sh and search for check_content. Add another call to check_content for your new content directory. This ensures that the linting rules apply to your new content.

  • Edit the file src/ts/lang.ts and add your new language. This will add your language to the language toggle button that is available on preliminary.istio.io and will make it so your language will be supported in the language selection menu.

  • Get an Istio GitHub administrator to create a new maintainer team for your language. For Franch, this would be WG - Docs Mintainers/French.

  • Edit the file CODEOWNERS and add entries for your language to give the new team you've created ownership over the translated content and translation table file.

You can then commit all of these changes and you can start translating the content and the translation file in a purely incremental fashion. When you build the site, you'll find your content at <url>/<language code>. For example, once you've checked everything in, you should be able to get to your content at https://preliminary.istio.io/fr if you were doing a French translation.

Once your translation is complete and you're ready to publish it to the world, there are a few other changes you need to make:

  • Edit the file layouts/index.redir. Search for translated sites and add a line for your language. This will cause users coming to the site for the first time to be automatically redirectded to the translated content suitable for them. For French, this would be:

    /  /fr   302  Language=fr
    
  • Edit fhe file layouts/partials/headers.html. Search for switch-lang and you'll find the definitions for the language selection menu. Add a line for your new language.

And that's it.

Regular maintenance

We have a number of checks in place to ensure a number of invariants are maintained in order to help the site's overall quality. For example, we disallow checking in broken links and we do spell checking. There are some things which are hard to systematically check through automation and instead require a human to review on in a while to ensure everything's doing well.

It's a good idea to run through this list before every major release of the site:

  • Ensure that references to the Istio repos on GitHub don't hardcode branch names. Search for any uses of /release-1 or /master throughout all the markdown files and replace those with {{< source_branch_name >}} instead, which produces a version-appropriate branch name.

  • Review the .spelling file for words that shouldn't be in there. Type names in particular tend to creep in here. Type names should not be in the dictionary and should instead be shown with backticks. Remove the entries from the dictionary and fix any spell checking errors that emerge.

  • Ensure proper capitalization. Document titles need to be fully capitalized (e.g. "This is a Valid Title"), while section headings should use first letter capitalization only (e.g. "This is a valid heading").

  • Ensure that preformatted text blocks that reference files from the Istio GitHub repos use the @@ syntax to produce links to the content. See here for context.