Skip to content

Commit 6334eb3

Browse files
committed
Merge branch 'main' of github.com:metal-stack/docs-new
2 parents f9550ed + 9ee43c5 commit 6334eb3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+2000
-68
lines changed

README.md

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ bun run fetch-readmes
132132
```
133133

134134
## Component references
135-
136-
Ensure first, that all files in the docs folder are updated and ready to freeze. Also execute `bun run fetch-readmes` to update files from components and apis.
135+
Ensure first, that all files in the docs folder are updated and ready to freeze. Also execute `bun run fetch-readmes` to update files from components and apis with the release-vector file from the main branch.
136+
It is also possible to use `bun run fetch-readmes v0.20.8` to use the release-vector file with a specific tag (i.E. v0.20.8).
137137
All components are referenced in the `/scripts/components.json` file. Use this minimal template to add a new component:
138138

139139
```json
@@ -160,26 +160,11 @@ bun run docusaurus docs:version v0.21.6
160160

161161
Now, the new version will be create and the latest files will be copied to the "`versioned`" folders.
162162

163-
## Comparison
164-
165-
### Benefits
166-
167-
**Core** features:
168-
169-
- md, mdx based documentation
170-
- simple and flexible file structure
171-
- versioning
172-
- blog integration
173-
174-
**Nice** to have:
163+
## Release Notes
164+
The release notes can be synced from GitHub with the GitHub API. Therefore, ensure that a valid access token is created and set on the GitHub Runner or local machine with the name `GH_RELEASE_TOKEN`.
175165

176-
- completely in typescript
177-
- highly customizable
178-
- custom page routing
179-
- custom styling and theming
180-
- possibility for translations
181-
182-
### Disadvantages
183-
184-
- new framework
185-
- copies of versions can explode the size of the repository
166+
To run the synchronization, run the following commmand:
167+
```
168+
bun run create-release-notes
169+
```
170+
If you run this before the build step, also the release notes get indexed.

docs/contributing/03-contribution-guideline.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Development follows the official guide to:
110110

111111
#### Libraries
112112

113-
metal-stack maintains several libraries that you should utilize in your project in order unify common behavior. Some of these projects are:
113+
metal-stack maintains several libraries that you should utilize in your project in order to unify common behavior. Some of these projects are:
114114

