feat: Configuration stockage local et token K3S partagé
Some checks failed
CD - Deploy Infrastructure / Terraform Validation (push) Successful in 17s
CD - Deploy Infrastructure / Deploy on pve1 (push) Successful in 2m12s
CD - Deploy Infrastructure / Deploy on pve2 (push) Successful in 2m11s
CD - Deploy Infrastructure / Deploy on pve3 (push) Successful in 2m28s
CD - Deploy Infrastructure / Validate K3s Cluster (push) Successful in 5m3s
CD - Deploy Infrastructure / Deployment Notification (push) Failing after 1s
Some checks failed
CD - Deploy Infrastructure / Terraform Validation (push) Successful in 17s
CD - Deploy Infrastructure / Deploy on pve1 (push) Successful in 2m12s
CD - Deploy Infrastructure / Deploy on pve2 (push) Successful in 2m11s
CD - Deploy Infrastructure / Deploy on pve3 (push) Successful in 2m28s
CD - Deploy Infrastructure / Validate K3s Cluster (push) Successful in 5m3s
CD - Deploy Infrastructure / Deployment Notification (push) Failing after 1s
- Passage stockage local-nvme pour acemagician et elitedesk (40G) - Token K3S partagé via cloud-init pour cluster HA - Configuration FluxCD avec GitRepository Forgejo - Déploiement Hello World via FluxCD - Manifestes Kubernetes pour application demo
This commit is contained in:
parent
a818aab4be
commit
3b5f1fc2d2
17 changed files with 193 additions and 84 deletions
|
|
@ -27,6 +27,9 @@ locals {
|
|||
#!/bin/bash
|
||||
set -e
|
||||
source /etc/ansible-pull.conf
|
||||
export K3S_TOKEN
|
||||
export FORGEJO_TOKEN
|
||||
export REPO_URL
|
||||
WORK_DIR="/var/lib/ansible-local"
|
||||
mkdir -p $WORK_DIR
|
||||
cd $WORK_DIR
|
||||
|
|
@ -48,7 +51,7 @@ locals {
|
|||
},
|
||||
{
|
||||
path = "/etc/ansible-pull.conf"
|
||||
content = "REPO_URL=${var.forgejo_repo_url}\nFORGEJO_TOKEN=${var.forgejo_token}\nK3S_VERSION=${var.k3s_version}"
|
||||
content = "REPO_URL=${var.forgejo_repo_url}\nFORGEJO_TOKEN=${var.forgejo_token}\nK3S_VERSION=${var.k3s_version}\nK3S_TOKEN=${var.k3s_token}"
|
||||
permissions = "0600"
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -54,9 +54,9 @@ variable "storage_pool" {
|
|||
}
|
||||
|
||||
variable "k3s_server_1_storage_pool" {
|
||||
description = "Storage pool for k3s-server-1 disk (linstor_storage for HA)"
|
||||
description = "Storage pool for k3s-server-1 disk (local-nvme for acemagician)"
|
||||
type = string
|
||||
default = "linstor_storage"
|
||||
default = "local-nvme"
|
||||
}
|
||||
|
||||
variable "snippets_storage" {
|
||||
|
|
@ -88,3 +88,9 @@ variable "k3s_server_1_config" {
|
|||
disk_size = string
|
||||
})
|
||||
}
|
||||
|
||||
variable "k3s_token" {
|
||||
description = "K3s cluster token"
|
||||
type = string
|
||||
sensitive = true
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,9 @@ locals {
|
|||
#!/bin/bash
|
||||
set -e
|
||||
source /etc/ansible-pull.conf
|
||||
export K3S_TOKEN
|
||||
export FORGEJO_TOKEN
|
||||
export REPO_URL
|
||||
WORK_DIR="/var/lib/ansible-local"
|
||||
mkdir -p $WORK_DIR
|
||||
cd $WORK_DIR
|
||||
|
|
@ -48,7 +51,7 @@ locals {
|
|||
},
|
||||
{
|
||||
path = "/etc/ansible-pull.conf"
|
||||
content = "REPO_URL=${var.forgejo_repo_url}\nFORGEJO_TOKEN=${var.forgejo_token}\nK3S_VERSION=${var.k3s_version}"
|
||||
content = "REPO_URL=${var.forgejo_repo_url}\nFORGEJO_TOKEN=${var.forgejo_token}\nK3S_VERSION=${var.k3s_version}\nK3S_TOKEN=${var.k3s_token}"
|
||||
permissions = "0600"
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -54,9 +54,9 @@ variable "storage_pool" {
|
|||
}
|
||||
|
||||
variable "k3s_server_2_storage_pool" {
|
||||
description = "Storage pool for k3s-server-2 disk (linstor_storage for HA)"
|
||||
description = "Storage pool for k3s-server-2 disk (local-nvme for elitedesk)"
|
||||
type = string
|
||||
default = "linstor_storage"
|
||||
default = "local-nvme"
|
||||
}
|
||||
|
||||
variable "snippets_storage" {
|
||||
|
|
@ -88,3 +88,9 @@ variable "k3s_server_2_config" {
|
|||
disk_size = string
|
||||
})
|
||||
}
|
||||
|
||||
variable "k3s_token" {
|
||||
description = "K3s cluster token"
|
||||
type = string
|
||||
sensitive = true
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,9 @@ locals {
|
|||
#!/bin/bash
|
||||
set -e
|
||||
source /etc/ansible-pull.conf
|
||||
export K3S_TOKEN
|
||||
export FORGEJO_TOKEN
|
||||
export REPO_URL
|
||||
WORK_DIR="/var/lib/ansible-local"
|
||||
mkdir -p $WORK_DIR
|
||||
cd $WORK_DIR
|
||||
|
|
@ -48,7 +51,7 @@ locals {
|
|||
},
|
||||
{
|
||||
path = "/etc/ansible-pull.conf"
|
||||
content = "REPO_URL=${var.forgejo_repo_url}\nFORGEJO_TOKEN=${var.forgejo_token}\nK3S_VERSION=${var.k3s_version}"
|
||||
content = "REPO_URL=${var.forgejo_repo_url}\nFORGEJO_TOKEN=${var.forgejo_token}\nK3S_VERSION=${var.k3s_version}\nK3S_TOKEN=${var.k3s_token}"
|
||||
permissions = "0600"
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -88,3 +88,9 @@ variable "etcd_witness_config" {
|
|||
disk_size = string
|
||||
})
|
||||
}
|
||||
|
||||
variable "k3s_token" {
|
||||
description = "K3s cluster token"
|
||||
type = string
|
||||
sensitive = true
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,44 +1,36 @@
|
|||
# Copy this file to terraform.tfvars and fill in your values
|
||||
|
||||
# Proxmox Configuration
|
||||
proxmox_api_url = "https://192.168.100.10:8006/api2/json"
|
||||
proxmox_token_id = "root@pam!opentofu"
|
||||
proxmox_token_secret = "your-proxmox-token-secret"
|
||||
proxmox_tls_insecure = true
|
||||
|
||||
# SSH Access
|
||||
ssh_public_key = "ssh-ed25519 AAAAC3... your-email@example.com"
|
||||
|
||||
# Forgejo Configuration
|
||||
forgejo_token = "your-forgejo-token"
|
||||
forgejo_repo_url = "ssh://git@forgejo.tellserv.fr:222/Tellsanguis/infra.git"
|
||||
|
||||
# K3s Version
|
||||
k3s_version = "v1.28.5+k3s1"
|
||||
k3s_token = "your-k3s-cluster-token"
|
||||
|
||||
# Template and Storage
|
||||
ubuntu_template = "ubuntu-2404-cloudinit"
|
||||
storage_pool = "linstor_storage"
|
||||
snippets_storage = "local"
|
||||
|
||||
# Network
|
||||
k3s_network_bridge = "k3s"
|
||||
k3s_gateway = "10.100.20.1"
|
||||
k3s_dns = ["10.100.20.1", "1.1.1.1"]
|
||||
|
||||
# VM Configurations
|
||||
k3s_server_1_config = {
|
||||
ip = "10.100.20.10/24"
|
||||
cores = 6
|
||||
memory = 12288
|
||||
disk_size = "100G"
|
||||
disk_size = "40G"
|
||||
}
|
||||
|
||||
k3s_server_2_config = {
|
||||
ip = "10.100.20.20/24"
|
||||
cores = 6
|
||||
memory = 12288
|
||||
disk_size = "100G"
|
||||
disk_size = "40G"
|
||||
}
|
||||
|
||||
etcd_witness_config = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue