Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Lab v1 #36

Merged
merged 51 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
a462943
Clean rke2 cluster working
lholota Dec 29, 2023
d59046f
Helm, Sysctls, Argocd working
lholota Dec 29, 2023
586a180
Application sets working
lholota Jan 3, 2024
bba876a
RKE 2
lholota Jan 31, 2024
5d24fea
Removed unnecesarry code
lholota Feb 14, 2024
5efe7cb
RKE2 cluster working
lholota Feb 14, 2024
14838e3
ArgoCD back
lholota Feb 14, 2024
8e221c3
ArgoCD netpol
lholota Feb 14, 2024
c922bd8
argocd netpol fixed
lholota Feb 21, 2024
361d375
Pomerium 1
lholota Feb 22, 2024
cd5a4b2
Pom policy 2
lholota Feb 22, 2024
e55f8cf
Kube vip configured correctly for externalTrafficPolicy: local
lholota Feb 22, 2024
0ca4b87
Proxmox https forward fixed
lholota Feb 25, 2024
2885475
iscsi started after installation
lholota Feb 25, 2024
b872b7f
Calico api-server and configuration
lholota Feb 29, 2024
fc95947
Switch to PVE only
lholota Mar 1, 2024
0c5a343
Checkpoint
lholota Mar 4, 2024
a0c33f8
Cluster firewall working
lholota Mar 4, 2024
f550343
Coredns
lholota Mar 7, 2024
5fde02b
Debug
lholota Mar 7, 2024
4f37818
Coredns working
lholota Mar 8, 2024
fa5b00a
Pomerium half way
lholota Mar 11, 2024
c10eb9c
MQTT added
lholota Mar 11, 2024
b12c841
Before switch to pihole
lholota Mar 11, 2024
f680370
Pihole working
lholota Mar 11, 2024
5aff8fb
Checkpoiunt
lholota Mar 12, 2024
4c79347
Frigate not working, probably due to missing gpu
lholota Mar 14, 2024
7fbfb97
Prod deployment checkpoint
lholota Mar 14, 2024
12f1ce8
Checkpoint
lholota Apr 16, 2024
790ea90
Prod dns can forward to lab dns
lholota Apr 16, 2024
cb8c82b
Unifi controller
lholota Apr 17, 2024
0c46947
Haraka
lholota Apr 17, 2024
db73d8a
Haraka health check
lholota Apr 18, 2024
e721d0a
Shared vars checkpoint
lholota Apr 19, 2024
fff1e6f
Shared vars working in lab
lholota Apr 19, 2024
53dd895
Cloudflared tunnels upgrade
lholota Apr 19, 2024
b53ae20
Secondary DNS in Lab
lholota Apr 20, 2024
e55d41f
Fixes
lholota Apr 21, 2024
dff45a6
e2e tests working locally
lholota Apr 23, 2024
3225691
fix
lholota Apr 23, 2024
fa00b29
Fixes
lholota Apr 25, 2024
952cff4
Checkpoint
lholota Jul 19, 2024
46e57c1
Check 2
lholota Jul 19, 2024
14449e3
Obsolete files
lholota Jul 19, 2024
a58ae36
UPS notifications
lholota Sep 12, 2024
e618514
UPS thresholds
lholota Sep 12, 2024
d7f6b1c
outline
lholota Oct 8, 2024
d77160d
CI pipeline
lholota Oct 9, 2024
8aff08e
CI 2
lholota Oct 9, 2024
0a45cc9
fix: Lint fixes
lholota Oct 10, 2024
e340e00
fix: CI fix
lholota Oct 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ exclude_paths:
- .github/
- node_modules/
- "**/*.sops.yml"
- "**/*.sops.yaml"
- ".sops.yaml"
- "**/inventory/hosts.yaml"

use_default_rules: true

Expand Down
2 changes: 1 addition & 1 deletion .ansible-lint-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ roles/gluster_server/tasks/create-volume-quota.yml var-naming[no-role-prefix]
roles/gluster_client/tasks/main.yml var-naming[no-role-prefix]
roles/pve_virtual_machines/tasks/main.yml var-naming[no-role-prefix]
roles/pve_virtual_machines/tasks/vm.yml var-naming[no-role-prefix]
playbooks/nvidia.yml name[casing]
playbooks/nvidia.yml name[casing]
43 changes: 0 additions & 43 deletions .github/workflows/cd.yml

This file was deleted.

46 changes: 1 addition & 45 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,57 +11,13 @@ jobs:

- name: Install pre-requisites
run: |
yarn
sudo wget -q -O /usr/bin/sops https://github.com/mozilla/sops/releases/download/v3.7.3/sops-v3.7.3.linux.amd64
sudo chmod a+x /usr/bin/sops
sudo pip install --upgrade pip
sudo pip uninstall -y ansible-core
pip install --force-reinstall ansible==7.6.0
pip install --force-reinstall ansible-lint==6.17.0
SKIP_PLAYBOOKS=1 yarn install

- name: Lint Ansible files
run: yarn lint

- name: Compare values across environments
run: yarn validate-values
env:
SOPS_AGE_KEY: ${{ secrets.SOPS_AGE_PRIVATE_KEY }}

deploy-lab:
runs-on: self-hosted
needs:
- validate
steps:
- name: Checkout code
uses: actions/checkout@master

- name: Write ssh key
run: |
echo "${{ secrets.SSH_KEY }}" > ${{ runner.temp }}/ssh.key
chmod 0600 ${{ runner.temp }}/ssh.key

- name: Run Ansible playbooks
run: yarn lab:apply _all -e ansible_user=github-runner --private-key ${{ runner.temp }}/ssh.key
env:
SOPS_AGE_KEY: ${{ secrets.SOPS_AGE_PRIVATE_KEY }}
ANSIBLE_HOST_KEY_CHECKING: "false"

e2e-lab-local:
uses: homecentr/e2e/.github/workflows/run-e2e.yml@master
needs:
- deploy-lab
with:
environment: lab
client: local
secrets:
sops_age_key: ${{ secrets.SOPS_AGE_PRIVATE_KEY }}

e2e-lab-remote:
uses: homecentr/e2e/.github/workflows/run-e2e.yml@master
needs:
- deploy-lab
with:
environment: lab
client: remote
secrets:
sops_age_key: ${{ secrets.SOPS_AGE_PRIVATE_KEY }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
**/tests_output
**/screenshots

*.key
*.crt
.images
Expand Down
2 changes: 1 addition & 1 deletion .sops.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
creation_rules:
- path_regex: ".*environments.*\\.sops\\.ya?ml$"
- path_regex: ".*inventory.*\\.sops\\.ya?ml$"
# Workaround for https://github.com/mozilla/sops/issues/1103 where sops does not currently work correctly with age via YubiKey
pgp: 2D1D9C803F35BBC24014C3906601E1EB2454827F # lholota
age: > # GitHub
Expand Down
2 changes: 1 addition & 1 deletion ansible.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[defaults]
vars_plugins_enabled = host_group_vars,community.sops.sops
timeout = 30
timeout = 30
2 changes: 0 additions & 2 deletions environments/lab/group_vars/all/general.yml

This file was deleted.

1 change: 0 additions & 1 deletion environments/lab/group_vars/all/node-exporter.yml

This file was deleted.

41 changes: 0 additions & 41 deletions environments/lab/group_vars/all/ups.sops.yml

This file was deleted.

6 changes: 0 additions & 6 deletions environments/lab/group_vars/all/ups.yml

This file was deleted.

53 changes: 0 additions & 53 deletions environments/lab/group_vars/all/users.sops.yml

This file was deleted.

Loading