-
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.
chore: update bootstrap and task components with latest updates from @…
- Loading branch information
1 parent
bbaa07b
commit b345bfc
Showing
226 changed files
with
5,799 additions
and
1,763 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,6 +1,4 @@ | ||
#shellcheck disable=SC2148,SC2155 | ||
export KUBECONFIG=$(expand_path ./kubeconfig) | ||
export ANSIBLE_CONFIG=$(expand_path ./ansible.cfg) | ||
export ANSIBLE_HOST_KEY_CHECKING="False" | ||
export K8S_AUTH_KUBECONFIG=$(expand_path ./kubeconfig) | ||
export SOPS_AGE_KEY_FILE=$(expand_path ~/.config/sops/age/keys.txt) |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
* text=auto eol=lf | ||
*.yaml.j2 linguist-language=YAML | ||
*.sops.* diff=sopsdiffer | ||
*.sops.toml linguist-language=JSON |
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
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
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
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
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,95 @@ | ||
--- | ||
version: "3" | ||
|
||
env: | ||
K8S_AUTH_KUBECONFIG: "{{.ROOT_DIR}}/kubeconfig" | ||
|
||
vars: | ||
ANSIBLE_PLAYBOOK_DIR: "{{.ANSIBLE_DIR}}/playbooks" | ||
ANSIBLE_INVENTORY_DIR: "{{.ANSIBLE_DIR}}/inventory" | ||
|
||
tasks: | ||
|
||
deps: | ||
desc: Install / Upgrade Ansible galaxy deps | ||
dir: "{{.ANSIBLE_DIR}}" | ||
cmds: | ||
- pip3 install --user --requirement requirements.txt | ||
- ansible-galaxy install -r requirements.yaml --roles-path ~/.ansible/roles --force | ||
- ansible-galaxy collection install -r requirements.yaml --collections-path ~/.ansible/collections --force | ||
preconditions: | ||
- test -f "{{.ANSIBLE_DIR}}/requirements.txt" | ||
- test -f "{{.ANSIBLE_DIR}}/requirements.yaml" | ||
env: | ||
ANSIBLE_CONFIG: "{{.ANSIBLE_DIR}}/ansible.cfg" | ||
|
||
list: | ||
desc: List all the hosts | ||
dir: "{{.ANSIBLE_DIR}}" | ||
cmd: ansible all -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yaml --list-hosts | ||
env: | ||
ANSIBLE_CONFIG: "{{.ANSIBLE_DIR}}/ansible.cfg" | ||
|
||
prepare: | ||
desc: Prepare all the k8s nodes for running k3s | ||
dir: "{{.ANSIBLE_DIR}}" | ||
cmd: ansible-playbook -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yaml {{.ANSIBLE_PLAYBOOK_DIR}}/cluster-prepare.yaml | ||
env: | ||
ANSIBLE_CONFIG: "{{.ANSIBLE_DIR}}/ansible.cfg" | ||
|
||
install: | ||
desc: Install Kubernetes on the nodes | ||
dir: "{{.ANSIBLE_DIR}}" | ||
cmd: ansible-playbook -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yaml {{.ANSIBLE_PLAYBOOK_DIR}}/cluster-installation.yaml | ||
env: | ||
ANSIBLE_CONFIG: "{{.ANSIBLE_DIR}}/ansible.cfg" | ||
|
||
rollout-update: | ||
desc: Preform operating system updates and rollout restart the cluster | ||
dir: "{{.ANSIBLE_DIR}}" | ||
cmd: ansible-playbook -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yaml {{.ANSIBLE_PLAYBOOK_DIR}}/cluster-rollout-update.yaml | ||
env: | ||
ANSIBLE_CONFIG: "{{.ANSIBLE_DIR}}/ansible.cfg" | ||
|
||
kube-vip: | ||
desc: Apply new kube-vip configuration to the cluster | ||
dir: "{{.ANSIBLE_DIR}}" | ||
cmd: ansible-playbook -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yaml {{.ANSIBLE_PLAYBOOK_DIR}}/cluster-kube-vip.yaml | ||
env: | ||
ANSIBLE_CONFIG: "{{.ANSIBLE_DIR}}/ansible.cfg" | ||
|
||
nuke: | ||
desc: Uninstall Kubernetes on the nodes | ||
dir: "{{.ANSIBLE_DIR}}" | ||
interactive: true | ||
cmd: ansible-playbook -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yaml {{.ANSIBLE_PLAYBOOK_DIR}}/cluster-nuke.yaml | ||
env: | ||
ANSIBLE_CONFIG: "{{.ANSIBLE_DIR}}/ansible.cfg" | ||
|
||
ping: | ||
desc: Ping all the hosts | ||
dir: "{{.ANSIBLE_DIR}}" | ||
cmd: ansible all -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yaml --one-line -m 'ping' | ||
env: | ||
ANSIBLE_CONFIG: "{{.ANSIBLE_DIR}}/ansible.cfg" | ||
|
||
uptime: | ||
desc: Uptime of all the hosts | ||
dir: "{{.ANSIBLE_DIR}}" | ||
cmd: ansible all -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yaml --one-line -a 'uptime' | ||
env: | ||
ANSIBLE_CONFIG: "{{.ANSIBLE_DIR}}/ansible.cfg" | ||
|
||
force-reboot: | ||
desc: Reboot all the k8s nodes | ||
dir: "{{.ANSIBLE_DIR}}" | ||
cmd: ansible-playbook -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yaml {{.ANSIBLE_PLAYBOOK_DIR}}/cluster-reboot.yaml | ||
env: | ||
ANSIBLE_CONFIG: "{{.ANSIBLE_DIR}}/ansible.cfg" | ||
|
||
force-poweroff: | ||
desc: Shutdown all the k8s nodes | ||
dir: "{{.ANSIBLE_DIR}}" | ||
cmd: ansible kubernetes -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yaml -a '/usr/bin/systemctl poweroff' --become | ||
env: | ||
ANSIBLE_CONFIG: "{{.ANSIBLE_DIR}}/ansible.cfg" |
Oops, something went wrong.