Skip to content

Commit

Permalink
Change cni.dev versioning scheme
Browse files Browse the repository at this point in the history
- Changing from a URL based to a folder based versioning scheme.
- Moving from 3 digit to 2 digit version number scheme
- Add link checker command to Makefile
- Updating navbar-version-selector's dropdown menu to link to the top level of a
  version if the specific file does not exist
- Updating deprecation warning
- Updating links throughout

Contributes to: containernetworking#76

Signed-off-by: Nate W <4453979+nate-double-u@users.noreply.github.com>
  • Loading branch information
nate-double-u committed Mar 10, 2021
1 parent 513977a commit 14e5db1
Show file tree
Hide file tree
Showing 123 changed files with 5,421 additions and 364 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ node_modules/
# files
package-lock.json
yarn.lock

# Link checker artefacts
bin/
tmp/

9 changes: 9 additions & 0 deletions .htmltest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

# Link check code based on Luc Perkins etcd-io/website
# https://github.com/etcd-io/website/commit/5ed6c700096509c7b436de440e9cc72a8475fb0b#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52

DirectoryPath: public
IgnoreDirectoryMissingTrailingSlash: true
CheckExternal: false
IgnoreAltMissing: true

27 changes: 23 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
DOCKER_IMG = klakegg/hugo:0.80.0-ext
SERVER = server --buildDrafts --buildFuture --disableFastRender --ignoreCache

yarn:
yarn

serve:
yarn
hugo server \
--buildDrafts \
--buildFuture \
--disableFastRender
hugo $(SERVER)

docker-serve:
docker run --rm -it -v $(PWD):/src -p 1313:1313 $(DOCKER_IMG) $(SERVER)

production-build:
hugo \
Expand All @@ -24,3 +27,19 @@ preview-build:

open:
open https://cncf-hugo-starter.netlify.com

# Link check code based on Luc Perkins etcd-io/website
# https://github.com/etcd-io/website/commit/5ed6c700096509c7b436de440e9cc72a8475fb0b#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52

clean:
rm -rf public

link-checker-setup:
# https://wjdp.uk/work/htmltest/
curl https://htmltest.wjdp.uk | bash

run-link-checker:
bin/htmltest

check-links: clean production-build link-checker-setup run-link-checker

192 changes: 0 additions & 192 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,195 +45,3 @@ This repository has two layouts with minimal styling, all stored under `/layouts

Both use default components and styling from the Bootstrap CSS framework. No menus are structured, because menu structure is highly dependent on the nature of the project.

# Versioning the CNI website

The current website version should always be in sync with the [containernetworking/plugins](https://github.com/containernetworking/plugins) repo’s master branch as this website is its continuously deployed documentation. The current version of the site should always be the most up to date version of the documentation.

## Creating a new version

To create a new version from the main branch, the process is as follows.

For this example, v0.8.7 is "Current" in the main branch, and will be frozen into its own version. The new version for the site’s main branch will be v0.8.8, but will be listed as `Current`.

### Create new branch & update version

Create a new branch from `main` in the form `release-x.x.x`

```bash
$ git checkout -b release-0.8.7
Switched to a new branch 'release-0.8.7'
```

Edit the `config.toml` file with the new `latest` version (v0.8.8).
Update the `docsbranch` to help people know where this version is going to reside.

If this version is now deprecated, set the `deprecated` flag to true to show the deprecation warning on the site.

Add a new `[[params.versions]]` with the newest current version.

Update the existing v0.8.7 `[[params.versions]]` for this version.

```toml
latest = "v0.8.7" # updated
latestUrl = "https://v0-8-7.cni.dev" # Updated

# Site information (i.e., the site currently being served. In this case, v0.8.7)
fullversion = "v0.8.7"
version = "v0.8.7"
docsbranch = "relese-0.8.7" # updated
deprecated = false

# Updated current version menu entry
[[params.versions]]
fullversion = "v0.8.8" # updated
version = "Current"
docsbranch = "master"
url = "https://www.cni.dev"

