docs: add documentation website

This will allow us to iterate faster on documentation for multiple
versions of Talos.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
This commit is contained in:
Andrew Rynhard
2019-10-18 01:40:45 +00:00
parent 0d09e6f530
commit 655aaa3149
80 changed files with 13261 additions and 776 deletions

8
.gitignore vendored
View File

@@ -1,8 +1,6 @@
bin bin
build build
cache
images images
vendor
.vscode .vscode
master*.yaml master*.yaml
worker*.yaml worker*.yaml
@@ -20,10 +18,10 @@ kubeconfig
coverage.txt coverage.txt
.artifacts/ .artifacts/
# buildkit cache
.buildkit/
sha256sum.txt sha256sum.txt
sha512sum.txt sha512sum.txt
**/packet-cluster.yaml **/packet-cluster.yaml
# Local Netlify folder
.netlify

View File

@@ -1,14 +0,0 @@
---
title: "kubeadm"
date: 2018-10-29T19:40:55-07:00
draft: false
menu:
docs:
parent: 'components'
---
[`kubeadm`](https://github.com/kubernetes/kubernetes/tree/master/cmd/kubeadm) handles the installation and configuration of Kubernetes.
This is done to stay as close as possible to upstream Kubernetes best practices and recommendations.
By integrating with `kubeadm` natively, the development and operational ecosystem is familiar to all Kubernetes users.
Kubeadm configuration is defined in the userdata under the `services.kubeadm` section.

View File

@@ -1,10 +0,0 @@
---
title: "udevd"
date: 2018-10-29T19:40:55-07:00
draft: false
menu:
docs:
parent: 'components'
---
Udevd handles the kernel device notifications and sets up the necessary links in `/dev`.

View File

@@ -1,447 +0,0 @@
---
title: v0 Reference
date: 2019-06-21T19:40:55-07:00
draft: false
weight: 20
menu:
docs:
parent: 'configuration'
---
Talos User Data is responsible for the host and Kubernetes configuration, and it is independent of other cloud config / cloud init data.
## Version
``Version`` represents the Talos userdata configuration version.
This denotes what the schema of the configuration file is.
```yaml
version: "0"
```
## Security
``Security`` contains all of the certificate information for Talos.
### OS
``OS`` handles the certificate configuration for Talos components (osd, trustd, etc.).
#### CA
``OS.CA`` contains the certificate/key pair.
```yaml
security:
os:
ca:
crt: <base64 encoded x509 pem certificate>
key: <base64 encoded x509 pem certificate key>
```
### Kubernetes
Kubernetes handles the certificate configuration for Kubernetes components (api server).
<!-- markdownlint-disable MD024 -->
#### CA
``Kubernetes.CA`` contains the certificate/key pair for the apiserver.
```yaml
security:
kubernetes:
ca:
crt: <base64 encoded x509 pem certificate>
key: <base64 encoded x509 pem certificate key>
```
#### SA
``Kubernetes.SA`` contains the certificate/key pair for the default service account.
This item is optional.
If it is not provided, a certificate/key pair will be generated.
```yaml
security:
kubernetes:
sa:
crt: <base64 encoded x509 pem certificate>
key: <base64 encoded x509 pem certificate key>
```
#### FrontProxy
``Kubernetes.FrontProxy`` contains the certificate/key pair for the [Front Proxy](https://kubernetes.io/docs/tasks/access-kubernetes-api/setup-extension-api-server/).
This item is optional.
If it is not provided, a certificate/key pair will be generated.
```yaml
security:
kubernetes:
frontproxy:
crt: <base64 encoded x509 pem certificate>
key: <base64 encoded x509 pem certificate key>
```
#### Etcd
``Kubernetes.Etcd`` contains the certificate/key pair for [etcd](https://kubernetes.io/docs/concepts/overview/components/#etcd).
This item is optional.
If it is not provided, a certificate/key pair will be generated.
```yaml
security:
kubernetes:
etcd:
crt: <base64 encoded x509 pem certificate>
key: <base64 encoded x509 pem certificate key>
```
## Networking
``Networking`` allows for the customization of the host networking.
**Note** Bonding is currently not supported.
<!-- markdownlint-disable MD024 -->
### OS
``OS`` contains a list of host networking devices and their respective configurations.
#### Devices
```yaml
networking:
os:
devices:
- interface: eth0
cidr: <ip/mask>
dhcp: bool
ignore: bool
routes:
- network: <ip/mask>
gateway: <ip>
```
##### Interface
This is the interface name that should be configured.
##### CIDR
``CIDR`` is used to specify a static IP address to the interface.
> Note: This option is mutually exclusive with DHCP.
##### DHCP
``DHCP`` is used to specify that this device should be configured via DHCP.
The following DHCP options are supported:
- `OptionHostName`
- `OptionClasslessStaticRouteOption`
- `OptionDNSDomainSearchList`
- `OptionNTPServers`
> Note: This option is mutually exclusive with CIDR.
##### Ignore
``Ignore`` is used to exclude a specific interface from configuration.
This parameter is optional.
##### Routes
``Routes`` is used to specify static routes that may be necessary.
This parameter is optional.
## Services
### Init
``Init`` allows for the customization of the CNI plugin.
This translates to additional host mounts.
```yaml
services:
init:
cni: [flannel|calico]
```
> Note: This option will eventually be deprecated.
### Kubelet
#### ExtraMounts
``Kubelet.ExtraMounts`` allows you to specify additional host mounts that should be presented to kubelet.
```yaml
services:
kubelet:
extraMounts:
- < opencontainers/runtime-spec/mounts >
```
### Kubeadm
#### Configuration
``Kubeadm.Configuration`` contains the various kubeadm configs as a yaml block of yaml configs.
```yaml
services:
kubeadm:
configuration: |
apiVersion: kubeadm.k8s.io/v1beta1
kind: InitConfiguration
...
---
apiVersion: kubeadm.k8s.io/v1beta1
kind: ClusterConfiguration
...
---
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
...
---
apiVersion: kubeproxy.config.k8s.io/v1alpha1
kind: KubeProxyConfiguration
...
```
#### ExtraArgs
``Kubeadm.extraArgs`` contains an additional list of arguments that can be passed into kubeadm.
```yaml
services:
kubeadm:
extraArgs:
- some arg
- some arg
...
```
#### IgnorePreflightErrors
Kubeadm.Ignorepreflighterrors is a list of Kubeadm preflight errors to ignore.
```yaml
services:
kubeadm:
ignorePreflightErrors:
- Swap
- SystemVerification
...
```
### Trustd
#### Token
Trustd.Token can be used for auth for trustd.
```yaml
services:
trustd:
token: a9u3hjikoof.ADa
```
**Note** Token is mutually exclusive from Username and Password.
#### Username
Trustd.Username is part of the username/password combination used for auth for trustd.
The values defined here will be the credentials trustd will use.
```yaml
services:
trustd:
username: trusty
```
**Note** Username/Password mutually exclusive from Token.
#### Password
Trustd.Password is part of the username/password combination used for auth for trustd.
The values defined here will be the credentials trustd will use.
```yaml
services:
trustd:
password: mypass
```
**Note** Username/Password mutually exclusive from Token.
#### Endpoints
The endpoints denote the other trustd instances.
All trustd instances should be listed here.
These are typically your master nodes.
```yaml
services:
trustd:
endpoints:
- endpoint
```
#### CertSANs
```yaml
services:
trustd:
certSANs:
- san
```
### NTP
#### Server
NTP.Server allows you to customize which NTP server to use.
By default it consumes from pool.ntp.org.
```yaml
services:
ntp:
server: <ntp server>
```
## Install
Install is primarily used in bare metal situations.
It defines the disk layout and installation properties.
### Boot
#### Device
The device name to use for the `/boot` partition.
This should be specified as the unpartitioned block device.
If this parameter is omitted, the value of `install.root.device` is used.
```yaml
install:
boot:
device: <name of device to use>
```
#### Size
The size of the `/boot` partition in bytes.
If this parameter is omitted, a default value of 512MB will be used.
```yaml
install:
boot:
size: <size in bytes>
```
#### Kernel
This parameter can be used to specify a custom kernel to use.
If this parameter is omitted, the most recent Talos release will be used ( fetched from github releases ).
```yaml
install:
boot:
kernel: <path or url to vmlinuz>
```
**Note** The asset name **must** be named `vmlinuz`.
#### Initramfs
This parameter can be used to specify a custom initramfs to use.
If this parameter is omitted, the most recent Talos release will be used ( fetched from github releases ).
```yaml
install:
boot:
initramfs: <path or url to initramfs.xz>
```
**Note** The asset name **must** be named `initramfs.xz`.
### Ephemeral
<!-- markdownlint-disable MD024 -->
#### Device
``Device`` specifies the device name to use for the `/var` partition.
This should be specified as the unpartitioned block device.
If this parameter is omitted, the value of `install.root.device` is used.
```yaml
install:
ephemeral:
device: <name of device to use>
```
<!-- markdownlint-disable MD024 -->
#### Size
``Size`` defines the size of the `/var` partition in bytes.
If this parameter is omitted, a default value of 1GB will be used.
This partition will auto extend to consume the remainder of the unpartitioned space on the disk.
```yaml
install:
ephemeral:
size: <size in bytes>
```
### Wipe
``Wipe`` denotes if the disk should be wiped ( zero's written ) before it is partitioned.
```yaml
install:
wipe: <bool>
```
### Force
``Force`` allows the partitioning to proceed if there is already a filesystem detected.
```yaml
install:
force: <bool>
```
### ExtraDevices
``ExtraDevices`` allows for the extension of the partitioning scheme on the specified device.
These new partitions will be formatted as `xfs` filesystems.
```yaml
install:
extraDevices:
- device: sdb
partitions:
- size: 2048000000
mountpoint: /var/lib/etcd
```
<!-- markdownlint-disable MD024 -->
#### Device
``ExtraDevices.Device`` specifies a device to use for additional host mountpoints.
#### Partitions
<!-- markdownlint-disable MD024 -->
##### Size
``Size`` specifies the size in bytes of the new partition.
##### MountPoint
``Mountpoint`` specifies where the device should be mounted.

View File

@@ -1,100 +0,0 @@
---
title: "v0 Usage"
date: 2019-10-04T17:14:49-07:00
draft: false
weight: 10
menu:
docs:
identifier: "v0-usage-configuration"
parent: 'configuration'
---
Talos enforces a high level of security by using mutual TLS for authentication and authorization.
We recommend that the configuration of Talos be performed by a cluster owner.
A cluster owner should be a person of authority within an organization, perhaps a director, manager, or senior member of a team.
They are responsible for storing the root CA, and distributing the PKI for authorized cluster administrators.
## Generate base configuration
We can generate a basic configuration using `osctl`.
This configuration is enough to get started with, however it can be customized as needed.
```bash
osctl config generate <cluster name> <master ip>[,<master ip>...]
```
This command will generate a yaml config per master node, a worker config, and a talosconfig.
## Example of generated master-1.yaml
```bash
osctl config generate cluster.local 1.2.3.4,2.3.4.5,3.4.5.6
```
```yaml
#!talos
version: ""
security:
os:
ca:
crt: "LS0tLS1CRUdJTiBDRVJUSUZJQ..."
key: "LS0tLS1CRUdJTiBFQyBQUklWQV..."
kubernetes:
ca:
crt: "LS0tLS1CRUdJTiBDRVJ..."
key: "LS0tLS1CRUdJTiBSU0E..."
services:
init:
cni: flannel
kubeadm:
certificateKey: 'mrhjuj5wlhd9v7z9xls3gh88uo'
configuration: |
apiVersion: kubeadm.k8s.io/v1beta2
kind: InitConfiguration
bootstrapTokens:
- token: 'itv1vj.c8iznlo3gvbimoea'
ttl: 0s
nodeRegistration:
taints: []
kubeletExtraArgs:
node-labels: ""
---
apiVersion: kubeadm.k8s.io/v1beta2
kind: ClusterConfiguration
clusterName: cluster.local
kubernetesVersion: v1.16.0
controlPlaneEndpoint: "1.2.3.4"
apiServer:
certSANs: [ "127.0.0.1","::1","1.2.3.4","2.3.4.5","3.4.5.6" ]
extraArgs:
runtime-config: settings.k8s.io/v1alpha1=true
feature-gates: ""
controllerManager:
extraArgs:
terminated-pod-gc-threshold: '100'
feature-gates: ""
scheduler:
extraArgs:
feature-gates: ""
networking:
dnsDomain: cluster.local
podSubnet: "10.244.0.0/16"
serviceSubnet: "10.96.0.0/12"
---
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
featureGates: {}
---
apiVersion: kubeproxy.config.k8s.io/v1alpha1
kind: KubeProxyConfiguration
mode: ipvs
ipvs:
scheduler: lc
trustd:
token: '3gs2ja.q6yno1x90m3hb3f5'
endpoints: [ "1.2.3.4", "2.3.4.5", "3.4.5.6" ]
certSANs: [ "1.2.3.4", "127.0.0.1", "::1" ]
```
The above configuration can be customized as needed by using the following [reference guide](/docs/configuration/v0-reference/).

View File

@@ -0,0 +1,13 @@
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false

22
docs/website/.eslintrc.js Normal file
View File

@@ -0,0 +1,22 @@
module.exports = {
root: true,
env: {
browser: true,
node: true
},
parserOptions: {
parser: 'babel-eslint'
},
extends: [
'@nuxtjs',
'standard',
'prettier',
'prettier/vue',
'prettier/standard',
'plugin:prettier/recommended',
'plugin:nuxt/recommended'
],
plugins: ['prettier', 'standard'],
// add your custom rules here
rules: {}
}

102
docs/website/.gitignore vendored Normal file
View File

@@ -0,0 +1,102 @@
# Created by .ignore support plugin (hsz.mobi)
### Node template
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# Nuxt generate
dist
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless
# IDE / Editor
.idea
# Service worker
sw.*
# Mac OSX
.DS_Store
# Vim swap files
*.swp
# Docgen
routes.json
/static/index.json
/static/*.menu.*
/static/*.sections.*
# Custom
!assets/images
!static/images

5
docs/website/.prettierrc Normal file
View File

@@ -0,0 +1,5 @@
{
"semi": false,
"arrowParens": "always",
"singleQuote": true
}

22
docs/website/README.md Normal file
View File

@@ -0,0 +1,22 @@
# docs
> A static site for Talos documentation
## Build Setup
``` bash
# install dependencies
$ npm run install
# serve with hot reload at localhost:3000
$ npm run dev
# build for production and launch server
$ npm run build
$ npm run start
# generate static project
$ npm run generate
```
For detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org).

View File

@@ -0,0 +1,7 @@
# ASSETS
**This directory is not required, you can delete it if you don't want to use it.**
This directory contains your un-compiled assets such as LESS, SASS, or JavaScript.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#webpacked).

View File

@@ -0,0 +1,84 @@
/* purgecss start ignore */
@import url('@/assets/css/navigation.css');
@import url('@/assets/css/prism-ghcolors.css');
body {
@apply font-sans text-gray-800;
}
main {
@apply font-sans;
}
.page-heading {
@apply font-headings text-5xl mb-8 leading-tight;
}
body {
@apply flex flex-col min-h-screen;
}
.content {
flex: 1;
}
.c-rich-text a {
@apply text-gray-600;
font-weight: 400;
}
.c-rich-text a:hover {
@apply text-gray-900 no-underline;
}
pre {
background: #f4f5f6;
border-style: solid;
border-width: 0.5px;
border-radius: 5px;
padding: 0.5em;
overflow-x: auto;
}
code[class*='language-'],
pre[class*='language-'] {
@apply font-mono;
}
article {
background: white;
border-radius: 5px;
}
.article-content {
@apply max-w-3xl pt-4 pb-4 pl-6 pr-6 mx-auto shadow-md;
}
h1,
h2,
h3,
h4,
h5 {
@apply .my-4;
}
p {
@apply .mb-4;
}
p a:link,
p a:active,
p a:visited {
/* This blue has a 4.77 contrast ratio on white 4.56 on near-white */
color: #1a76c1;
}
p a:hover {
color: #12283a;
}
li {
list-style-position: outside;
margin-left: 1.25rem;
}
/* purgecss end ignore */

View File

@@ -0,0 +1,65 @@
header {
@apply bg-white px-6 border-b z-50;
}
header .site-title {
@apply font-brand text-3xl text-primary-color-600 leading-tight;
}
nav[aria-label='main'] div {
@apply font-brand text-base flex flex-wrap items-center inline-block mr-8;
}
nav[aria-label='main'] .tnd-Nav__item {
@apply block;
}
nav[aria-label='main'] .tnd-Nav__item a {
@apply text-primary-color-700 mt-4 mb-2 text-xl inline-block border-b-2 border-white;
}
nav[aria-label='main'] .tnd-Nav__item--active a,
nav[aria-label='main'] .tnd-Nav__item a:hover {
@apply text-primary-color-700 border-b-2 border-primary-color-700;
}
nav[aria-label='footer'] {
@apply ml-8;
}
nav[aria-label='footer'],
nav[aria-label='footer'] .tnd-Nav__item {
@apply inline-block px-4;
}
nav[aria-label='main'] {
@apply mb-4;
}
@screen md {
nav[aria-label='main'] {
@apply mb-auto;
}
}
@screen lg {
nav[aria-label='main'] .tnd-Nav__item {
@apply inline-block;
}
nav[aria-label='main'] {
@apply block;
}
header {
@apply sticky top-0;
transition: height 0.3s;
}
nav[aria-label='main'] .tnd-Nav__item a {
@apply mb-auto mt-auto;
}
}
header#header img#header-logo {
transition: all 0.3s;
}
header#header.scrolled img#header-logo {
width: 150px;
}

View File

@@ -0,0 +1,119 @@
/**
* GHColors theme by Avi Aryan (http://aviaryan.in)
* Inspired by Github syntax coloring
*/
code[class*="language-"],
pre[class*="language-"] {
color: #393A34;
font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace;
direction: ltr;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
font-size: .9em;
line-height: 1.2em;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
pre > code[class*="language-"] {
font-size: 1em;
}
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
background: #b3d4fc;
}
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
code[class*="language-"]::selection, code[class*="language-"] ::selection {
background: #b3d4fc;
}
/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: .5em 0;
overflow: auto;
border: 1px solid #dddddd;
background-color: white;
}
/* Inline code */
:not(pre) > code[class*="language-"] {
padding: .2em;
padding-top: 1px; padding-bottom: 1px;
background: #f8f8f8;
border: 1px solid #dddddd;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: #999988; font-style: italic;
}
.token.namespace {
opacity: .7;
}
.token.string,
.token.attr-value {
color: #e3116c;
}
.token.punctuation,
.token.operator {
color: #393A34; /* no highlight */
}
.token.entity,
.token.url,
.token.symbol,
.token.number,
.token.boolean,
.token.variable,
.token.constant,
.token.property,
.token.regex,
.token.inserted {
color: #36acaa;
}
.token.atrule,
.token.keyword,
.token.attr-name,
.language-autohotkey .token.selector {
color: #00a4db;
}
.token.function,
.token.deleted,
.language-autohotkey .token.tag {
color: #9a050f;
}
.token.tag,
.token.selector,
.language-autohotkey .token.keyword {
color: #00009f;
}
.token.important,
.token.function,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}

