-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 57baddd
Showing
19 changed files
with
368 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
# Created by https://www.toptal.com/developers/gitignore/api/hugo | ||
# Edit at https://www.toptal.com/developers/gitignore?templates=hugo | ||
|
||
### Hugo ### | ||
# Generated files by hugo | ||
/public/ | ||
/resources/_gen/ | ||
hugo_stats.json | ||
|
||
# Executable may be added to repository | ||
hugo.exe | ||
hugo.darwin | ||
hugo.linux | ||
|
||
# End of https://www.toptal.com/developers/gitignore/api/hugo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[submodule "static/logo"] | ||
path = static/logo | ||
url = git@github.com:nimbolus/logo.git | ||
[submodule "themes/docsy"] | ||
path = themes/docsy | ||
url = https://github.com/google/docsy.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM klakegg/hugo:ext-alpine | ||
|
||
RUN apk add git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: "{{ replace .Name "-" " " | title }}" | ||
linkTitle: "{{ replace .Name "-" " " | title }}" | ||
date: "{{ .Date }}" | ||
weight: 10 | ||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../static/logo/nimbolus_red.svg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
$primary: #3f608c; | ||
$secondary: #af0000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
baseURL = "https://nimbolus.de/" | ||
languageCode = "en-us" | ||
title = "Nimbolus" | ||
description = "Nimbolus Documentation" | ||
theme = ["docsy"] | ||
|
||
enableGitInfo = false | ||
|
||
contentDir = "content/en" | ||
defaultContentLanguageInSubdir = true | ||
|
||
[languages] | ||
[languages.en] | ||
title = "Nimbolus" | ||
description = "Nimbolus Documentation" | ||
languageName ="English" | ||
weight = 1 | ||
|
||
[markup] | ||
[markup.goldmark] | ||
[markup.goldmark.renderer] | ||
unsafe = true | ||
[markup.highlight] | ||
style = "monokai" | ||
|
||
[outputs] | ||
section = ["HTML", "print"] | ||
|
||
[params] | ||
copyright = "Nimbolus" | ||
images = ["logo/nimbolus_red_512.png"] | ||
|
||
github_repo = "https://github.com/nimbolus/nimbolus.de" | ||
github_branch= "main" | ||
|
||
[params.ui.readingtime] | ||
enable = true | ||
|
||
[params.ui] | ||
sidebar_menu_compact = false | ||
breadcrumb_disable = false | ||
sidebar_search_disable = false | ||
navbar_logo = true | ||
footer_about_disable = true | ||
|
||
[params.mermaid] | ||
enable = true | ||
theme = "neutral" | ||
|
||
[[menu.main]] | ||
name = "GitHub" | ||
weight = 50 | ||
url = "https://github.com/nimbolus/" | ||
pre = "<i class='fab fa-github'></i>" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
title: "Documentation" | ||
linkTitle: "Documentation" | ||
date: "2021-05-11T01:41:54+02:00" | ||
menu: | ||
main: | ||
weight: 10 | ||
|
||
cascade: | ||
- type: "blog" | ||
toc_root: true | ||
_target: | ||
path: "/blog/**" | ||
- type: "docs" | ||
_target: | ||
path: "/**" | ||
--- | ||
{{< alert color="warning" >}}The docs are still under heady development. Use with caution.{{< /alert >}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: "Ansible OpenStack" | ||
linkTitle: "Ansible OpenStack" | ||
date: "2021-05-11T01:41:54+02:00" | ||
weight: 1 | ||
|
||
github_project_repo: https://github.com/nimbolus/ansible-openstack | ||
--- | ||
[View on GitHub](https://github.com/nimbolus/ansible-openstack.git) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: "Helm Bot" | ||
linkTitle: "Helm Bot" | ||
date: "2021-05-11T01:41:54+02:00" | ||
weight: 3 | ||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: "Terraform Modules" | ||
linkTitle: "Terraform Modules" | ||
date: "2021-05-11T01:41:54+02:00" | ||
weight: 2 | ||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,191 @@ | ||
--- | ||
title: "Terraform K3s" | ||
linkTitle: "Terraform K3s" | ||
date: "2021-05-11T01:41:54+02:00" | ||
weight: 2 | ||
|
||
github_project_repo: https://github.com/nimbolus/tf-k3s | ||
--- | ||
[View on GitHub](https://github.com/nimbolus/tf-k3s.git) | ||
|
||
These Terraform modules can provision k3s nodes and are able to build a cluster from multiple nodes. | ||
|
||
You can use the [k3s](https://github.com/nimbolus/tf-k3s/tree/master/k3s) module to template the necessary cloudinit files for creating a k3s cluster node. | ||
Modules for [OpenStack](https://github.com/nimbolus/tf-k3s/tree/master/k3s-openstack) and [Hetzner hcloud](https://github.com/nimbolus/tf-k3s/tree/master/k3s-hcloud) that bundle all necessary resources are available. | ||
|
||
## Examples | ||
|
||
Note that network, subnet and key pair needs to be created beforehand. | ||
|
||
### Simple Module for templating cloudinit user_data | ||
[View on GitHub](https://github.com/nimbolus/tf-k3s/tree/master/example-simple.tf) | ||
|
||
```terraform | ||
resource "random_password" "cluster_token" { | ||
length = 64 | ||
special = false | ||
} | ||
module "k3s_master" { | ||
source = "github.com/nimbolus/tf-k3s/k3s" | ||
name = "k3s-master" | ||
k3s_token = random_password.cluster_token.result | ||
install_k3s_exec = "server --disable traefik --node-label az=ex1" | ||
} | ||
module "k3s_worker" { | ||
source = "github.com/nimbolus/tf-k3s/k3s" | ||
name = "k3s-worker" | ||
k3s_join_existing = true | ||
k3s_url = module.k3s_master.k3s_url | ||
k3s_token = random_password.cluster_token.result | ||
install_k3s_exec = "agent --node-label az=ex1" | ||
} | ||
``` | ||
|
||
### HA-Master and bootstrap token with OpenStack | ||
[View on GitHub](https://github.com/nimbolus/tf-k3s/tree/master/example-ha-openstack.tf) | ||
|
||
```terraform | ||
resource "random_password" "ha_cluster_token" { | ||
length = 64 | ||
special = false | ||
} | ||
resource "random_password" "ha_bootstrap_token_id" { | ||
length = 6 | ||
special = false | ||
} | ||
resource "random_password" "ha_bootstrap_token_secret" { | ||
length = 16 | ||
special = false | ||
} | ||
module "master1" { | ||
source = "github.com/nimbolus/tf-k3s/k3s-openstack" | ||
name = "k3s-master1" | ||
image_name = "ubuntu-20.04" | ||
flavor_name = "m1.small" | ||
availability_zone = "ex1" | ||
keypair_name = "example-keypair" | ||
network_id = "example-id" | ||
subnet_id = "example-id" | ||
k3s_token = random_password.ha_cluster_token.result | ||
install_k3s_exec = "server --cluster-init --kube-apiserver-arg=\"enable-bootstrap-token-auth\" --node-label az=ex1" | ||
bootstrap_token_id = nonsensitive(random_password.ha_bootstrap_token_id.result) | ||
bootstrap_token_secret = random_password.ha_bootstrap_token_secret.result | ||
} | ||
output "k3s_url" { | ||
value = module.master1.k3s_url | ||
} | ||
resource "local_file" "kubeconfig" { | ||
filename = "kubeconfig.yaml" | ||
content = module.master1.kubeconfig | ||
} | ||
module "master2" { | ||
source = "github.com/nimbolus/tf-k3s/k3s-openstack" | ||
name = "k3s-master2" | ||
image_name = "ubuntu-20.04" | ||
flavor_name = "m1.small" | ||
availability_zone = "ex1" | ||
keypair_name = "example-keypair" | ||
network_id = "example-id" | ||
subnet_id = "example-id" | ||
security_group_id = module.master1.security_group_id | ||
k3s_join_existing = true | ||
k3s_url = module.master1.k3s_url | ||
k3s_token = random_password.ha_cluster_token.result | ||
install_k3s_exec = "server --kube-apiserver-arg=\"enable-bootstrap-token-auth\" --node-label az=ex1" | ||
} | ||
module "master3" { | ||
source = "github.com/nimbolus/tf-k3s/k3s-openstack" | ||
name = "k3s-master3" | ||
image_name = "ubuntu-20.04" | ||
flavor_name = "m1.small" | ||
availability_zone = "ex1" | ||
keypair_name = "example-keypair" | ||
network_id = "example-id" | ||
subnet_id = "example-id" | ||
security_group_id = module.master1.security_group_id | ||
k3s_join_existing = true | ||
k3s_url = module.master1.k3s_url | ||
k3s_token = random_password.ha_cluster_token.result | ||
install_k3s_exec = "server --kube-apiserver-arg=\"enable-bootstrap-token-auth\" --node-label az=ex1" | ||
} | ||
module "worker1" { | ||
source = "github.com/nimbolus/tf-k3s/k3s-openstack" | ||
name = "k3s-worker1" | ||
image_name = "ubuntu-20.04" | ||
flavor_name = "m1.small" | ||
availability_zone = "ex1" | ||
keypair_name = "example-keypair" | ||
network_id = "example-id" | ||
subnet_id = "example-id" | ||
security_group_id = module.master1.security_group_id | ||
k3s_join_existing = true | ||
k3s_url = module.master1.k3s_url | ||
k3s_token = random_password.ha_cluster_token.result | ||
install_k3s_exec = "agent --node-label az=ex1" | ||
} | ||
provider "kubernetes" { | ||
host = module.master1.k3s_url | ||
token = "${module.master1.bootstrap_token_id}.${module.master1.bootstrap_token_secret}" | ||
cluster_ca_certificate = base64decode(module.master1.ca_crt) | ||
} | ||
``` | ||
|
||
### Single Master and Worker with hcloud | ||
[View on GitHub](https://github.com/nimbolus/tf-k3s/tree/master/example-simple-hcloud.tf) | ||
|
||
```terraform | ||
resource "random_password" "hcloud_cluster_token" { | ||
length = 64 | ||
special = false | ||
} | ||
module "hcloud_master" { | ||
source = "github.com/nimbolus/tf-k3s/k3s-hcloud" | ||
name = "k3s-master" | ||
keypair_name = "pubkey" | ||
network_id = "example-id" | ||
k3s_token = random_password.hcloud_cluster_token.result | ||
install_k3s_exec = "server --disable traefik --node-label az=ex1" | ||
} | ||
module "hcloud_worker" { | ||
source = "github.com/nimbolus/tf-k3s/k3s-hcloud" | ||
name = "k3s-worker" | ||
keypair_name = hcloud_ssh_key.yubikey.name | ||
network_id = hcloud_network.k3s.id | ||
k3s_join_existing = true | ||
k3s_url = module.hcloud_master.k3s_url | ||
k3s_token = random_password.hcloud_cluster_token.result | ||
install_k3s_exec = "agent --node-label az=ex1" | ||
} | ||
resource "local_file" "hcloud_kubeconfig" { | ||
filename = "hcloud-kubeconfig.yaml" | ||
content = module.hcloud_master.kubeconfig | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: "Terraform Pihole" | ||
linkTitle: "Terraform Pihole" | ||
date: "2021-05-11T01:41:54+02:00" | ||
weight: 10 | ||
icon: fas fa-exclamation-triangle | ||
--- | ||
{{< alert color="warning" >}}This module is still under heady development.{{< /alert >}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: "Terraform Rancher" | ||
linkTitle: "Terraform Rancher" | ||
date: "2021-05-11T01:41:54+02:00" | ||
weight: 10 | ||
icon: fas fa-exclamation-triangle | ||
--- | ||
{{< alert color="warning" >}}This module is still under heady development.{{< /alert >}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: "Terraform Wireguard" | ||
linkTitle: "Terraform Wireguard" | ||
date: "2021-05-11T01:41:54+02:00" | ||
weight: 10 | ||
icon: fas fa-exclamation-triangle | ||
--- | ||
{{< alert color="warning" >}}This module is still under heady development.{{< /alert >}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: "3.3" | ||
|
||
services: | ||
site: | ||
image: nimbolus.de | ||
build: | ||
context: . | ||
command: server -D | ||
ports: | ||
- "1313:1313" | ||
volumes: | ||
- .:/src | ||
user: "1000:1000" |