# New version v0.8.7 menu entry
[[params.versions]]
fullversion = "v0.8.7"
version = "v0.8.7"
docsbranch = "release-0.8.7"
url = "https://v0-8-7.cni.dev"
```

Commit and push the new `release-0.8.7` branch upstream.

### Create new netlify site

Login at https://app.netlify.com
Select `CNCF Projects` team.
- Note: If you don’t have access to this team, please contact the CNCF to update team permissions.

![CNCF Projects](static/img/readme/netlify-1-cncf-projects.png)

Click the `New site from Git` button

#### Create a new site

![Create a new site](static/img/readme/netlify-2-create-a-new-site-1.png)

Select `GitHub`

At “Continuous Deployment: GitHub App” prompt, select `containternetworking` project, then click `cni.dev`.

![Create a new site](static/img/readme/netlify-2-create-a-new-site-2.png)

At the “Deploy settings for containernetworking/cni.dev” prompt, set the following
- Branch to deploy: `release-0.8.7`
- Build command: `make non-production-build`

![Create a new site](static/img/readme/netlify-2-create-a-new-site-3.png)

Click `Deploy site`

### Site & domain settings

Once deployed, click `site settings` to change the site name.

Click change site name

![Site details](static/img/readme/netlify-3-site-details.png)

Set site name: v0-8-7-cni
(this will update the URL as well)

![Site details](static/img/readme/netlify-3-site-details-2-change-name.png)

The site is now deployed at https://v0-8-7-cni.netlify.app/, with correct entries in the “Versions” menu.

#### DNS updates

Now the permanent URL for the version can be set up.

From the `v0-8-7-cni` dashboard, click `Domain Settings`

![Domains](static/img/readme/netlify-4-domains-1.png)

Click `Add custom domain`

![Domains](static/img/readme/netlify-4-domains-2.png)

Enter `v0-8-7.cni.dev` and click `Verify`

![Domains](static/img/readme/netlify-4-domains-3.png)

Netlify may prompt: "cni.dev already has an owner. Is it you?"

Click `Yes, add domain` to continue.

![Domains](static/img/readme/netlify-4-domains-4.png)

https://v0-8-7.cni.dev is now set as the primary domain for this version.

### Update main branch with new version

In the `config.toml` file, update the `latest`, `fullversion` and `version`. Update the previous version’s prams.versions’ section `docsbranch` and `url`.

Add a new section for latest version, update the previous version’s `url` and `docsbranch`

```toml
# Latest released version information
latest = "v0.8.7" # updated
latestUrl = "https://v0-8-7.cni.dev" # updated

# Site information (i.e., the site currently being served)
fullversion = "v0.8.8" # updated
version = "Current"
docsbranch = "master"
deprecated = false

# Version menu entries

## Current version menu entry
[[params.versions]]
fullversion = "v0.8.8" # updated
version = "Current"
docsbranch = "master"
url = "https://www.cni.dev"

## v0.8.7 (latest) version menu entry
[[params.versions]]
fullversion = "v0.8.7"
version = "v0.8.7"
docsbranch = "release-0.8.7"
url = "https://v0-8-7.cni.dev"
```

### Update any old version branches that are still supported

In this case, we have v0.8.6 that is still supported, so we need to change the config in the release-0.8.6 branch. This way the current version is still reflected on the site, and there are links to all the supported versions in the dropdown menu.

```toml
# config.toml file in release-0.8.6 branch (partial)

latest = "v0.8.7" # updated
latestUrl = "https://v0-8-7.cni.dev"

fullversion = "v0.8.6"
version = "v0.8.6"
docsbranch = "release-0.8.6"
deprecated = true

# Updated current version menu entry
[[params.versions]]
fullversion = "v0.8.8" # updated
version = "v0.8.8" # updated
docsbranch = "master"
url = "https://www.cni.dev"

# New version v0.8.7 menu entry
[[params.versions]]
fullversion = "v0.8.7"
version = "v0.8.7"
docsbranch = "release-0.8.7"
url = "https://v0-8-7.cni.dev"

