This repository has been archived by the owner on Jul 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 277
[docs] render the documentation as a website #1840
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
3e6b69b
[docs] add base hugo config
flynnduism b3db275
[docs] build on top of docsy theme
flynnduism 6727282
[docs] move markdown files into hugo content dir
flynnduism d8ca82d
[docs] add theme files
flynnduism 85cda70
[docs] tweak netlify build
flynnduism 41280a7
[docs] add css cache
flynnduism b36ff96
[docs] use a compatible hugop version
flynnduism 0b120e4
[docs] debugging netlify hugo build
flynnduism 357ed93
[docs] latest docs for rebase resolution
flynnduism 445ba11
[docs] reinstate original docs content to resolve conflicts
flynnduism 981ce58
[docs] add README and docs versioning
flynnduism 04af8f2
[docs] ensure https
flynnduism 07208c6
[docs] post rebase cleanup
flynnduism 368ef1b
[docs] adjust code block css style
flynnduism File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
A documentation website for the [OSM](https://github.com/openservicemesh/osm/) project - [docs.openservicemesh.io](https://docs.openservicemesh.io) | ||
|
||
# Editing Content | ||
|
||
docs.openservicemesh.io is a static site. The documentation content needs to be located at `docs/content/docs/`. | ||
|
||
To ensure the docs content renders correctly in the theme, each page will need to have [front matter](https://gohugo.io/content-management/front-matter/) metadata. Example front matter: | ||
|
||
``` | ||
--- | ||
title: "Docs Home" | ||
linkTitle: "Home" | ||
description: "OSM Docs Home" | ||
weight: 1 | ||
type: docs | ||
--- | ||
``` | ||
|
||
## Front Matter Notes: | ||
|
||
* inclusion of `type: docs` is important for the theme to properly index the site contents | ||
* the `linkTitle` attribute allows you to simplify the name as it appears in the left-side nav bar - ideally it should be short and clear - whereas the title can handle longform names for pages/documents. | ||
|
||
## Versioning the Docs Site | ||
|
||
When a new OSM release is cut, the docs site should be updated to reflect the version change. The underlying Docsy theme has versioning support built-in. | ||
|
||
<img width="244" alt="Screen Shot 2020-10-27 at 11 25 23 AM" src="https://user-images.githubusercontent.com/686194/97345732-a979ab80-1847-11eb-8c42-1b52c422a722.png"> | ||
|
||
## Release and Versioning Process: | ||
|
||
1. Create an archive of the current `main` branch, following the naming convention used by [prior releases](https://github.com/openservicemesh/osm/branches). Push this archival branch to `upstream`. | ||
|
||
<img width="301" alt="Screen Shot 2020-10-27 at 11 11 17 AM" src="https://user-images.githubusercontent.com/686194/97343954-5999e500-1845-11eb-96f4-d9d59352a830.png"> | ||
|
||
2. Once a release version branch is pushed to `upstream`, Netlify will build and deploy the documentation found within that branch. Within a couple of minutes of the branch push, the version of the site should be accessible at `https://<BRANCHNAME>--osm-docs.netlify.app/` | ||
|
||
Test the url for the branch once deployed to ensure it is working. | ||
|
||
3. Update the site version menu to reflect the changes | ||
|
||
<img width="723" alt="Screen Shot 2020-10-27 at 11 36 02 AM" src="https://user-images.githubusercontent.com/686194/97346387-9ca98780-1848-11eb-8179-523dcbed79c0.png"> | ||
|
||
The version dropdown menu in set in the sites' `config.toml` (L73) file - adding a new `params.versions` archival entry for the prior release/branch, using the url from Netlify. The current release at the top of the list should reflect (i) the new version and (ii) the primary docs website url. | ||
|
||
Example _(where v5 is new and v4 is now an archival prior release):_ | ||
|
||
``` | ||
[[params.versions]] | ||
version = "v0.5" | ||
url = "https://docs.openservicemesh.io" | ||
|
||
[[params.versions]] | ||
version = "v0.4" | ||
url = "https://release-v0.4--osm-docs.netlify.app" | ||
``` | ||
|
||
See [the Doscy versioning docs](https://www.docsy.dev/docs/adding-content/versioning/) for more information on these theme config parameters. | ||
|
||
> Note: the versioning controls are forward-facing only due to the nature of git branch history. The documentation website and netlify build process was added after `release-v0.4`, so only future releases will be deployed in this manner. The first release to be properly archived in this way will be `release-v0.5`. Trying to access archival urls for earlier versions (0.1 to 0.4) will not work because they predate this documentation website. | ||
|
||
|
||
|
||
# Site Development | ||
|
||
## Notes | ||
|
||
* built with the [Hugo](https://gohugo.io/) static site generator | ||
* custom theme uses [Docsy](https://www.docsy.dev/) as a base, with [Bootstrap](https://getbootstrap.com/) as the underlying css framework and some [OSM custom sass](https://github.com/openservicemesh/osm/pull/1840/files#diff-374e78d353e95d66afe7e6c3e13de4aab370ffb117f32aeac519b15c2cbd057aR1) | ||
* deployed to [Netlify](https://app.netlify.com/sites/osm-docs/deploys) via merges to master. (@flynnduism can grant additional access to account) | ||
* metrics tracked via Google Analytics | ||
|
||
## Install dependencies: | ||
|
||
* Hugo [installation guide](https://gohugo.io/getting-started/installing/) | ||
* packages are installed by running `yarn` | ||
|
||
## Run the site: | ||
|
||
``` | ||
// rebuild the site (to compile latest css/js) | ||
hugo | ||
|
||
// or serve the site for local dev | ||
hugo serve | ||
``` | ||
|
||
## Deploying the site: | ||
|
||
The site auto deploys the master branch via [Netlify](https://app.netlify.com/sites/osm-docs). Once pull requests are merged the changes will appear at docs.openservicemesh.io after a couple of minutes. Check the [logs](https://app.netlify.com/sites/osm-docs/deploys) for details. | ||
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.
main |
||
|
||
[![Netlify Status](https://api.netlify.com/api/v1/badges/8c8b7b52-b87f-42e0-949a-a784c3ca6d9a/deploy-status)](https://app.netlify.com/sites/osm-docs/deploys) | ||
|
||
`hugo serve` will run the site locally at [localhost:1313](http://localhost:1313/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: "{{ replace .Name "-" " " | title }}" | ||
date: {{ .Date }} | ||
draft: true | ||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
title = "Open Service Mesh" | ||
baseURL = "https://docs.openservicemesh.io/" | ||
languageCode = "en-us" | ||
description = "Documentation for Open Service Mesh (OSM)" | ||
theme = "dosmy" | ||
|
||
# Theme General Config | ||
[languages] | ||
[languages.en] | ||
title = "Open Service Mesh" | ||
description = "Documentation for Open Service Mesh (OSM)" | ||
languageName ="English" | ||
weight = 1 | ||
[services] | ||
[services.googleAnalytics] | ||
id = "UA-130516746-13" | ||
enableRobotsTXT = true | ||
enableGitInfo = true | ||
contentDir = "content" | ||
version_menu = "Releases" | ||
defaultContentLanguage = "en" | ||
defaultContentLanguageInSubdir = false | ||
enableMissingTranslationPlaceholders = true | ||
disableKinds = ["taxonomy", "taxonomyTerm"] | ||
pygmentsCodeFences = true | ||
pygmentsUseClasses = false | ||
pygmentsUseClassic = false | ||
pygmentsStyle = "tango" | ||
[imaging] | ||
resampleFilter = "CatmullRom" | ||
quality = 75 | ||
anchor = "smart" | ||
[blackfriday] | ||
plainIDAnchors = true | ||
hrefTargetBlank = true | ||
angledQuotes = false | ||
latexDashes = true | ||
[markup] | ||
[markup.goldmark] | ||
[markup.goldmark.renderer] | ||
unsafe = true | ||
[markup.highlight] | ||
style = "tango" | ||
|
||
|
||
# OSM top menu (should match main site) | ||
[[menu.main]] | ||
name = "Home" | ||
weight = 10 | ||
url = "https://openservicemesh.io" | ||
[[menu.main]] | ||
name = "Docs" | ||
weight = 20 | ||
url = "/docs" | ||
[[menu.main]] | ||
name = "Github" | ||
weight = 30 | ||
url = "https://github.com/openservicemesh/osm" | ||
[[menu.main]] | ||
name = "Blog" | ||
weight = 40 | ||
url = "https://openservicemesh.io/blog" | ||
[[menu.main]] | ||
name = "Slack" | ||
weight = 50 | ||
url = "https://cloud-native.slack.com/archives/C018794NV1C" | ||
[[menu.main]] | ||
name = "Twitter" | ||
weight = 60 | ||
url = "https://twitter.com/openservicemesh" | ||
|
||
|
||
# Add your release versions here | ||
[[params.versions]] | ||
version = "v0.4" | ||
url = "https://docs.openservicemesh.io" | ||
|
||
|
||
# Theme Additional params | ||
[params] | ||
copyright = "The Docsy Authors" | ||
offlineSearch = true | ||
prism_syntax_highlighting = true | ||
|
||
[params.ui] | ||
navbar_logo = true | ||
sidebar_menu_compact = false | ||
breadcrumb_disable = false | ||
sidebar_search_disable = false | ||
|
||
[params.ui.feedback] | ||
enable = true | ||
yes = 'Glad to hear it! Please <a href="https://github.com/USERNAME/REPOSITORY/issues/new">tell us how we can improve</a>.' | ||
no = 'Sorry to hear that. Please <a href="https://github.com/USERNAME/REPOSITORY/issues/new">tell us how we can improve</a>.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
title: "Docs Home" | ||
description: "OSM Docs Home" | ||
type: docs | ||
--- | ||
|
||
## Overview | ||
|
||
OSM runs an Envoy based control plane on Kubernetes, can be configured with SMI APIs, and works by injecting an Envoy proxy as a sidecar container next to each instance of your application. The proxy contains and executes rules around access control policies, implements routing configuration, and captures metrics. The control plane continually configures proxies to ensure policies and routing rules are up to date and ensures proxies are healthy. | ||
|
||
## Core Principles | ||
* Simple to understand and contribute to | ||
* Effortless to install, maintain, and operate | ||
* Painless to troubleshoot | ||
* Easy to configure via Service Mesh Interface (SMI) | ||
|
||
## Features | ||
* Easily and transparently configure traffic shifting for deployments | ||
* Secure service to service communication by enabling mTLS | ||
* Define and execute fine grained access control policies for services | ||
* Observability and insights into application metrics for debugging and monitoring services | ||
* Integrate with external certificate management services/solutions with a pluggable interface | ||
* Onboard applications onto the mesh by enabling automatic sidecar injection of Envoy proxy | ||
|
||
## Install | ||
|
||
### Prerequisites | ||
- Kubernetes cluster running Kubernetes v1.15.0 or greater | ||
- kubectl current context is configured for the target cluster install | ||
- ```kubectl config current-context``` | ||
|
||
### Get the OSM CLI | ||
|
||
The simplest way of installing Open Service Mesh on a Kubernetes cluster is by using the `osm` CLI. | ||
|
||
Download the `osm` binary from the [Releases page](https://github.com/openservicemesh/osm/releases). Unpack the `osm` binary and add it to `$PATH` to get started. | ||
```shell | ||
sudo mv ./osm /usr/local/bin/osm | ||
``` | ||
|
||
### Install OSM | ||
```shell | ||
$ osm install | ||
``` | ||
|
||
![OSM Install Demo](https://github.com/openservicemesh/osm/raw/main/img/osm-install-demo-v0.2.0.gif "OSM Install Demo") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
place the docs in here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"dependencies": { | ||
"@fortawesome/fontawesome-free": "^5.15.1", | ||
"bootstrap": "^4.5.2" | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
main