View File

@@ -0,0 +1,3 @@
@import 'tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';

View File

@@ -0,0 +1,172 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 1300 600" style="enable-background:new 0 0 1300 600;" xml:space="preserve">
<style type="text/css">
.st0{clip-path:url(#SVGID_2_);}
.st1{opacity:0.59;clip-path:url(#SVGID_4_);}
.st2{clip-path:url(#SVGID_6_);fill:#37B3C8;}
.st3{clip-path:url(#SVGID_8_);fill:#37B3C8;}
.st4{clip-path:url(#SVGID_10_);fill:#6C9FBF;}
.st5{opacity:0.8;clip-path:url(#SVGID_4_);}
.st6{clip-path:url(#SVGID_12_);fill:#E96C90;}
.st7{clip-path:url(#SVGID_14_);fill:#E96C90;}
.st8{opacity:0.33;clip-path:url(#SVGID_4_);}
.st9{clip-path:url(#SVGID_16_);fill:#AF82A7;}
.st10{clip-path:url(#SVGID_18_);fill:#AF82A7;}
.st11{clip-path:url(#SVGID_20_);fill:#AF82A7;}
.st12{clip-path:url(#SVGID_4_);}
.st13{clip-path:url(#SVGID_22_);fill:#37B3C8;}
.st14{clip-path:url(#SVGID_24_);fill:#AF82A7;}
.st15{clip-path:url(#SVGID_26_);fill:#AF82A7;}
.st16{clip-path:url(#SVGID_28_);fill:#37B3C8;}
</style>
<g>
<defs>
<rect id="SVGID_1_" x="-218.03" y="115.03" width="1711.87" height="734.36"/>
</defs>
<clipPath id="SVGID_2_">
<use xlink:href="#SVGID_1_" style="overflow:visible;"/>
</clipPath>
<g class="st0">
<defs>
<rect id="SVGID_3_" x="-218.03" y="115.03" width="1711.87" height="734.36"/>
</defs>
<clipPath id="SVGID_4_">
<use xlink:href="#SVGID_3_" style="overflow:visible;"/>
</clipPath>
<g class="st1">
<g>
<defs>
<rect id="SVGID_5_" x="1125.59" y="107.49" width="327.49" height="548.32"/>
</defs>
<clipPath id="SVGID_6_">
<use xlink:href="#SVGID_5_" style="overflow:visible;"/>
</clipPath>
<polygon class="st2" points="1406.92,115.03 1113.29,649.8 1421.38,654.72 "/>
</g>
</g>
<g class="st1">
<g>
<defs>
<rect id="SVGID_7_" x="19.06" y="397.05" width="558.17" height="541.39"/>
</defs>
<clipPath id="SVGID_8_">
<use xlink:href="#SVGID_7_" style="overflow:visible;"/>
</clipPath>
<polygon class="st3" points="-105.68,863.76 659.35,697.03 401.65,406.81 "/>
</g>
</g>
<g class="st1">
<g>
<defs>
<rect id="SVGID_9_" x="809.09" y="373.56" width="556.82" height="361.04"/>
</defs>
<clipPath id="SVGID_10_">
<use xlink:href="#SVGID_9_" style="overflow:visible;"/>
</clipPath>
<polygon class="st4" points="810.03,382.11 1385.2,634.64 836.45,759.29 "/>
</g>
</g>
<g class="st5">
<g>
<defs>
<rect id="SVGID_11_" x="891.76" y="314.14" width="629.78" height="493.64"/>
</defs>
<clipPath id="SVGID_12_">
<use xlink:href="#SVGID_11_" style="overflow:visible;"/>
</clipPath>
<polygon class="st6" points="903,453.82 1458.33,459.71 1270.61,734.52 "/>
</g>
</g>
<g class="st5">
<g>
<defs>
<rect id="SVGID_13_" x="-136.99" y="269.3" width="587.91" height="463.61"/>
</defs>
<clipPath id="SVGID_14_">
<use xlink:href="#SVGID_13_" style="overflow:visible;"/>
</clipPath>
<polygon class="st7" points="469.29,606.66 -74.03,614.08 104.42,343.19 "/>
</g>
</g>
<g class="st8">
<g>
<defs>
<rect id="SVGID_15_" x="948.26" y="198.21" width="556.81" height="428.67"/>
</defs>
<clipPath id="SVGID_16_">
<use xlink:href="#SVGID_15_" style="overflow:visible;"/>
</clipPath>
<polygon class="st9" points="1493.84,579.32 1003.85,577.68 1171.19,340.4 "/>
</g>
</g>
<g class="st8">
<g>
<defs>
<rect id="SVGID_17_" x="-323.28" y="139.89" width="635.91" height="582.39"/>
</defs>
<clipPath id="SVGID_18_">
<use xlink:href="#SVGID_17_" style="overflow:visible;"/>
</clipPath>
<polygon class="st10" points="-103.95,189.83 253.47,579.44 -58.8,625.42 "/>
</g>
</g>
<g class="st8">
<g>
<defs>
<rect id="SVGID_19_" x="296.04" y="297.81" width="539.55" height="420.01"/>
</defs>
<clipPath id="SVGID_20_">
<use xlink:href="#SVGID_19_" style="overflow:visible;"/>
</clipPath>
<polygon class="st11" points="824.34,597.24 350.91,593.38 511.51,360.79 "/>
</g>
</g>
<g class="st12">
<g>
<defs>
<rect id="SVGID_21_" x="823.82" y="350.51" width="394.8" height="378.25"/>
</defs>
<clipPath id="SVGID_22_">
<use xlink:href="#SVGID_21_" style="overflow:visible;"/>
</clipPath>
<polygon class="st13" points="1138.27,417.53 1120.78,717.17 817.19,587.67 "/>
</g>
</g>
<g class="st12">
<g>
<defs>
<rect id="SVGID_23_" x="371.76" y="247.17" width="631.56" height="614.41"/>
</defs>
<clipPath id="SVGID_24_">
<use xlink:href="#SVGID_23_" style="overflow:visible;"/>
</clipPath>
<polygon class="st14" points="895.16,437.94 783.1,849.39 396.7,578.14 "/>
</g>
</g>
<g class="st12">
<g>
<defs>
<rect id="SVGID_25_" x="-235.36" y="405.71" width="423.12" height="463.1"/>
</defs>
<clipPath id="SVGID_26_">
<use xlink:href="#SVGID_25_" style="overflow:visible;"/>
</clipPath>
<polygon class="st15" points="-218.03,541.9 148.14,413.92 143.88,843.34 "/>
</g>
</g>
<g class="st12">
<g>
<defs>
<rect id="SVGID_27_" x="-102.04" y="461.15" width="333.37" height="308.56"/>
</defs>
<clipPath id="SVGID_28_">
<use xlink:href="#SVGID_27_" style="overflow:visible;"/>
</clipPath>
<polygon class="st16" points="-188.38,807.3 -159.44,413.21 237.63,589.67 "/>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

@@ -0,0 +1,38 @@
<template>
<article class="article-content c-rich-text">
<h1 class="page-heading">{{ doc.title }}</h1>
<div class="my-0">
<a
:href="
'https://github.com/talos-systems/talos/edit/master/docs/website/content/' +
$store.state.sidebar.activeMenuPath +
'.md'
"
class="no-underline font-normal text-sm"
><img
src="/images/Git-Icon-Black.png"
height="14px"
width="14px"
class="inline-block mr-1"
alt=""
/>
Edit this Page
</a>
</div>
<div class="border-t pt-4" v-html="doc.content"></div>
</article>
</template>
<script>
export default {
name: 'Content',
computed: {
doc() {
return this.$store.state.sidebar.sections[
this.$store.state.sidebar.activeMenuPath
]
}
}
}
</script>

View File

@@ -0,0 +1,73 @@
<template>
<div class="dropdown inline-block relative">
<button class="font-semibold py-2 px-4 rounded inline-flex items-center">
<svg
id="dropdown-caret"
class="h-6 w-6 fill-current mr-2"
viewBox="0 0 32 32"
aria-hidden="true"
>
<path
d="M16.003 18.626l7.081-7.081L25 13.46l-8.997 8.998-9.003-9 1.917-1.916z"
/>
</svg>
<span class="mr-1">Documentation</span>
</button>
<ul class="dropdown-menu absolute pt-1 w-full">
<li class="" v-for="option in options" :key="option.version">
<a
:href="option.url"
class="rounded-t py-2 px-4 block whitespace-no-wrap"
>{{ option.version }}</a
>
</li>
</ul>
</div>
</template>
<script>
export default {
name: 'Dropdown',
data() {
return {
selected: '',
options: [
// { version: 'v0.3 (pre-release)', url: '/docs/v0.3' },
{ version: 'v0.2', url: '/docs/v0.2' }
]
}
}
}
</script>
<style>
.dropdown {
@apply font-headings;
font-size: 20px;
}
.dropdown-menu {
height: 0px;
background: white;
overflow: hidden;
-webkit-transition: all 0.3s ease-in-out;
-moz-transition: all 0.3s ease-in-out;
-o-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
}
#dropdown-caret {
-webkit-transition: all 0.3s ease-in-out;
-moz-transition: all 0.3s ease-in-out;
-o-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
}
.dropdown:hover #dropdown-caret {
transform: rotateX(180deg);
}
.dropdown:hover .dropdown-menu {
height: 100px;
}
</style>

View File

@@ -0,0 +1,28 @@
<template>
<footer>
<div>
<a class="inline-block no-underline color-inherit" href="/">
© 2019 Talos Systems, Inc.
</a>
</div>
</footer>
</template>
<style>
footer {
@apply bg-gray-200 flex flex-wrap items-center font-sans justify-between py-4 px-4;
z-index: 99;
}
footer a {
@apply text-gray-600 text-xs;
}
footer a:hover {
@apply text-black underline;
}
.color-inherit {
color: inherit;
}
</style>

View File

@@ -0,0 +1,46 @@
<template>
<header id="header">
<div
class="max-w-6xl mx-auto py-6 flex flex-wrap items-center justify-between"
>
<Logo></Logo>
<Dropdown></Dropdown>
</div>
</header>
</template>
<script>
import Logo from '~/components/Logo.vue'
import Dropdown from '~/components/Dropdown.vue'
export default {
name: 'Header',
components: {
Logo,
Dropdown
},
mounted() {
window.addEventListener('scroll', this.handleScroll)
},
destroyed() {
window.removeEventListener('scroll', this.handleScroll)
},
methods: {
handleScroll() {
const distanceY = window.pageYOffset || document.documentElement.scrollTop
const shrinkOn = 240
const shrinkOff = 140
const headerEl = document.getElementById('header')
if (distanceY > shrinkOn) {
headerEl.classList.add('scrolled')
} else if (distanceY < shrinkOff) {
headerEl.classList.remove('scrolled')
}
}
}
}
</script>

View File

@@ -0,0 +1,10 @@
<template>
<a href="/" class="site-title">
<img
id="header-logo"
src="/images/TalosSystems_Horizontal_Logo_FullColor_RGB-for-site.svg"
alt="Talos"
width="350"
/>
</a>
</template>

View File

@@ -0,0 +1,7 @@
# COMPONENTS
**This directory is not required, you can delete it if you don't want to use it.**
The components directory contains your Vue.js Components.
_Nuxt.js doesn't supercharge these components._

View File

@@ -0,0 +1,98 @@
<template>
<div class="sidenav pt-4 pb-4">
<ul>
<li
v-for="entry in $store.state.sidebar.menu"
:key="entry.title"
@click="selected = entry.title"
class="py-2"
>
<a
class="sidebar-category"
:href="'#' + entry.title"
@click="handleClick(entry)"
>
<span class="relative">{{ entry.title }}</span>
</a>
<ul class="py-0 pl-4">
<li v-for="item in entry.items" :key="item.path" class="ml-0">
<a
class="sidebar-item"
:href="'#' + item.title"
@click="handleClick(item)"
>
<span class="relative">{{ item.title }}</span>
</a>
<ul class="py-0 pl-4">
<li v-for="child in item.children" :key="child.path" class="ml-0">
<a
class="sidebar-child"
:href="'#' + child.title"
@click="handleClick(child)"
>
<span class="relative">{{ child.title }}</span>
</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</template>
<script>
export default {
name: 'Sidebar',
data() {
return {
selected: undefined
}
},
methods: {
handleClick(item) {
console.log('setting')
this.$store.commit('sidebar/setActiveDoc', item.path)
}
}
}
</script>
<style>
.sidenav {
height: 100%;
position: fixed;
z-index: 1;
overflow-x: hidden;
}
a.sidebar-category {
@apply font-brand text-gray-600 relative block text-lg font-bold tracking-wide;
}
a.sidebar-category:hover {
@apply text-gray-900;
}
a.sidebar-item {
@apply font-brand text-gray-600 relative block text-base tracking-wide;
}
a.sidebar-item:hover {
@apply text-gray-900;
}
a.sidebar-child {
@apply font-brand text-gray-600 relative block text-xs tracking-wide;
}
a.sidebar-child:hover {
@apply text-gray-900;
}
a.active {
@apply text-gray-900 font-bold;
}
</style>

View File

@@ -1,11 +1,5 @@
--- ---
title: "Talos" title: 'Talos'
menu:
main:
name: Documentation
weight: 10
docs:
weight: 1
--- ---
**Talos** is a modern OS designed to be secure, immutable, and minimal. **Talos** is a modern OS designed to be secure, immutable, and minimal.
@@ -13,17 +7,13 @@ Its purpose is to host Kubernetes clusters, so it is tightly integrated with Kub
Talos is based on the Linux kernel, and supports most cloud platforms, bare metal, and most virtualization platforms. Talos is based on the Linux kernel, and supports most cloud platforms, bare metal, and most virtualization platforms.
All system management is done via an API, and there is no shell or interactive console. All system management is done via an API, and there is no shell or interactive console.
See the [FAQ]({{< ref "/docs/faqs" >}}) for more details and an architecture diagram.
Some of the capabilities and benefits provided by Talos include: Some of the capabilities and benefits provided by Talos include:
- **Security**: Talos reduces your attack surface by practicing the Principle of Least Privilege (PoLP) and by securing the API with mutual TLS (mTLS) authentication. - **Security**: Talos reduces your attack surface by practicing the Principle of Least Privilege (PoLP) and by securing the API with mutual TLS (mTLS) authentication.
- **Predictability**: Talos eliminates unneeded variables and reduces unknown factors in your environment by employing immutable infrastructure ideology. - **Predictability**: Talos eliminates unneeded variables and reduces unknown factors in your environment by employing immutable infrastructure ideology.
- **Evolvability**: Talos simplifies your architecture and increases your ability to easily accommodate future changes. - **Evolvability**: Talos simplifies your architecture and increases your ability to easily accommodate future changes.
For details on the various components that make up Talos, please see the [components]({{< ref "/docs/components" >}}) section. To get started with Talos, see the [documentation](/docs/v0.2).
To get started with Talos, see the [Getting Started Guide]({{< ref "/docs/guides/getting_started" >}}).
If you need help, or if you have questions or comments, we would love to hear from you! Please join our community on [Slack](https://slack.dev.talos-systems.io), [GitHub](https://github.com/talos-systems), or the mailing list. If you need help, or if you have questions or comments, we would love to hear from you! Please join our community on [Slack](https://slack.dev.talos-systems.io), [GitHub](https://github.com/talos-systems), or the mailing list.
@@ -95,7 +85,7 @@ system osd talos/osd 107 RUNNING
system trustd talos/trustd 115 RUNNING system trustd talos/trustd 115 RUNNING
``` ```
or query the containers in the `k8s.io` [`namespace`](https://github.com/containerd/containerd/blob/master/docs/namespaces.md): or query the containers in the `k8s.io` [`namespace`](https://github.com/containerd/containerd/blob/master/namespaces.md):
```bash ```bash
$ osctl ps -k $ osctl ps -k

View File

@@ -0,0 +1,139 @@
[
{
"title": "Guides",
"path": "v0.2/en/guides",
"items": [
{
"title": "Getting Started",
"path": "v0.2/en/guides/getting-started"
},
{
"title": "Cloud",
"path": "v0.2/en/guides/cloud",
"children": [
{
"title": "AWS",
"path": "v0.2/en/guides/cloud/aws"
},
{
"title": "Azure",
"path": "v0.2/en/guides/cloud/azure"
},
{
"title": "GCP",
"path": "v0.2/en/guides/cloud/gcp"
}
]
},
{
"title": "Hypervisors",
"path": "v0.2/en/guides/hypervisors",
"children": [
{
"title": "KVM",
"path": "v0.2/en/guides/hypervisors/kvm"
},
{
"title": "Xen",
"path": "v0.2/en/guides/hypervisors/xen"
}
]
},
{
"title": "Metal",
"path": "v0.2/en/guides/metal",
"children": [
{
"title": "Matchbox",
"path": "v0.2/en/guides/metal/matchbox"
},
{
"title": "Digital Rebar",
"path": "v0.2/en/guides/metal/digital-rebar"
}
]
}
]
},
{
"title": "Configuration",
"path": "v0.2/en/configuration",
"items": [
{
"title": "v1alpha1",
"path": "v0.2/en/configuration/v1alpha1",
"children": [
{
"title": "Reference",
"path": "v0.2/en/configuration/v1alpha1/reference"
},
{
"title": "Usage",
"path": "v0.2/en/configuration/v1alpha1/usage"
}
]
}
]
},
{
"title": "Components",
"path": "v0.2/en/components",
"items": [
{
"title": "init",
"path": "v0.2/en/components/init"
},
{
"title": "machined",
"path": "v0.2/en/components/machined"
},
{
"title": "networkd",
"path": "v0.2/en/components/networkd"
},
{
"title": "osd",
"path": "v0.2/en/components/osd"
},
{
"title": "trustd",
"path": "v0.2/en/components/trustd"
},
{
"title": "udevd",
"path": "v0.2/en/components/udevd"
},
{
"title": "init",
"path": "v0.2/en/components/init"
},
{
"title": "kernel",
"path": "v0.2/en/components/kernel"
}
]
},
{
"title": "Use Cases",
"path": "v0.2/en/use-cases",
"items": [
{
"title": "Serverless",
"path": "v0.2/en/use-cases/serverless"
},
{
"title": "Edge",
"path": "v0.2/en/use-cases/edge"
},
{
"title": "Multi-Cloud",
"path": "v0.2/en/use-cases/multi-cloud"
}
]
},
{
"title": "FAQs",
"path": "v0.2/en/faqs",
"items": []
}
]

View File

@@ -1,8 +1,5 @@
--- ---
title: containerd title: containerd
menu:
docs:
parent: components
--- ---
[Containerd](https://github.com/containerd/containerd) provides the container runtime to launch workloads on Talos as well as Kubernetes. [Containerd](https://github.com/containerd/containerd) provides the container runtime to launch workloads on Talos as well as Kubernetes.

View File

@@ -1,6 +1,5 @@
--- ---
title: "Components" title: 'Components'
layout: single
--- ---
In this section we will discuss the various components of which Talos is comprised. In this section we will discuss the various components of which Talos is comprised.

View File

@@ -1,12 +1,5 @@
--- ---
title: "init" title: 'init'
date: 2018-10-29T19:40:55-07:00
draft: false
weight: 20
menu:
docs:
parent: 'components'
weight: 20
--- ---
A common theme throughout the design of Talos is minimalism. A common theme throughout the design of Talos is minimalism.

View File

@@ -1,12 +1,5 @@
--- ---
title: "kernel" title: 'kernel'
date: 2018-10-29T19:40:55-07:00
draft: false
weight: 10
menu:
docs:
parent: 'components'
weight: 10
--- ---
The Linux kernel included with Talos is configured according to the recommendations outlined in the Kernel Self Protection Project ([KSSP](http://kernsec.org/wiki/index.php/Kernel_Self_Protection_Project)). The Linux kernel included with Talos is configured according to the recommendations outlined in the Kernel Self Protection Project ([KSSP](http://kernsec.org/wiki/index.php/Kernel_Self_Protection_Project)).

View File

@@ -0,0 +1,5 @@
---
title: 'machined'
---
The Linux kernel included with Talos is configured according to the recommendations outlined in the Kernel Self Protection Project ([KSSP](http://kernsec.org/wiki/index.php/Kernel_Self_Protection_Project)).

View File

@@ -1,8 +1,5 @@
--- ---
title: networkd title: networkd
menu:
docs:
parent: components
--- ---
Networkd handles all of the host level network configuration. Networkd handles all of the host level network configuration.

View File

@@ -1,8 +1,5 @@
--- ---
title: ntpd title: ntpd
menu:
docs:
parent: components
--- ---
Ntpd handles the host time synchronization. Ntpd handles the host time synchronization.

View File

@@ -1,10 +1,5 @@
--- ---
title: "osctl" title: 'osctl'
date: 2018-10-29T19:40:55-07:00
draft: false
menu:
docs:
parent: 'components'
--- ---
`osctl` CLI is the client to the [osd](/components/osd) service running on every node. `osctl` CLI is the client to the [osd](/components/osd) service running on every node.

View File

@@ -1,10 +1,5 @@
--- ---
title: "osd" title: 'osd'
date: 2018-10-29T19:40:55-07:00
draft: false
menu:
docs:
parent: 'components'
--- ---
Talos is unique in that it has no concept of host-level access. Talos is unique in that it has no concept of host-level access.

View File

@@ -1,10 +1,5 @@
--- ---
title: "trustd" title: 'trustd'
date: 2018-10-29T19:40:55-07:00
draft: false
menu:
docs:
parent: 'components'
--- ---
Security is one of the highest priorities within Talos. Security is one of the highest priorities within Talos.

View File

@@ -0,0 +1,5 @@
---
title: 'udevd'
---
Udevd handles the kernel device notifications and sets up the necessary links in `/dev`.

View File

@@ -1,6 +1,5 @@
--- ---
title: "Configuration" title: 'Configuration'
layout: single
--- ---
In this section, we will step through the configuration of a Talos based Kubernetes cluster. In this section, we will step through the configuration of a Talos based Kubernetes cluster.

View File

@@ -0,0 +1,3 @@
---
title: v1alpha1 Format
---

View File

@@ -1,11 +1,5 @@
--- ---
title: v1alpha1 Reference title: v1alpha1 Reference
date: 2019-10-04T19:40:55-07:00
draft: false
weight: 20
menu:
docs:
parent: 'configuration'
--- ---
Talos User Data is responsible for the host and Kubernetes configuration, and it is independent of other cloud init data. Talos User Data is responsible for the host and Kubernetes configuration, and it is independent of other cloud init data.
@@ -19,7 +13,7 @@ Machine configuration data deals with the configuration of the host itself where
## Version ## Version
``Version`` represents the Talos configuration version. `Version` represents the Talos configuration version.
This denotes what the schema of the configuration file is. This denotes what the schema of the configuration file is.
@@ -57,12 +51,9 @@ machine:
### machine.type ### machine.type
``type`` defines the type/role of a node. `type` defines the type/role of a node.
Acceptable values are: Acceptable values are: -`init` -`controlplane` -`worker`
-``init``
-``controlplane``
-``worker``
#### Init #### Init
@@ -82,43 +73,43 @@ This means it will be an available compute node for scheduling workloads.
### machine.token ### machine.token
``token`` is used for authentication to ``trustd`` to confirm the node's identity. `token` is used for authentication to `trustd` to confirm the node's identity.
### machine.kubelet ### machine.kubelet
``kubelet`` is used to provide some additional options to the kubelet. `kubelet` is used to provide some additional options to the kubelet.
#### machine.kubelet.image #### machine.kubelet.image
``image`` is used to supply a hyperkube image location. `image` is used to supply a hyperkube image location.
#### machine.kubelet.extraArgs #### machine.kubelet.extraArgs
``extraArgs`` is used to supply kubelet with additional startup command line arguments. `extraArgs` is used to supply kubelet with additional startup command line arguments.
### machine.ca ### machine.ca
``ca`` handles the certificate configuration for Talos components (osd, trustd, etc.). `ca` handles the certificate configuration for Talos components (osd, trustd, etc.).
#### machine.ca.crt #### machine.ca.crt
``crt`` provides the CA Certificate for OSD. `crt` provides the CA Certificate for OSD.
#### machine.ca.key #### machine.ca.key
``crt`` provides the CA Certificate Key for OSD. `crt` provides the CA Certificate Key for OSD.
### machine.network ### machine.network
``network`` defines the host network configuration. `network` defines the host network configuration.
#### machine.network.hostname #### machine.network.hostname
``hostname`` can be used to statically set the hostname for the host. `hostname` can be used to statically set the hostname for the host.
#### machine.network.interfaces #### machine.network.interfaces
``interfaces`` is used to define the network interface configuration. `interfaces` is used to define the network interface configuration.
By default all network interfaces will attempt a DHCP discovery. By default all network interfaces will attempt a DHCP discovery.
This can be further tuned through this configuration parameter. This can be further tuned through this configuration parameter.
@@ -128,14 +119,14 @@ This is the interface name that should be configured.
##### machine.network.interfaces.cidr ##### machine.network.interfaces.cidr
``cidr`` is used to specify a static IP address to the interface. `cidr` is used to specify a static IP address to the interface.
This should be in proper CIDR notation ( `192.168.2.5/24` ). This should be in proper CIDR notation ( `192.168.2.5/24` ).
> Note: This option is mutually exclusive with DHCP. > Note: This option is mutually exclusive with DHCP.
##### machine.network.interfaces.dhcp ##### machine.network.interfaces.dhcp
``dhcp`` is used to specify that this device should be configured via DHCP. `dhcp` is used to specify that this device should be configured via DHCP.
The following DHCP options are supported: The following DHCP options are supported:
@@ -148,49 +139,49 @@ The following DHCP options are supported:
##### machine.network.interfaces.ignore ##### machine.network.interfaces.ignore
``ignore`` is used to exclude a specific interface from configuration. `ignore` is used to exclude a specific interface from configuration.
This parameter is optional. This parameter is optional.
##### machine.network.interfaces.routes ##### machine.network.interfaces.routes
``routes`` is used to specify static routes that may be necessary. `routes` is used to specify static routes that may be necessary.
This parameter is optional. This parameter is optional.
Routes can be repeated and includes a ``Network`` and ``Gateway`` field. Routes can be repeated and includes a `Network` and `Gateway` field.
### machine.install ### machine.install
``install`` provides the details necessary to install the Talos image to disk. `install` provides the details necessary to install the Talos image to disk.
This is typically only used in bare metal setups. This is typically only used in bare metal setups.
#### machine.install.disk #### machine.install.disk
``disk`` is the device name to use for the `/boot` partition and `/var` partitions. `disk` is the device name to use for the `/boot` partition and `/var` partitions.
This should be specified as the unpartitioned block device. This should be specified as the unpartitioned block device.
#### machine.install.extraDevices #### machine.install.extraDevices
``extraDevices`` contains additional devices that should be formatted and partitioned. `extraDevices` contains additional devices that should be formatted and partitioned.
#### machine.install.extraKernelArgs #### machine.install.extraKernelArgs
``extraKernelArgs`` contain additional kernel arguments to be appended to the bootloader. `extraKernelArgs` contain additional kernel arguments to be appended to the bootloader.
#### machine.install.image #### machine.install.image
``image`` is a url to a Talos installer image. `image` is a url to a Talos installer image.
#### machine.install.bootloader #### machine.install.bootloader
``bootloader`` denotes if the bootloader should be installed to teh device. `bootloader` denotes if the bootloader should be installed to teh device.
#### machine.install.wipe #### machine.install.wipe
``wipe`` denotes if the disk should have zeros written to it before partitioning. `wipe` denotes if the disk should have zeros written to it before partitioning.
#### machine.install.force #### machine.install.force
``force`` will ignore any existing partitions on the device. `force` will ignore any existing partitions on the device.
## Cluster Configuration ## Cluster Configuration
@@ -225,38 +216,38 @@ cluster:
#### cluster.controlPlane.endpoint #### cluster.controlPlane.endpoint
``endpoint`` defines the address for kubernetes ( load balancer or DNS name ). `endpoint` defines the address for kubernetes ( load balancer or DNS name ).
#### cluster.controlPlane.ips #### cluster.controlPlane.ips
``ips`` lists the trustd endpoints. `ips` lists the trustd endpoints.
This should be a list of all the control plane addresses. This should be a list of all the control plane addresses.
### cluster.clusterName ### cluster.clusterName
``clusterName`` is the name of the cluster. `clusterName` is the name of the cluster.
### cluster.network ### cluster.network
### cluster.network.dnsDomain ### cluster.network.dnsDomain
``dnsDomain`` is the dns domain of the cluster. `dnsDomain` is the dns domain of the cluster.
### cluster.network.podSubnets ### cluster.network.podSubnets
``podSubnets`` is a list of the subnets that Kubernetes should allocate from for CNI. `podSubnets` is a list of the subnets that Kubernetes should allocate from for CNI.
### cluster.network.serviceSubnets ### cluster.network.serviceSubnets
``serviceSubnets`` is a list of the subnets that Kubernetes should allocate service addresses from. `serviceSubnets` is a list of the subnets that Kubernetes should allocate service addresses from.
### cluster.token ### cluster.token
``token`` is the kubeadm bootstrap token used to authenticate additional kubernetes nodes to the cluster. `token` is the kubeadm bootstrap token used to authenticate additional kubernetes nodes to the cluster.
### cluster.ca ### cluster.ca
``ca`` represents the ca certificate and key pair for Kubernetes use. `ca` represents the ca certificate and key pair for Kubernetes use.
### cluster.ca.crt ### cluster.ca.crt
@@ -266,38 +257,38 @@ This should be a list of all the control plane addresses.
### cluster.apiServer.image ### cluster.apiServer.image
``image`` defines the container image the Kubernetes API server will use. `image` defines the container image the Kubernetes API server will use.
### cluster.apiServer.extraArgs ### cluster.apiServer.extraArgs
``extraArgs`` provides additional arguments to the Kubernetes API server. `extraArgs` provides additional arguments to the Kubernetes API server.
### cluster.apiServer.certSANs ### cluster.apiServer.certSANs
``certSANs`` are a list of IP addresses that should be added to the API server certificate. `certSANs` are a list of IP addresses that should be added to the API server certificate.
### cluster.controllerManager ### cluster.controllerManager
### cluster.controllerManager.image ### cluster.controllerManager.image
``image`` defines the container image the Kubernetes API server will use. `image` defines the container image the Kubernetes API server will use.
### cluster.controllerManager.extraArgs ### cluster.controllerManager.extraArgs
``extraArgs`` provides additional arguments to the Kubernetes API server. `extraArgs` provides additional arguments to the Kubernetes API server.
### cluster.scheduler ### cluster.scheduler
### cluster.scheduler.image ### cluster.scheduler.image
``image`` defines the container image the Kubernetes API server will use. `image` defines the container image the Kubernetes API server will use.
### cluster.scheduler.extraArgs ### cluster.scheduler.extraArgs
``extraArgs`` provides additional arguments to the Kubernetes API server. `extraArgs` provides additional arguments to the Kubernetes API server.
### cluster.etcd ### cluster.etcd
### cluster.etcd.image ### cluster.etcd.image
``image`` defines the container image the Kubernetes API server will use. `image` defines the container image the Kubernetes API server will use.

View File

@@ -1,12 +1,5 @@
--- ---
title: "v1alpha1 Usage" title: 'v1alpha1 Usage'
date: 2019-10-04T17:14:49-07:00
draft: false
weight: 10
menu:
docs:
identifier: "v1alpha1-usage-configuration"
parent: 'configuration'
--- ---
Talos enforces a high level of security by using mutual TLS for authentication and authorization. Talos enforces a high level of security by using mutual TLS for authentication and authorization.
@@ -45,27 +38,27 @@ machine:
cluster: cluster:
controlPlane: controlPlane:
ips: ips:
- 1.2.3.4 - 1.2.3.4
- 2.3.4.5 - 2.3.4.5
- 3.4.5.6 - 3.4.5.6
clusterName: cluster.local clusterName: cluster.local
network: network:
dnsDomain: cluster.local dnsDomain: cluster.local
podSubnets: podSubnets:
- 10.244.0.0/16 - 10.244.0.0/16
serviceSubnets: serviceSubnets:
- 10.96.0.0/12 - 10.96.0.0/12
token: ndg6bi.cfj4sk82nddtr2hv token: ndg6bi.cfj4sk82nddtr2hv
ca: ca:
crt: LS0tLS1CR... crt: LS0tLS1CR...
key: LS0tLS1CR... key: LS0tLS1CR...
apiServer: apiServer:
certSANs: certSANs:
- 127.0.0.1 - 127.0.0.1
- ::1 - ::1
- 1.2.3.4 - 1.2.3.4
- 2.3.4.5 - 2.3.4.5
- 3.4.5.6 - 3.4.5.6
controllerManager: {} controllerManager: {}
scheduler: {} scheduler: {}
etcd: {} etcd: {}

View File

@@ -1,10 +1,5 @@
--- ---
title: "AWS" title: 'AWS'
date: 2018-10-29T19:40:55-07:00
draft: false
menu:
docs:
parent: 'guides'
--- ---
First, create the AMI: First, create the AMI:

View File

@@ -1,10 +1,5 @@
--- ---
title: "Azure" title: 'Azure'
date: 2019-8-16
draft: false
menu:
docs:
parent: 'guides'
--- ---
## Image Creation ## Image Creation

View File

@@ -1,10 +1,5 @@
--- ---
title: "GCP" title: 'GCP'
date: 2019-2-19
draft: false
menu:
docs:
parent: 'guides'
--- ---
First, from a source checkout of the [Talos repository](https://www.github.com/talos-systems/talos/), create the GCP compatible image: First, from a source checkout of the [Talos repository](https://www.github.com/talos-systems/talos/), create the GCP compatible image:
@@ -21,12 +16,12 @@ gsutil cp /path/to/talos/build/gcloud/talos.tar.gz gs://<gcloud bucket name>
Create a custom GCP image with: Create a custom GCP image with:
```bash ```bash
gcloud compute images create talos \ gcloud compute images create talos \
--source-uri=gs://<gcloud bucket name>/talos.tar.gz \ --source-uri=gs://<gcloud bucket name>/talos.tar.gz \
--guest-os-features=VIRTIO_SCSI_MULTIQUEUE --guest-os-features=VIRTIO_SCSI_MULTIQUEUE
``` ```
Create an instance in GCP, making sure to create a `user-data` key in the "Metadata" section, with a value of your full Talos node configuration. Create an instance in GCP, making sure to create a `user-data` key in the "Metadata" section, with a value of your full Talos node configuration.
{{% note %}} Further exploration is needed to see if we can use the "Startup script" section instead. {{% /note %}} > Further exploration is needed to see if we can use the "Startup script" section instead.

View File

@@ -0,0 +1,3 @@
---
title: Cloud
---

View File

@@ -1,11 +1,5 @@
--- ---
title: Getting Started title: Getting Started
date: 2019-06-21T06:25:46-08:00
draft: false
menu:
docs:
parent: 'guides'
weight: 1
--- ---
In this guide we will create a Kubernetes cluster in Docker, using a containerized version of Talos. In this guide we will create a Kubernetes cluster in Docker, using a containerized version of Talos.
@@ -31,7 +25,7 @@ osctl cluster create
Once the above finishes successfully, your talosconfig(`~/.talos/config`) will be configured to point to the new cluster. Once the above finishes successfully, your talosconfig(`~/.talos/config`) will be configured to point to the new cluster.
{{% note %}}Startup times can take up to a minute before the cluster is available.{{% /note %}} > Startup times can take up to a minute before the cluster is available.
## Configure the Cluster ## Configure the Cluster
@@ -53,7 +47,7 @@ The first thing we need to do is apply a PSP manifest:
kubectl --kubeconfig ./kubeconfig apply -f https://raw.githubusercontent.com/talos-systems/talos/master/hack/dev/manifests/psp.yaml kubectl --kubeconfig ./kubeconfig apply -f https://raw.githubusercontent.com/talos-systems/talos/master/hack/dev/manifests/psp.yaml
``` ```
{{% note %}}Talos enforces the use of [Pod Security Policies](https://kubernetes.io/docs/concepts/policy/pod-security-policy/).{{% /note %}} > Talos enforces the use of [Pod Security Policies](https://kubernetes.io/docs/concepts/policy/pod-security-policy/).
### Deploy the CNI Provider ### Deploy the CNI Provider
@@ -77,7 +71,7 @@ Once the cluster is available, you can make use of `osctl` and `kubectl` to inte
For example, to view current running containers, run `osctl ps` for a list of containers in the `system` namespace, or `osctl ps -k` for the `k8s.io` namespace. For example, to view current running containers, run `osctl ps` for a list of containers in the `system` namespace, or `osctl ps -k` for the `k8s.io` namespace.
To view the logs of a container, use `osctl logs <container>` or `osctl logs -k <container>`. To view the logs of a container, use `osctl logs <container>` or `osctl logs -k <container>`.
{{% note %}}We only set up port forwarding to master-1 so other nodes will not be directly accessible.{{% /note %}} > We only set up port forwarding to master-1 so other nodes will not be directly accessible.
## Cleaning Up ## Cleaning Up

View File

@@ -0,0 +1,3 @@
---
title: Hypervisors
---

View File

@@ -1,10 +1,5 @@
--- ---
title: "KVM" title: 'KVM'
date: 2018-10-29T19:40:55-07:00
draft: true
menu:
docs:
parent: 'guides'
--- ---
## Creating a Master Node ## Creating a Master Node
@@ -20,7 +15,7 @@ docker run \
-p metal -u http://${IP}:8080/master.yaml -p metal -u http://${IP}:8080/master.yaml
``` ```
{{% note %}}`http://${IP}:8080/master.yaml` should be reachable by the VM and contain a valid master configuration file.{{% /note %}} > `http://${IP}:8080/master.yaml` should be reachable by the VM and contain a valid master configuration file.
Now, create the VM: Now, create the VM:
@@ -54,7 +49,7 @@ docker run \
-p metal -u http://${IP}:8080/worker.yaml -p metal -u http://${IP}:8080/worker.yaml
``` ```
{{% note %}}`http://${IP}:8080/worker.yaml` should be reachable by the VM and contain a valid worker configuration file.{{% /note %}} > `http://${IP}:8080/worker.yaml` should be reachable by the VM and contain a valid worker configuration file.
Now, create the VM: Now, create the VM:

View File

@@ -1,10 +1,5 @@
--- ---
title: "Xen" title: 'Xen'
date: 2018-11-06T06:25:46-08:00
draft: true
menu:
docs:
parent: 'guides'
--- ---
## Creating a Master Node ## Creating a Master Node
@@ -39,7 +34,7 @@ vif = [ 'mac=52:54:00:A8:4C:E1,bridge=xenbr0,model=e1000', ]
extra = "consoleblank=0 console=hvc0 console=tty0 console=ttyS0,9600 talos.platform=metal talos.config=http://${IP}:8080/master.yaml" extra = "consoleblank=0 console=hvc0 console=tty0 console=ttyS0,9600 talos.platform=metal talos.config=http://${IP}:8080/master.yaml"
``` ```
{{% note %}}`http://${IP}:8080/master.yaml` should be reachable by the VM and contain a valid master configuration file.{{% /note %}} > `http://${IP}:8080/master.yaml` should be reachable by the VM and contain a valid master configuration file.
Now, create the VM: Now, create the VM:
@@ -79,7 +74,7 @@ vif = [ 'mac=52:54:00:B9:5D:F2,bridge=xenbr0,model=e1000', ]
extra = "consoleblank=0 console=hvc0 console=tty0 console=ttyS0,9600 talos.platform=metal talos.config=http://${IP}:8080/worker.yaml" extra = "consoleblank=0 console=hvc0 console=tty0 console=ttyS0,9600 talos.platform=metal talos.config=http://${IP}:8080/worker.yaml"
``` ```
{{% note %}}`http://${IP}:8080/worker.yaml` should be reachable by the VM and contain a valid worker configuration file.{{% /note %}} > `http://${IP}:8080/worker.yaml` should be reachable by the VM and contain a valid worker configuration file.
Now, create the VM: Now, create the VM:

View File

@@ -1,6 +1,6 @@
--- ---
title: "Guides" title: 'Guides'
layout: single
--- ---
One of the primary goals of Talos is a consistent experience regardless of _where_ you are operating. One of the primary goals of Talos is a consistent experience regardless of _where_ you are operating.
In the following sections we will cover how to deploy Talos to well known platforms. In the following sections we will cover how to deploy Talos to well known platforms.

View File

@@ -0,0 +1,3 @@
---
title: Digital Rebar
---

View File

@@ -1,10 +1,5 @@
--- ---
title: Metal title: Metal
date: 2019-06-21T06:25:46-08:00
draft: false
menu:
docs:
parent: 'guides'
--- ---
## Generate configuration ## Generate configuration

View File

@@ -0,0 +1,3 @@
---
title: Matchbox
---

View File

@@ -1,9 +1,5 @@
--- ---
title: "Edge" title: 'Edge'
draft: false
menu:
docs:
parent: 'use-cases'
--- ---
## Edge Computing ## Edge Computing

View File

@@ -1,6 +1,5 @@
--- ---
title: "Use Cases" title: 'Use Cases'
layout: single
--- ---
Talos is a suitable host operating system for any Kubernetes-based Talos is a suitable host operating system for any Kubernetes-based

View File

@@ -1,9 +1,5 @@
--- ---
title: "Multi-Cloud" title: 'Multi-Cloud'
draft: false
menu:
docs:
parent: 'use-cases'
--- ---
## Multi-cloud Kubernetes ## Multi-cloud Kubernetes

View File

@@ -1,9 +1,5 @@
--- ---
title: "Serverless" title: 'Serverless'
draft: false
menu:
docs:
parent: 'use-cases'
--- ---
## Serverless Infrastructure ## Serverless Infrastructure

View File

@@ -0,0 +1,9 @@
module.exports = {
defaultLanguage: `en`,
availableRoutesFile: `${__dirname}/routes.json`,
contentInputFolder: `${__dirname}/content/`,
menuInputFile: `${__dirname}/content/{version}.{lang}.json`,
indexOutputFile: `${__dirname}/static/index.json`,
sectionsOutputFile: `${__dirname}/static/{version}.sections.{lang}.json`,
menuOutputFile: `${__dirname}/static/{version}.menu.{lang}.json`
}

291
docs/website/docgen.js Normal file
View File

@@ -0,0 +1,291 @@
const watch = require('node-watch')
const frontmatter = require('front-matter')
const path = require('path')
const fs = require('fs-extra')
const glob = require('glob')
const config = require('./docgen.config')
const marked = require('marked')
const prism = require('prismjs')
const loadLanguages = require('prismjs/components/')
marked.setOptions({
highlight(code, lang) {
loadLanguages([lang])
return prism.highlight(code, prism.languages[lang], lang)
}
})
const args = process.argv
.slice(2)
.map((arg) => arg.split('='))
.reduce((args, [value, key]) => {
args[value] = key
return args
}, {})
const Docgen = {
sections: {},
init: () => {
Docgen.generateRoutes()
Docgen.coldstart()
if (!!args.watch) {
watch(
config.contentInputFolder,
{ filter: /\.md$/, recursive: true },
Docgen.handleFileEvent
)
watch(
config.contentInputFolder,
{ filter: /\.json$/, recursive: false },
Docgen.handleMenuEvent
)
}
},
/**
* Handles all node-watch file events (remove, update)
* @param {string} event - node-watch event type; eg. 'remove' || 'change'
* @param {string} contentFilePath - path to file that triggered that event
*/
handleFileEvent: (event, contentFilePath) => {
switch (event) {
case 'remove':
// contentFilePath = /my_absolute_file/content/content-delivery/en/topics/introduction.md
// contentPath = content-delivery/en/topics/introduction
const contentPath = contentFilePath
.replace(config.contentInputFolder, '')
.replace(path.parse(contentFilePath).ext, '')
// [ content-delivery, en, topics, introduction ]
const contentPathParts = contentPath.replace(/\\/g, '/').split('/')
// content-delivery
const version = contentPathParts.shift()
// en
const lang = contentPathParts.shift()
delete Docgen.sections[version][lang][contentPath]
Docgen.generate(version, lang)
break
default:
const section = Docgen.load(contentFilePath)
Docgen.generate(section.version, section.lang)
break
}
},
/**
* Handles all node-watch file events (remove, update)
* @param {string} event - node-watch event type; eg. 'remove' || 'change'
* @param {string} contentFilePath - path to file that triggered that event
*/
handleMenuEvent: (event, contentFilePath) => {
switch (event) {
case 'remove':
// ignore
return
break
default:
// [ content-delivery, en, json ]
const contentPathParts = contentFilePath
.replace(config.contentInputFolder, '')
.split('.')
// content-delivery
const version = contentPathParts.shift()
// en
const lang = contentPathParts.shift()
Docgen.exportMenu(version, lang)
break
}
},
/**
* Iterates through all markdown files, loads their content
* and generates section JSONs after preparation
*/
coldstart: () => {
glob(`${config.contentInputFolder}**/*.md`, (err, files) => {
if (err) throw err
files.forEach((contentFilePath) => {
Docgen.load(contentFilePath)
})
Docgen.generateAll()
})
},
/**
* Iterate through all versions and languages to trigger
* the generate for each content file.
*/
generateAll: () => {
// content-delivery, ...
Docgen.listFoldersInFolder(config.contentInputFolder).forEach((version) => {
// en, ...
Docgen.listFoldersInFolder(config.contentInputFolder + version).forEach(
(lang) => {
// generate sections json from one language and version
Docgen.generate(version, lang)
}
)
})
const content = fs.readFileSync(config.contentInputFolder + '/index.md', {
encoding: 'utf8'
})
const frontmatterContent = frontmatter(content)
const markedContent = marked(frontmatterContent.body)
index = {
attributes: frontmatterContent.attributes,
content: markedContent
}
return fs.writeFileSync(config.indexOutputFile, JSON.stringify(index))
},
/**
* Generates sections JSON for one version and language combination
* @param {string} version - first level of content folder, eg.: content-delivery, managmenet
* @param {string} lang - second level of content folder, eg.: en, de, es, it, ...
*/
generate: (version, lang) => {
// order sections for one language and version
Docgen.exportSections(Docgen.sections[version][lang], version, lang)
// copies menu to static
Docgen.exportMenu(version, lang)
},
/**
* Exports the generated menu as JSON depending on version and language
* @param {string} version - first level of content folder, eg.: content-delivery, managmenet
* @param {string} lang - second level of content folder, eg.: en, de, es, it, ...
*/
exportMenu: (version, lang) => {
fs.copySync(
config.menuInputFile
.replace('{version}', version)
.replace('{lang}', lang),
config.menuOutputFile
.replace('{version}', version)
.replace('{lang}', lang)
)
},
/**
* Exports the sections as JSON depending on version and language
* @param {Array} sections - Array of section objects
* @param {string} version - first level of content folder, eg.: content-delivery, managmenet
* @param {string} lang - second level of content folder, eg.: en, de, es, it, ...
*/
exportSections: (sections, version, lang) => {
return fs.writeFileSync(
config.sectionsOutputFile
.replace('{version}', version)
.replace('{lang}', lang),
JSON.stringify(sections)
)
},
/**
* Loads one file into Docgen.sections
* @param {string} contentFilePath - Absolute path to Content Source File, will be a *.md file containing frontmatter.
* @returns {Object} section - Object containing parsed markdown and additional information
*/
load: (contentFilePath) => {
const content = fs.readFileSync(contentFilePath, { encoding: 'utf8' })
const frontmatterContent = frontmatter(content)
const title = marked(frontmatterContent.attributes.title || '')
.replace('<p>', '')
.replace('</p>\n', '')
const markdownContent = marked(frontmatterContent.body)
// contentFilePath = /my_absolute_file/content/content-delivery/en/topics/introduction.md
// contentPath = content-delivery/en/topics/introduction
let contentPath = contentFilePath
.replace(config.contentInputFolder, '')
.replace(path.parse(contentFilePath).ext, '')
if (path.basename(contentPath) == 'index') {
contentPath = path.dirname(contentPath)
}
// [ content-delivery, en, topics, introduction ]
const contentPathParts = contentPath.replace(/\\/g, '/').split('/')
// content-delivery
const version = contentPathParts.shift()
// en
const lang = contentPathParts.shift()
// prepare data for json
let section = {
path: contentPath, // content-delivery/en/topics/introduction
lang: lang, // en
version: version, // content-delivery
title: title, // title from frontmatter
attributes: frontmatterContent.attributes, // all attributes from frontmatter
content: markdownContent // Markdown Content for left part of method section already as HTML
}
// check if version already exists in sections object
if (typeof Docgen.sections[version] === 'undefined') {
Docgen.sections[version] = {}
}
// check if language already exists in section version
if (typeof Docgen.sections[version][lang] === 'undefined') {
Docgen.sections[version][lang] = {}
}
// assign data to version, lang and contentPath combination
Docgen.sections[version][lang][contentPath] = section
return section
},
/**
* Generate and export a routes.json which will be used by Nuxt during "nuxt generate"
*/
generateRoutes: () => {
const routes = []
Docgen.listFoldersInFolder(config.contentInputFolder).forEach((version) => {
Docgen.listFoldersInFolder(config.contentInputFolder + version).forEach(
(lang) => {
if (lang == config.defaultLanguage) {
routes.push(`/docs/${version}/`)
} else {
routes.push(`/${lang}/docs/${version}/`)
}
}
)
})
fs.writeFile(config.availableRoutesFile, JSON.stringify(routes), (err) => {
if (err) throw err
})
},
/**
* Returns all first level subfolder names as string Array
* @param {string} folder - Path to folder you want all first level subfolders.
* @returns {Array<string>} folders - Array of folder names as string
*/
listFoldersInFolder: (folder) => {
return fs.readdirSync(folder).filter((file) => {
return fs.statSync(path.join(folder, file)).isDirectory()
})
}
}
Docgen.init()

View File

@@ -0,0 +1,12 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"~/*": ["./*"],
"@/*": ["./*"],
"~~/*": ["./*"],
"@@/*": ["./*"]
}
},
"exclude": ["node_modules", ".nuxt", "dist"]
}

View File

@@ -0,0 +1,7 @@
# LAYOUTS
**This directory is not required, you can delete it if you don't want to use it.**
This directory contains your Application Layouts.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/views#layouts).

View File

@@ -0,0 +1,38 @@
<template>
<div class="app">
<Header></Header>
<main role="main" class="content">
<nuxt />
</main>
<Footer></Footer>
</div>
</template>
<script>
import Header from '~/components/Header.vue'
import Footer from '~/components/Footer.vue'
export default {
components: {
Header,
Footer
}
}
</script>
<style>
.app {
display: flex;
flex-direction: column;
min-height: 100vh;
}
html {
background: url(~assets/images/chips_bg_v1.svg) no-repeat center center fixed;
-webkit-background-size: contain;
-moz-background-size: contain;
-o-background-size: contain;
background-size: contain;
background-position: center bottom;
}
</style>

View File

@@ -0,0 +1,8 @@
# MIDDLEWARE
**This directory is not required, you can delete it if you don't want to use it.**
This directory contains your application middleware.
Middleware let you define custom functions that can be run before rendering either a page or a group of pages.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing#middleware).

109
docs/website/nuxt.config.js Normal file
View File

@@ -0,0 +1,109 @@
const routes = require('./routes')
export default {
mode: 'universal',
/*
** Headers of the page
*/
head: {
title: process.env.npm_package_name || '',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{
hid: 'description',
name: 'description',
content: process.env.npm_package_description || ''
}
],
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }]
},
/*
** Customize the progress-bar color
*/
loading: { color: '#fff' },
/*
** Global CSS
*/
css: ['@/assets/css/main.css'],
/*
** Plugins to load before mounting the App
*/
plugins: [],
/*
** Nuxt.js dev-modules
*/
buildModules: [
// Doc: https://github.com/nuxt-community/eslint-module
'@nuxtjs/eslint-module',
// Doc: https://github.com/nuxt-community/nuxt-tailwindcss
'@nuxtjs/tailwindcss'
],
/*
** Nuxt.js dev-modules configuration
*/
// PurgeCSS is automatically installed by @nuxtjs/tailwindcss
purgeCSS: {},
/*
** Nuxt.js modules
*/
modules: ['nuxt-webfontloader'],
webfontloader: {
google: {
families: ['Lato:400,700', 'Nunito Sans:400,700', 'Fira Mono:400,700']
}
},
generate: {
routes(callback) {
let generatedRoutes = []
routes.forEach((route) => {
const parts = route.split('/')
let lang = parts[1]
let version = parts[3]
if (lang == 'docs') {
lang = 'en'
version = parts[2]
}
const r = {
route: route,
payload: {
sections: require(`${__dirname}/static/${version}.sections.${lang}.json`),
menu: require(`${__dirname}/static/${version}.menu.${lang}.json`)
}
}
generatedRoutes.push(r)
})
generatedRoutes.push({
route: '/',
payload: require(`${__dirname}/static/index.json`)
})
callback(null, generatedRoutes)
}
},
/*
** Build configuration
*/
build: {
/*
** You can extend webpack config here
*/
extend(config, ctx) {},
extractCSS: true
}
}

11168
docs/website/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

37
docs/website/package.json Normal file
View File

@@ -0,0 +1,37 @@
{
"name": "Talos",
"version": "0.1.0",
"description": "A static site for Talos documentation",
"author": "Talos Systems, Inc.",
"private": true,
"scripts": {
"dev": "node docgen.js watch=true & nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "node docgen.js && nuxt generate",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore .",
"clean": "rm -rf node_modules .nuxt dist"
},
"dependencies": {
"axios": "^0.19.0",
"front-matter": "^3.0.2",
"marked": "^0.7.0",
"nuxt": "^2.10.1",
"nuxt-webfontloader": "^1.1.0",
"prismjs": "^1.17.1"
},
"devDependencies": {
"@nuxtjs/eslint-config": "^1.0.1",
"@nuxtjs/eslint-module": "^1.0.0",
"@nuxtjs/tailwindcss": "^1.0.0",
"babel-eslint": "^10.0.1",
"eslint": "^6.1.0",
"eslint-config-prettier": "^4.1.0",
"eslint-plugin-nuxt": ">=0.4.2",
"eslint-plugin-prettier": "^3.1.1",
"node-watch": "^0.6.3",
"prettier": "^1.18.2",
"tailwindcss-grid": "^1.2.1",
"tailwindcss-typography": "^2.2.0"
}
}

View File

@@ -0,0 +1,6 @@
# PAGES
This directory contains your Application Views and Routes.
The framework reads all the `*.vue` files inside this directory and creates the router of your application.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing).

View File

@@ -0,0 +1,81 @@
<template>
<div id="content" class="content mb-4 section-docs">
<div class="md:flex flex-wrap">
<div class="md:w-1/4 mt-6">
<Sidebar></Sidebar>
</div>
<div class="md:w-3/4 mt-6">
<Content></Content>
</div>
</div>
</div>
</template>
<script>
import axios from 'axios'
import Sidebar from '~/components/Sidebar.vue'
import Content from '~/components/Content.vue'
export default {
name: 'Doc',
components: {
Sidebar,
Content
},
head: {
bodyAttrs: {
class: 'kind-section section-docs'
}
},
async fetch({ store, params, payload }) {
const version = params.pathMatch.split('/')[0]
const lang = params.lang || 'en'
let menu = null
let sections = null
if (payload) {
menu = payload.menu
sections = payload.sections
} else {
const base = process.client
? window.location.origin
: 'http://localhost:3000'
const [menuRes, sectionsRes] = await Promise.all([
axios.get(base + `/${version}.menu.${lang}.json`),
axios.get(base + `/${version}.sections.${lang}.json`)
])
menu = menuRes.data
sections = sectionsRes.data
}
store.commit('sidebar/setLang', lang)
store.commit('sidebar/setVersion', version)
store.commit('sidebar/setSections', sections)
store.commit('sidebar/setMenu', menu)
}
}
</script>
<style>
body.kind-page #content {
@apply max-w-3xl mx-auto px-6;
}
body.kind-section #content,
body.section-docs #content {
@apply max-w-6xl mx-auto px-6;
}
@screen lg {
body.kind-section #content body.kind-page #content {
@apply px-0;
}
}
body.section-docs .page-heading {
@apply mb-1;
}
</style>

View File

@@ -0,0 +1,35 @@
<template>
<div class="content w-full mb-4">
<article class="article-content c-rich-text">
<h1 class="page-heading">{{ attributes.title }}</h1>
<section class="border-t pt-4" v-html="content"></section>
</article>
</div>
</template>
<script>
import axios from 'axios'
export default {
async asyncData({ params, error, payload }) {
if (payload) {
return {
attributes: payload.attributes,
content: payload.content
}
}
const base = process.client
? window.location.origin
: 'http://localhost:3000'
const [indexRes] = await Promise.all([axios.get(base + '/index.json')])
const index = indexRes.data
return {
attributes: index.attributes,
content: index.content
}
}
}
</script>

View File

@@ -0,0 +1,7 @@
# PLUGINS
**This directory is not required, you can delete it if you don't want to use it.**
This directory contains Javascript plugins that you want to run before mounting the root Vue.js application.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/plugins).

View File

@@ -0,0 +1,11 @@
# STATIC
**This directory is not required, you can delete it if you don't want to use it.**
This directory contains your static files.
Each file inside this directory is mapped to `/`.
Thus you'd want to delete this README.md before deploying to production.
Example: `/static/robots.txt` is mapped as `/robots.txt`.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#static).

Binary file not shown.

After

Width:  |  Height:  |  Size: 598 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -0,0 +1 @@
<svg version="1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 740.6 280.1"><style>.st17{fill:gray}.st18{fill:#a4a3a6}</style><path fill="#32afc5" d="M272.8 272.5L140.3 7.5 7.8 272.5 140.3 40.7z"/><path fill="#6d9cbc" d="M272.8 272.5L140.3 73.8 7.8 272.5l132.5-165.6z"/><path fill="#ac80a3" d="M272.8 272.5L140.3 140 7.8 272.5l132.5-99.3z"/><path fill="#e66b8d" d="M272.8 272.5l-132.5-66.2L7.8 272.5l132.5-33.1z"/><g><path class="st17" d="M293.7 74.9h71.1v13.6h-27.1v88.3H321V88.6h-27.3V74.9zM443.1 156h-42.7l-7.3 20.8h-17.4l36.5-102.1h19.4L468 176.8h-17.6l-7.3-20.8zm-21.2-61l-16.7 47.4h33.3L421.9 95zM500.6 74.9v88.4h34.5v13.5h-51.2V74.9h16.7zM595.5 177.9c-28.7 0-52.1-21.6-52.1-52.2 0-30.5 23.3-52.1 52.1-52.1 29 0 52.1 21.6 52.1 52.1-.1 30.6-23.1 52.2-52.1 52.2zm0-14.6c20.2 0 34.9-14.7 34.9-37.7s-14.7-37.4-34.9-37.4-34.9 14.4-34.9 37.4 14.6 37.7 34.9 37.7zM697.5 177.9c-20.4 0-36.1-11.1-36.1-29.2h17.9c.7 8.4 6.6 15.1 18.2 15.1 11.7 0 18.3-6.3 18.3-15 0-24.6-54.1-8.7-54.1-46.2 0-17.9 14.2-29 35-29 19.5 0 33.3 10.3 34.8 27.7H713c-.6-6.9-6.6-13.2-17.2-13.5-9.7-.3-17.2 4.4-17.2 14.2 0 23 54 8.7 54 45.9.1 15.3-12.3 30-35.1 30z"/></g><g><path class="st18" d="M370.4 239.3c-6.2 0-11.1-3.1-11.3-8.9h7.5c.2 2.2 1.6 3.3 3.6 3.3 2.1 0 3.4-1 3.4-2.7 0-5.4-14.4-2.5-14.4-12.7 0-5.5 4.5-8.5 10.5-8.5 6.3 0 10.5 3.1 10.8 8.6H373c-.1-1.9-1.4-3-3.3-3-1.7 0-3 .8-3 2.6 0 5 14.3 2.8 14.3 12.4 0 4.9-3.8 8.9-10.6 8.9zM403.6 210.1h8l5.6 12.1 5.6-12.1h7.9l-10 19.4v9.6h-7v-9.6l-10.1-19.4zM464.6 239.3c-6.2 0-11.1-3.1-11.3-8.9h7.5c.2 2.2 1.6 3.3 3.6 3.3 2.1 0 3.4-1 3.4-2.7 0-5.4-14.4-2.5-14.4-12.7 0-5.5 4.5-8.5 10.5-8.5 6.3 0 10.5 3.1 10.8 8.6h-7.6c-.1-1.9-1.4-3-3.3-3-1.7 0-3 .8-3 2.6 0 5 14.3 2.8 14.3 12.4 0 4.9-3.8 8.9-10.5 8.9zM498.5 210.1h22.4v5.6h-7.7V239h-7v-23.3h-7.7v-5.6zM562.7 215.8H552v5.8h9.4v5.4H552v6.3h10.7v5.6H545V210h17.7v5.8zM587.9 210.1h8.3l8.1 20 8-20h8.3V239h-7v-17.3l-6.5 17.3h-5.7l-6.5-17.4V239h-7v-28.9zM656.7 239.3c-6.2 0-11.1-3.1-11.3-8.9h7.5c.2 2.2 1.6 3.3 3.6 3.3 2.1 0 3.4-1 3.4-2.7 0-5.4-14.4-2.5-14.4-12.7 0-5.5 4.5-8.5 10.5-8.5 6.3 0 10.5 3.1 10.8 8.6h-7.6c-.1-1.9-1.4-3-3.3-3-1.7 0-3 .8-3 2.6 0 5 14.3 2.8 14.3 12.4.1 4.9-3.7 8.9-10.5 8.9z"/></g></svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -0,0 +1,10 @@
# STORE
**This directory is not required, you can delete it if you don't want to use it.**
This directory contains your Vuex Store files.
Vuex Store option is implemented in the Nuxt.js framework.
Creating a file in this directory automatically activates the option in the framework.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/vuex-store).

View File

@@ -0,0 +1,29 @@
export const state = () => ({
activeMenuPath: 'v0.2/en/guides',
lang: 'en',
version: 'v0.2',
sections: {},
menu: []
})
export const mutations = {
setMenu(state, menu) {
state.menu = menu
},
setSections(state, sections) {
state.sections = sections
},
setLang(state, lang) {
state.lang = lang
},
setVersion(state, version) {
state.version = version
},
setActiveDoc(state, activeMenuPath) {
state.activeMenuPath = activeMenuPath.replace('docs/', '')
}
}

View File

@@ -0,0 +1,224 @@
/*
** TailwindCSS Configuration File
**
** Docs: https://tailwindcss.com/docs/configuration
** Default: https://github.com/tailwindcss/tailwindcss/blob/master/stubs/defaultConfig.stub.js
*/
module.exports = {
theme: {
extend: {
width: {
'30': '30%'
},
colors: {
'primary-color': {
100: '#EBF7F9',
200: '#CCEBF1',
300: '#ADDFE8',
400: '#70C7D6',
500: '#32AFC5',
600: '#2D9EB1',
700: '#1E6976',
800: '#174F59',
900: '#0F353B'
},
'logo-colors': {
1: '#32AFC5',
2: '#6D9CBC',
3: '#AC80A3',
4: '#E66B8D'
}
},
fontFamily: {
brand: [
'Nunito Sans',
'Work Sans',
'-apple-system',
'BlinkMacSystemFont',
'"Segoe UI"',
'Roboto',
'"Helvetica Neue"',
'Arial',
'"Noto Sans"',
'sans-serif',
'"Apple Color Emoji"',
'"Segoe UI Emoji"',
'"Segoe UI Symbol"',
'"Noto Color Emoji"'
],
headings: [
'Nunito Sans',
'"Helvetica Neue"',
'Arial',
'"Noto Sans"',
'sans-serif'
],
sans: [
'Lato',
'-apple-system',
'BlinkMacSystemFont',
'"Segoe UI"',
'"Helvetica Neue"',
'Arial',
'"Noto Sans"',
'sans-serif',
'"Apple Color Emoji"',
'"Segoe UI Emoji"',
'"Segoe UI Symbol"',
'"Noto Color Emoji"'
],
mono: ['Fira Mono', 'monospace']
},
fontSize: {
xs: '.75rem',
sm: '.875rem',
base: '1rem',
lg: '1.125rem',
xl: '1.25rem',
'2xl': '1.5rem',
'3xl': '1.875rem',
'4xl': '2.25rem',
'5xl': '3rem',
'6xl': '4rem'
}
},
textIndent: {
// defaults to {}
'1': '0.25rem',
'2': '0.5rem'
},
textShadow: {
// defaults to {}
default: '0 2px 5px rgba(0, 0, 0, 0.5)',
lg: '0 2px 10px rgba(0, 0, 0, 0.5)'
},
textStyles: (theme) => ({
// defaults to {}
heading: {
output: false, // this means there won't be a "heading" component in the CSS, but it can be extended
fontWeight: theme('fontWeight.normal'),
lineHeight: theme('lineHeight.tight'),
fontFamily: theme('fontFamily.headings')
},
h1: {
extends: 'heading', // this means all the styles in "heading" will be copied here; "extends" can also be an array to extend multiple text styles
fontSize: theme('fontSize.4xl'),
'@screen sm': {
fontSize: theme('fontSize.5xl')
}
},
h2: {
extends: 'heading',
fontSize: theme('fontSize.3xl'),
'@screen sm': {
fontSize: theme('fontSize.4xl')
}
},
h3: {
extends: 'heading',
fontSize: theme('fontSize.3xl')
},
h4: {
extends: 'heading',
fontSize: theme('fontSize.2xl')
},
h5: {
extends: 'heading',
fontSize: theme('fontSize.xl')
},
h6: {
extends: 'heading',
fontSize: theme('fontSize.lg')
},
link: {
fontWeight: theme('fontWeight.bold'),
color: theme('colors.blue.400'),
'&:hover': {
color: theme('colors.blue.600'),
textDecoration: 'underline'
}
},
richText: {
fontWeight: theme('fontWeight.normal'),
fontSize: theme('fontSize.base'),
lineHeight: theme('lineHeight.relaxed'),
'> * + *': {
marginTop: '1em'
},
blockquote: {
fontStyle: 'italic',
fontSize: '0.85rem',
marginLeft: '1rem',
borderLeft: '2px solid #999',
paddingLeft: '.5rem'
},
h1: {
extends: 'h1'
},
h2: {
extends: 'h2'
},
h3: {
extends: 'h3'
},
h4: {
extends: 'h4'
},
h5: {
extends: 'h5'
},
h6: {
extends: 'h6'
},
ul: {
listStyleType: 'disc',
listStylePosition: 'inside',
marginBottom: '16px'
},
ol: {
listStyleType: 'decimal',
listStylePosition: 'inside',
marginBottom: '16px'
},
a: {
extends: 'link'
},
'b, strong': {
fontWeight: theme('fontWeight.bold')
},
'i, em': {
fontStyle: 'italic'
},
code: {
fontFamily: theme('fontFamily.code')
}
}
})
},
variants: {},
plugins: [
require('tailwindcss-grid')({
grids: [2, 3, 4, 5, 6, 8, 10, 12],
gaps: {
0: '0',
4: '1rem',
8: '2rem',
'4-x': '1rem',
'4-y': '1rem'
},
autoMinWidths: {
'16': '4rem',
'24': '6rem',
'300px': '300px'
},
variants: ['responsive']
}),
require('tailwindcss-typography')({
ellipsis: true, // defaults to true
hyphens: true, // defaults to true
textUnset: true, // defaults to true
componentPrefix: 'c-' // for text styles; defaults to 'c-'
})
]
}

12
netlify.toml Normal file
View File

@@ -0,0 +1,12 @@
[build]
base = "docs/website/"
publish = "dist"
command = "npm run generate --fail-on-page-error"
[context.deploy-preview]
publish = "dist"
command = "npm run generate"
[context.branch-deploy]
publish = "dist"
command = "npm run generate"