# Existing version v0.8.6 menu entry
[[params.versions]]
fullversion = "v0.8.6"
version = "v0.8.6"
docsbranch = "release-0.8.6"
url = "https://v0-8-6.cni.dev"
```
64 changes: 4 additions & 60 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,67 +32,11 @@ repositoryUrl = "https://github.com/containernetworking/cni.dev"
contentDir = "/content/"

# Version Menu Parameters

# Menu title if your navbar has a versions selector to access old versions of
# your site. This menu appears only if you have at least one [params.versions]
# entry set.
version_menu = "Versions"

# Latest released version information
latest = "v0.9.0"
latestUrl = "https://v0-9-0.cni.dev"

# Site information (i.e., the site currently being served)
fullversion = "v0.9.1" # will be v0.9.1 when frozen, currently un-versioned
version = "Current"
docsbranch = "master"
deprecated = false

# Version menu entries

## Current version menu entry
[[params.versions]]
fullversion = "v0.9.1"
version = "Current"
docsbranch = "master"
url = "https://www.cni.dev"

## v0.9.0 (latest) version menu entry
[[params.versions]]
fullversion = "v0.9.0"
version = "v0.9.0"
docsbranch = "release-0.9.0"
url = "https://v0-9-0.cni.dev"

## v0.8.7 version menu entry
[[params.versions]]
fullversion = "v0.8.7"
version = "v0.8.7"
docsbranch = "release-0.8.7"
url = "https://v0-8-7.cni.dev"

## v0.8.6 version menu entry
[[params.versions]]
fullversion = "v0.8.6"
version = "v0.8.6"
docsbranch = "release-0.8.6"
url = "https://v0-8-6.cni.dev"

## v0.7.6 version menu entry
[[params.versions]]
fullversion = "v0.7.6"
version = "v0.7.6"
docsbranch = "release-0.7.6"
url = "https://v0-7-6.cni.dev"

## v0.6.0 version menu entry
[[params.versions]]
fullversion = "v0.6.0"
version = "v0.6.0"
docsbranch = "release-0.6.0"
url = "https://v0-6-0.cni.dev"

# End of Version Menu paramaters
[params.versions]
latest = "v0.9"
all = ["current", "v0.9", "v0.8", "v0.7", "v0.6"]

[params.logos]
navbar = "cni-horizontal-color.png"
Expand Down Expand Up @@ -130,5 +74,5 @@ weight = 2

[[menu.main]]
name = "Plugins"
url = "/plugins/"
url = "/plugins/current/"
weight = 3
52 changes: 0 additions & 52 deletions content/plugins/_index.md
Original file line number Diff line number Diff line change
@@ -1,52 +0,0 @@
---
title: Plugins Overview
description: "plugins/README.md"
date: 2020-11-02
toc: true
draft: false
weight: 200
---

[![Build Status](https://travis-ci.org/containernetworking/plugins.svg?branch=master)](https://travis-ci.org/containernetworking/plugins)

This is a list of CNI network plugins maintained by the containernetworking team. For more information, see the individual READMEs.

Read [CONTRIBUTING](CONTRIBUTING.md) for build and test instructions.

## Reference plugins:

### Main: interface-creating

* [`bridge`](main/bridge): Creates a bridge, adds the host and the container to it
* [`ipvlan`](main/ipvlan): Adds an [ipvlan](https://www.kernel.org/doc/Documentation/networking/ipvlan.txt) interface in the container
* [`macvlan`](main/macvlan): Creates a new MAC address, forwards all traffic to that to the container
* [`ptp`](main/ptp): Creates a veth pair
* [`host-device`](main/host-device): Moves an already-existing device into a container

#### Windows: windows specific

* [`win-bridge`](main/win-bridge): Creates a bridge, adds the host and the container to it
* [`win-overlay`](main/win-overlay): Creates an overlay interface to the container

### IPAM: IP address allocation
* [`dhcp`](ipam/dhcp): Runs a daemon on the host to make DHCP requests on behalf of a container
* [`host-local`](ipam/host-local): Maintains a local database of allocated IPs
* [`static`](ipam/static): Allocates static IPv4/IPv6 addresses to containers

### Meta: other plugins

* [`flannel`](meta/flannel): Generates an interface corresponding to a flannel config file
* [`tuning`](meta/tuning): Changes sysctl parameters of an existing interface
* [`portmap`](meta/portmap): An iptables-based portmapping plugin. Maps ports from the host's address space to the container
* [`bandwidth`](meta/bandwidth): Allows bandwidth-limiting through use of traffic control tbf (ingress/egress)
* [`sbr`](meta/sbr): A plugin that configures source based routing for an interface (from which it is chained)
* [`firewall`](meta/firewall): A firewall plugin which uses iptables or firewalld to add rules to allow traffic to/from the container

## Contact

For any questions about CNI, please reach out via:
- Email: [cni-dev](https://groups.google.com/forum/#!forum/cni-dev)
- Slack: #cni on the [CNCF slack](https://slack.cncf.io/).

If you have a _security_ issue to report, please do so privately to the email addresses listed in the [OWNERS](OWNERS.md) file.

Loading

0 comments on commit 14e5db1

Please sign in to comment.