Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f946f0f2bf | |||
| 80d48e6f46 | |||
| 8dc6ac2939 | |||
| 7f80884082 | |||
| 9abb0b010e | |||
| aa0e9f37bf | |||
| 5613699540 | |||
| 03dc10c0e5 |
@@ -3,6 +3,7 @@
|
|||||||
terraform.tfstate
|
terraform.tfstate
|
||||||
terraform.tfstate.backup
|
terraform.tfstate.backup
|
||||||
ansible/lookup_plugins
|
ansible/lookup_plugins
|
||||||
|
ansible/galaxy_roles
|
||||||
|
|
||||||
!.gitignore
|
!.gitignore
|
||||||
!.editorconfig
|
!.editorconfig
|
||||||
|
|||||||
@@ -30,6 +30,9 @@ headlamp:
|
|||||||
clean: tofu-destroy
|
clean: tofu-destroy
|
||||||
git clean -fdx
|
git clean -fdx
|
||||||
|
|
||||||
|
fetch-ansible-deps:
|
||||||
|
ansible-galaxy install --role-file ansible/requirements.yml --roles-path ansible/galaxy_roles
|
||||||
|
|
||||||
fetch-plugins:
|
fetch-plugins:
|
||||||
mkdir -p ansible/lookup_plugins
|
mkdir -p ansible/lookup_plugins
|
||||||
curl -fsSL -o ansible/lookup_plugins/proton_pass.py {{ ansible_proton_pass_plugin_url }}
|
curl -fsSL -o ansible/lookup_plugins/proton_pass.py {{ ansible_proton_pass_plugin_url }}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
[defaults]
|
[defaults]
|
||||||
|
roles_path = ansible/roles:ansible/galaxy_roles
|
||||||
lookup_plugins = ansible/lookup_plugins
|
lookup_plugins = ansible/lookup_plugins
|
||||||
callback_result_format = yaml
|
callback_result_format = yaml
|
||||||
|
|||||||
@@ -2,5 +2,6 @@ ansible_python_interpreter: /usr/bin/python3
|
|||||||
ansible_user: kolibri
|
ansible_user: kolibri
|
||||||
vip_interface: enp5s0
|
vip_interface: enp5s0
|
||||||
vip_address: 10.150.0.100
|
vip_address: 10.150.0.100
|
||||||
|
cluster_name: hive
|
||||||
cluster_pod_subnet: 172.16.0.0/16
|
cluster_pod_subnet: 172.16.0.0/16
|
||||||
cluster_service_subnet: 10.96.0.0/16
|
cluster_service_subnet: 10.96.0.0/16
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
- name: Configure performance tuning
|
||||||
|
hosts: all
|
||||||
|
become: true
|
||||||
|
roles:
|
||||||
|
- giovtorres.tuned
|
||||||
|
- irqbalance
|
||||||
@@ -10,6 +10,7 @@
|
|||||||
groups:
|
groups:
|
||||||
- sudo
|
- sudo
|
||||||
shell: /bin/bash
|
shell: /bin/bash
|
||||||
|
system: true
|
||||||
|
|
||||||
- name: Ensure authorised keys for Kolibri
|
- name: Ensure authorised keys for Kolibri
|
||||||
ansible.posix.authorized_key:
|
ansible.posix.authorized_key:
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
collections:
|
||||||
|
- ansible.posix
|
||||||
|
roles:
|
||||||
|
- name: giovtorres.tuned
|
||||||
|
version: 2.0.2
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
- name: Install irqbalance
|
||||||
|
ansible.builtin.package:
|
||||||
|
name: irqbalance
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Ensure irqbalance service
|
||||||
|
ansible.builtin.service:
|
||||||
|
name: irqbalance
|
||||||
|
state: started
|
||||||
|
enabled: true
|
||||||
+3
-4
@@ -1,3 +1,6 @@
|
|||||||
|
- name: Apply power and performance settings
|
||||||
|
ansible.builtin.import_playbook: playbooks/performance.yaml
|
||||||
|
|
||||||
- name: Baseline configuration
|
- name: Baseline configuration
|
||||||
hosts: all
|
hosts: all
|
||||||
become: true
|
become: true
|
||||||
@@ -5,10 +8,6 @@
|
|||||||
- common
|
- common
|
||||||
- kubernetes_common
|
- kubernetes_common
|
||||||
|
|
||||||
# ========================
|
|
||||||
# Setup Kubernetes Cluster
|
|
||||||
# ========================
|
|
||||||
|
|
||||||
- name: Initialise Kubernetes Cluster
|
- name: Initialise Kubernetes Cluster
|
||||||
hosts: masters
|
hosts: masters
|
||||||
become: true
|
become: true
|
||||||
|
|||||||
+4
-8
@@ -3,14 +3,10 @@
|
|||||||
# ------
|
# ------
|
||||||
|
|
||||||
locals {
|
locals {
|
||||||
|
image = "ubuntu/26.04"
|
||||||
root_disk_size = "16GiB"
|
root_disk_size = "16GiB"
|
||||||
ext_disk_size = "16GiB"
|
ext_disk_size = "16GiB"
|
||||||
network_cidr = "10.150.0.1/24"
|
network_cidr = "10.150.0.1/24"
|
||||||
|
|
||||||
master_count = 3
|
|
||||||
worker_count = 0
|
|
||||||
|
|
||||||
image = "ubuntu/26.04"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# ---------
|
# ---------
|
||||||
@@ -46,7 +42,7 @@ resource "incus_network" "this" {
|
|||||||
|
|
||||||
module "master" {
|
module "master" {
|
||||||
source = "./modules/incus_vm"
|
source = "./modules/incus_vm"
|
||||||
count = local.master_count
|
count = var.master_count
|
||||||
|
|
||||||
name = "master-${count.index}"
|
name = "master-${count.index}"
|
||||||
project = incus_project.this.name
|
project = incus_project.this.name
|
||||||
@@ -60,7 +56,7 @@ module "master" {
|
|||||||
|
|
||||||
module "worker" {
|
module "worker" {
|
||||||
source = "./modules/incus_vm"
|
source = "./modules/incus_vm"
|
||||||
count = local.worker_count
|
count = var.worker_count
|
||||||
|
|
||||||
name = "worker-${count.index}"
|
name = "worker-${count.index}"
|
||||||
project = incus_project.this.name
|
project = incus_project.this.name
|
||||||
@@ -77,7 +73,7 @@ module "worker" {
|
|||||||
# ---------
|
# ---------
|
||||||
|
|
||||||
terraform {
|
terraform {
|
||||||
required_version = "~> 1.12"
|
required_version = ">= 1.11.5"
|
||||||
|
|
||||||
required_providers {
|
required_providers {
|
||||||
incus = {
|
incus = {
|
||||||
|
|||||||
@@ -1,3 +1,17 @@
|
|||||||
|
variable "master_count" {
|
||||||
|
description = "The number of master nodes to provision."
|
||||||
|
type = number
|
||||||
|
default = 1
|
||||||
|
nullable = false
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "worker_count" {
|
||||||
|
description = "The number of worker nodes to provision."
|
||||||
|
type = number
|
||||||
|
default = 0
|
||||||
|
nullable = false
|
||||||
|
}
|
||||||
|
|
||||||
variable "cpus" {
|
variable "cpus" {
|
||||||
description = "The number of CPU cores allocated to each virtual machine."
|
description = "The number of CPU cores allocated to each virtual machine."
|
||||||
type = number
|
type = number
|
||||||
|
|||||||
Reference in New Issue
Block a user