115115
- [metal-go](https://github.com/metal-stack/metal-go)
116116
- [metal-lib](https://github.com/metal-stack/metal-lib)
@@ -121,7 +121,7 @@ From the server-side you should ensure that you are returning the common error j
121121

122122
### Documentation
123123

124-
We want to share knowledge and keep things simple. If things cannot kept simple we want enable everybody to understand them by:
124+
We want to share knowledge and keep things simple. If things cannot kept simple we want to enable everybody to understand them by:
125125

126126
- Document in short sentences[^4].
127127
- Do not explain the HOW (this is already documented by your code and documenting the obvious is considered a defect).

docs/docs/04-For Operators/01-hardware.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ The following GPU types are officially supported and verified by the metal-stack
3737
| NVIDIA | RTX 6000 | stable |
3838
| NVIDIA | H100 | stable |
3939

40-
Other GPU models might work but were not reported to us. For a detailed description howto use GPU support in a kubernetes cluster please check this [documentation](../05-Concepts/04-Kubernetes/06-gpu-workers.md)
40+
Other GPU models might work but were not reported to us. For a detailed description howto use GPU support in a kubernetes cluster please check this [documentation](../05-Concepts/04-Kubernetes/06-gpu-workers.md).
4141

4242
## Network Cards
4343

@@ -69,7 +69,7 @@ Other switch series and models might work but were not reported to us.
6969

7070
On our switches we run [SONiC](https://sonicfoundation.dev). The metal-core writes network configuration specifically implemented for this operating system. Please also consider running SONiC on your switches if you do not want to run into any issues with networking.
7171

72-
Our previous support for [Cumulus Linux](hhttps://www.nvidia.com/en-us/networking/ethernet-switching/cumulus-linux/) will come to an end.
72+
Our previous support for [Cumulus Linux](https://www.nvidia.com/en-us/networking/ethernet-switching/cumulus-linux/) will come to an end.
7373

7474
Of course, contributions for supporting other switch vendors and operating systems are highly appreciated.
7575
:::

docs/docs/04-For Operators/02-operating-systems.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ It is fully possible to build your own operating system images and provide them
3434

3535
There are some conventions though that you need to follow in order to make your image installable through the metal-hammer. You should understand the [machine provisioning sequence](../05-Concepts/01-architecture.md#machine-provisioning-sequence) before starting to write your own images.
3636

37-
1. Images need to be compressed to a tarball using the [lz4](https://de.wikipedia.org/wiki/LZ4) compression algorithm
38-
1. An `md5` checksum file with the same name as the image archive needs to be provided in the download path along with the actual os image
39-
1. A `packages.txt` containing the packages contained in the OS image should be provided in the download path (not strictly required)
37+
1. Images need to be compressed to a tarball using the [lz4](https://de.wikipedia.org/wiki/LZ4) compression algorithm.
38+
1. An `md5` checksum file with the same name as the image archive needs to be provided in the download path along with the actual os image.
39+
1. A `packages.txt` containing the packages contained in the OS image should be provided in the download path (not strictly required).
4040
1. Consider semantic image versioning, which we use in our algorithms to select latest images (e.g. `os-major.minor.patch` ➡️ `ubuntu-19.10.20191018`)
41-
1. Consider installing packages used by the metal-stack infrastructure
41+
1. Consider installing packages used by the metal-stack infrastructure:
4242
- [FRR](https://frrouting.org/) to enable routing-to-the-host in our network topology
4343
- [go-lldpd](https://github.com/metal-stack/go-lldpd) to enable checking if the machine is still alive after user allocation
4444
- [ignition](https://github.com/coreos/ignition) for enabling users to run user-specific initialization instructions before bootup. It's pretty small in size, which is why we use it. However, you are free to use other cloud instance initialization tools if you want to.

docs/docs/04-For Operators/03-deployment-guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ This playbook will always be run before the actual metal-stack deployment and pr
124124
125125
### Inventory
126126
127-
Then, there will be an inventory for the control plane deployment in `inventories/control-plane.yaml` that adds the localhost to the `control-plane` host group:
127+
Then, there will be an inventory for the control plane deployment in `inventories/control-plane.yaml` that adds `localhost` to the `control-plane` host group:
128128

129129
```yaml
130130
---
@@ -538,7 +538,7 @@ The basic principles of how the metal control plane can be deployed should now b
538538

539539
### Setting Up the backup-restore-sidecar
540540

541-
The backup-restore-sidecar can come up very handy when you want to add another layer of security to the metal-stack databases in your Kubernetes cluster. The sidecar takes backups of the metal databases in small time intervals and stores them in a blobstore of a cloud provider. For each database that will be backed up, a lifecycle rule is established. The backup mechanism is deactivated by default and must be activated by the operator. This way your metal-stack setup can even survive the deletion of your Kubernetes control plane cluster (including all volumes getting lost). After re-deploying metal-stack to another Kubernetes clusters, the databases come up with the latest backup data in a matter of seconds.
541+
The backup-restore-sidecar can come in very handy when you want to add another layer of security to the metal-stack databases in your Kubernetes cluster. The sidecar takes backups of the metal databases in small time intervals and stores them in a blobstore of a cloud provider. For each database that will be backed up, a lifecycle rule is established. The backup mechanism is deactivated by default and must be activated by the operator. This way your metal-stack setup can even survive the deletion of your Kubernetes control plane cluster (including all volumes getting lost). After re-deploying metal-stack to another Kubernetes clusters, the databases come up with the latest backup data in a matter of seconds.
542542

543543
Encryption can be enabled for the backups by providing an AES-256 encryption key.
544544

docs/docs/05-Concepts/03-Network/02-firewalls.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
slug: /firewalls
33
title: Firewalls
44
sidebar_position: 1
5+
draft: true
56
---
67

78
# Firewalls
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
---
2+
slug: /tailscale-service-exposal
3+
title: Tailscale
4+
sidebar_position: 3
5+
---
6+
# Expose Services with Tailscale
7+
This guide is a recommendation on how to access services from anywhere if you are evaluating the metalstack on-prem starter without a public IP-address.
8+
9+
These steps will guide you through the process quickly. For a deeper dive, or if you want to use alternative setups, the Tailscale articles are also linked.
10+
11+
## What are Tailscale and Tailnets?
12+
Tailscale is a Canadian company that offers a virtual private network solution based on WireGuard.
13+
14+
Instead of relying on centralised VPN servers to route all traffic, Tailscale creates a mesh VPN called Tailnet. It creates encrypted peer-to-peer connections between network subscribers. This approach is claimed to improve throughput and stability while reducing latency.
15+
16+
Tailscale's solution is composed of components that are mostly open source. Find more information on their [open source sstatement](https://tailscale.com/opensource) and their [GitHub repository](https://github.com/tailscale).
17+
18+
## Setup an Account and Clients
19+
Please begin by [following these steps](https://login.tailscale.com/start) to use an authentication provider to create the first user account for your network.
20+
21+
The first step is to install Tailscale clients on the devices from which you wish to access the Kubernetes services.
22+
23+
Should you require to extend an invitation to additional users, this can be facilitated by navigating to the "Users" tab on the Admin Console.
24+
25+
## Setup the Operator
26+
### Labels
27+
First, we will establish tags to categorise our services. Please open the 'Access controls' tab, where you will find a text editor containing all the Access Control settings in JSON format.
28+
29+
Uncomment the `tagOwners` section and add the following tags:
30+
```json
31+
"tagOwners": {
32+
"tag:k8s-operator": [],
33+
"tag:k8s": ["tag:k8s-operator"],
34+
}
35+
```
36+
The operator will use the `k8s-operator`-tag. Devices with this tag are now configured as owner for devices with the `k8s`-tag, which will be used for our services.
37+
### Create OAuth-Client Credentials
38+
In the "Settings" tab at "OAuth clients", generate a new OAuth client. Set write permissions for "Devices - Core" and "Keys - Auth Keys". Select the `k8s-operator` tag for both.
39+
40+
![Tailscale Devices Configuration](tailscale-devices.png)
41+
![Tailscale AuthKey Configuration](tailscale-authkeys.png)
42+
43+
Therefore, a device that has been assigned the label `k8s-operator` will have the capability to register additional devices with the `k8s` tag.
44+
45+
When you click "create", you get a client-id and client-secret, that you will need to setup the operator.
46+
### Setup Operator with helm
47+
The most common and practical way is to use a Helm chart to setup the operator. Therefore, we first have to add and update the helm-repository of tailscale:
48+
```
49+
helm repo add tailscale https://pkgs.tailscale.com/helmcharts
50+
helm repo update
51+
```
52+
53+
Now, we can install the helm-chart in a dedicated namespace using the credentials of the OAuth client
54+
55+
```bash
56+
helm upgrade \
57+
--install \
58+
tailscale-operator \
59+
tailscale/tailscale-operator \
60+
--namespace=tailscale \
61+
--create-namespace \
62+
--set-string oauth.clientId="<OAauth client ID>" \
63+
--set-string oauth.clientSecret="<OAuth client secret>" \
64+
--wait
65+
```
66+
Check on the administration console, if your operator appears on the Machines list.
67+
68+
Alternative ways & troubleshooting:
69+
- Take the [operator.yaml manifest](https://github.com/tailscale/tailscale/blob/main/cmd/k8s-operator/deploy/manifests/operator.yaml) from the GitHub repository and make your adjustments to use [Static manifests with kubectl](https://tailscale.com/kb/1236/kubernetes-operator#static-manifests-with-kubectl)
70+
- If the operator does not show op in the Machines list, use the guide for [Troubleshooting the Kubernetes operator](https://tailscale.com/kb/1446/kubernetes-operator-troubleshooting)
71+
## Expose Services on the Tailnet
72+
There are three ways to allow traffic to your pods from the tailnet. We can setup a dedicated Service or annotate an existing one. For more routing options, use an Ingress object. For detailed configuration options, review the article about [Expose a Kubernetes cluster workload to your tailnet (cluster ingress)](https://tailscale.com/kb/1439/kubernetes-operator-cluster-ingress)
73+
### Add a Load Balancer Service
74+
The installed operator is looking for Service objects with the `spec.type`of `LoadBalancer`and the `spec.loadBalancerClass` of `tailscale`.
75+
```yaml
76+
---
77+
apiVersion: v1
78+
kind: Service
79+
metadata:
80+
name: nginx
81+
spec:
82+
ports:
83+
- name: https
84+
port: 443
85+
targetPort: 443
86+
type: LoadBalancer
87+
loadBalancerClass: tailscale
88+
```
89+
### Annotate an existing Service
90+
Edit the Service and add the annotation `tailscale.com/expose` with the value "true":
91+
```yaml
92+
---
93+
apiVersion: v1
94+
kind: Service
95+
metadata:
96+
annotations:
97+
tailscale.com/expose: "true"
98+
name: nginx
99+
spec:
100+
...
101+
```
102+
Note that "true" is quoted because annotation values are strings, and an unquoted true will be incorrectly interpreted as a boolean.
103+
### Use an Ingress
104+
To enable path-based routing, use an Ingress resource.
105+
Ingress routes only use TLS over HTTPS. To make this work, you have to enable the `MagicDNS` and `HTTPS` options in the [DNS-Tab on your Administration Console](https://login.tailscale.com/admin/dns). This enables helpful features:
106+
- Magic DNS automatically register your services with subdomains in your tailnet
107+
- HTTPS enables the provisioning of certificates for devices
108+
109+
To set the Ingress up, just refer to `tailscale` as the `ingressClassName`:
110+
```yaml
111+
---
112+
apiVersion: networking.k8s.io/v1
113+
kind: Ingress
114+
metadata:
115+
name: nginx
116+
spec:
117+
ingressClassName: tailscale
118+
rules:
119+
- http:
120+
paths:
121+
- path: /
122+
pathType: Prefix
123+
backend:
124+
...
125+
```
126+
Please consider, that currently only paths with `pathType: prefix` are supported currently
60.6 KB
Loading
62.5 KB
Loading

docs/docs/06-For CISOs/Security/01-principles.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ To ensure that internal components interact securely with the metal-api, metal-s
4343

4444
Users can interact with the metal-api using [metalctl](https://github.com/metal-stack/metalctl), the command-line interface provided by metal-stack. Depending on the required operations, users should authenticate with the appropriate role to match their level of access.
4545

46-
## Defence in Depth
46+
## Defense in Depth
4747

48-
Defence in depth is a security strategy that employs multiple layers of defense to protect systems and data. By implementing various security measures at different levels, metal-stack aims to mitigate risks and enhance overall security posture.
48+
Defense in depth is a security strategy that employs multiple layers of defense to protect systems and data. By implementing various security measures at different levels, metal-stack aims to mitigate risks and enhance overall security posture.
4949

5050
## Redundancy
5151

0 commit comments

Comments
 (0)