574 Commits

Author SHA1 Message Date
1f55ff7cfa build: Revert to semi-working syntax
Some checks failed
continuous-integration/drone/push Build is failing
2023-06-20 16:30:49 +02:00
ba4a0148ff build: Try different syntax (remove quotes)
Some checks failed
continuous-integration/drone/push Build is failing
2023-06-20 15:44:45 +02:00
c177dbd03b build: Test different syntax for character escape
Some checks failed
continuous-integration/drone/push Build is failing
2023-06-20 15:40:39 +02:00
2e8ce6cc00 build: Escape escape sequence characters
Some checks failed
continuous-integration/drone/push Build is failing
2023-06-20 15:37:36 +02:00
7fd1cf73db build: Fix linebreak
Some checks failed
continuous-integration/drone/push Build is failing
2023-06-20 15:35:09 +02:00
cf001cd0ce build:Test explicit tag format
Some checks failed
continuous-integration/drone/push Build is failing
2023-06-20 15:32:53 +02:00
438b944011 build: Add missing variable export
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-22 13:43:53 +02:00
679a9457b5 build:Fix variable name
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-22 12:44:13 +02:00
8b4a1e380c build:Test semantic-release + build flow
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-22 12:19:10 +02:00
0468cd6269 build:Debug echo to file
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-22 12:11:14 +02:00
b808397d47 build:Fix var substitution
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-22 12:08:01 +02:00
8fd0136bb7 build:debug brace mismatch #2
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-22 12:06:14 +02:00
479d896599 build:Debug brace mismatch
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2023-05-22 12:05:32 +02:00
263f156eb1 build:Try different syntax
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2023-05-22 11:55:28 +02:00
f1dfc83d7c build:Revert back to cli arguments while specifying custom command
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2023-05-22 09:23:44 +02:00
5b950a3834 build:Test with configuration in .releaserc.json
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-22 09:09:50 +02:00
978f39d45b build: Test different semantic-release plugins
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-21 18:27:34 +02:00
9b9ab6b784 build:Skip build on tag
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-21 18:09:22 +02:00
24dca2755a fix: Run semantic-release with different drone variable as input
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-21 18:02:00 +02:00
0d1db2f29f feat: Test semantic-release dry-run #2
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-21 17:51:04 +02:00
cce39a5bb7 fix:Test semantic release dry-run
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is failing
2023-05-20 15:18:23 +02:00
823cc467fa Explicitly install semantic-release plugins #2
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-20 14:32:47 +02:00
9cb89bf055 Try different syntax
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-20 14:30:38 +02:00
358cbe39ea Fix quote
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-20 14:28:31 +02:00
0fee2df2a6 Explicitly install semantic-release plugins
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2023-05-20 13:44:54 +02:00
e4e58e4789 Disable npm plugin
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-20 13:31:48 +02:00
75158a8a5b Fix variable substitution
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-20 13:26:49 +02:00
c83d541a0d Remove redundant parameter
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-20 13:24:20 +02:00
a46610f828 Add git credentials
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-20 13:22:20 +02:00
fe5147bd2e Override branch during semantic-release dry-run
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-20 12:58:44 +02:00
6d168f0517 Add semantic-release prerequisites
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-20 12:48:40 +02:00
68445ee13f Testing semantic-release
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-20 12:44:32 +02:00
31b21c9b7a Upgrade node template OS version
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-19 12:19:42 +02:00
e03cd20d65 Replay upstream changes;Upgrade to latest minor K8s version
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-19 11:38:53 +02:00
fd1c306061 Add workload-cluster worker-node size property
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-26 09:17:41 +02:00
ca8044b4ab Workaround to support self-signed vCenter certificate
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-25 09:01:10 +02:00
3c98e16e74 Update longhorn settings
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-19 08:43:34 +02:00
1860d8e2dd Configure longhorn through node label;Update version
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-18 21:50:26 +02:00
16fdd66328 Hide redundant parameter;Configure oidc provider
Some checks failed
continuous-integration/drone/push Build is failing
2023-04-14 09:51:59 +02:00
d73320da32 Add quotes
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-13 10:47:52 +02:00
572b7df74c Switch OIDC provider
Some checks failed
continuous-integration/drone/push Build is failing
2023-04-13 10:11:13 +02:00
ee08fd47b5 Configure keycloakx;Convert output to yaml
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-11 10:40:33 +02:00
75277e285a Switch oidc provider
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-09 20:04:11 +02:00
debe80a2a1 Fix url
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-07 13:19:57 +02:00
2534cea4a0 Pin k3s install.sh version
Some checks reported errors
continuous-integration/drone/push Build was killed
2023-04-07 13:14:34 +02:00
05c3a09ab3 Upgrade k3s version
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-07 11:59:29 +02:00
2f91c0f7c3 Move kustomize pattern to strategic merge;Fix regex patterns;Update description
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-07 10:29:41 +02:00
c385baf630 Housekeeping;Add separate storage nodepool
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-06 13:29:29 +02:00
5c18869d60 Fix missing namespaces;Add default empty value
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-06 08:47:37 +02:00
1941e02d94 Fix post-processor paths
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-05 17:30:24 +02:00
610495e424 Add random vm name postfix
Some checks failed
continuous-integration/drone/push Build is failing
2023-04-05 17:01:36 +02:00
4e6a0549b5 Remove redundant task;Refactor packer vm name
Some checks failed
continuous-integration/drone/push Build is failing
2023-04-05 16:51:42 +02:00
db090ac564 Add missing kustomize patch;Switch to query filter
Some checks failed
continuous-integration/drone/push Build is failing
2023-04-05 13:37:31 +02:00
2b56677e9a Remove regex_replace filter;Refactor dict key names;Make chart values optional
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-05 10:47:17 +02:00
641ee2d9a7 Rename nodepools
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-05 09:46:05 +02:00
979ac38794 Aggregate/store workload cluster chart values
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-04 22:44:56 +02:00
86a0b684e2 Add missing key
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-04 20:59:54 +02:00
56a33134a0 Housekeeping;Move inclusterippool to gitops;Delete temporary manifests;Align resource naming;Remove redundant config;Add helm configuration
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-04 17:22:39 +02:00
915660f618 Housekeeping;Populate all registry mirrors;Disable manifest image reference workaround;Add missing key;Remove redundant filter
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-04 10:47:28 +02:00
d0c4251e06 Configure registry mirrors on workload-cluster nodes;Test ansible collection paths #2
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-03 21:37:09 +02:00
9ff0e09625 Test ansible collection paths
Some checks failed
continuous-integration/drone/push Build is failing
2023-04-03 21:20:10 +02:00
8e76617794 Fix repository path;Add chart values;Fix ansible galaxy cli syntax
Some checks failed
continuous-integration/drone/push Build is failing
2023-04-03 17:25:45 +02:00
5a82c9e122 Fix key name;Fix task dependencies
Some checks failed
continuous-integration/drone/push Build is failing
2023-04-03 16:32:05 +02:00
cde92b4514 Fix indentation
Some checks failed
continuous-integration/drone/push Build is failing
2023-04-03 16:29:16 +02:00
6942c33ae8 Fix Ansible templating;DRY
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2023-04-03 16:26:38 +02:00
7ac4cc0914 Avoid parallel build issues #3
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-03 15:43:10 +02:00
c054c76b60 Avoid parallel build issues #2
Some checks failed
continuous-integration/drone/push Build is failing
2023-04-03 15:00:06 +02:00
25230fdda2 Avoid parallel build issues
Some checks failed
continuous-integration/drone/push Build is failing
2023-04-03 14:50:58 +02:00
89cf69adc7 Refactor cluster registration
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-02 22:36:23 +02:00
3f9fc4b7aa Fix git repository organization;Move cluster api manifests to gitops;Rename gitrepo's
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-01 16:10:38 +02:00
570047df3b Fix target paths;Add git repositories
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-01 13:43:36 +02:00
d187f60091 Remove redundant key
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-31 18:27:45 +02:00
933615adeb Refactor gitops repositories;Move capi manifests to subfolder;Sort components in tty console message;Generalize templates
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-31 18:19:13 +02:00
1c60214f5a Add repositories;Push manifests;Change protocol
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-31 14:25:03 +02:00
414b72bcb8 Fix path
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-29 22:53:56 +02:00
29396de154 Inject CPI image tag into manifest
Some checks failed
continuous-integration/drone/push Build is failing
2023-03-29 22:01:43 +02:00
5effe00c19 Upgrade version
Some checks failed
continuous-integration/drone/push Build is failing
2023-03-29 13:53:56 +02:00
767be3b8f5 Upgrade CAPI/CAPV
Some checks failed
continuous-integration/drone/push Build is failing
2023-03-28 22:36:21 +02:00
eb2f491f72 Refactor git repo creation;Housekeeping
Some checks failed
continuous-integration/drone/push Build is failing
2023-03-28 22:31:11 +02:00
cd5fa89a0d Fix key reference
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-28 16:41:48 +02:00
d7e8685225 Download workloadcluster helm-charts;Revert foldernames;Setup git repositories
Some checks failed
continuous-integration/drone/push Build is failing
2023-03-28 13:49:18 +02:00
5113dd5b6c Set default values to optional vapp properties
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-25 23:01:23 +01:00
89fd23f66a Reference node template by inventory path
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-25 19:13:11 +01:00
fa0b72a903 Remove git repo logic; Debug ova templates
Some checks failed
continuous-integration/drone/push Build is failing
2023-03-25 16:58:23 +01:00
ec6f712427 Add healthcheck;Improve console healthchecks;Increase default retries
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-23 16:55:11 +01:00
1c19708855 Increase default retries;Add healthcheck
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-23 16:51:17 +01:00
942c13dde7 Improve console healthchecks
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-23 11:42:34 +01:00
439223c56e Build n-1 version
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-22 08:54:45 +01:00
b644dc1a04 Fix indentation;Add partition/filesystem/mount specification;Fix disk unit number
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-20 12:40:39 +01:00
2de2259c76 Fix linting faults;Add missing keys
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-19 17:43:29 +01:00
214a3d189a Update K8s version
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-19 13:17:14 +01:00
df91de5516 Fix missing keys;Add core deployment option
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-18 20:08:34 +01:00
68f0524bda Housekeeping;Disable redundant hook;Add configurable data-disk
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-18 18:25:09 +01:00
ff555ce0de Add missing keys
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-16 09:15:05 +01:00
ad0c511651 Fix var reference 2023-03-15 15:02:00 +01:00
bae9696023 Fix variable reference
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-15 10:56:55 +01:00
23e1ec1e71 Add missing linebreak
Some checks failed
continuous-integration/drone/push Build is failing
2023-03-15 10:26:42 +01:00
6bd49750a4 Add missing key/parameter;Fix dependency type;Add k8s version to filename
Some checks failed
continuous-integration/drone/push Build is failing
2023-03-15 10:24:45 +01:00
daa7a240cc Switch from Network Protocol Profiles to in-cluster IPAM
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-14 15:43:11 +01:00
c0b2857be1 Split CAPI cluster manifest;Remove debugging;Add dependency
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-14 14:28:24 +01:00
925bc5be39 Add missing comma
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-09 12:47:28 +01:00
b6a03484e1 Add container registry login
Some checks failed
continuous-integration/drone/push Build is failing
2023-03-09 12:45:51 +01:00
462aebdf17 Fix ephemeral storage out of disk space
Some checks reported errors
continuous-integration/drone/push Build was killed
2023-03-09 11:13:36 +01:00
230dc5e0cd Force variable type;Ensure minimum default value for storage_benchmark;Fix type mismatch
Some checks failed
continuous-integration/drone/push Build is failing
2023-03-09 09:59:45 +01:00
f47777763a Add serviceaccount token creation;Base delays on storage benchmark
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-08 17:07:44 +01:00
cabf813daa Add crude storage benchmark
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-08 13:35:56 +01:00
5aa2141f84 Latest K8s version
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-04 16:06:11 +01:00
70a4962afa Upgrade versions
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-03 14:17:45 +01:00
e8da87afd8 Revert OvfTransport changes;Build with new CAPV template
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-03 10:25:05 +01:00
90efda336a Test without ovfenvironment transport enabled
Some checks failed
continuous-integration/drone/push Build is failing
2023-03-02 17:04:06 +01:00
8f17551d50 Downgrade node-template OS version
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-02 12:28:46 +01:00
75e2250a50 Test custom-built nodetemplate
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-02 10:23:38 +01:00
6c9a8e4abd Upgrade version
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-02 09:16:51 +01:00
6940bdb1d3 Testing multiline description #2;Improve parameter UX;Upgrade versions
Some checks failed
continuous-integration/drone/push Build is failing
2023-02-28 11:16:14 +01:00
64644d7eff Add node sizing parameters;Add description
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-27 10:00:07 +01:00
c9c8b79891 Fix key reference
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-22 21:12:23 +01:00
8aa42ffb67 Fix chart version
Some checks failed
continuous-integration/drone/push Build is failing
2023-02-22 20:49:02 +01:00
0f335d6841 Fix missing key in dict
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2023-02-22 20:47:41 +01:00
0170ee7944 Include kube-prometheus-stack
Some checks failed
continuous-integration/drone/push Build is failing
2023-02-22 17:33:37 +01:00
e0726f858c Housekeeping;Upgrade versions
Some checks failed
continuous-integration/drone/push Build is failing
2023-02-17 17:43:41 +01:00
b7a3669681 Upgrade version;Disable git rebase/push
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-13 22:13:22 +01:00
438b40dd53 Add quotes
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-13 13:05:44 +01:00
9e7eaf2ff7 Fix var reference;Upgrade version;Add LDAP configuration
Some checks failed
continuous-integration/drone/push Build is failing
2023-02-13 12:04:32 +01:00
7931b1ed44 Upgrade version;Housekeeping;Reduce verbosity;Sanitize input;Fix url reference;Test Dex
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-10 15:12:54 +01:00
b8cb76e7ac Reduce loop list length;Test vApp properties
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-07 22:11:09 +01:00
4d2513c1a5 Adjust retries/delay;Upgrade version
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-07 17:47:00 +01:00
df069672f3 Upgrade versions
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-07 11:58:44 +01:00
27106b1f34 Add upgrade tasks;Housekeeping
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-06 14:17:05 +01:00
abcf530b49 Decrease provisioner pause;Apply bug workaround;Housekeeping
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-06 10:59:41 +01:00
1c950086fa Remove redundant conditional;Remove debugging;Fix module parameters;Fix var reference
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-05 10:38:12 +01:00
ede82ea7e7 Fix conditional
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-04 15:54:36 +01:00
6d5b8e2d96 Fix label syntax;Add retries;Sort list;Housekeeping
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-04 12:00:10 +01:00
a020ac0e15 Fix marker collission;Add missing key
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-03 15:49:38 +01:00
f74d94a5e0 Update hypervisor details;Upgrade components;Housekeeping;Add decom tasks;Prevent configuration reset #2;Add morefid label
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-03 13:11:54 +01:00
d874da0cb3 Prevent configuration reset;Fix query
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-02 21:52:57 +01:00
07e95d82a2 Remove debugging
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-02 13:22:45 +01:00
5aecf61a01 Reorder ingress configuration tasks;Housekeeping
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-01 20:07:04 +01:00
be4b6177f9 Revert CAPV image
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-01 12:17:53 +01:00
aacfbfc2fa Upgrade versions;Add delay;Housekeeping;Fix indentation
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-01 10:54:47 +01:00
0c44f1fd54 Add missing key
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-31 15:23:48 +01:00
e5908fde1c Add retries to preflight check;Move/refactor tasks to front
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-31 13:42:26 +01:00
c793ced9f3 Remove redundant tasks;Add readycheck;Housekeeping;Add further upgrade tasks
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-30 16:24:37 +01:00
2870041530 Fix typo;Add debugging;Add missing key
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-30 14:26:28 +01:00
9887faa7c4 Refactor helm chart values
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-30 10:55:47 +01:00
51cabfa8d2 Add base64 filter
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-30 08:40:23 +01:00
95f5750291 Fix var reference;Fix port;Merge chart values
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-29 19:02:06 +01:00
e3ce60bcb4 Housekeeping;Generate root ca preemptively
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-29 12:43:55 +01:00
79b794dba2 Configure inotify limits;Filter updating image references
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-26 16:58:15 +01:00
907ec8bf3b Increase default garbage collection threshold
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-26 09:30:36 +01:00
a4db841a7a Attempt to properly match build w/ source #3
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-25 14:40:28 +01:00
3f2f19b36a Attempt to properly match build w/ source #2
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-25 14:35:54 +01:00
8a753daed7 Attempt to fix syntax
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-25 14:30:58 +01:00
fdfe5f100b Attempt to properly match build w/ source
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-25 14:16:50 +01:00
4bcb1198f3 Add replica rebuild wait;Upgrade longhorn&harbor
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-25 12:36:21 +01:00
64c2c35383 Fix update strategy 2023-01-25 11:21:08 +01:00
e21b11a37a Fix var reference;Housekeeping;Improve UX 2023-01-25 10:28:28 +01:00
dd802e0620 Remove debugging;Sanitize hypervisor username;Traefik /data volume permission fix #2;Specify kubeconfig x3
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-24 16:41:18 +01:00
17cf7925d6 Traefik /data volume permission fix
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-24 10:41:22 +01:00
2b81d4caa0 Enable traefik persistence
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-23 16:45:04 +01:00
a4e243e882 Increase volumes;Move template
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-23 14:56:19 +01:00
2531a4fb5d Add preflight retries;Housekeeping;Upload&Import images;Fix var reference;Improve UX
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-23 09:12:35 +01:00
ca51303602 Change ImagePullPolicy;Update tty console message;Sanitize user input;Add missing vapp property
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-22 15:08:12 +01:00
e7d89006fc Fix var reference;Fix task order;Fix block scalar
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-22 11:44:41 +01:00
531ead868a Fix var reference
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-21 16:58:51 +01:00
3dec92a955 Fix typo
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-21 16:22:24 +01:00
d67bf86dab Test ansible output regression workaround #2;Refactor vapp properties;Add kube-vip dependency;Refactor netplan;Download/Trust root CA
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-21 16:12:11 +01:00
43d83e8e31 Move files between payload folders;Define upgrade vapp properties;Join metacluster
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-20 13:23:34 +01:00
1428fe73f7 Fix path;Debug packer contextual vars
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-19 21:15:48 +01:00
cd308d116b Fix quote
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-19 16:08:20 +01:00
d915c21e44 Upgrade base image;Unpin ansible-core;Attempt different packer syntax
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-19 15:24:23 +01:00
89532ff7fb Remove duplicate block definition
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-19 13:38:30 +01:00
1f7fb31afe Fix quotes
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-19 13:36:33 +01:00
52fbc561dd Define install token;Change artifact path
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-19 13:30:13 +01:00
849c86b22b Test ansible output regression workaround;Fix filename
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-18 18:42:21 +01:00
c1bff94cd1 Parallel build of bootstrap/upgrade ova;Split ansible tasks respectively
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-18 15:09:32 +01:00
8ba8b5aaab Revert CAPV image
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-18 11:31:26 +01:00
f2dadb3e47 Move readycheck;Fix template value
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-17 15:08:20 +01:00
8e2df51993 Add retries
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-17 12:21:40 +01:00
2a9841fb0c Fix hypervisor settings
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-17 11:49:16 +01:00
c2219a5ddc Upgrade CAPV images;Add readycheck
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-17 11:45:25 +01:00
336150b00c Fix typo;Fix module;Register workloadcluster in argocd #2;Reduce tty refresh frequency;Upgrade component
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-13 09:03:35 +01:00
d1b1635942 Avoid ansible-galaxy timeouts
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-07 12:14:00 +01:00
62660c8d6c Switch tty message to systemd service;Add missing kubeconfig;Refactor tty script
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-07 11:58:58 +01:00
2a5a154df0 Fix kubeconfig source;(WIP)Register workloadcluster in argocd
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-06 16:27:33 +01:00
36e3a2b99f Add cluster api readycheck;Reorder tasks
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-06 13:34:26 +01:00
07b61d8bf3 Temporarily disable reboot
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-06 10:59:59 +01:00
3710f97b38 Fix var reference
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-05 17:21:40 +01:00
6c3867fb57 Fix linting error;Add workload cluster generation/configuration
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-05 16:42:20 +01:00
edc19464e2 Revert readycheck for step-ca;Revert retries;DRY;Upgrade components;Fix syntax
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-05 13:48:47 +01:00
85dcbb73a4 Increase retry limit for helm charts
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-05 10:01:03 +01:00
9e63e243b8 Add missing vApp property;Fix preflight check;Add missing folder;Revert Longhorn&K3s version
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-04 15:36:20 +01:00
d343b84b30 Add preflight check;Refactor readychecks;Quote input variables;Fix kustomization template;Apply kustomization;Generate new cluster-api manifest
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-04 13:22:35 +01:00
31a91d826f Refactor readycheck
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-03 19:31:39 +01:00
3f24a4af1a Add graceful shutdown configuration
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-03 11:28:32 +01:00
dc4fa31070 Remove component;Disable restart;Force overwrite of network protocol profile;Housekeeping
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-03 11:09:51 +01:00
d91acb9c0d Fix/Optimize kustomization template;Simplify dictionary
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-02 21:20:08 +01:00
9c6e1ff386 Housekeeping;Apply cluster-template kustomization
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-02 14:39:01 +01:00
f03e0c3bda Copy kubeadm images to separate project 2023-01-02 09:13:56 +01:00
deb524d1f5 Pin version for kubeadm container images
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-01 13:39:23 +01:00
3674862ff4 Update 'ansible/roles/assets/tasks/containerimages.yml'
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-01 02:33:58 +00:00
08a543e27f Add debugging;Fix readiness check;Create kubeadm registry project
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-31 17:15:13 +01:00
0fd4cbb92f Inject kubeadm container images
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-31 13:11:33 +01:00
6c31038b1a Upgrade versions; Attempt to add more robust wait/retry for helm chart installation
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-30 18:05:30 +01:00
fdead3c41c Fix foldername;Add semi-recursive yaml parse commands
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-30 11:14:49 +01:00
3efee69602 Refactor network protocol profile;Update container image references to local registry;Update/Remove dependencies
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-29 12:31:27 +01:00
0c8272c9e4 Add dependency container image;(WIP)Update image reference
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-27 14:00:10 +01:00
fcb05e2e12 Improve user experience;Upgrade dependency
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-26 17:01:05 +01:00
6de8ea3029 Fix vApp property value
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-24 15:31:37 +01:00
4b5acf5e95 Add retries;Increase ova cpu sizing;Replace deployment options
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-23 21:49:15 +01:00
5c68b87d67 Upgrade dependency;Fix syntax
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-23 12:51:10 +01:00
e538fce0f8 Upgrade dependency
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-22 19:49:56 +01:00
b67bc43a70 Refactor vApp properties;Add dependency
Some checks reported errors
continuous-integration/drone/push Build was killed
2022-12-22 19:44:33 +01:00
78c1d7fb54 Housekeeping;
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-15 22:17:07 +01:00
ab5f082933 Define registry mirrors dynamically;Fix path;Fix Ansible config
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-10 16:56:13 +01:00
e3f44fab0a Add missing folder
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-04 12:23:18 +01:00
f68189e3b7 Include IPAM in-cluster provider
Some checks failed
continuous-integration/drone/push Build is failing
2022-12-04 11:22:17 +01:00
f3224416cb Reenable key;Upgrade ClusterAPI
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-01 13:45:37 +01:00
96ee96b470 Ensure API availability
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-29 14:48:19 +01:00
a20cb4417c Configure Ansible defaults
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-29 14:32:44 +01:00
433a231487 Improve feedback;Housekeeping;Downgrade K3s version
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-29 13:02:06 +01:00
b890a03760 Housekeeping;Improved feedback;Prevent duplicates
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-29 11:24:26 +01:00
92eee0744e Attempt to simplify/aggregate dicts
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-28 16:58:56 +01:00
83ce1be8bf Fix var reference;Upgrade all included components
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-28 16:22:15 +01:00
a364a7c359 Use interface autodetection;Skip TLS Verify
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-28 13:29:56 +01:00
edca98549c Add explicit version;Add cni plugin;Add vApp properties to node template
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-28 10:25:25 +01:00
146887e9e1 Fix linting errors
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-25 09:50:55 +01:00
9bfa6bf658 Fix API ready check
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-25 09:29:28 +01:00
b9575d2de4 Ensure API readiness
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-24 13:46:19 +01:00
e249498109 Fix paths 2022-11-24 12:39:28 +01:00
01a1c0bf0a Fix typo
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-24 11:22:13 +01:00
c27712bc20 Simplify playbook roles
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-24 10:59:41 +01:00
2d99511360 Upgrade cluster api and dependencies
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-24 10:04:46 +01:00
46a927b777 Fix script logic;Remove source files
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-23 13:30:32 +01:00
c9a8598a35 Move tarball compression to background service;Housekeeping
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-23 10:25:35 +01:00
0d7b1ab269 Debug taints #2
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-21 12:37:12 +01:00
4786507366 Debug taints
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-18 17:54:13 +01:00
ed4c1145b6 Fix unique id in loop #2
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-17 12:02:27 +01:00
3aa44e0f83 Add retries #2
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-17 11:21:19 +01:00
3a48676ca7 Add retries
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-17 10:51:27 +01:00
44daf9191a Revert dict attribute;Move template;Add missing template attribute;Fix unique id in loop
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-17 10:17:17 +01:00
83ee632ff9 Move task;Fix static value;Improve shell logic/ansible filter;Fix typo
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-17 09:22:58 +01:00
be562f0124 Add unique postfix to tarball
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-17 08:35:00 +01:00
f711908ddb Upgrade skopeo
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-14 12:37:24 +01:00
6f7b8e99f2 Add retries
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-14 09:36:13 +01:00
6261bfdda7 Add retries for container import; Add cluster API images
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-12 11:03:22 +01:00
5751e7200c Add missing kubeconfig path;Reorder cleanup tasks
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-10 21:27:17 +01:00
6ce1a66d3e Avoid latest Ansible version
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-10 15:03:11 +01:00
85fb68b2e0 Fix template name;Fix interface name
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-09 16:59:43 +01:00
b47dda7a50 Enable gather facts; Fix typo and conditional;Add missing manifests;Initialize cluster API
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-09 16:43:49 +01:00
838c7b6361 Add pause to loop iteration; Replace wrong variable reference
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-09 15:35:42 +01:00
2ca91b5dea Reorder vApp properties
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-09 11:40:27 +01:00
42d79a95ca Merge vars_files
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-08 20:17:36 +01:00
1f4bbca7ec Add missing key to dict #2
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-08 20:11:31 +01:00
fe8700f300 Housekeeping;Add missing key to dict
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-08 19:46:37 +01:00
ac4b011e83 Add vApp property
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-08 15:48:00 +01:00
7ca9d20b65 Write template during firstboot
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-08 14:43:40 +01:00
0f79832d96 Change syntax
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-08 11:53:07 +01:00
8926b72344 Rebase node templates;Switch to linked clones;Rename dictionary;Add debugging
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-08 08:54:33 +01:00
5985615868 Fix url;Disable debugging
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-07 16:09:14 +01:00
4655fe7465 Allow multiple results;Add debugging
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-07 14:06:34 +01:00
15622d8a21 Upgrade binary #2
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-07 13:29:00 +01:00
5c75452315 Add fileflob filter; Housekeeping;Add dependency;Upgrade binary
Some checks reported errors
continuous-integration/drone/push Build was killed
2022-11-07 13:28:44 +01:00
f27dea92e3 Filter empty results;Remove debugging
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-07 09:03:49 +01:00
67ec47b2b3 Debug manifest parsing
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-07 08:40:19 +01:00
c6170436f4 Filter undefined items
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-07 07:38:01 +01:00
5b4eb2e443 Update 'ansible/roles/metacluster/tasks/components.yml'
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-07 03:18:20 +00:00
68a1534d9c Update 'ansible/roles/metacluster/tasks/components.yml'
Some checks reported errors
continuous-integration/drone/push Build was killed
2022-11-07 03:16:49 +00:00
e656780f56 Fix template
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-07 03:36:01 +01:00
464ed497fe Move config to firstboot;Split yaml;Improve feedback
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-07 03:11:59 +01:00
eb46c384a8 Fix label
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-07 02:39:51 +01:00
78526527bb Remove filter;Improve feedback
Some checks reported errors
continuous-integration/drone/push Build was killed
2022-11-07 02:18:54 +01:00
22c06e2388 Fix loop var;Fix template vars
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-07 01:57:30 +01:00
09c4a17050 Fix url's
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-06 20:41:02 +01:00
35ced380a4 Fix variable names #2; Update clusterctl config template
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-06 20:04:28 +01:00
9199809da5 Fix variable names;Add clusterctl config template
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-06 14:21:35 +01:00
806bf24fc0 Pin version;Store manifests in folder structure
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-06 13:23:14 +01:00
4733d8e5f8 Fix variable references
All checks were successful
continuous-integration/drone/push Build is passing
2022-10-17 21:30:06 +02:00
65346db100 Debug variables
All checks were successful
continuous-integration/drone/push Build is passing
2022-10-17 21:03:13 +02:00
8eb85e4b11 Fix syntax
All checks were successful
continuous-integration/drone/push Build is passing
2022-10-17 16:56:24 +02:00
716818c23c Avoid lookup
Some checks failed
continuous-integration/drone/push Build is failing
2022-10-17 14:28:59 +02:00
f4d32d7828 Test join syntax
Some checks failed
continuous-integration/drone/push Build is failing
2022-10-17 13:47:32 +02:00
c44b40568d Fix module
Some checks failed
continuous-integration/drone/push Build is failing
2022-10-17 12:06:26 +02:00
67676ff03b Download ClusterAPI assets
Some checks failed
continuous-integration/drone/push Build is failing
2022-10-17 11:13:13 +02:00
204faa7415 Upgrade binary #2
All checks were successful
continuous-integration/drone/push Build is passing
2022-10-10 16:36:48 +02:00
35a5656c59 Configure 'needrestart' package 2022-10-10 16:05:48 +02:00
3fe83457ea Fix url 2022-10-10 16:03:57 +02:00
3c11ce5dde Upgrade binary
Some checks failed
continuous-integration/drone/push Build is failing
2022-10-10 15:58:46 +02:00
7a1b563851 Add clusterapi prereqs
All checks were successful
continuous-integration/drone/push Build is passing
2022-09-19 13:15:09 +02:00
0bddae0440 Move filter_plugin folder;Improve feedback;Add missing attributes
All checks were successful
continuous-integration/drone/push Build is passing
2022-09-07 09:46:36 +02:00
8181ae4017 Add missing dependency
All checks were successful
continuous-integration/drone/push Build is passing
2022-09-06 16:37:26 +02:00
ac3f162dd4 Fix linting error
All checks were successful
continuous-integration/drone/push Build is passing
2022-09-06 13:41:51 +02:00
aa5c45e6e6 Add key/value pair to configmap
Some checks failed
continuous-integration/drone/push Build is failing
2022-09-06 13:39:35 +02:00
a67ef0e1bd Divide hypervisor/vapp details over secret/configmap;Add filter plugin;Retain newlines in template;Add vApp properties
Some checks failed
continuous-integration/drone/push Build is failing
2022-09-06 13:34:39 +02:00
1794b24998 Fix labels;Fix feedback
All checks were successful
continuous-integration/drone/push Build is passing
2022-09-05 08:39:18 +02:00
7c7333690d Fix linting warning;Add annotations
All checks were successful
continuous-integration/drone/push Build is passing
2022-09-04 21:41:49 +02:00
7b17b8ad63 Sort fileglob loops;Fix filter parameter;Remove redundant key;Fix multiline key/value pairs;Add helm-adopt labels
All checks were successful
continuous-integration/drone/push Build is passing
2022-09-04 14:51:07 +02:00
1141225907 Install SealedSecrets;Store hypervisor credentials in secret
All checks were successful
continuous-integration/drone/push Build is passing
2022-09-03 17:44:44 +02:00
6c4fe7a0e6 Improve feedback;Fix Gitea config;Fix argocd config
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-31 12:04:53 +02:00
8d13b527be Store certificate in configmap/secret dynamically;Remove helmchart values
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-30 21:14:51 +02:00
d8299ee90c Fix yaml;Fix volumemount;Fix filename
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-30 18:11:02 +02:00
b34ac733f4 Add missing task
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-30 14:52:43 +02:00
9f2e6ee160 Change gitea config;Remove image compression logic;Switch to template;Reenable/Move workaround
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-30 14:39:01 +02:00
042b9eb36f Fix filename/keyname;Disable jinja trim_blocks
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-29 22:43:26 +02:00
2097dec958 Disable tags
Some checks failed
continuous-integration/drone/push Build is failing
2022-08-29 19:26:17 +02:00
0c1fca9643 Fix readycheck;Create namespaces explicitly
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-29 14:43:26 +02:00
b0dad1caf7 Remove redundant tasks;Fix health check;Add gitea config
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-29 08:51:33 +02:00
2cd2c4c6d0 Fix typo;Fix readycheck;Add argocd applicationset
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-28 20:10:08 +02:00
bd0b74ba19 Merge branch 'Kubernetes.Bootstrap.Appliance' of https://code.spamasaurus.com/djpbessems/Packer.Images into Kubernetes.Bootstrap.Appliance
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-28 10:00:59 +02:00
521b323de2 Add retries 2022-08-28 10:00:58 +02:00
35b3d5d3b9 Refine task order w/ tags;Fix API check
Some checks failed
continuous-integration/drone/push Build is failing
2022-08-28 09:07:17 +02:00
675dce4160 Split up tasklist;Revert namespace;Distribute root cert
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-27 21:10:51 +02:00
bd7c1f92e8 Set traefik cert duration
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-26 11:31:12 +02:00
7d837a1711 Fix indentation
Some checks reported errors
continuous-integration/drone/push Build was killed
2022-08-26 08:29:55 +02:00
e1b57cfdea Fix configmap name
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-25 16:06:29 +02:00
84d644db67 Fix namespace #2
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-25 13:11:33 +02:00
5cffb61544 Fix indentation
Some checks reported errors
continuous-integration/drone/push Build was killed
2022-08-25 13:08:35 +02:00
1083937d5d Fix configmap namespace
Some checks reported errors
continuous-integration/drone/push Build was killed
2022-08-25 12:56:37 +02:00
e52c63f80c Fix ingress namespace
Some checks reported errors
continuous-integration/drone/push Build was killed
2022-08-25 12:51:29 +02:00
c7579ea4a6 Fix endpoint
Some checks reported errors
continuous-integration/drone/push Build was killed
2022-08-25 12:06:56 +02:00
fba2e3e4b1 Disable http challenge;Inject stepca cert;Set default certresolver
Some checks reported errors
continuous-integration/drone/push Build was killed
2022-08-25 12:04:51 +02:00
1c43bb19d2 Add acme provisioner;Force system certs update
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-25 08:22:28 +02:00
9a3898e0b8 Retrieve step-ca more reliably;Configure step-ca admin credentials
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-24 17:44:30 +02:00
a3da5b8f93 Migrate from helm-controlled ingress to passthrough ingressRoute
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-24 11:21:51 +02:00
5f02ddab49 Add default value 2022-08-23 14:38:03 +02:00
585e39cb97 Disable Harbor tls (rely on Traefik);Configure Traefik with custom certResolver;Retrieve & install root ca in truststore
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-23 14:31:53 +02:00
1cd7e1510f Configure CA w/ ingress
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-23 12:37:38 +02:00
0534b031fa Handle duplicate images;Add registry endpoint
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-22 14:54:54 +02:00
c8509aa3d5 Fix keyname
Some checks failed
continuous-integration/drone/push Build is failing
2022-08-22 14:28:06 +02:00
158af986c3 Add quotes
Some checks failed
continuous-integration/drone/push Build is failing
2022-08-22 13:46:43 +02:00
5e537966f6 Debug Ansible issue
Some checks failed
continuous-integration/drone/push Build is failing
2022-08-22 13:20:03 +02:00
3849b79493 Add step-ca component
Some checks failed
continuous-integration/drone/push Build is failing
2022-08-22 12:52:47 +02:00
5f1d1bfa8a Change order (test timing of handler)
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-19 12:55:53 +02:00
fe306bd845 Allow handler to fail (timing issue helm charts)
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-18 12:54:16 +02:00
ccbd4ed984 Fix task order;Add default hostname value
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-18 12:44:08 +02:00
fdc5c44e6a Remove handler from non-firstboot steps;Fix kubeconfig order/logic
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-17 08:32:35 +02:00
c57291af6d Force apply manifests w/ handler;Add dependency
Some checks failed
continuous-integration/drone/push Build is failing
2022-08-16 15:16:20 +02:00
d652cf0346 Configure ArgoCD declaratively
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-15 14:43:55 +02:00
a1b8837cc5 Add more memory
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-09 15:56:50 +02:00
5b7b93dd30 Increase diskspace
Some checks failed
continuous-integration/drone/push Build is failing
2022-08-09 14:56:30 +02:00
d89ccd57da Revert compression changes
Some checks failed
continuous-integration/drone/push Build is failing
2022-08-09 13:29:19 +02:00
53da641926 Test xz compression
Some checks failed
continuous-integration/drone/push Build is failing
2022-08-09 12:01:39 +02:00
a3e9bc659a Add powercli container
Some checks failed
continuous-integration/drone/push Build is failing
2022-08-09 11:57:31 +02:00
fc51bf3f94 Optimize node template handling
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-04 08:55:50 +02:00
3d96f8c13b Add missing dependency #2
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-03 15:16:24 +02:00
488fe10e1e Add missing dependency
Some checks failed
continuous-integration/drone/push Build is failing
2022-08-03 14:56:55 +02:00
01e168a7f9 Refactor package installation
Some checks failed
continuous-integration/drone/push Build is failing
2022-08-03 14:39:36 +02:00
c48f27c42e Rebase pip packages
Some checks failed
continuous-integration/drone/push Build is failing
2022-08-03 13:53:54 +02:00
185b332764 Fix linting error
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-03 09:23:27 +02:00
e89505bef6 Handle existing templates
Some checks failed
continuous-integration/drone/push Build is failing
2022-08-03 08:53:40 +02:00
b763d2b562 Avoid uncaught exception
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-31 22:29:47 +02:00
d607f615e9 Remove redundant quotes
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-31 18:21:18 +02:00
ed7a474dbb Update vApp properties;Rebase static binary;Refactor dictionary;Combine similar steps;Housekeeping
Some checks failed
continuous-integration/drone/push Build is failing
2022-07-31 18:17:13 +02:00
14c6720196 Fix typo
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-29 11:39:57 +02:00
277c91eeba Fix module name;Add indentation;Update dependencies #2
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-29 11:39:39 +02:00
c9f3c648b7 Fix vApp property type;Include missing role;Update dependencies
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-29 10:56:34 +02:00
8e680c45be Housekeeping;Provision node templates;Add vApp properties
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-28 23:22:41 +02:00
7440d5824c Add missing parameter
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-27 14:23:33 +02:00
8e75925b52 Rebase dependency;Comment out redundant logic
Some checks failed
continuous-integration/drone/push Build is failing
2022-07-27 13:33:04 +02:00
d6234321d9 Add dependencies
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-27 12:51:18 +02:00
ea20b1290c Add initial steps for workload cluster staging;Include govc (temporarily)
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-26 16:50:50 +02:00
d986d5ab25 Debug existing config map;Fix key;Fix tty mess of typos;Fix git push
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-26 10:08:35 +02:00
c29728594c Ignore errors for debugging
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-25 16:51:00 +02:00
10d5d6f389 Fix linting errors
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-22 09:44:35 +02:00
96dccef450 Housekeeping;Add tty console message
Some checks failed
continuous-integration/drone/push Build is failing
2022-07-22 09:38:03 +02:00
05e0c50217 Debugging;Housekeeping;Push source gitops repository
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-20 20:50:39 +02:00
261e91ee2e Create additional SSH-keypair;Configure gitea
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-20 08:40:18 +02:00
1746af9b9d Fix variable references
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-18 14:07:12 +02:00
7c2ff54019 Fix helm chart ref
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-18 12:38:55 +02:00
193ce9a534 Move manifest injection to firstboot;Add SealedSecrets;Replace traefik dashboard
Some checks failed
continuous-integration/drone/push Build is failing
2022-07-18 12:09:54 +02:00
9e91bef7b7 Disable phone-home;Add SealedSecrets;Flatten list
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-15 14:39:33 +02:00
05b30287bd Fix label;Configure gitea SSH;Fix git folder
Some checks failed
continuous-integration/drone/push Build is failing
2022-07-15 14:02:27 +02:00
54caff8fb6 Add conditional;Inject manifests
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-15 12:14:12 +02:00
2f976898eb Remove redundant key/value;Add debugging
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-14 22:45:35 +02:00
44befeda4b Increase cpu sizing;Change default value;Fix filename;Fix endpoint;Add dependency;Fix filemode
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-14 14:54:04 +02:00
81847d3b93 Interact with argocd API
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-14 11:04:35 +02:00
39cc83ac57 Add missing key;Add traefik ssh entrypoint
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-14 10:33:26 +02:00
0263b2dfc4 Add (unversioned) clone of metacluster git repo 2022-07-13 12:17:46 +02:00
e7e3b69d95 Change block syntax
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-13 12:05:08 +02:00
b6ac086a31 Add conditional to K3s installation;Populate Gitea #2
Some checks failed
continuous-integration/drone/push Build is failing
2022-07-13 12:00:03 +02:00
20ce62fb6d Enable offlineMode for gitea;Cleanup comments;Populate /etc/hosts
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-12 14:20:43 +02:00
0918eb36fe Fix parenthesis
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-11 13:37:55 +02:00
93e7d4dc9b Fix invalid var name
Some checks failed
continuous-integration/drone/push Build is failing
2022-07-11 13:21:49 +02:00
9a0a33816c Add dummy file to preserve empty dir
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-11 10:18:33 +02:00
eeb1364f1b Refactor templating #3
Some checks failed
continuous-integration/drone/push Build is failing
2022-07-11 09:56:02 +02:00
f04095db8c Refactor templating #42
Some checks failed
continuous-integration/drone/push Build is failing
2022-07-11 09:24:04 +02:00
2847542976 Add vars_file reference
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-10 13:47:53 +02:00
929186d123 Revert var references
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-10 10:10:36 +02:00
d6c885240a Remove debugging;Revert default quotes;Test dynamic helm chart values
Some checks failed
continuous-integration/drone/push Build is failing
2022-07-10 09:54:41 +02:00
0b97ae2fc5 Write whole dict to file
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-09 23:37:57 +02:00
abacbf90ce Refine templating #5
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-09 12:35:29 +02:00
243cf426d7 Add missing jinja delimiters
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-09 11:08:11 +02:00
64b7ea45c0 Fix linting error
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-09 09:26:13 +02:00
3a2dbe572e Refactor templating logic
Some checks failed
continuous-integration/drone/push Build is failing
2022-07-09 09:18:13 +02:00
2be42989e5 Refine templating #4;Update sizing
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-07 20:16:18 +02:00
cb97703406 Refine templating #3
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-07 17:35:31 +02:00
16df0b65fc Disable TLS verify 2022-07-07 09:57:56 +02:00
847b255e3b Refine templating #2
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-06 17:03:48 +02:00
d005697438 Change ansible module
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-06 16:32:39 +02:00
ab010643df Revert blob storage test
Some checks failed
continuous-integration/drone/push Build is failing
2022-07-06 16:09:21 +02:00
e17cd1b633 Test optimizing skopeo blob storage
Some checks failed
continuous-integration/drone/push Build is failing
2022-07-06 15:28:13 +02:00
504764af10 Fix filename templating
Some checks failed
continuous-integration/drone/push Build is failing
2022-07-06 14:52:25 +02:00
405fb5938f Force creation of new tarball
Some checks failed
continuous-integration/drone/push Build is failing
2022-07-06 14:36:30 +02:00
77e0f7b7cb Refine templating
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-06 11:55:29 +02:00
7fb0e80537 Configure ArgoCD w/ password;Add bcrypt dependency
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-05 16:09:02 +02:00
fb8b9b735f Disable tls for argocd
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-05 15:52:17 +02:00
86e99b1515 Install argo-cd;Housekeeping
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-05 09:56:56 +02:00
952e92082f Fix var reference
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-04 18:00:57 +02:00
33e0220e34 Test making dd play nice 2022-07-04 17:57:56 +02:00
a51d922f00 Add marker key
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-04 17:35:02 +02:00
b441717ee1 Add retries to image downloads #2
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-04 17:10:15 +02:00
b7da591571 Add retries to image downloads 2022-07-04 17:08:46 +02:00
fa0fa30062 Fix ansible module name
Some checks failed
continuous-integration/drone/push Build is failing
2022-07-04 16:45:09 +02:00
dd4e79901e Invert jinja delimiter declaration
Some checks failed
continuous-integration/drone/push Build is failing
2022-07-04 16:07:30 +02:00
1fcaa4b212 Remove redundant/wrong scalar blocks
Some checks failed
continuous-integration/drone/push Build is failing
2022-07-04 15:48:48 +02:00
164fd15c60 Prevent parsing of jinja delimiters;Revert exotic syntax
Some checks failed
continuous-integration/drone/push Build is failing
2022-07-04 15:47:24 +02:00
241551169a Change syntax wrt raw jinja strings #3
Some checks failed
continuous-integration/drone/push Build is failing
2022-07-04 15:34:52 +02:00
a2b20f49cc Add missing chart value key
Some checks failed
continuous-integration/drone/push Build is failing
2022-07-04 15:21:47 +02:00
fe8765ded7 Different syntax to allow raw jinja strings
Some checks failed
continuous-integration/drone/push Build is failing
2022-07-04 15:12:27 +02:00
caf45b5270 Fix quotes 2022-07-04 14:55:07 +02:00
9ba2df08cd Fix linting error 2022-07-04 14:15:08 +02:00
9458f49744 Avoid invalid yaml w/ jinja syntax
Some checks failed
continuous-integration/drone/push Build is failing
2022-07-04 14:13:30 +02:00
369aaaa0b5 Fix typo in dynamic disk 2022-07-04 14:02:55 +02:00
6220e2a9aa Add chart values to var_file;Add default null
Some checks failed
continuous-integration/drone/push Build is failing
2022-07-04 13:49:37 +02:00
e3e46bae7d Test injecting dictionaries into yaml file
Some checks failed
continuous-integration/drone/push Build is failing
2022-07-04 13:26:35 +02:00
6e6e7900da Update gitea chart values;Add registry mirror definitions
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-04 12:39:53 +02:00
6c329a36e9 Move payload file
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-03 22:32:17 +02:00
f33f2912f1 Fix linting error
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-03 15:19:41 +02:00
9541942c23 Install gitea chart;Add tea cli binary
Some checks failed
continuous-integration/drone/push Build is failing
2022-07-03 15:08:57 +02:00
2f937aded7 Rename vapp property;Configure node for private registry 2022-07-03 14:52:01 +02:00
95dea97382 Fix skopeo copy syntax
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-01 13:10:26 +02:00
a840306245 Change hypervisor cluster 2022-07-01 11:13:29 +02:00
bbd103d527 Fix scalar block syntax
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-01 10:39:47 +02:00
b2ceee8720 Push images to registry
Some checks failed
continuous-integration/drone/push Build is failing
2022-07-01 10:32:58 +02:00
d5c886f02b Fix Harbor config;Add extra container images
All checks were successful
continuous-integration/drone/push Build is passing
2022-06-30 16:21:19 +02:00
1d59cd4b3c Configure Harbor;Disable tarball deletion
All checks were successful
continuous-integration/drone/push Build is passing
2022-06-30 11:20:39 +02:00
f2d9147291 Fix syntax error
All checks were successful
continuous-integration/drone/push Build is passing
2022-06-30 08:03:13 +02:00
bc9f1c260f Reconfigure Longhorn/Harbor
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-29 17:06:23 +02:00
368f84769b Reenable image handling;Configure Longhorn/Harbor
All checks were successful
continuous-integration/drone/push Build is passing
2022-06-29 13:07:34 +02:00
51366476cc Fix linting error
All checks were successful
continuous-integration/drone/push Build is passing
2022-06-29 11:31:13 +02:00
dcbaf6b807 Create/mount logical volume;Add lvm2 dependency
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-29 11:29:22 +02:00
5dfc3a7813 Redirect crontab output 2022-06-29 09:58:10 +02:00
0989d0c586 Remove debugging;Add missing collection
All checks were successful
continuous-integration/drone/push Build is passing
2022-06-29 09:27:03 +02:00
8a83f47572 Redirect error output;Add debugging;Housekeeping
All checks were successful
continuous-integration/drone/push Build is passing
2022-06-29 09:06:13 +02:00
a3bbf88ce3 Rename file 2022-06-29 08:54:36 +02:00
5e0cebf733 Fix linting error 2022-06-29 08:00:02 +02:00
00e3266360 Test dynamic disk;Disable containerimages temporarily
All checks were successful
continuous-integration/drone/push Build is passing
2022-06-29 07:59:17 +02:00
c6a8f9f7bd Fix linting errors
Some checks reported errors
continuous-integration/drone/push Build was killed
2022-06-28 17:11:11 +02:00
4f1231f973 Set longhorn defaults
All checks were successful
continuous-integration/drone/push Build is passing
2022-06-28 17:10:24 +02:00
049bedbd8f Mount dynamic disk
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-28 16:37:54 +02:00
0e7cfa0934 Add dynamic disk;Add kubectl tab completion
All checks were successful
continuous-integration/drone/push Build is passing
2022-06-28 15:46:55 +02:00
5435f73402 Disable local-path storageclass
All checks were successful
continuous-integration/drone/push Build is passing
2022-06-28 12:02:12 +02:00
6917e0799a Add missing kubeconfig key
All checks were successful
continuous-integration/drone/push Build is passing
2022-06-28 11:53:17 +02:00
4616b9b070 Fix typo
All checks were successful
continuous-integration/drone/push Build is passing
2022-06-28 09:37:49 +02:00
8c741dc120 Fix parse logic
All checks were successful
continuous-integration/drone/push Build is passing
2022-06-27 22:50:12 +02:00
8cbfcb016b Remove debugging; Cleanup redundant logic;Add vapp property
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-27 20:26:09 +02:00
4ba7b590ba Debugging & revert override logic
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-27 19:43:07 +02:00
52660e1414 Fix var reference
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-27 17:05:30 +02:00
0ab6aaeaa5 Fix foldername 2022-06-27 16:57:14 +02:00
02c26b2465 Scale down cpu/ram 2022-06-27 16:46:27 +02:00
1842a08a39 Add Gitea;Allow override of helm-chart basedir
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-27 16:32:25 +02:00
0c01f024e9 Increase disksize;Add container image import during firstboot
All checks were successful
continuous-integration/drone/push Build is passing
2022-06-27 16:02:11 +02:00
40489ff373 Housekeeping #2 2022-06-27 15:34:15 +02:00
c491066384 Housekeeping 2022-06-27 15:33:49 +02:00
4c054cc434 Switch module
All checks were successful
continuous-integration/drone/push Build is passing
2022-06-27 14:38:48 +02:00
dcbe6c397f Change tarball scope;Try zeroing disk
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-27 13:55:59 +02:00
cb84a02b6f Readd parse_logic
All checks were successful
continuous-integration/drone/push Build is passing
2022-06-27 12:27:11 +02:00
8f432d3353 Remove debugging;Housekeeping;Rename dict 2022-06-27 10:55:17 +02:00
1cdbcaccaf Filter invalid results
All checks were successful
continuous-integration/drone/push Build is passing
2022-06-27 10:28:27 +02:00
f1c6161bcb Revert debugging;Switch ansible module
All checks were successful
continuous-integration/drone/push Build is passing
2022-06-27 09:56:48 +02:00
123518a787 Debugging versions
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-27 09:54:57 +02:00
2ec6a756b7 Quote whole cli string
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-27 09:27:33 +02:00
a1779be079 Change yq syntax
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-27 09:03:43 +02:00
8ed9b2f754 Fix firstboot logic;Refactor helm chart parsing;Housekeeping
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-27 08:44:16 +02:00
72202d9f21 Fix missing parenthesis;Attempt parsing argo-cd chart
All checks were successful
continuous-integration/drone/push Build is passing
2022-06-26 22:30:10 +02:00
9eb5fbd0a3 Fix component name;Temporarily add ignore_errors
All checks were successful
continuous-integration/drone/push Build is passing
2022-06-26 21:35:41 +02:00
c58ede04c4 Add missing galaxy collection;Fix logic to parse charts for container images;Add ArgoCD
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-26 21:20:16 +02:00
662e8984c3 Fix linting errors; Extend firstboot logic
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-26 21:01:27 +02:00
b7abf25907 Fix version number;Parse, Pull & Compress container images
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-26 20:56:45 +02:00
18fa7742fa Add short pause before first provisioner
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-26 18:48:06 +02:00
f6993c2052 Remove redundant quotes
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-26 18:32:05 +02:00
59d1730ca5 Update var reference #2
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-26 18:24:57 +02:00
b087203cfb Update var reference
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-26 18:06:15 +02:00
d39d594bf0 Reorganize vars dict;Parse & loop through dict key/values
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-26 17:54:19 +02:00
487239365e Remove debugging;Set loop_control label
All checks were successful
continuous-integration/drone/push Build is passing
2022-06-25 23:57:55 +02:00
6ea03d152c Debugging paths
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-25 23:43:20 +02:00
01991435ae Remove loop redundancy
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-25 23:32:29 +02:00
a64b5b2325 Fix missing quote
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-25 21:14:47 +02:00
38d7442025 Remove redundant tasks
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-25 21:03:42 +02:00
cf91519076 Add jinja filter
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-25 20:48:15 +02:00
bae044e145 Fix misaligned var references
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-25 20:23:27 +02:00
f39b4bbb62 Try dynamic logic for archived/compressed/flat static binaries
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-25 18:44:43 +02:00
9739c51100 Fix var reference
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-25 08:49:53 +02:00
0df98d4341 Quote special char string
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-25 08:33:12 +02:00
fc23dc068d Fix var reference;Install packages;Change DHCP identifier to MAC
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-25 08:28:44 +02:00
4d78d65ad8 Add missing role reference
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-25 01:13:37 +02:00
c1440d9dcd Add ansible galaxy collection requirements
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-25 01:08:11 +02:00
4a5f390ae1 Fix linting errors
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-25 00:54:36 +02:00
e0a5b5a5da Reorganize dependencies/components;Fix folder name
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-25 00:50:44 +02:00
081aaaaa19 Fix/Replace old references;Fix syntaxes
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-24 23:55:54 +02:00
2bd0f8df0a Initial build based on 22.04
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-24 23:44:10 +02:00
2c57dbcddc Fix boot kernel command;Rename files&folders
All checks were successful
continuous-integration/drone/push Build is passing
2022-06-22 11:40:25 +02:00
0f01e803f2 First attempt at 22.04
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-22 11:20:14 +02:00
bd82e13fc4 Remove baremetal logic
All checks were successful
continuous-integration/drone/push Build is passing
2022-04-25 13:35:30 +02:00
2f902fa27c Rebase to newer ISO;Revert cloudinit config
Some checks failed
continuous-integration/drone/push Build is failing
2022-04-25 13:21:30 +02:00
37ecd4a1b9 Update password
Some checks failed
continuous-integration/drone/push Build is failing
2022-04-25 09:51:31 +02:00
8a8cb09984 Add cluster reference
Some checks failed
continuous-integration/drone/push Build is failing
2022-04-25 09:21:05 +02:00
bc46b09708 Update hypervisor details
Some checks failed
continuous-integration/drone/push Build is failing
2022-04-25 09:15:48 +02:00
d508b28213 Disable LVM
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-23 13:05:17 +02:00
03ed59680f Remove debugging steps
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-17 14:14:11 +02:00
40ade38c78 Fix typo
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-17 13:52:11 +02:00
c89edd3ee9 FIx paths for postprocessor
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-17 13:15:51 +02:00
e5880c222e Fix source names for only keys
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-17 11:35:48 +02:00
236db40016 Fix line continuators
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-17 11:23:57 +02:00
b340c777ba Create rawdisk image for baremetal provisioning
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-17 11:21:22 +02:00
10624f8c90 Fix regex patterns 2021-06-15 11:11:56 +02:00
eca6ae515e Fix Ansible loop
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-14 17:08:42 +02:00
b6656c3d9c Fix SSH config;Housekeeping 2021-06-14 16:59:20 +02:00
82b8eeca4f Add jq package 2021-06-14 13:41:27 +02:00
5af4d729ef Add publickey vApp property;Configure SSH;Housekeeping
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-14 12:31:01 +02:00
73c266632c Fix yamllint errors
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-11 14:50:53 +02:00
cd448a0af3 Disable login during deployment
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-11 14:44:43 +02:00
6b1db0dd23 Move user cleanup to firstboot script
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-10 17:08:07 +02:00
f15485e7c2 Fix password hashing;Delete temporary user;Housekeeping
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-10 16:53:03 +02:00
4257849ca4 Set password;Force reboot
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-10 15:07:48 +02:00
3426cd7ed3 Add absolute paths of executables
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-10 12:32:27 +02:00
226fa9859b Change reference for local-var
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-10 11:53:51 +02:00
7e36abe0cb Marking local-var as sensitive
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-10 11:52:11 +02:00
1e470f38dd Fix quotes
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-10 11:44:45 +02:00
389c35bb05 Add logging to firstboot.sh
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-10 11:43:54 +02:00
f40889370d Add logging;Move iso-file specifics to variable file;Housekeeping
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-10 11:39:42 +02:00
990534618b Housekeeping;Disable crontab w/ reboot-followup
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-09 22:49:14 +02:00
c0953acefe Add vApp xml parse logic
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-09 22:11:06 +02:00
b33280b443 Fix variable/tasks name
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-09 15:41:46 +02:00
9460bc9bd6 Rebase ansible installation source
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-09 14:39:43 +02:00
5f835960b9 Create destination folder for firstboot logic
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-09 11:04:05 +02:00
35c2df5f4e Fix yamllint error
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-09 10:39:56 +02:00
fcdc7d07ad Add ansible payload draft
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-09 10:39:00 +02:00
998f5ef381 Remove multiline descriptions for deployment options 2021-06-08 22:28:40 +02:00
a9041b19a4 Housekeeping 2021-06-08 22:16:52 +02:00
0a2647d465 Hide deprecation warnings 2021-06-08 22:13:46 +02:00
93cadce4fe Move vars file
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-08 22:12:00 +02:00
4d7400ed43 Add missing cleanup script 2021-06-08 22:01:05 +02:00
f8d0c1cdde Fix yamllint error
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-08 21:57:07 +02:00
4ea138fd69 Extend ansible roles #2
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-08 21:56:06 +02:00
d5c3e2c0b6 Fix yamllint errors
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-08 21:27:59 +02:00
f33a99ad05 Extend ansible playbook
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-08 21:27:08 +02:00
d50bf402af Decrease verbose logging for ansible provisioner 2021-06-08 17:10:52 +02:00
8adbec57d5 Reenable ansible tasks
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-08 17:00:56 +02:00
06d0a44c4d Add explicit password for ansible provisioner
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-08 16:39:12 +02:00
be9609875a Try different workaround #3
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-08 15:26:41 +02:00
6c27d2e74d Try different workaround
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-08 15:23:36 +02:00
346b2878a6 Try some random workarounds
Some checks reported errors
continuous-integration/drone/push Build was killed
2021-06-08 15:13:12 +02:00
0ff31c104b Try different tasks to get started with
Some checks reported errors
continuous-integration/drone/push Build was killed
2021-06-08 14:42:42 +02:00
4bf036c49d Add debugging info
Some checks reported errors
continuous-integration/drone/push Build was killed
2021-06-08 13:51:22 +02:00
f6a27db822 Fix ansible.cfg header
Some checks reported errors
continuous-integration/drone/push Build was killed
2021-06-08 13:26:48 +02:00
b9fb3cdb30 Configure ansible temporary folder
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-08 10:41:01 +02:00
d95daa1861 Add elevated permissions to ansible playbook;add post-processor scripts
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-08 10:14:10 +02:00
fcea2ef449 Reenable yamllint for ansible;Fix quotes
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-08 09:38:40 +02:00
d680b0dde4 Add ansible provisioner
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-08 09:24:39 +02:00
03b5338f59 Try several connection changes
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-07 16:25:50 +02:00
b7d737e7df Add password as hashed value
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-07 16:01:11 +02:00
c4389f4932 Housekeeping
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-07 15:31:46 +02:00
bfa31fd7f7 Fix newline in yml
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-07 14:58:00 +02:00
94e1624180 Change credentials;Prevent/Delay SSH connectivity
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-07 14:54:22 +02:00
64ecc33dcb Add missing file reference
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-07 14:44:50 +02:00
1da7269d87 Packer Abort vs cleanup debugging
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-07 14:35:16 +02:00
50bef57ff7 Include necessary empty file
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-07 14:19:32 +02:00
66e3c01863 Avoid globbing for cd_files key
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-07 14:17:03 +02:00
7b525a6ea8 Fix authentication keys in packer template
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-07 13:31:46 +02:00
6ae9003fec Fix wrong variable reference
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-07 13:29:22 +02:00
7557a7bfca Fix yaml errors
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-07 13:26:43 +02:00
5501c640fc Ansible is not yet in place; skipping yamllint for that folder
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-07 13:25:45 +02:00
3f0a8ca3c4 Point yamllint to the correct folders/files
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-07 13:23:08 +02:00
04c9eb4f03 Add Ubuntu Server initial draft
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-07 13:19:00 +02:00
155 changed files with 4773 additions and 1074 deletions

View File

@ -1,7 +1,7 @@
kind: pipeline
type: kubernetes
name: 'Packer Build'
volumes:
- name: output
claim:
@ -10,63 +10,207 @@ volumes:
claim:
name: flexvolsmb-drone-scratch
trigger:
event:
exclude:
- tag
steps:
- name: Debugging information
image: bv11-cr01.bessems.eu/library/packer-extended
pull: always
commands:
- yamllint --version
- packer --version
- pwsh --version
- ansible --version
- ovftool --version
- name: Windows 10
- packer --version
- yamllint --version
- name: Linting
depends_on:
- Debugging information
image: bv11-cr01.bessems.eu/library/packer-extended
pull: always
commands:
- sed -i -e "s/<<img-productkey>>/$${PRODUCTKEY}/" packer/preseed/Windows10/Autounattend.xml
- |
sed -i -e "s/<<img-password>>/$${WINRM_PASSWORD}/g" \
packer/preseed/Windows10/Autounattend.xml \
packer/preseed/Windows10/Sysprep_Unattend.xml
yamllint -d "{extends: relaxed, rules: {line-length: disable}}" \
ansible \
packer/preseed/UbuntuServer22.04/user-data \
scripts
- name: Semantic Release (Dry-run)
depends_on:
- Linting
image: bv11-cr01.bessems.eu/proxy/library/node:20-slim
pull: always
commands:
- |
yamllint -d "{extends: relaxed, rules: {line-length: disable}}" scripts
apt-get update
- |
apt-get install -y --no-install-recommends \
git-core \
ca-certificates
- |
npm install \
semantic-release \
@semantic-release/commit-analyzer \
@semantic-release/exec \
- |
export GIT_CREDENTIALS=$${GIT_USERNAME}:$${GIT_APIKEY}
- |
npx semantic-release \
--package @semantic-release/exec \
--package semantic-release \
--branches ${DRONE_BRANCH} \
--tag-format "K8s_1.25.9-v\$${version}" \
--dry-run \
--plugins @semantic-release/commit-analyzer,@semantic-release/exec \
--analyzeCommits @semantic-release/commit-analyzer \
--verifyRelease @semantic-release/exec \
--verifyReleaseCmd 'echo "$${nextRelease.version}" > .version'
environment:
GIT_APIKEY:
from_secret: git_apikey
GIT_USERNAME: djpbessems
- name: Install Ansible Galaxy collections
depends_on:
- Semantic Release (Dry-run)
image: bv11-cr01.bessems.eu/library/packer-extended
pull: always
commands:
- |
ansible-galaxy collection install \
-r ansible/requirements.yml \
-p ./ansible/collections
- name: Kubernetes Bootstrap Appliance
depends_on:
- Install Ansible Galaxy collections
image: bv11-cr01.bessems.eu/library/packer-extended
pull: always
commands:
- |
sed -i -e "s/<<img-password>>/$${SSH_PASSWORD}/g" \
packer/preseed/UbuntuServer22.04/user-data
- |
export K8S_VERSION=$(yq '.components.clusterapi.workload.version.k8s' < ./ansible/vars/metacluster.yml)
export NEXT_RELEASE_VERSION=$(cat .version)
- |
packer init -upgrade \
./packer
- |
packer validate \
-var vm_name=$DRONE_BUILD_NUMBER-${DRONE_COMMIT_SHA:0:10} \
-var vm_guestos=win10 \
-only=vsphere-iso.bootstrap \
-var vm_name=${DRONE_BUILD_NUMBER}-${DRONE_COMMIT_SHA:0:10}-$(openssl rand -hex 3) \
-var docker_username=$${DOCKER_USERNAME} \
-var docker_password=$${DOCKER_PASSWORD} \
-var repo_username=$${REPO_USERNAME} \
-var repo_password=$${REPO_PASSWORD} \
-var ssh_password=$${SSH_PASSWORD} \
-var vsphere_password=$${VSPHERE_PASSWORD} \
-var winrm_password=$${WINRM_PASSWORD} \
-var k8s_version=$K8S_VERSION \
-var next_release_version=$NEXT_RELEASE_VERSION \
./packer
- |
packer build \
-on-error=cleanup \
-var vm_name=$DRONE_BUILD_NUMBER-${DRONE_COMMIT_SHA:0:10} \
-var vm_guestos=win10 \
-on-error=cleanup -timestamp-ui \
-only=vsphere-iso.bootstrap \
-var vm_name=${DRONE_BUILD_NUMBER}-${DRONE_COMMIT_SHA:0:10}-$(openssl rand -hex 3) \
-var docker_username=$${DOCKER_USERNAME} \
-var docker_password=$${DOCKER_PASSWORD} \
-var repo_username=$${REPO_USERNAME} \
-var repo_password=$${REPO_PASSWORD} \
-var ssh_password=$${SSH_PASSWORD} \
-var vsphere_password=$${VSPHERE_PASSWORD} \
-var winrm_password=$${WINRM_PASSWORD} \
-var k8s_version=$K8S_VERSION \
-var next_release_version=$NEXT_RELEASE_VERSION \
./packer
environment:
VSPHERE_PASSWORD:
from_secret: vsphere_password
WINRM_PASSWORD:
from_secret: winrm_password
DOCKER_USERNAME:
from_secret: docker_username
DOCKER_PASSWORD:
from_secret: docker_password
# PACKER_LOG: 1
REPO_USERNAME:
from_secret: repo_username
REPO_PASSWORD:
from_secret: repo_password
PRODUCTKEY:
from_secret: prodkey_win10
# PACKER_LOG: 1
SSH_PASSWORD:
from_secret: ssh_password
VSPHERE_PASSWORD:
from_secret: vsphere_password
volumes:
- name: output
path: /output
- name: scratch
path: /scratch
- name: Kubernetes Upgrade Appliance
depends_on:
- Install Ansible Galaxy collections
image: bv11-cr01.bessems.eu/library/packer-extended
pull: alwaysquery(
commands:
- |
sed -i -e "s/<<img-password>>/$${SSH_PASSWORD}/g" \
packer/preseed/UbuntuServer22.04/user-data
- |
export K8S_VERSION=$(yq '.components.clusterapi.workload.version.k8s' < ./ansible/vars/metacluster.yml)
export NEXT_RELEASE_VERSION=$(cat .version)
- |
packer init -upgrade \
./packer
- |
packer validate \
-only=vsphere-iso.upgrade \
-var vm_name=${DRONE_BUILD_NUMBER}-${DRONE_COMMIT_SHA:0:10}-$(openssl rand -hex 3) \
-var docker_username=$${DOCKER_USERNAME} \
-var docker_password=$${DOCKER_PASSWORD} \
-var repo_username=$${REPO_USERNAME} \
-var repo_password=$${REPO_PASSWORD} \
-var ssh_password=$${SSH_PASSWORD} \
-var vsphere_password=$${VSPHERE_PASSWORD} \
-var k8s_version=$K8S_VERSION \
-var next_release_version=$NEXT_RELEASE_VERSION \
./packer
- |
packer build \
-on-error=cleanup -timestamp-ui \
-only=vsphere-iso.upgrade \
-var vm_name=${DRONE_BUILD_NUMBER}-${DRONE_COMMIT_SHA:0:10}-$(openssl rand -hex 3) \
-var docker_username=$${DOCKER_USERNAME} \
-var docker_password=$${DOCKER_PASSWORD} \
-var repo_username=$${REPO_USERNAME} \
-var repo_password=$${REPO_PASSWORD} \
-var ssh_password=$${SSH_PASSWORD} \
-var vsphere_password=$${VSPHERE_PASSWORD} \
-var k8s_version=$K8S_VERSION \
-var next_release_version=$NEXT_RELEASE_VERSION \
./packer
environment:
DOCKER_USERNAME:
from_secret: docker_username
DOCKER_PASSWORD:
from_secret: docker_password
# PACKER_LOG: 1
REPO_USERNAME:
from_secret: repo_username
REPO_PASSWORD:
from_secret: repo_password
SSH_PASSWORD:
from_secret: ssh_password
VSPHERE_PASSWORD:
from_secret: vsphere_password
volumes:
- name: output
path: /output
- name: scratch
path: /scratch
- name: Remove temporary resources
depends_on:
- Kubernetes Bootstrap Appliance
- Kubernetes Upgrade Appliance
image: bv11-cr01.bessems.eu/library/packer-extended
commands:
- |

11
.releaserc.json.DISABLED Normal file
View File

@ -0,0 +1,11 @@
{
"plugins": [
["@semantic-release/commit-analyzer"],
["@semantic-release/release-notes-generator"],
["@semantic-release/exec", {
"prepareCmd": "export SEMANTICRELEASE_NEXTRELEASEVERSION=${nextRelease.version}",
"publishCmd": "echo $SEMANTICRELEASE_NEXTRELEASEVERSION"
}],
["@semantic-release/git"]
]
}

View File

@ -1 +1 @@
# Packer.Images [![Build Status](https://ci.spamasaurus.com/api/badges/djpbessems/Packer.Images/status.svg?ref=refs/heads/Windows10)](https://ci.spamasaurus.com/djpbessems/Packer.Images)
# Packer.Images [![Build Status](https://ci.spamasaurus.com/api/badges/djpbessems/Packer.Images/status.svg?ref=refs/heads/Kubernetes.Bootstrap.Appliance)](https://ci.spamasaurus.com/djpbessems/Packer.Images)

3
ansible/ansible.cfg Normal file
View File

@ -0,0 +1,3 @@
[defaults]
deprecation_warnings = False
remote_tmp = /tmp/.ansible-${USER}/tmp

11
ansible/playbook.yml Normal file
View File

@ -0,0 +1,11 @@
---
- hosts: all
gather_facts: false
vars_files:
- metacluster.yml
- workloadcluster.yml
become: true
roles:
- os
- firstboot
- assets

9
ansible/requirements.yml Normal file
View File

@ -0,0 +1,9 @@
collections:
- name: https://github.com/ansible-collections/ansible.posix
type: git
- name: https://github.com/ansible-collections/ansible.utils
type: git
- name: https://github.com/ansible-collections/community.general
type: git
- name: https://github.com/ansible-collections/kubernetes.core
type: git

View File

@ -0,0 +1,67 @@
- name: Parse manifests for container images
ansible.builtin.shell:
# This set of commands is necessary to deal with multi-line scalar values
# eg.:
# key: |
# multi-line
# value
cmd: >-
cat {{ item.dest }} | yq --no-doc eval '.. | .image? | select(.)' | awk '!/ /';
cat {{ item.dest }} | yq eval '.data.data' | yq --no-doc eval '.. | .image? | select(.)';
cat {{ item.dest }} | yq --no-doc eval '.. | .files? | with_entries(select(.value.path == "*.yaml")).[0].content' | awk '!/null/' | yq eval '.. | .image? | select(.)'
register: parsedmanifests
loop: "{{ clusterapi_manifests.results }}"
loop_control:
label: "{{ item.dest | basename }}"
- name: Parse metacluster helm charts for container images
ansible.builtin.shell:
cmd: "{{ item.value.helm.parse_logic }}"
chdir: /opt/metacluster/helm-charts/{{ item.key }}
register: chartimages_metacluster
when: item.value.helm is defined
loop: "{{ query('ansible.builtin.dict', components) }}"
loop_control:
label: "{{ item.key }}"
- name: Parse workloadcluster helm charts for container images
ansible.builtin.shell:
cmd: "{{ item.value.parse_logic }}"
chdir: /opt/workloadcluster/helm-charts/{{ item.value.namespace }}/{{ item.key }}
register: chartimages_workloadcluster
loop: "{{ query('ansible.builtin.dict', downstream.helm_charts) }}"
loop_control:
label: "{{ item.key }}"
- name: Store container images in dicts
ansible.builtin.set_fact:
containerimages_{{ item.source }}: "{{ item.results }}"
loop:
- source: charts
results: "{{ (chartimages_metacluster | json_query('results[*].stdout_lines')) + (chartimages_workloadcluster | json_query('results[*].stdout_lines')) | select() | flatten | list }}"
- source: kubeadm
results: "{{ kubeadmimages.stdout_lines }}"
- source: manifests
results: "{{ parsedmanifests | json_query('results[*].stdout_lines') | select() | flatten | list }}"
loop_control:
label: "{{ item.source }}"
- name: Log in to container registry
ansible.builtin.shell:
cmd: >-
skopeo login \
docker.io \
--username={{ docker_username }} \
--password={{ docker_password }}
no_log: true
- name: Pull and store containerimages
ansible.builtin.shell:
cmd: >-
skopeo copy \
--insecure-policy \
--retry-times=5 \
docker://{{ item }} \
docker-archive:./{{ ( item | regex_findall('[^/:]+'))[-2] }}_{{ lookup('ansible.builtin.password', '/dev/null length=5 chars=ascii_lowercase,digits seed={{ item }}') }}.tar:{{ item }}
chdir: /opt/metacluster/container-images
loop: "{{ (containerimages_charts + containerimages_kubeadm + containerimages_manifests + dependencies.container_images) | flatten | unique | sort }}"

View File

@ -0,0 +1,31 @@
---
- name: Initialize tempfolder
ansible.builtin.tempfile:
state: directory
register: archive
- name: Download & extract archived static binary
ansible.builtin.unarchive:
src: "{{ item.url }}"
dest: "{{ archive.path }}"
remote_src: yes
extra_opts: "{{ item.extra_opts | default(omit) }}"
register: staticbinary_download
retries: 5
delay: 5
until: staticbinary_download is not failed
- name: Install extracted binary
ansible.builtin.copy:
src: "{{ archive.path }}/{{ item.filename }}"
dest: /usr/local/bin/{{ item.filename }}
remote_src: yes
owner: root
group: root
mode: 0755
- name: Cleanup tempfolder
ansible.builtin.file:
path: "{{ archive.path }}"
state: absent
when: archive.path is defined

View File

@ -0,0 +1,54 @@
- name: Download & install static binaries
ansible.builtin.get_url:
url: "{{ item.url }}"
url_username: "{{ item.username | default(omit) }}"
url_password: "{{ item.password | default(omit) }}"
dest: /usr/local/bin/{{ item.filename }}
owner: root
group: root
mode: 0755
register: staticbinary_download
loop: "{{ dependencies.static_binaries | selectattr('archive', 'undefined') }}"
loop_control:
label: "{{ item.filename }}"
retries: 5
delay: 5
until: staticbinary_download is not failed
- name: Download, extract & install archived static binaries
include_tasks: dependencies.archive_compressed.yml
loop: "{{ dependencies.static_binaries | rejectattr('archive', 'undefined') | selectattr('archive', 'equalto', 'compressed') }}"
loop_control:
label: "{{ item.filename }}"
- name: Install ansible-galaxy collections
ansible.builtin.shell:
cmd: ansible-galaxy collection install {{ item }}
register: collections
loop: "{{ dependencies.ansible_galaxy_collections }}"
retries: 5
delay: 5
until: collections is not failed
- name: Install distro packages
ansible.builtin.apt:
pkg: "{{ dependencies.packages.apt }}"
state: latest
update_cache: yes
install_recommends: no
- name: Upgrade all packages
ansible.builtin.apt:
name: '*'
state: latest
update_cache: yes
- name: Install additional python packages
ansible.builtin.pip:
name: "{{ dependencies.packages.pip }}"
state: latest
- name: Cleanup apt cache
ansible.builtin.apt:
autoremove: yes
purge: yes

View File

@ -0,0 +1,31 @@
- name: Add helm repositories
kubernetes.core.helm_repository:
name: "{{ item.name }}"
repo_url: "{{ item.url }}"
state: present
loop: "{{ platform.helm_repositories + downstream.helm_repositories }}"
- name: Fetch helm charts for metacluster
ansible.builtin.command:
cmd: helm fetch {{ item.value.helm.chart }} --untar --version {{ item.value.helm.version }}
chdir: /opt/metacluster/helm-charts
when: item.value.helm is defined
register: helmcharts_metacluster
loop: "{{ query('ansible.builtin.dict', components) }}"
loop_control:
label: "{{ item.key }}"
retries: 5
delay: 5
until: helmcharts_metacluster is not failed
- name: Fetch helm charts for workloadcluster
ansible.builtin.command:
cmd: helm fetch {{ item.value.chart }} --untardir ./{{ item.value.namespace }} --untar --version {{ item.value.version }}
chdir: /opt/workloadcluster/helm-charts
register: helmcharts_workloadcluster
loop: "{{ query('ansible.builtin.dict', downstream.helm_charts) }}"
loop_control:
label: "{{ item.key }}"
retries: 5
delay: 5
until: helmcharts_workloadcluster is not failed

View File

@ -0,0 +1,43 @@
- name: Download & install K3s binary
ansible.builtin.get_url:
url: https://github.com/k3s-io/k3s/releases/download/{{ platform.k3s.version }}/k3s
dest: /usr/local/bin/k3s
owner: root
group: root
mode: 0755
register: download
until: download is not failed
retries: 3
delay: 10
- name: Download K3s images tarball
ansible.builtin.get_url:
url: https://github.com/k3s-io/k3s/releases/download/{{ platform.k3s.version }}/k3s-airgap-images-amd64.tar.gz
dest: /var/lib/rancher/k3s/agent/images
register: download
until: download is not failed
retries: 3
delay: 10
- name: Download K3s install script
ansible.builtin.get_url:
url: https://raw.githubusercontent.com/k3s-io/k3s/{{ platform.k3s.version | urlencode }}/install.sh
dest: /opt/metacluster/k3s/install.sh
owner: root
group: root
mode: 0755
register: download
until: download is not failed
retries: 3
delay: 10
- name: Inject manifests
ansible.builtin.template:
src: helmchartconfig.j2
dest: /var/lib/rancher/k3s/server/manifests/{{ item.name }}-config.yaml
owner: root
group: root
mode: 0600
loop: "{{ platform.packaged_components }}"
loop_control:
label: "{{ item.name }}"

View File

@ -0,0 +1,26 @@
- name: Initialize tempfile
ansible.builtin.tempfile:
state: directory
register: kubeadm
- name: Download kubeadm binary
ansible.builtin.get_url:
url: https://dl.k8s.io/release/{{ components.clusterapi.workload.version.k8s }}/bin/linux/amd64/kubeadm
dest: "{{ kubeadm.path }}/kubeadm"
mode: u+x
- name: Retrieve container images list
ansible.builtin.shell:
cmd: "{{ kubeadm.path }}/kubeadm config images list --kubernetes-version {{ components.clusterapi.workload.version.k8s }}"
register: kubeadmimages
- name: Store list of container images for reference
ansible.builtin.copy:
dest: /opt/metacluster/cluster-api/imagelist
content: "{{ kubeadmimages.stdout }}"
- name: Cleanup tempfile
ansible.builtin.file:
path: "{{ kubeadm.path }}"
state: absent
when: kubeadm.path is defined

View File

@ -0,0 +1,33 @@
- name: Create folder structure(s)
ansible.builtin.file:
path: "{{ item }}"
state: directory
loop:
- /etc/rancher/k3s
- /opt/metacluster/cluster-api/bootstrap-kubeadm/{{ components.clusterapi.management.version.base }}
- /opt/metacluster/cluster-api/cert-manager/{{ components.clusterapi.management.version.cert_manager }}
- /opt/metacluster/cluster-api/cluster-api/{{ components.clusterapi.management.version.base }}
- /opt/metacluster/cluster-api/cni-calico/{{ components.clusterapi.workload.version.calico }}
- /opt/metacluster/cluster-api/control-plane-kubeadm/{{ components.clusterapi.management.version.base }}
- /opt/metacluster/cluster-api/infrastructure-vsphere/{{ components.clusterapi.management.version.infrastructure_vsphere }}
- /opt/metacluster/cluster-api/ipam-in-cluster/{{ components.clusterapi.management.version.ipam_incluster }}
- /opt/metacluster/container-images
- /opt/metacluster/git-repositories
- /opt/metacluster/helm-charts
- /opt/metacluster/k3s
- /opt/metacluster/kube-vip
- /opt/workloadcluster/git-repositories/gitops/charts
- /opt/workloadcluster/git-repositories/gitops/values
- /opt/workloadcluster/helm-charts
- /opt/workloadcluster/node-templates
- /var/lib/rancher/k3s/agent/images
- /var/lib/rancher/k3s/server/manifests
- import_tasks: dependencies.yml
- import_tasks: k3s.yml
- import_tasks: helm.yml
# - import_tasks: git.yml
- import_tasks: manifests.yml
- import_tasks: kubeadm.yml
- import_tasks: containerimages.yml
- import_tasks: nodetemplates.yml

View File

@ -0,0 +1,109 @@
- block:
- name: Aggregate chart_values into dict
ansible.builtin.set_fact:
metacluster_chartvalues: "{{ metacluster_chartvalues | default({}) | combine({ item.key: { 'chart_values': (item.value.helm.chart_values | from_yaml) } }) }}"
when: item.value.helm.chart_values is defined
loop: "{{ query('ansible.builtin.dict', components) }}"
loop_control:
label: "{{ item.key }}"
- name: Write dict to vars_file
ansible.builtin.copy:
dest: /opt/firstboot/ansible/vars/metacluster.yml
content: >-
{{
{ 'components': (
metacluster_chartvalues |
combine({ 'clusterapi': components.clusterapi }) |
combine({ 'kubevip' : components.kubevip }) )
} | to_nice_yaml(indent=2, width=4096)
}}
- name: Aggregate chart_values into dict
ansible.builtin.set_fact:
workloadcluster_chartvalues: "{{ workloadcluster_chartvalues | default({}) | combine({ item.key: { 'chart_values': (item.value.chart_values | default('') | from_yaml) } }) }}"
# when: item.value.chart_values is defined
loop: "{{ query('ansible.builtin.dict', downstream.helm_charts) }}"
loop_control:
label: "{{ item.key }}"
- name: Write dict to vars_file
ansible.builtin.copy:
dest: /opt/firstboot/ansible/vars/workloadcluster.yml
content: >-
{{
{ 'downstream_components': ( workloadcluster_chartvalues )
} | to_nice_yaml(indent=2, width=4096)
}}
- name: Download ClusterAPI manifests
ansible.builtin.get_url:
url: "{{ item.url }}"
dest: /opt/metacluster/cluster-api/{{ item.dest }}
register: clusterapi_manifests
loop:
# This list is based on `clusterctl config repositories`
# Note: Each manifest also needs a `metadata.yaml` file stored in the respective folder
- url: https://github.com/kubernetes-sigs/cluster-api/releases/download/{{ components.clusterapi.management.version.base }}/bootstrap-components.yaml
dest: bootstrap-kubeadm/{{ components.clusterapi.management.version.base }}/bootstrap-components.yaml
- url: https://github.com/kubernetes-sigs/cluster-api/releases/download/{{ components.clusterapi.management.version.base }}/core-components.yaml
dest: cluster-api/{{ components.clusterapi.management.version.base }}/core-components.yaml
- url: https://github.com/kubernetes-sigs/cluster-api/releases/download/{{ components.clusterapi.management.version.base }}/control-plane-components.yaml
dest: control-plane-kubeadm/{{ components.clusterapi.management.version.base }}/control-plane-components.yaml
# This downloads the same `metadata.yaml` file to three separate folders
- url: https://github.com/kubernetes-sigs/cluster-api/releases/download/{{ components.clusterapi.management.version.base }}/metadata.yaml
dest: bootstrap-kubeadm/{{ components.clusterapi.management.version.base }}/metadata.yaml
- url: https://github.com/kubernetes-sigs/cluster-api/releases/download/{{ components.clusterapi.management.version.base }}/metadata.yaml
dest: cluster-api/{{ components.clusterapi.management.version.base }}/metadata.yaml
- url: https://github.com/kubernetes-sigs/cluster-api/releases/download/{{ components.clusterapi.management.version.base }}/metadata.yaml
dest: control-plane-kubeadm/{{ components.clusterapi.management.version.base }}/metadata.yaml
# The vsphere infrastructure provider requires multiple files (`cluster-template.yaml` and `metadata.yaml` on top of default files)
- url: https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/releases/download/{{ components.clusterapi.management.version.infrastructure_vsphere }}/infrastructure-components.yaml
dest: infrastructure-vsphere/{{ components.clusterapi.management.version.infrastructure_vsphere }}/infrastructure-components.yaml
- url: https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/releases/download/{{ components.clusterapi.management.version.infrastructure_vsphere }}/cluster-template.yaml
dest: infrastructure-vsphere/{{ components.clusterapi.management.version.infrastructure_vsphere }}/cluster-template.yaml
- url: https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/releases/download/{{ components.clusterapi.management.version.infrastructure_vsphere }}/metadata.yaml
dest: infrastructure-vsphere/{{ components.clusterapi.management.version.infrastructure_vsphere }}/metadata.yaml
# Additionally, cert-manager is a prerequisite
- url: https://github.com/cert-manager/cert-manager/releases/download/{{ components.clusterapi.management.version.cert_manager }}/cert-manager.yaml
dest: cert-manager/{{ components.clusterapi.management.version.cert_manager }}/cert-manager.yaml
# Finally, workload clusters will need a CNI plugin
- url: https://raw.githubusercontent.com/projectcalico/calico/{{ components.clusterapi.workload.version.calico }}/manifests/calico.yaml
dest: cni-calico/{{ components.clusterapi.workload.version.calico }}/calico.yaml
# IPAM in-cluster provider (w/ metadata.yaml)
- url: https://github.com/telekom/cluster-api-ipam-provider-in-cluster/releases/download/{{ components.clusterapi.management.version.ipam_incluster }}/ipam-components.yaml
dest: ipam-in-cluster/{{ components.clusterapi.management.version.ipam_incluster }}/ipam-components.yaml
- url: https://github.com/telekom/cluster-api-ipam-provider-in-cluster/releases/download/{{ components.clusterapi.management.version.ipam_incluster }}/metadata.yaml
dest: ipam-in-cluster/{{ components.clusterapi.management.version.ipam_incluster }}/metadata.yaml
loop_control:
label: "{{ item.url | basename }}"
retries: 5
delay: 5
until: clusterapi_manifests is not failed
- name: Update cluster-template with image tags
ansible.builtin.replace:
dest: /opt/metacluster/cluster-api/infrastructure-vsphere/{{ components.clusterapi.management.version.infrastructure_vsphere }}/cluster-template.yaml
regexp: ':\${CPI_IMAGE_K8S_VERSION}'
replace: ":{{ components.clusterapi.management.version.cpi_vsphere }}"
- name: Download kube-vip RBAC manifest
ansible.builtin.get_url:
url: https://kube-vip.io/manifests/rbac.yaml
dest: /opt/metacluster/kube-vip/rbac.yaml
register: kubevip_manifest
retries: 5
delay: 5
until: kubevip_manifest is not failed
# - name: Inject manifests
# ansible.builtin.template:
# src: "{{ item.type }}.j2"
# dest: /var/lib/rancher/k3s/server/manifests/{{ item.name }}-manifest.yaml
# owner: root
# group: root
# mode: 0600
# loop: "{{ query('ansible.builtin.dict', components) | map(attribute='value.manifests') | list | select('defined') | flatten }}"
# loop_control:
# label: "{{ item.type ~ '/' ~ item.name }}"

View File

@ -0,0 +1,4 @@
- name: Download node-template image
ansible.builtin.uri:
url: "{{ components.clusterapi.workload.node_template.url }}"
dest: /opt/workloadcluster/node-templates/{{ components.clusterapi.workload.node_template.url | basename}}

View File

@ -0,0 +1,8 @@
apiVersion: helm.cattle.io/v1
kind: HelmChartConfig
metadata:
name: {{ item.name }}
namespace: {{ item.namespace }}
spec:
valuesContent: |-
{{ item.config }}

View File

@ -0,0 +1,27 @@
---
- hosts: 127.0.0.1
connection: local
gather_facts: true
vars_files:
- defaults.yml
- metacluster.yml
- workloadcluster.yml
# become: true
roles:
- vapp
- network
- preflight
- users
- disks
- metacluster
- workloadcluster
- tty
- cleanup
handlers:
- name: Apply manifests
kubernetes.core.k8s:
src: "{{ item }}"
state: present
kubeconfig: "{{ kubeconfig.path }}"
loop: "{{ query('ansible.builtin.fileglob', '/var/lib/rancher/k3s/server/manifests/*.yaml') | sort }}"
ignore_errors: yes

View File

@ -0,0 +1,142 @@
- block:
- name: Initialize tempfile
ansible.builtin.tempfile:
state: file
register: values_file
- name: Write chart values w/ password to tempfile
ansible.builtin.copy:
dest: "{{ values_file.path }}"
content: "{{ stepca_values.stdout | regex_replace('(ca_password|provisioner_password): ', '\\1: ' ~ (vapp['metacluster.password'] | b64encode)) }}"
no_log: true
- name: Install step-ca chart
kubernetes.core.helm:
name: step-certificates
chart_ref: /opt/metacluster/helm-charts/step-certificates
release_namespace: step-ca
create_namespace: true
# Unable to use REST api based readycheck due to lack of ingress
wait: true
kubeconfig: "{{ kubeconfig.path }}"
values_files:
- "{{ values_file.path }}"
- name: Cleanup tempfile
ansible.builtin.file:
path: "{{ values_file.path }}"
state: absent
when: values_file.path is defined
- name: Retrieve configmap w/ root certificate
kubernetes.core.k8s_info:
kind: ConfigMap
name: step-certificates-certs
namespace: step-ca
kubeconfig: "{{ kubeconfig.path }}"
register: stepca_cm_certs
- name: Create target namespaces
kubernetes.core.k8s:
kind: Namespace
name: "{{ item }}"
state: present
kubeconfig: "{{ kubeconfig.path }}"
loop:
- argo-cd
# - kube-system
- name: Store root certificate in namespaced configmaps/secrets
kubernetes.core.k8s:
state: present
template: "{{ item.kind }}.j2"
kubeconfig: "{{ kubeconfig.path }}"
vars:
_template:
name: "{{ item.name }}"
namespace: "{{ item.namespace }}"
annotations: "{{ item.annotations | default('{}') | indent(width=4, first=True) }}"
labels: "{{ item.labels | default('{}') | indent(width=4, first=True) }}"
data: "{{ item.data }}"
loop:
- name: argocd-tls-certs-cm
namespace: argo-cd
kind: configmap
annotations: |
meta.helm.sh/release-name: argo-cd
meta.helm.sh/release-namespace: argo-cd
labels: |
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: argocd-cm
app.kubernetes.io/part-of: argocd
data:
- key: git.{{ vapp['metacluster.fqdn'] }}
value: "{{ stepca_cm_certs.resources[0].data['root_ca.crt'] }}"
- name: step-certificates-certs
namespace: kube-system
kind: secret
data:
- key: root_ca.crt
value: "{{ stepca_cm_certs.resources[0].data['root_ca.crt'] | b64encode }}"
loop_control:
label: "{{ item.kind ~ '/' ~ item.name ~ ' (' ~ item.namespace ~ ')' }}"
- name: Configure step-ca passthrough ingress
ansible.builtin.template:
src: ingressroutetcp.j2
dest: /var/lib/rancher/k3s/server/manifests/{{ _template.name }}-manifest.yaml
owner: root
group: root
mode: 0600
vars:
_template:
name: step-ca
namespace: step-ca
config: |2
entryPoints:
- websecure
routes:
- match: HostSNI(`ca.{{ vapp['metacluster.fqdn'] }}`)
services:
- name: step-certificates
port: 443
tls:
passthrough: true
notify:
- Apply manifests
- name: Inject step-ca certificate into traefik container
ansible.builtin.blockinfile:
path: /var/lib/rancher/k3s/server/manifests/traefik-config.yaml
block: |2
volumes:
- name: step-certificates-certs
mountPath: /step-ca
type: secret
env:
- name: LEGO_CA_CERTIFICATES
value: /step-ca/root_ca.crt
marker: ' # {mark} ANSIBLE MANAGED BLOCK [rootca]'
notify:
- Apply manifests
- name: Trigger handlers
ansible.builtin.meta: flush_handlers
- name: Ensure step-ca API availability
ansible.builtin.uri:
url: https://ca.{{ vapp['metacluster.fqdn'] }}/health
method: GET
register: api_readycheck
until:
- api_readycheck.json.status is defined
- api_readycheck.json.status == 'ok'
retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
module_defaults:
ansible.builtin.uri:
validate_certs: no
status_code: [200, 201]
body_format: json

View File

@ -0,0 +1,151 @@
- block:
- name: Install gitea chart
kubernetes.core.helm:
name: gitea
chart_ref: /opt/metacluster/helm-charts/gitea
release_namespace: gitea
create_namespace: true
wait: false
kubeconfig: "{{ kubeconfig.path }}"
values: "{{ components['gitea'].chart_values }}"
- name: Ensure gitea API availability
ansible.builtin.uri:
url: https://git.{{ vapp['metacluster.fqdn'] }}/api/healthz
method: GET
register: api_readycheck
until:
- api_readycheck.json.status is defined
- api_readycheck.json.status == 'pass'
retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
- name: Configure additional SSH ingress
ansible.builtin.template:
src: ingressroutetcp.j2
dest: /var/lib/rancher/k3s/server/manifests/{{ _template.name }}-manifest.yaml
owner: root
group: root
mode: 0600
vars:
_template:
name: gitea-ssh
namespace: gitea
config: |2
entryPoints:
- ssh
routes:
- match: HostSNI(`*`)
services:
- name: gitea-ssh
port: 22
notify:
- Apply manifests
- name: Trigger handlers
ansible.builtin.meta: flush_handlers
- name: Generate gitea API token
ansible.builtin.uri:
url: https://git.{{ vapp['metacluster.fqdn'] }}/api/v1/users/administrator/tokens
method: POST
user: administrator
password: "{{ vapp['metacluster.password'] }}"
force_basic_auth: yes
body:
name: token_init_{{ lookup('password', '/dev/null length=5 chars=ascii_letters,digits') }}
register: gitea_api_token
- name: Retrieve existing gitea configuration
ansible.builtin.uri:
url: https://git.{{ vapp['metacluster.fqdn'] }}/api/v1/repos/search
method: GET
register: gitea_existing_config
- block:
- name: Register SSH public key
ansible.builtin.uri:
url: https://git.{{ vapp['metacluster.fqdn'] }}/api/v1/user/keys
method: POST
headers:
Authorization: token {{ gitea_api_token.json.sha1 }}
body:
key: "{{ gitops_sshkey.public_key }}"
read_only: false
title: GitOps
- name: Create organization(s)
ansible.builtin.uri:
url: https://git.{{ vapp['metacluster.fqdn'] }}/api/v1/orgs
method: POST
headers:
Authorization: token {{ gitea_api_token.json.sha1 }}
body: "{{ item }}"
loop:
- full_name: Meta-cluster
description: Meta-cluster configuration items
username: mc
website: https://git.{{ vapp['metacluster.fqdn'] }}/mc
location: '[...]'
visibility: public
- full_name: Workload-cluster
description: Workload-cluster configuration items
username: wl
website: https://git.{{ vapp['metacluster.fqdn'] }}/wl
location: '[...]'
visibility: public
loop_control:
label: "{{ item.full_name }}"
- name: Create repositories
ansible.builtin.uri:
url: https://git.{{ vapp['metacluster.fqdn'] }}/api/v1/orgs/{{ item.organization }}/repos
method: POST
headers:
Authorization: token {{ gitea_api_token.json.sha1 }}
body: "{{ item.body }}"
loop:
- organization: mc
body:
name: GitOps.ClusterAPI
# auto_init: true
# default_branch: main
description: ClusterAPI manifests
- organization: mc
body:
name: GitOps.Config
# auto_init: true
# default_branch: main
description: GitOps manifests
- organization: wl
body:
name: GitOps.Config
# auto_init: true
# default_branch: main
description: GitOps manifests
- organization: wl
body:
name: GitOps.HelmCharts
# auto_init: true
# default_branch: main
description: Helm charts
loop_control:
label: "{{ item.organization ~ '/' ~ item.body.name }}"
# - name: Rebase/Push source gitops repository
# ansible.builtin.shell:
# cmd: |
# git config --local http.sslVerify false
# git remote set-url origin https://administrator:{{ vapp['metacluster.password'] | urlencode }}@git.{{ vapp['metacluster.fqdn'] }}/mc/GitOps.Config.git
# git push
# chdir: /opt/metacluster/git-repositories/gitops
when: (gitea_existing_config.json is undefined) or (gitea_existing_config.json.data | length == 0)
module_defaults:
ansible.builtin.uri:
validate_certs: no
status_code: [200, 201]
body_format: json

View File

@ -0,0 +1,75 @@
- block:
- name: Install argo-cd chart
kubernetes.core.helm:
name: argo-cd
chart_ref: /opt/metacluster/helm-charts/argo-cd
release_namespace: argo-cd
create_namespace: true
wait: false
kubeconfig: "{{ kubeconfig.path }}"
values: "{{ components['argo-cd'].chart_values }}"
- name: Ensure argo-cd API availability
ansible.builtin.uri:
url: https://gitops.{{ vapp['metacluster.fqdn'] }}/api/version
method: GET
register: api_readycheck
until:
- api_readycheck.json.Version is defined
retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
- name: Generate argo-cd API token
ansible.builtin.uri:
url: https://gitops.{{ vapp['metacluster.fqdn'] }}/api/v1/session
method: POST
force_basic_auth: yes
body:
username: admin
password: "{{ vapp['metacluster.password'] }}"
register: argocd_api_token
- name: Configure metacluster-gitops repository
ansible.builtin.template:
src: gitrepo.j2
dest: /var/lib/rancher/k3s/server/manifests/{{ _template.name }}-manifest.yaml
owner: root
group: root
mode: 0600
vars:
_template:
name: gitrepo-mc-gitopsconfig
namespace: argo-cd
url: https://git.{{ vapp['metacluster.fqdn'] }}/mc/GitOps.Config.git
notify:
- Apply manifests
- name: Create applicationset
ansible.builtin.template:
src: applicationset.j2
dest: /var/lib/rancher/k3s/server/manifests/{{ _template.application.name }}-manifest.yaml
owner: root
group: root
mode: 0600
vars:
_template:
application:
name: applicationset-metacluster
namespace: argo-cd
cluster:
url: https://kubernetes.default.svc
repository:
url: https://git.{{ vapp['metacluster.fqdn'] }}/mc/GitOps.Config.git
revision: main
notify:
- Apply manifests
- name: Trigger handlers
ansible.builtin.meta: flush_handlers
module_defaults:
ansible.builtin.uri:
validate_certs: no
status_code: [200, 201]
body_format: json

View File

@ -0,0 +1,44 @@
- name: Reconfigure traefik container for persistence
ansible.builtin.blockinfile:
path: /var/lib/rancher/k3s/server/manifests/traefik-config.yaml
block: |2
deployment:
initContainers:
- name: volume-permissions
image: busybox:1
command: ["sh", "-c", "touch /data/acme.json && chmod -Rv 600 /data/* && chown 65532:65532 /data/acme.json"]
volumeMounts:
- name: data
mountPath: /data
persistence:
enabled: true
marker: ' # {mark} ANSIBLE MANAGED BLOCK [persistence]'
notify:
- Apply manifests
- name: Configure traefik dashboard ingress
ansible.builtin.template:
src: ingressroute.j2
dest: /var/lib/rancher/k3s/server/manifests/{{ _template.name }}-manifest.yaml
owner: root
group: root
mode: 0600
vars:
_template:
name: traefik-dashboard
namespace: kube-system
config: |2
entryPoints:
- web
- websecure
routes:
- kind: Rule
match: Host(`ingress.{{ vapp['metacluster.fqdn'] }}`)
services:
- kind: TraefikService
name: api@internal
notify:
- Apply manifests
- name: Trigger handlers
ansible.builtin.meta: flush_handlers

View File

@ -0,0 +1,83 @@
- name: Configure fallback name resolution
ansible.builtin.lineinfile:
path: /etc/hosts
line: "{{ vapp['guestinfo.ipaddress'] }} {{ item ~ '.' ~ vapp['metacluster.fqdn'] }}"
state: present
loop:
# TODO: Make this list dynamic
- ca
- git
- gitops
- ingress
- registry
- storage
- name: Initialize tempfile
ansible.builtin.tempfile:
state: file
register: stepca_password
- name: Store password in tempfile
ansible.builtin.copy:
dest: "{{ stepca_password.path }}"
content: "{{ vapp['metacluster.password'] }}"
no_log: true
- name: Generate step-ca helm chart values (including root CA certificate)
ansible.builtin.shell:
cmd: >-
step ca init \
--helm \
--deployment-type=standalone \
--name=ca.{{ vapp['metacluster.fqdn'] }} \
--dns=ca.{{ vapp['metacluster.fqdn'] }} \
--dns=step-certificates.step-ca.svc.cluster.local \
--dns=127.0.0.1 \
--address=:9000 \
--provisioner=admin \
--acme \
--password-file={{ stepca_password.path }}
register: stepca_values
- name: Cleanup tempfile
ansible.builtin.file:
path: "{{ stepca_password.path }}"
state: absent
when: stepca_password.path is defined
- name: Store root CA certificate
ansible.builtin.copy:
dest: /usr/local/share/ca-certificates/root_ca.crt
content: "{{ (stepca_values.stdout | from_yaml).inject.certificates.root_ca }}"
- name: Update certificate truststore
ansible.builtin.command:
cmd: update-ca-certificates
- name: Get all stored fully qualified container image names
ansible.builtin.shell:
cmd: >-
skopeo list-tags \
--insecure-policy \
docker-archive:./{{ item | basename }} | \
jq -r '.Tags[0]'
chdir: /opt/metacluster/container-images
register: registry_artifacts
loop: "{{ query('ansible.builtin.fileglob', '/opt/metacluster/container-images/*.tar') | sort }}"
loop_control:
label: "{{ item | basename }}"
- name: Get source registries of all artifacts
ansible.builtin.set_fact:
source_registries: "{{ (source_registries | default([]) + [(item | split('/'))[0]]) | unique | sort }}"
loop: "{{ registry_artifacts | json_query('results[*].stdout') | select | sort }}"
- name: Configure K3s node for private registry
ansible.builtin.template:
dest: /etc/rancher/k3s/registries.yaml
src: registries.j2
vars:
_template:
registries: "{{ source_registries }}"
hv:
fqdn: "{{ vapp['metacluster.fqdn'] }}"

View File

@ -0,0 +1,80 @@
- name: Store custom configuration files
ansible.builtin.copy:
dest: "{{ item.filename }}"
content: "{{ item.content }}"
loop:
- filename: /etc/rancher/k3s/config.yaml
content: |
kubelet-arg:
- "config=/etc/rancher/k3s/kubelet.config"
- "image-gc-high-threshold=95"
- filename: /etc/rancher/k3s/kubelet.config
content: |
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
shutdownGracePeriod: 180s
shtudownGracePeriodCriticalPods: 60s
loop_control:
label: "{{ item.filename }}"
- name: Gather service facts
ansible.builtin.service_facts:
# Module requires no attributes
- name: Install K3s
ansible.builtin.command:
cmd: ./install.sh
chdir: /opt/metacluster/k3s
environment:
INSTALL_K3S_SKIP_DOWNLOAD: 'true'
INSTALL_K3S_EXEC: "server --cluster-init --token {{ vapp['metacluster.token'] | trim }} --tls-san {{ vapp['metacluster.vip'] }} --disable local-storage --config /etc/rancher/k3s/config.yaml"
when: ansible_facts.services['k3s.service'] is undefined
- name: Ensure API availability
ansible.builtin.uri:
url: https://{{ vapp['guestinfo.ipaddress'] }}:6443/livez?verbose
method: GET
validate_certs: no
status_code: [200, 401]
register: api_readycheck
until: api_readycheck.json.apiVersion is defined
retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark | int) * (playbook.delay.medium | int) }}"
- name: Install kubectl tab-completion
ansible.builtin.shell:
cmd: kubectl completion bash | tee /etc/bash_completion.d/kubectl
- name: Initialize tempfile
ansible.builtin.tempfile:
state: file
register: kubeconfig
- name: Retrieve kubeconfig
ansible.builtin.command:
cmd: kubectl config view --raw
register: kubectl_config
- name: Store kubeconfig in tempfile
ansible.builtin.copy:
dest: "{{ kubeconfig.path }}"
content: "{{ kubectl_config.stdout }}"
mode: 0600
no_log: true
- name: Add label to node object
kubernetes.core.k8s:
name: "{{ ansible_facts.nodename | lower }}"
kind: Node
state: patched
definition:
metadata:
labels:
ova.airgappedk8s/moref_id: "{{ moref_id }}"
kubeconfig: "{{ kubeconfig.path }}"
register: k8snode_patch
until:
- k8snode_patch.result.metadata.labels['ova.airgappedk8s/moref_id'] is defined
retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark | int) * (playbook.delay.medium | int) }}"

View File

@ -0,0 +1,27 @@
- name: Generate kube-vip manifest
ansible.builtin.shell:
cmd: >-
ctr run --rm --net-host ghcr.io/kube-vip/kube-vip:{{ components.kubevip.version }} vip \
/kube-vip manifest daemonset \
--interface eth0 \
--address {{ vapp['metacluster.vip'] }} \
--inCluster \
--taint \
--controlplane \
--services \
--arp \
--leaderElection
register: kubevip_manifest
- name: Inject manifests
ansible.builtin.copy:
dest: /var/lib/rancher/k3s/server/manifests/kubevip-manifest.yaml
content: |
{{ lookup('ansible.builtin.file', '/opt/metacluster/kube-vip/rbac.yaml') }}
---
{{ kubevip_manifest.stdout | replace('imagePullPolicy: Always', 'imagePullPolicy: IfNotPresent') }}
notify:
- Apply manifests
- name: Trigger handlers
ansible.builtin.meta: flush_handlers

View File

@ -0,0 +1,10 @@
- import_tasks: init.yml
- import_tasks: k3s.yml
- import_tasks: assets.yml
- import_tasks: kube-vip.yml
- import_tasks: storage.yml
- import_tasks: ingress.yml
- import_tasks: certauthority.yml
- import_tasks: registry.yml
- import_tasks: git.yml
- import_tasks: gitops.yml

View File

@ -0,0 +1,50 @@
- block:
- name: Install harbor chart
kubernetes.core.helm:
name: harbor
chart_ref: /opt/metacluster/helm-charts/harbor
release_namespace: harbor
create_namespace: true
wait: false
kubeconfig: "{{ kubeconfig.path }}"
values: "{{ components['harbor'].chart_values }}"
- name: Ensure harbor API availability
ansible.builtin.uri:
url: https://registry.{{ vapp['metacluster.fqdn'] }}/api/v2.0/health
method: GET
register: api_readycheck
until:
- api_readycheck.json.status is defined
- api_readycheck.json.status == 'healthy'
retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
- name: Push images to registry
ansible.builtin.shell:
cmd: >-
skopeo copy \
--insecure-policy \
--dest-tls-verify=false \
--dest-creds admin:{{ vapp['metacluster.password'] }} \
docker-archive:./{{ item | basename }} \
docker://registry.{{ vapp['metacluster.fqdn'] }}/library/$( \
skopeo list-tags \
--insecure-policy \
docker-archive:./{{ item | basename }} | \
jq -r '.Tags[0]')
chdir: /opt/metacluster/container-images/
register: push_result
loop: "{{ query('ansible.builtin.fileglob', '/opt/metacluster/container-images/*.tar') | sort }}"
loop_control:
label: "{{ item | basename }}"
retries: "{{ playbook.retries }}"
delay: "{{ ((storage_benchmark | float) * playbook.delay.short) | int }}"
until: push_result is not failed
module_defaults:
ansible.builtin.uri:
validate_certs: no
status_code: [200, 201, 401]
body_format: json

View File

@ -0,0 +1,26 @@
- block:
- name: Install longhorn chart
kubernetes.core.helm:
name: longhorn
chart_ref: /opt/metacluster/helm-charts/longhorn
release_namespace: longhorn-system
create_namespace: true
wait: false
kubeconfig: "{{ kubeconfig.path }}"
values: "{{ components['longhorn'].chart_values }}"
- name: Ensure longhorn API availability
ansible.builtin.uri:
url: https://storage.{{ vapp['metacluster.fqdn'] }}/v1
method: GET
register: api_readycheck
until:
- api_readycheck is not failed
retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
module_defaults:
ansible.builtin.uri:
validate_certs: no
status_code: [200, 201]
body_format: json

View File

@ -0,0 +1,25 @@
- name: Check for expected vApp properties
ansible.builtin.assert:
that:
- vapp[item] is defined
- (vapp[item] | length) > 0
quiet: true
loop:
- deployment.type
- guestinfo.dnsserver
- guestinfo.gateway
- guestinfo.hostname
- guestinfo.ipaddress
- guestinfo.prefixlength
- guestinfo.rootsshkey
- hv.fqdn
- hv.password
- hv.username
- ippool.endip
- ippool.startip
- metacluster.fqdn
- metacluster.password
- metacluster.token
- metacluster.vip
- workloadcluster.name
- workloadcluster.vip

View File

@ -0,0 +1,284 @@
- block:
# Below tasks circumvent usernames with `<domain>\<username>` format, which causes CAPV to
# incorrectly interpret the backslash (despite automatic escaping) as an escape sequence.
# `vcenter_session.user` will instead contain the username in `<username>@<domain>` format.
- name: Generate vCenter API token
ansible.builtin.uri:
url: https://{{ vapp['hv.fqdn'] }}/api/session
method: POST
headers:
Authorization: Basic {{ ( vapp['hv.username'] ~ ':' ~ vapp['hv.password'] ) | b64encode }}
register: vcenterapi_token
- name: Retrieve vCenter API session details
ansible.builtin.uri:
url: https://{{ vapp['hv.fqdn'] }}/api/session
method: GET
headers:
vmware-api-session-id: "{{ vcenterapi_token.json }}"
register: vcenter_session
module_defaults:
ansible.builtin.uri:
validate_certs: no
status_code: [200, 201]
body_format: json
- name: Configure clusterctl
ansible.builtin.template:
src: clusterctl.j2
dest: /opt/metacluster/cluster-api/clusterctl.yaml
vars:
_template:
version:
base: "{{ components.clusterapi.management.version.base }}"
cert_manager: "{{ components.clusterapi.management.version.cert_manager }}"
infrastructure_vsphere: "{{ components.clusterapi.management.version.infrastructure_vsphere }}"
ipam_incluster: "{{ components.clusterapi.management.version.ipam_incluster }}"
hv:
fqdn: "{{ vapp['hv.fqdn'] }}"
tlsthumbprint: "{{ tls_thumbprint.stdout }}"
username: "{{ vcenter_session.json.user }}"
password: "{{ vapp['hv.password'] }}"
datacenter: "{{ vcenter_info.datacenter }}"
datastore: "{{ vcenter_info.datastore }}"
network: "{{ vcenter_info.network }}"
resourcepool: "{{ vcenter_info.resourcepool }}"
folder: "{{ vcenter_info.folder }}"
cluster:
nodetemplate: "{{ nodetemplate_inventorypath }}"
publickey: "{{ vapp['guestinfo.rootsshkey'] }}"
version: "{{ components.clusterapi.workload.version.k8s }}"
vip: "{{ vapp['workloadcluster.vip'] }}"
- name: Generate cluster-template kustomization manifest
ansible.builtin.template:
src: kustomization.cluster-template.j2
dest: /opt/metacluster/cluster-api/infrastructure-vsphere/{{ components.clusterapi.management.version.infrastructure_vsphere }}/kustomization.yaml
vars:
_template:
network:
fqdn: "{{ vapp['metacluster.fqdn'] }}"
dnsserver: "{{ vapp['guestinfo.dnsserver'] }}"
nodesize:
cpu: "{{ config.clusterapi.size_matrix[ vapp['workloadcluster.nodesize'] ].cpu }}"
memory: "{{ config.clusterapi.size_matrix[ vapp['workloadcluster.nodesize'] ].memory }}"
rootca: "{{ stepca_cm_certs.resources[0].data['root_ca.crt'] }}"
runcmds:
- update-ca-certificates
registries: "{{ source_registries }}"
- name: Store custom cluster-template
ansible.builtin.copy:
dest: /opt/metacluster/cluster-api/custom-cluster-template.yaml
content: "{{ lookup('kubernetes.core.kustomize', dir='/opt/metacluster/cluster-api/infrastructure-vsphere/' ~ components.clusterapi.management.version.infrastructure_vsphere ) }}"
- name: Initialize Cluster API management cluster
ansible.builtin.shell:
cmd: >-
clusterctl init \
-v5 \
--infrastructure vsphere:{{ components.clusterapi.management.version.infrastructure_vsphere }} \
--ipam in-cluster:{{ components.clusterapi.management.version.ipam_incluster }} \
--config ./clusterctl.yaml \
--kubeconfig {{ kubeconfig.path }}
chdir: /opt/metacluster/cluster-api
- name: Ensure controller availability
kubernetes.core.k8s_info:
kind: Deployment
name: "{{ item.name }}"
namespace: "{{ item.namespace }}"
wait: true
kubeconfig: "{{ kubeconfig.path }}"
loop:
- name: caip-in-cluster-controller-manager
namespace: caip-in-cluster-system
- name: capi-controller-manager
namespace: capi-system
- name: capv-controller-manager
namespace: capv-system
loop_control:
label: "{{ item.name }}"
- name: Parse vApp for workload cluster sizing
ansible.builtin.set_fact:
clustersize: >-
{{ {
'controlplane': vapp['deployment.type'] | regex_findall('^cp(\d)+') | first,
'worker': vapp['deployment.type'] | regex_findall('w(\d)+') | first,
'workerstorage': vapp['deployment.type'] | regex_findall('ws(\d)+$') | first
} }}
- name: Generate workload cluster manifest
ansible.builtin.shell:
cmd: >-
clusterctl generate cluster \
{{ vapp['workloadcluster.name'] | lower }} \
--control-plane-machine-count {{ clustersize.controlplane }} \
--worker-machine-count {{ clustersize.worker }} \
--from ./custom-cluster-template.yaml \
--config ./clusterctl.yaml \
--kubeconfig {{ kubeconfig.path }}
chdir: /opt/metacluster/cluster-api
register: clusterctl_newcluster
- name: Initialize tempfolder
ansible.builtin.tempfile:
state: directory
register: capi_clustermanifest
- name: Save workload cluster manifest
ansible.builtin.copy:
dest: "{{ capi_clustermanifest.path }}/new-cluster.yaml"
content: "{{ clusterctl_newcluster.stdout }}"
- name: Split manifest into separate files
ansible.builtin.shell:
cmd: >-
kubectl slice \
-f {{ capi_clustermanifest.path }}/new-cluster.yaml \
-o {{ capi_clustermanifest.path }}/manifests
- name: Generate nodepool kustomization manifest
ansible.builtin.template:
src: kustomization.nodepool.j2
dest: "{{ capi_clustermanifest.path }}/kustomization.yaml"
vars:
_template:
cluster:
name: "{{ vapp['workloadcluster.name'] }}"
nodepool:
size: "{{ clustersize.workerstorage }}"
additionaldisk: "{{ vapp['workloadcluster.additionaldisk'] }}"
- name: Store nodepool manifest
ansible.builtin.copy:
dest: "{{ capi_clustermanifest.path }}/manifests/nodepool-worker-storage.yaml"
content: "{{ lookup('kubernetes.core.kustomize', dir=capi_clustermanifest.path) }}"
- name: Create in-cluster IpPool
ansible.builtin.template:
src: ippool.j2
dest: "{{ capi_clustermanifest.path }}/manifests/inclusterippool-{{ _template.cluster.name }}.yml"
vars:
_template:
cluster:
name: "{{ vapp['workloadcluster.name'] | lower }}"
namespace: default
network:
startip: "{{ vapp['ippool.startip'] }}"
endip: "{{ vapp['ippool.endip'] }}"
prefix: "{{ vapp['guestinfo.prefixlength'] }}"
gateway: "{{ vapp['guestinfo.gateway'] }}"
- name: Initialize/Push git repository
ansible.builtin.shell:
cmd: |
git init
git config --global user.email "administrator@{{ vapp['metacluster.fqdn'] }}"
git config --global user.name "administrator"
git checkout -b main
git add ./manifests
git commit -m "Upload manifests"
git remote add origin https://git.{{ vapp['metacluster.fqdn'] }}/mc/GitOps.ClusterAPI.git
git push https://administrator:{{ vapp['metacluster.password'] | urlencode }}@git.{{ vapp['metacluster.fqdn'] }}/mc/GitOps.ClusterAPI.git --all
chdir: "{{ capi_clustermanifest.path }}"
- name: Cleanup tempfolder
ansible.builtin.file:
path: "{{ capi_clustermanifest.path }}"
state: absent
when: capi_clustermanifest.path is defined
- name: Configure Cluster API repository
ansible.builtin.template:
src: gitrepo.j2
dest: /var/lib/rancher/k3s/server/manifests/{{ _template.name }}-manifest.yaml
owner: root
group: root
mode: 0600
vars:
_template:
name: gitrepo-mc-gitopsclusterapi
namespace: argo-cd
url: https://git.{{ vapp['metacluster.fqdn'] }}/mc/GitOps.ClusterAPI.git
notify:
- Apply manifests
- name: WORKAROUND - Wait for ingress ACME requests to complete
ansible.builtin.shell:
cmd: >-
openssl s_client -connect registry.{{ vapp['metacluster.fqdn'] }}:443 -servername registry.{{ vapp['metacluster.fqdn'] }} 2>/dev/null </dev/null | \
openssl x509 -noout -subject | \
grep 'subject=CN = registry.{{ vapp['metacluster.fqdn'] }}'
register: certificate_subject
until: certificate_subject is not failed
retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark | int) * (playbook.delay.medium | int) }}"
- name: Create application
ansible.builtin.template:
src: application.j2
dest: /var/lib/rancher/k3s/server/manifests/{{ _template.application.name }}-manifest.yaml
owner: root
group: root
mode: 0600
vars:
_template:
application:
name: application-clusterapi-workloadcluster
namespace: argo-cd
cluster:
name: https://kubernetes.default.svc
namespace: default
repository:
url: https://git.{{ vapp['metacluster.fqdn'] }}/mc/GitOps.ClusterAPI.git
path: manifests
revision: main
notify:
- Apply manifests
- name: Trigger handlers
ansible.builtin.meta: flush_handlers
- name: Wait for cluster to be available
ansible.builtin.shell:
cmd: >-
kubectl wait clusters.cluster.x-k8s.io/{{ vapp['workloadcluster.name'] | lower }} \
--for=condition=Ready \
--timeout 0s
register: cluster_readycheck
until: cluster_readycheck is succeeded
retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
- name: Initialize tempfile
ansible.builtin.tempfile:
state: file
register: capi_kubeconfig
- name: Retrieve kubeconfig
ansible.builtin.shell:
cmd: >-
clusterctl get kubeconfig \
{{ vapp['workloadcluster.name'] | lower }} \
--kubeconfig {{ kubeconfig.path }}
register: capi_kubectl_config
- name: Store kubeconfig in tempfile
ansible.builtin.copy:
dest: "{{ capi_kubeconfig.path }}"
content: "{{ capi_kubectl_config.stdout }}"
mode: 0600
no_log: true
# TODO: move to git repo
- name: Apply cni plugin manifest
kubernetes.core.k8s:
src: /opt/metacluster/cluster-api/cni-calico/{{ components.clusterapi.workload.version.calico }}/calico.yaml
state: present
wait: true
kubeconfig: "{{ capi_kubeconfig.path }}"
# TODO: move to git repo

View File

@ -0,0 +1,105 @@
- name: Aggregate helm charts from filesystem
ansible.builtin.find:
path: /opt/workloadcluster/helm-charts
file_type: directory
recurse: false
register: helm_charts
- name: Create hard-links to populate new git-repository
ansible.builtin.shell:
cmd: >-
cp -lr {{ item.path }}/ /opt/workloadcluster/git-repositories/gitops/charts
loop: "{{ helm_charts.files }}"
loop_control:
label: "{{ item.path | basename }}"
- name: Create subfolders
ansible.builtin.file:
path: /opt/workloadcluster/git-repositories/gitops/values/{{ item.key }}
state: directory
loop: "{{ query('ansible.builtin.dict', downstream_components) }}"
loop_control:
label: "{{ item.key }}"
- name: Write chart values to file
ansible.builtin.copy:
dest: /opt/workloadcluster/git-repositories/gitops/values/{{ item.key }}/values.yaml
content: "{{ item.value.chart_values | default('# Empty') | to_nice_yaml(indent=2, width=4096) }}"
loop: "{{ query('ansible.builtin.dict', downstream_components) }}"
loop_control:
label: "{{ item.key }}"
- name: Initialize/Push git repository
ansible.builtin.shell:
cmd: |
git init
git config --global user.email "administrator@{{ vapp['metacluster.fqdn'] }}"
git config --global user.name "administrator"
git checkout -b main
git add .
git commit -m "Upload charts"
git remote add origin https://git.{{ vapp['metacluster.fqdn'] }}/wl/GitOps.Config.git
git push https://administrator:{{ vapp['metacluster.password'] | urlencode }}@git.{{ vapp['metacluster.fqdn'] }}/wl/GitOps.Config.git --all
chdir: /opt/workloadcluster/git-repositories/gitops
- name: Retrieve workload-cluster kubeconfig
kubernetes.core.k8s_info:
kind: Secret
name: "{{ vapp['workloadcluster.name'] }}-kubeconfig"
namespace: default
kubeconfig: "{{ kubeconfig.path }}"
register: secret_workloadcluster_kubeconfig
- name: Register workload-cluster in argo-cd
kubernetes.core.k8s:
template: cluster.j2
state: present
kubeconfig: "{{ kubeconfig.path }}"
vars:
_template:
cluster:
name: "{{ vapp['workloadcluster.name'] | lower }}"
secret: argocd-cluster-{{ vapp['workloadcluster.name'] | lower }}
url: https://{{ vapp['workloadcluster.vip'] }}:6443
kubeconfig:
ca: "{{ (secret_workloadcluster_kubeconfig.resources[0].data.value | b64decode | from_yaml).clusters[0].cluster['certificate-authority-data'] }}"
certificate: "{{ (secret_workloadcluster_kubeconfig.resources[0].data.value | b64decode | from_yaml).users[0].user['client-certificate-data'] }}"
key: "{{ (secret_workloadcluster_kubeconfig.resources[0].data.value | b64decode | from_yaml).users[0].user['client-key-data'] }}"
- name: Configure workload-cluster GitOps repository
ansible.builtin.template:
src: gitrepo.j2
dest: /var/lib/rancher/k3s/server/manifests/{{ _template.name }}-manifest.yaml
owner: root
group: root
mode: 0600
vars:
_template:
name: gitrepo-wl-gitopsconfig
namespace: argo-cd
url: https://git.{{ vapp['metacluster.fqdn'] }}/wl/GitOps.Config.git
notify:
- Apply manifests
- name: Create applicationset
ansible.builtin.template:
src: applicationset.j2
dest: /var/lib/rancher/k3s/server/manifests/{{ _template.application.name }}-manifest.yaml
owner: root
group: root
mode: 0600
vars:
_template:
application:
name: applicationset-workloadcluster
namespace: argo-cd
cluster:
url: https://{{ vapp['workloadcluster.vip'] }}:6443
repository:
url: https://git.{{ vapp['metacluster.fqdn'] }}/wl/GitOps.Config.git
revision: main
notify:
- Apply manifests
- name: Trigger handlers
ansible.builtin.meta: flush_handlers

View File

@ -0,0 +1,57 @@
- name: Gather hypervisor details
ansible.builtin.shell:
cmd: govc ls -L {{ item.moref }} | awk -F/ '{print ${{ item.part }}}'
environment:
GOVC_INSECURE: '1'
GOVC_URL: "{{ vapp['hv.fqdn'] }}"
GOVC_USERNAME: "{{ vapp['hv.username'] }}"
GOVC_PASSWORD: "{{ vapp['hv.password'] }}"
register: govc_inventory
loop:
- attribute: cluster
moref: >-
$(govc object.collect -json VirtualMachine:{{ moref_id }} | \
jq -r '.[] | select(.Name == "runtime").Val.Host | .Type + ":" + .Value')
part: (NF-1)
- attribute: datacenter
moref: VirtualMachine:{{ moref_id }}
part: 2
- attribute: datastore
moref: >-
$(govc object.collect -json VirtualMachine:{{ moref_id }} | \
jq -r '.[] | select(.Name == "datastore").Val.ManagedObjectReference | .[].Type + ":" + .[].Value')
part: NF
- attribute: folder
moref: >-
$(govc object.collect -json VirtualMachine:{{ moref_id }} | \
jq -r '.[] | select(.Name == "parent").Val | .Type + ":" + .Value')
part: 0
# - attribute: host
# moref: >-
# $(govc object.collect -json VirtualMachine:{{ moref_id }} | \
# jq -r '.[] | select(.Name == "runtime").Val.Host | .Type + ":" + .Value')
# part: NF
- attribute: network
moref: >-
$(govc object.collect -json VirtualMachine:{{ moref_id }} | \
jq -r '.[] | select(.Name == "network").Val.ManagedObjectReference | .[].Type + ":" + .[].Value')
part: NF
- attribute: resourcepool
moref: >-
$(govc object.collect -json VirtualMachine:{{ moref_id }} | \
jq -r '.[] | select(.Name == "resourcePool").Val | .Type + ":" + .Value')
part: 0
loop_control:
label: "{{ item.attribute }}"
- name: Retrieve hypervisor TLS thumbprint
ansible.builtin.shell:
cmd: openssl s_client -connect {{ vapp['hv.fqdn'] }}:443 < /dev/null 2>/dev/null | openssl x509 -fingerprint -noout -in /dev/stdin | awk -F'=' '{print $2}'
register: tls_thumbprint
- name: Store hypervisor details in dictionary
ansible.builtin.set_fact:
vcenter_info: "{{ vcenter_info | default({}) | combine({ item.item.attribute : item.stdout }) }}"
loop: "{{ govc_inventory.results }}"
loop_control:
label: "{{ item.item.attribute }}"

View File

@ -0,0 +1,11 @@
- import_tasks: hypervisor.yml
- import_tasks: registry.yml
- import_tasks: nodetemplates.yml
- block:
- import_tasks: clusterapi.yml
- import_tasks: gitops.yml
when:
- vapp['deployment.type'] != 'core'

View File

@ -0,0 +1,73 @@
- block:
- name: Check for existing template on hypervisor
community.vmware.vmware_guest_info:
name: "{{ (filename | basename | split('.'))[:-1] | join('.') }}"
register: existing_ova
ignore_errors: yes
- name: Store inventory path of existing template
ansible.builtin.set_fact:
nodetemplate_inventorypath: "{{ existing_ova.instance.hw_folder ~ '/' ~ existing_ova.instance.hw_name }}"
when: existing_ova is not failed
- block:
- name: Parse OVA file for network mappings
ansible.builtin.shell:
cmd: govc import.spec -json {{ filename }}
environment:
GOVC_INSECURE: '1'
GOVC_URL: "{{ vapp['hv.fqdn'] }}"
GOVC_USERNAME: "{{ vapp['hv.username'] }}"
GOVC_PASSWORD: "{{ vapp['hv.password'] }}"
register: ova_spec
- name: Deploy OVA template on hypervisor
community.vmware.vmware_deploy_ovf:
cluster: "{{ vcenter_info.cluster }}"
datastore: "{{ vcenter_info.datastore }}"
name: "{{ (filename | basename | split('.'))[:-1] | join('.') }}"
networks: "{u'{{ ova_spec.stdout | from_json | json_query('NetworkMapping[0].Name') }}':u'{{ vcenter_info.network }}'}"
allow_duplicates: no
power_on: false
ovf: "{{ filename }}"
register: ova_deploy
- name: Add additional placeholder disk
community.vmware.vmware_guest_disk:
name: "{{ ova_deploy.instance.hw_name }}"
disk:
- size: 1Mb
scsi_controller: 1
scsi_type: paravirtual
unit_number: 0
# Disabled to allow disks to be resized; at the cost of cloning speed
# - name: Create snapshot on deployed VM
# community.vmware.vmware_guest_snapshot:
# name: "{{ ova_deploy.instance.hw_name }}"
# state: present
# snapshot_name: "{{ ansible_date_time.iso8601_basic_short }}-base"
- name: Mark deployed VM as templates
community.vmware.vmware_guest:
name: "{{ ova_deploy.instance.hw_name }}"
is_template: yes
- name: Store inventory path of deployed template
ansible.builtin.set_fact:
nodetemplate_inventorypath: "{{ ova_deploy.instance.hw_folder ~ '/' ~ ova_deploy.instance.hw_name }}"
when: existing_ova is failed
vars:
filename: "{{ query('ansible.builtin.fileglob', '/opt/workloadcluster/node-templates/*.ova') | first }}"
module_defaults:
group/vmware:
hostname: "{{ vapp['hv.fqdn'] }}"
validate_certs: no
username: "{{ vapp['hv.username'] }}"
password: "{{ vapp['hv.password'] }}"
datacenter: "{{ vcenter_info.datacenter }}"
folder: "{{ vcenter_info.folder }}"

View File

@ -0,0 +1,40 @@
- block:
- name: Create dedicated kubeadm project within container registry
ansible.builtin.uri:
url: https://registry.{{ vapp['metacluster.fqdn'] }}/api/v2.0/projects
method: POST
headers:
Authorization: "Basic {{ ('admin:' ~ vapp['metacluster.password']) | b64encode }}"
body:
project_name: kubeadm
public: true
storage_limit: 0
metadata:
enable_content_trust: 'false'
enable_content_trust_cosign: 'false'
auto_scan: 'true'
severity: none
prevent_vul: 'false'
public: 'true'
reuse_sys_cve_allowlist: 'true'
- name: Lookup kubeadm container images
ansible.builtin.set_fact:
kubeadm_images: "{{ lookup('ansible.builtin.file', '/opt/metacluster/cluster-api/imagelist').splitlines() }}"
- name: Copy kubeadm container images to dedicated project
ansible.builtin.uri:
url: https://registry.{{ vapp['metacluster.fqdn'] }}/api/v2.0/projects/kubeadm/repositories/{{ ( item | regex_findall('([^:/]+)') )[-2] }}/artifacts?from=library/{{ item | replace('/', '%2F') | replace(':', '%3A') }}
method: POST
headers:
Authorization: "Basic {{ ('admin:' ~ vapp['metacluster.password']) | b64encode }}"
body:
from: "{{ item }}"
loop: "{{ kubeadm_images }}"
module_defaults:
ansible.builtin.uri:
validate_certs: no
status_code: [200, 201, 409]
body_format: json

View File

@ -0,0 +1,16 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: {{ _template.application.name }}
namespace: {{ _template.application.namespace }}
spec:
destination:
namespace: {{ _template.cluster.namespace }}
server: {{ _template.cluster.name }}
project: default
source:
repoURL: {{ _template.repository.url }}
path: {{ _template.repository.path }}
targetRevision: {{ _template.repository.revision }}
syncPolicy:
automated: {}

View File

@ -0,0 +1,33 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: {{ _template.application.name }}
namespace: {{ _template.application.namespace }}
spec:
generators:
- git:
repoURL: {{ _template.repository.url }}
revision: {{ _template.repository.revision }}
directories:
- path: charts/*/*
template:
metadata:
name: application-{% raw %}{{ path.basename }}{% endraw +%}
spec:
project: default
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
sources:
- repoURL: {{ _template.repository.url }}
targetRevision: {{ _template.repository.revision }}
path: {% raw %}'{{ path }}'{% endraw +%}
helm:
valueFiles:
- /values/{% raw %}{{ path.basename }}{% endraw %}/values.yaml
destination:
server: {{ _template.cluster.url }}
namespace: {% raw %}'{{ path[1] }}'{% endraw +%}

View File

@ -0,0 +1,20 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ _template.cluster.secret }}
namespace: argo-cd
labels:
argocd.argoproj.io/secret-type: cluster
type: Opaque
stringData:
name: {{ _template.cluster.name }}
server: {{ _template.cluster.url }}
config: |
{
"tlsClientConfig": {
"insecure": false,
"caData": "{{ _template.kubeconfig.ca }}",
"certData": "{{ _template.kubeconfig.certificate }}",
"keyData": "{{ _template.kubeconfig.key }}"
}
}

View File

@ -0,0 +1,42 @@
providers:
- name: "kubeadm"
url: "/opt/metacluster/cluster-api/bootstrap-kubeadm/{{ _template.version.base }}/bootstrap-components.yaml"
type: "BootstrapProvider"
- name: "cluster-api"
url: "/opt/metacluster/cluster-api/cluster-api/{{ _template.version.base }}/core-components.yaml"
type: "CoreProvider"
- name: "kubeadm"
url: "/opt/metacluster/cluster-api/control-plane-kubeadm/{{ _template.version.base }}/control-plane-components.yaml"
type: "ControlPlaneProvider"
- name: "vsphere"
url: "/opt/metacluster/cluster-api/infrastructure-vsphere/{{ _template.version.infrastructure_vsphere }}/infrastructure-components.yaml"
type: "InfrastructureProvider"
- name: "in-cluster"
url: "/opt/metacluster/cluster-api/ipam-in-cluster/{{ _template.version.ipam_incluster }}/ipam-components.yaml"
type: "IPAMProvider"
cert-manager:
url: "/opt/metacluster/cluster-api/cert-manager/{{ _template.version.cert_manager }}/cert-manager.yaml"
version: "{{ _template.version.cert_manager }}"
## -- Controller settings -- ##
VSPHERE_SERVER: "{{ _template.hv.fqdn }}"
VSPHERE_TLS_THUMBPRINT: "{{ _template.hv.tlsthumbprint }}"
VSPHERE_USERNAME: "{{ _template.hv.username }}"
VSPHERE_PASSWORD: "{{ _template.hv.password }}"
## -- Required workload cluster default settings -- ##
VSPHERE_DATACENTER: "{{ _template.hv.datacenter }}"
VSPHERE_DATASTORE: "{{ _template.hv.datastore }}"
VSPHERE_STORAGE_POLICY: ""
VSPHERE_NETWORK: "{{ _template.hv.network }}"
VSPHERE_RESOURCE_POOL: "{{ _template.hv.resourcepool }}"
VSPHERE_FOLDER: "{{ _template.hv.folder }}"
VSPHERE_TEMPLATE: "{{ _template.cluster.nodetemplate }}"
VSPHERE_SSH_AUTHORIZED_KEY: "{{ _template.cluster.publickey }}"
KUBERNETES_VERSION: "{{ _template.cluster.version }}"
CONTROL_PLANE_ENDPOINT_IP: "{{ _template.cluster.vip }}"
VIP_NETWORK_INTERFACE: ""
EXP_CLUSTER_RESOURCE_SET: "true"

View File

@ -0,0 +1,14 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ _template.name }}
namespace: {{ _template.namespace }}
annotations:
{{ _template.annotations }}
labels:
{{ _template.labels }}
data:
{% for kv_pair in _template.data %}
"{{ kv_pair.key }}": |
{{ kv_pair.value | indent(width=4, first=True) }}
{% endfor %}

View File

@ -0,0 +1,9 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ _template.name }}
namespace: {{ _template.namespace }}
labels:
argocd.argoproj.io/secret-type: repository
stringData:
url: {{ _template.url }}

View File

@ -0,0 +1,7 @@
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: {{ _template.name }}
namespace: {{ _template.namespace }}
spec:
{{ _template.config }}

View File

@ -0,0 +1,7 @@
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRouteTCP
metadata:
name: {{ _template.name }}
namespace: {{ _template.namespace }}
spec:
{{ _template.config }}

View File

@ -0,0 +1,10 @@
apiVersion: ipam.cluster.x-k8s.io/v1alpha1
kind: InClusterIPPool
metadata:
name: inclusterippool-{{ _template.cluster.name }}
namespace: {{ _template.cluster.namespace }}
spec:
start: {{ _template.cluster.network.startip }}
end: {{ _template.cluster.network.endip }}
prefix: {{ _template.cluster.network.prefix }}
gateway: {{ _template.cluster.network.gateway }}

View File

@ -0,0 +1,256 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- cluster-template.yaml
patchesStrategicMerge:
- |-
apiVersion: v1
kind: Secret
metadata:
name: csi-vsphere-config
namespace: '${NAMESPACE}'
stringData:
data: |
apiVersion: v1
kind: Secret
metadata:
name: csi-vsphere-config
namespace: kube-system
stringData:
csi-vsphere.conf: |+
[Global]
insecure-flag = true
thumbprint = "${VSPHERE_TLS_THUMBPRINT}"
cluster-id = "${NAMESPACE}/${CLUSTER_NAME}"
[VirtualCenter "${VSPHERE_SERVER}"]
user = "${VSPHERE_USERNAME}"
password = "${VSPHERE_PASSWORD}"
datacenters = "${VSPHERE_DATACENTER}"
[Network]
public-network = "${VSPHERE_NETWORK}"
type: Opaque
- |-
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
kind: KubeadmControlPlane
metadata:
name: '${CLUSTER_NAME}'
namespace: '${NAMESPACE}'
spec:
kubeadmConfigSpec:
clusterConfiguration:
imageRepository: registry.{{ _template.network.fqdn }}/kubeadm
- |-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: KubeadmConfigTemplate
metadata:
name: '${CLUSTER_NAME}-md-0'
namespace: '${NAMESPACE}'
spec:
template:
spec:
clusterConfiguration:
imageRepository: registry.{{ _template.network.fqdn }}/kubeadm
- |-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: KubeadmConfigTemplate
metadata:
name: '${CLUSTER_NAME}-md-0'
namespace: '${NAMESPACE}'
spec:
template:
spec:
files:
- content: |
[plugins."io.containerd.grpc.v1.cri".registry]
config_path = "/etc/containerd/certs.d"
append: true
path: /etc/containerd/config.toml
{% for registry in _template.registries %}
- content: |
server = "https://{{ registry }}"
[host."https://registry.{{ _template.network.fqdn }}/v2/library/{{ registry }}"]
capabilities = ["pull", "resolve"]
override_path = true
owner: root:root
path: /etc/containerd/certs.d/{{ registry }}/hosts.toml
{% endfor %}
- content: |
network: {config: disabled}
owner: root:root
path: /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
- content: |
{{ _template.rootca | indent(width=14, first=False) | trim }}
owner: root:root
path: /usr/local/share/ca-certificates/root_ca.crt
- |-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: VSphereMachineTemplate
metadata:
name: ${CLUSTER_NAME}
namespace: '${NAMESPACE}'
spec:
template:
spec:
network:
devices:
- dhcp4: false
addressesFromPools:
- apiGroup: ipam.cluster.x-k8s.io
kind: InClusterIPPool
name: inclusterippool-${CLUSTER_NAME}
nameservers:
- {{ _template.network.dnsserver }}
networkName: '${VSPHERE_NETWORK}'
- |-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: VSphereMachineTemplate
metadata:
name: ${CLUSTER_NAME}-worker
namespace: '${NAMESPACE}'
spec:
template:
spec:
network:
devices:
- dhcp4: false
addressesFromPools:
- apiGroup: ipam.cluster.x-k8s.io
kind: InClusterIPPool
name: inclusterippool-${CLUSTER_NAME}
nameservers:
- {{ _template.network.dnsserver }}
networkName: '${VSPHERE_NETWORK}'
patchesJson6902:
- target:
group: controlplane.cluster.x-k8s.io
version: v1beta1
kind: KubeadmControlPlane
name: .*
patch: |-
- op: add
path: /spec/kubeadmConfigSpec/files/-
value:
content: |
[plugins."io.containerd.grpc.v1.cri".registry]
config_path = "/etc/containerd/certs.d"
append: true
path: /etc/containerd/config.toml
{% for registry in _template.registries %}
- op: add
path: /spec/kubeadmConfigSpec/files/-
value:
content: |
server = "https://{{ registry }}"
[host."https://registry.{{ _template.network.fqdn }}/v2/library/{{ registry }}"]
capabilities = ["pull", "resolve"]
override_path = true
owner: root:root
path: /etc/containerd/certs.d/{{ registry }}/hosts.toml
{% endfor %}
- op: add
path: /spec/kubeadmConfigSpec/files/-
value:
content: |
network: {config: disabled}
owner: root:root
path: /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
- op: add
path: /spec/kubeadmConfigSpec/files/-
value:
content: |
{{ _template.rootca | indent(width=12, first=False) | trim }}
owner: root:root
path: /usr/local/share/ca-certificates/root_ca.crt
- target:
group: bootstrap.cluster.x-k8s.io
version: v1beta1
kind: KubeadmConfigTemplate
name: .*
patch: |-
{% for cmd in _template.runcmds %}
- op: add
path: /spec/template/spec/preKubeadmCommands/-
value: {{ cmd }}
{% endfor %}
- target:
group: controlplane.cluster.x-k8s.io
version: v1beta1
kind: KubeadmControlPlane
name: .*
patch: |-
{% for cmd in _template.runcmds %}
- op: add
path: /spec/kubeadmConfigSpec/preKubeadmCommands/-
value: {{ cmd }}
{% endfor %}
- target:
group: infrastructure.cluster.x-k8s.io
version: v1beta1
kind: VSphereMachineTemplate
name: \${CLUSTER_NAME}
patch: |-
- op: replace
path: /metadata/name
value: ${CLUSTER_NAME}-master
- target:
group: controlplane.cluster.x-k8s.io
version: v1beta1
kind: KubeadmControlPlane
name: \${CLUSTER_NAME}
patch: |-
- op: replace
path: /metadata/name
value: ${CLUSTER_NAME}-master
- op: replace
path: /spec/machineTemplate/infrastructureRef/name
value: ${CLUSTER_NAME}-master
- target:
group: cluster.x-k8s.io
version: v1beta1
kind: Cluster
name: \${CLUSTER_NAME}
patch: |-
- op: replace
path: /spec/controlPlaneRef/name
value: ${CLUSTER_NAME}-master
- target:
group: infrastructure.cluster.x-k8s.io
version: v1beta1
kind: VSphereMachineTemplate
name: \${CLUSTER_NAME}-worker
patch: |-
- op: replace
path: /spec/template/spec/numCPUs
value: {{ _template.nodesize.cpu }}
- op: replace
path: /spec/template/spec/memoryMiB
value: {{ _template.nodesize.memory }}
- target:
group: cluster.x-k8s.io
version: v1beta1
kind: MachineDeployment
name: \${CLUSTER_NAME}-md-0
patch: |-
- op: replace
path: /metadata/name
value: ${CLUSTER_NAME}-worker
- op: replace
path: /spec/template/spec/bootstrap/configRef/name
value: ${CLUSTER_NAME}-worker
- target:
group: bootstrap.cluster.x-k8s.io
version: v1beta1
kind: KubeadmConfigTemplate
name: \${CLUSTER_NAME}-md-0
patch: |-
- op: replace
path: /metadata/name
value: ${CLUSTER_NAME}-worker

View File

@ -0,0 +1,84 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- manifests/kubeadmconfigtemplate-{{ _template.cluster.name }}-worker.yaml
- manifests/machinedeployment-{{ _template.cluster.name }}-worker.yaml
- manifests/vspheremachinetemplate-{{ _template.cluster.name }}-worker.yaml
patchesStrategicMerge:
- |-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: KubeadmConfigTemplate
metadata:
name: {{ _template.cluster.name }}-worker
namespace: default
spec:
template:
spec:
diskSetup:
filesystems:
- device: /dev/sdb1
filesystem: ext4
label: blockstorage
partitions:
- device: /dev/sdb
layout: true
tableType: gpt
joinConfiguration:
nodeRegistration:
kubeletExtraArgs:
node-labels: "node.longhorn.io/create-default-disk=true"
mounts:
- - LABEL=blockstorage
- /mnt/blockstorage
- |-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: VSphereMachineTemplate
metadata:
name: {{ _template.cluster.name }}-worker
namespace: default
spec:
template:
spec:
additionalDisksGiB:
- {{ _template.nodepool.additionaldisk }}
patchesJson6902:
- target:
group: bootstrap.cluster.x-k8s.io
version: v1beta1
kind: KubeadmConfigTemplate
name: {{ _template.cluster.name }}-worker
patch: |-
- op: replace
path: /metadata/name
value: {{ _template.cluster.name }}-worker-storage
- target:
group: cluster.x-k8s.io
version: v1beta1
kind: MachineDeployment
name: {{ _template.cluster.name }}-worker
patch: |-
- op: replace
path: /metadata/name
value: {{ _template.cluster.name }}-worker-storage
- op: replace
path: /spec/template/spec/bootstrap/configRef/name
value: {{ _template.cluster.name }}-worker-storage
- op: replace
path: /spec/template/spec/infrastructureRef/name
value: {{ _template.cluster.name }}-worker-storage
- op: replace
path: /spec/replicas
value: {{ _template.nodepool.size }}
- target:
group: infrastructure.cluster.x-k8s.io
version: v1beta1
kind: VSphereMachineTemplate
name: {{ _template.cluster.name }}-worker
patch: |-
- op: replace
path: /metadata/name
value: {{ _template.cluster.name }}-worker-storage

View File

@ -0,0 +1,9 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ _template.name }}
namespace: {{ _template.namespace }}
data:
{% for kv_pair in _template.data %}
"{{ kv_pair.key }}": {{ kv_pair.value }}
{% endfor %}

View File

@ -0,0 +1,4 @@
- name: Disable crontab job
ansible.builtin.cron:
name: firstboot
state: absent

View File

@ -0,0 +1,12 @@
- import_tasks: service.yml
- import_tasks: cron.yml
- name: Cleanup tempfile
ansible.builtin.file:
path: "{{ kubeconfig.path }}"
state: absent
when: kubeconfig.path is defined
# - name: Reboot host
# ansible.builtin.shell:
# cmd: systemctl reboot

View File

@ -0,0 +1,30 @@
- name: Create tarball compression service
ansible.builtin.template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
owner: root
group: root
mode: "{{ item.mode | default(omit) }}"
vars:
_template:
service:
name: compressTarballs
executable: /opt/firstboot/compresstarballs.sh
workingdir: /opt/metacluster/container-images/
loop:
- src: compresstarballs.j2
dest: "{{ _template.service.executable }}"
mode: o+x
- src: systemdunit.j2
dest: /etc/systemd/system/{{ _template.service.name }}.service
loop_control:
label: "{{ item.src }}"
- name: Enable/Start services
ansible.builtin.systemd:
name: "{{ item }}"
enabled: yes
state: started
loop:
- compressTarballs
- ttyConsoleMessage

View File

@ -0,0 +1,40 @@
- name: Create volume group
community.general.lvg:
vg: longhorn_vg
pvs:
- /dev/sdb
pvresize: yes
- name: Create logical volume
community.general.lvol:
vg: longhorn_vg
lv: longhorn_lv
size: 100%VG
- name: Store begin timestamp
ansible.builtin.set_fact:
start_time: "{{ lookup('pipe', 'date +%s') }}"
- name: Create filesystem
community.general.filesystem:
dev: /dev/mapper/longhorn_vg-longhorn_lv
fstype: ext4
- name: Store end timestamp
ansible.builtin.set_fact:
end_time: "{{ lookup('pipe', 'date +%s') }}"
- name: Calculate crude storage benchmark
ansible.builtin.set_fact:
storage_benchmark: "{{ [storage_benchmark, (end_time | int - start_time | int)] | max }}"
- name: Log benchmark actual duration
ansible.builtin.debug:
msg: "Benchmark actual duration: {{ (end_time | int - start_time | int) }} second(s)"
- name: Mount dynamic disk
ansible.posix.mount:
path: /mnt/blockstorage
src: /dev/mapper/longhorn_vg-longhorn_lv
fstype: ext4
state: mounted

View File

@ -0,0 +1,12 @@
- name: Import container images
ansible.builtin.command:
cmd: k3s ctr image import {{ item }} --digests
chdir: /opt/metacluster/container-images
register: import_result
loop: "{{ query('ansible.builtin.fileglob', '/opt/metacluster/container-images/*.tar') | sort }}"
loop_control:
label: "{{ item | basename }}"
# Probably should add a task before that ensures K3s node is fully initialized before starting imports; currently K3s goes away briefly during this loop
retries: "{{ playbook.retries }}"
delay: "{{ ((storage_benchmark | float) * playbook.delay.short) | int }}"
until: import_result is not failed

View File

@ -0,0 +1,19 @@
- name: Set hostname
ansible.builtin.hostname:
name: "{{ vapp['guestinfo.hostname'] }}"
- name: Create netplan configuration file
ansible.builtin.template:
src: netplan.j2
dest: /etc/netplan/00-installer-config.yaml
vars:
_template:
macaddress: "{{ ansible_facts.default_ipv4.macaddress }}"
ipaddress: "{{ vapp['guestinfo.ipaddress'] }}"
prefixlength: "{{ vapp['guestinfo.prefixlength'] }}"
gateway: "{{ vapp['guestinfo.gateway'] }}"
dnsserver: "{{ vapp['guestinfo.dnsserver'] }}"
- name: Apply netplan configuration
ansible.builtin.shell:
cmd: /usr/sbin/netplan apply

View File

@ -0,0 +1,13 @@
network:
version: 2
ethernets:
id0:
set-name: eth0
match:
macaddress: {{ _template.macaddress }}
addresses:
- {{ _template.ipaddress }}/{{ _template.prefixlength }}
gateway4: {{ _template.gateway }}
nameservers:
addresses:
- {{ _template.dnsserver }}

View File

@ -0,0 +1,2 @@
- import_tasks: vapp.yml
- import_tasks: vcenter.yml

View File

@ -0,0 +1,16 @@
- block:
- name: Check for vCenter connectivity
community.vmware.vmware_vcenter_settings_info:
schema: vsphere
register: vcenter_info
retries: "{{ playbook.retries }}"
delay: "{{ ((storage_benchmark | float) * playbook.delay.short) | int }}"
until: vcenter_info is not failed
module_defaults:
group/vmware:
hostname: "{{ vapp['hv.fqdn'] }}"
validate_certs: no
username: "{{ vapp['hv.username'] }}"
password: "{{ vapp['hv.password'] }}"

View File

@ -0,0 +1,50 @@
- name: Create folder structure(s)
ansible.builtin.file:
path: "{{ item }}"
state: directory
loop:
- /opt/firstboot
- name: Create tty console message service
ansible.builtin.template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
owner: root
group: root
mode: "{{ item.mode | default(omit) }}"
vars:
_template:
service:
name: ttyConsoleMessage
executable: /opt/firstboot/tty.sh
workingdir: /tmp/
metacluster:
components:
- name: ArgoCD
url: https://gitops.${FQDN}
healthcheck: https://gitops.${FQDN}
- name: Gitea
url: https://git.${FQDN}
healthcheck: https://git.${FQDN}
- name: Harbor
url: https://registry.${FQDN}
healthcheck: https://registry.${FQDN}
- name: Longhorn
url: https://storage.${FQDN}
healthcheck: https://storage.${FQDN}
- name: StepCA
url: ''
healthcheck: https://ca.${FQDN}/health
- name: Traefik
url: https://ingress.${FQDN}
healthcheck: https://ingress.${FQDN}
fqdn: "{{ vapp['metacluster.fqdn'] }}"
vip: "{{ vapp['metacluster.vip'] }}"
loop:
- src: tty.j2
dest: "{{ _template.service.executable }}"
mode: o+x
- src: systemdunit.j2
dest: /etc/systemd/system/{{ _template.service.name }}.service
loop_control:
label: "{{ item.src }}"

View File

@ -0,0 +1,39 @@
- name: Set root password
ansible.builtin.user:
name: root
password: "{{ vapp['metacluster.password'] | password_hash('sha512', 65534 | random(seed=vapp['guestinfo.hostname']) | string) }}"
generate_ssh_key: yes
ssh_key_bits: 2048
ssh_key_file: .ssh/id_rsa
- name: Save root SSH publickey
ansible.builtin.lineinfile:
path: /root/.ssh/authorized_keys
line: "{{ vapp['guestinfo.rootsshkey'] }}"
- name: Disable SSH password authentication
ansible.builtin.lineinfile:
path: /etc/ssh/sshd_config
regex: "{{ item.regex }}"
line: "{{ item.line }}"
state: "{{ item.state }}"
loop:
- regex: '^#PasswordAuthentication'
line: 'PasswordAuthentication no'
state: present
- regex: '^PasswordAuthentication yes'
line: 'PasswordAuthentication yes'
state: absent
loop_control:
label: "{{ '[' ~ item.regex ~ '] ' ~ item.state }}"
- name: Create dedicated SSH keypair
community.crypto.openssh_keypair:
path: /root/.ssh/git_rsa_id
register: gitops_sshkey
- name: Delete 'ubuntu' user
ansible.builtin.user:
name: ubuntu
state: absent
remove: yes

View File

@ -0,0 +1,38 @@
- name: Store current ovfEnvironment
ansible.builtin.shell:
cmd: /usr/bin/vmtoolsd --cmd "info-get guestinfo.ovfEnv"
register: ovfenv
- name: Parse XML for MoRef ID
community.general.xml:
xmlstring: "{{ ovfenv.stdout }}"
namespaces:
ns: http://schemas.dmtf.org/ovf/environment/1
ve: http://www.vmware.com/schema/ovfenv
xpath: /ns:Environment
content: attribute
register: environment_attribute
- name: Store MoRef ID
ansible.builtin.set_fact:
moref_id: "{{ ((environment_attribute.matches[0].values() | list)[0].values() | list)[1] }}"
- name: Parse XML for vApp properties
community.general.xml:
xmlstring: "{{ ovfenv.stdout }}"
namespaces:
ns: http://schemas.dmtf.org/ovf/environment/1
xpath: /ns:Environment/ns:PropertySection/ns:Property
content: attribute
register: property_section
- name: Assign vApp properties to dictionary
ansible.builtin.set_fact:
vapp: >-
{{ vapp | default({}) | combine({
((item.values() | list)[0].values() | list)[0]:
((item.values() | list)[0].values() | list)[1]})
}}
loop: "{{ property_section.matches }}"
loop_control:
label: "{{ ((item.values() | list)[0].values() | list)[0] }}"

View File

@ -0,0 +1,10 @@
#!/bin/bash
# Change working directory
pushd {{ _template.service.workingdir }}
# Compress *.tar files
if tar -czf image-tarballs.tgz *.tar --remove-files; then
# Disable systemd unit
systemctl disable {{ _template.service.name }}
fi

View File

@ -0,0 +1,8 @@
mirrors:
{% for registry in _template.registries %}
{{ registry }}:
endpoint:
- https://registry.{{ _template.hv.fqdn }}
rewrite:
"(.*)": "library/{{ registry }}/$1"
{% endfor %}

View File

@ -0,0 +1,9 @@
[Unit]
Description={{ _template.service.name }}
[Service]
ExecStart={{ _template.service.executable }}
Nice=10
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,50 @@
#!/bin/bash
export TERM=linux
BGRN='\033[1;92m'
BGRY='\033[1;30m'
BBLU='\033[1;34m'
BRED='\033[1;91m'
BWHI='\033[1;97m'
CBLA='\033[?16;0;30c' # Hide blinking cursor
DFLT='\033[0m' # Reset colour
LCLR='\033[K' # Clear to end of line
PRST='\033[0;0H' # Reset cursor position
FQDN='{{ _template.metacluster.fqdn }}'
IPADDRESS='{{ _template.metacluster.vip }}'
declare -A COMPONENTS
{% for component in _template.metacluster.components %}
COMPONENTS["{{ component.name }}\t({{ component.url }})"]="{{ component.healthcheck }}"
{% endfor %}
I=0
while /bin/true; do
if [[ $I -gt 59 ]]; then
clear > /dev/tty1
I=0
else
I=$(( $I + 1 ))
fi
echo -e "${PRST}" > /dev/tty1
echo -e "\n\n\t${DFLT}To manage this appliance, please connect to one of the following:${LCLR}\n" > /dev/tty1
for c in $( echo "${!COMPONENTS[@]}" | tr ' ' $'\n' | sort); do
STATUS=$(curl -kLs "${COMPONENTS[${c}]}" -o /dev/null -w '%{http_code}')
if [[ "${STATUS}" -eq "200" ]]; then
echo -e "\t [${BGRN}+${DFLT}] ${BBLU}${c}${DFLT}${LCLR}" > /dev/tty1
else
echo -e "\t [${BRED}-${DFLT}] ${BBLU}${c}${DFLT}${LCLR}" > /dev/tty1
fi
done
echo -e "\n\t${BGRY}Note that your DNS zone ${DFLT}must have${BGRY} respective records defined,\n\teach pointing to: ${DFLT}${IPADDRESS}${LCLR}" > /dev/tty1
echo -e "${CBLA}" > /dev/tty1
sleep 1
done

View File

@ -0,0 +1,23 @@
playbook:
retries: 10
delay:
# These values are multiplied with the value of `storage_benchmark`
long: 2
medium: 1
short: 0.5
# This default value is updated during the playbook, based on an I/O intensive operation
storage_benchmark: 30
config:
clusterapi:
size_matrix:
small:
cpu: 2
memory: 6144
medium:
cpu: 4
memory: 8192
large:
cpu: 8
memory: 16384

View File

@ -0,0 +1,27 @@
---
- hosts: 127.0.0.1
connection: local
gather_facts: true
vars_files:
- defaults.yml
- metacluster.yml
# become: true
roles:
- vapp
- network
- preflight
- users
- disks
- metacluster
- workloadcluster
- decommission
- tty
- cleanup
handlers:
- name: Apply manifests
kubernetes.core.k8s:
src: "{{ item }}"
state: present
kubeconfig: "{{ kubeconfig.path }}"
loop: "{{ query('ansible.builtin.fileglob', '/var/lib/rancher/k3s/server/manifests/*.yaml') | sort }}"
ignore_errors: yes

View File

@ -0,0 +1,35 @@
- name: Cordon node
kubernetes.core.k8s_drain:
name: "{{ decom_nodename }}"
state: cordon
kubeconfig: "{{ kubeconfig.path }}"
- name: Drain node
# Currently does not work; returns with error "Failed to delete pod [...] due to: Too Many Requests"
# See also: https://github.com/ansible-collections/kubernetes.core/issues/474
# kubernetes.core.k8s_drain:
# name: "{{ decom_nodename }}"
# state: drain
# delete_options:
# ignore_daemonsets: true
# delete_emptydir_data: true
# kubeconfig: "{{ kubeconfig.path }}"
ansible.builtin.shell:
cmd: >-
kubectl drain {{ decom_nodename }} \
--delete-emptydir-data \
--ignore-daemonsets
register: nodedrain_results
until:
- nodedrain_results is not failed
- (nodedrain_results.stdout_lines | last) is match('node/.* drained')
retries: "{{ playbook.retries }}"
delay: "{{ ((storage_benchmark | float) * playbook.delay.short) | int }}"
- name: Delete node
kubernetes.core.k8s:
name: "{{ decom_nodename }}"
kind: node
state: absent
wait: true
kubeconfig: "{{ kubeconfig.path }}"

View File

@ -0,0 +1,18 @@
- name: Lookup node name and moref-id for decommissioning
ansible.builtin.set_fact:
decom_nodename: >-
{{
lookup('kubernetes.core.k8s', kind='Node', kubeconfig=(kubeconfig.path)) |
json_query('[? metadata.name != `' ~ ansible_facts.nodename ~ '`].metadata.name') |
first
}}
decom_morefid: >-
{{
lookup('kubernetes.core.k8s', kind='Node', kubeconfig=(kubeconfig.path)) |
json_query('[? metadata.name != `' ~ ansible_facts.nodename ~ '`].metadata.labels."ova.airgappedk8s/moref_id"') |
first
}}
- import_tasks: storage.yml
- import_tasks: k3s.yml
- import_tasks: virtualmachine.yml

View File

@ -0,0 +1,27 @@
- name: Disable disk scheduling and evict replicas
kubernetes.core.k8s:
api_version: longhorn.io/v1beta2
kind: lhn
name: "{{ decom_nodename }}"
namespace: longhorn-system
state: patched
definition: |
spec:
allowScheduling: false
evictionRequested: true
kubeconfig: "{{ kubeconfig.path }}"
- name: Reduce replica amount for each volume
kubernetes.core.k8s:
api_version: longhorn.io/v1beta2
kind: volume
name: "{{ item.metadata.name }}"
namespace: longhorn-system
state: patched
definition: |
spec:
numberOfReplicas: {{ (lookup('kubernetes.core.k8s', kind='node', kubeconfig=(kubeconfig.path)) | length | int) - 1 }}
kubeconfig: "{{ kubeconfig.path }}"
loop: "{{ query('kubernetes.core.k8s', api_version='longhorn.io/v1beta2', kind='volume', namespace='longhorn-system', kubeconfig=(kubeconfig.path)) }}"
loop_control:
label: "{{ item.metadata.name }}"

View File

@ -0,0 +1,26 @@
- block:
- name: Lookup VM name
community.vmware.vmware_guest_info:
moid: "{{ decom_morefid }}"
register: virtualmachine_details
- name: Power off VM
community.vmware.vmware_guest:
name: "{{ virtualmachine_details.instance.hw_name }}"
folder: "{{ virtualmachine_details.instance.hw_folder }}"
state: poweredoff
# - name: Delete VM
# community.vmware.vmware_guest:
# name: "{{ virtualmachine_details.hw_name }}"
# folder: "{{ virtualmachine_details.hw_folder }}"
# state: absent
module_defaults:
group/vmware:
hostname: "{{ vapp['hv.fqdn'] }}"
validate_certs: no
username: "{{ vapp['hv.username'] }}"
password: "{{ vapp['hv.password'] }}"
datacenter: "{{ vcenter_info.datacenter }}"

View File

@ -0,0 +1,52 @@
- block:
- name: Initialize tempfile
ansible.builtin.tempfile:
state: file
register: values_file
- name: Lookup current chart values
kubernetes.core.helm_info:
name: step-certificates
namespace: step-ca
kubeconfig: "{{ kubeconfig.path }}"
register: stepca_values
- name: Write chart values w/ password to tempfile
ansible.builtin.copy:
dest: "{{ values_file.path }}"
content: "{{ stepca_values.status | json_query('values') | to_yaml }}"
no_log: true
- name: Upgrade step-ca chart
kubernetes.core.helm:
name: step-certificates
chart_ref: /opt/metacluster/helm-charts/step-certificates
release_namespace: step-ca
wait: false
kubeconfig: "{{ kubeconfig.path }}"
values_files:
- "{{ values_file.path }}"
- name: Cleanup tempfile
ansible.builtin.file:
path: "{{ values_file.path }}"
state: absent
when: values_file.path is defined
- name: Ensure step-ca API availability
ansible.builtin.uri:
url: https://ca.{{ vapp['metacluster.fqdn'] }}/health
method: GET
register: api_readycheck
until:
- api_readycheck.json.status is defined
- api_readycheck.json.status == 'ok'
retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
module_defaults:
ansible.builtin.uri:
validate_certs: no
status_code: [200, 201]
body_format: json

View File

@ -0,0 +1,50 @@
- block:
- name: Push images to registry
ansible.builtin.shell:
cmd: >-
skopeo copy \
--insecure-policy \
--dest-tls-verify=false \
--dest-creds admin:{{ vapp['metacluster.password'] }} \
docker-archive:./{{ item | basename }} \
docker://registry.{{ vapp['metacluster.fqdn'] }}/library/$( \
skopeo list-tags \
--insecure-policy \
docker-archive:./{{ item | basename }} | \
jq -r '.Tags[0]')
chdir: /opt/metacluster/container-images/
register: push_result
loop: "{{ query('ansible.builtin.fileglob', '/opt/metacluster/container-images/*.tar') | sort }}"
loop_control:
label: "{{ item | basename }}"
retries: "{{ playbook.retries }}"
delay: "{{ ((storage_benchmark | float) * playbook.delay.short) | int }}"
until: push_result is not failed
- name: Get all stored container images (=artifacts)
ansible.builtin.uri:
url: https://registry.{{ vapp['metacluster.fqdn'] }}/api/v2.0/search?q=library
method: GET
register: registry_artifacts
- name: Get source registries of all artifacts
ansible.builtin.set_fact:
source_registries: "{{ (source_registries | default([]) + [(item | split('/'))[1]]) | unique | sort }}"
loop: "{{ registry_artifacts.json.repository | json_query('[*].repository_name') }}"
- name: Configure K3s node for private registry
ansible.builtin.template:
dest: /etc/rancher/k3s/registries.yaml
src: registries.j2
vars:
_template:
data: "{{ source_registries }}"
hv:
fqdn: "{{ vapp['metacluster.fqdn'] }}"
module_defaults:
ansible.builtin.uri:
validate_certs: no
status_code: [200, 201, 401]
body_format: json

View File

@ -0,0 +1,27 @@
- block:
- name: Upgrade gitea chart
kubernetes.core.helm:
name: gitea
chart_ref: /opt/metacluster/helm-charts/gitea
release_namespace: gitea
wait: false
kubeconfig: "{{ kubeconfig.path }}"
values: "{{ components['gitea'].chart_values }}"
- name: Ensure gitea API availability
ansible.builtin.uri:
url: https://git.{{ vapp['metacluster.fqdn'] }}/api/healthz
method: GET
register: api_readycheck
until:
- api_readycheck.json.status is defined
- api_readycheck.json.status == 'pass'
retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
module_defaults:
ansible.builtin.uri:
validate_certs: no
status_code: [200, 201]
body_format: json

View File

@ -0,0 +1,26 @@
- block:
- name: Upgrade argo-cd chart
kubernetes.core.helm:
name: argo-cd
chart_ref: /opt/metacluster/helm-charts/argo-cd
release_namespace: argo-cd
wait: false
kubeconfig: "{{ kubeconfig.path }}"
values: "{{ components['argo-cd'].chart_values }}"
- name: Ensure argo-cd API availability
ansible.builtin.uri:
url: https://gitops.{{ vapp['metacluster.fqdn'] }}/api/version
method: GET
register: api_readycheck
until:
- api_readycheck.json.Version is defined
retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
module_defaults:
ansible.builtin.uri:
validate_certs: no
status_code: [200, 201]
body_format: json

View File

@ -0,0 +1,35 @@
- name: Configure fallback name resolution
ansible.builtin.lineinfile:
path: /etc/hosts
line: "{{ vapp['metacluster.vip'] }} {{ item ~ '.' ~ vapp['metacluster.fqdn'] }}"
state: present
loop:
# TODO: Make this list dynamic
- ca
- git
- gitops
- ingress
- registry
- storage
- name: Retrieve root CA certificate
ansible.builtin.uri:
url: https://ca.{{ vapp['metacluster.fqdn'] }}/roots
validate_certs: no
method: GET
status_code: [200, 201]
register: rootca_certificate
- name: Store root CA certificate
ansible.builtin.copy:
dest: /usr/local/share/ca-certificates/root_ca.crt
content: "{{ rootca_certificate.json.crts | list | join('\n') }}"
- name: Update certificate truststore
ansible.builtin.command:
cmd: update-ca-certificates
- name: Remove redundant files
ansible.builtin.file:
path: /var/lib/rancher/k3s/server/manifests/traefik-config.yaml
state: absent

View File

@ -0,0 +1,80 @@
- name: Store custom configuration files
ansible.builtin.copy:
dest: "{{ item.filename }}"
content: "{{ item.content }}"
loop:
- filename: /etc/rancher/k3s/config.yaml
content: |
kubelet-arg:
- "config=/etc/rancher/k3s/kubelet.config"
- filename: /etc/rancher/k3s/kubelet.config
content: |
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
shutdownGracePeriod: 180s
shtudownGracePeriodCriticalPods: 60s
loop_control:
label: "{{ item.filename }}"
- name: Gather service facts
ansible.builtin.service_facts:
# Module requires no attributes
- name: Install K3s
ansible.builtin.command:
cmd: ./install.sh
chdir: /opt/metacluster/k3s
environment:
INSTALL_K3S_SKIP_DOWNLOAD: 'true'
# To prevent from overwriting traefik's existing configuration, "disable" it on this new node
INSTALL_K3S_EXEC: "server --token {{ vapp['metacluster.token'] | trim }} --server https://{{ vapp['metacluster.vip'] }}:6443 --disable local-storage,traefik --config /etc/rancher/k3s/config.yaml"
when: ansible_facts.services['k3s.service'] is undefined
- name: Ensure API availability
ansible.builtin.uri:
url: https://{{ vapp['guestinfo.ipaddress'] }}:6443/livez?verbose
method: GET
validate_certs: no
status_code: [200, 401]
register: api_readycheck
until: api_readycheck.json.apiVersion is defined
retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark | int) * (playbook.delay.medium | int) }}"
- name: Install kubectl tab-completion
ansible.builtin.shell:
cmd: kubectl completion bash | tee /etc/bash_completion.d/kubectl
- name: Initialize tempfile
ansible.builtin.tempfile:
state: file
register: kubeconfig
- name: Retrieve kubeconfig
ansible.builtin.command:
cmd: kubectl config view --raw
register: kubectl_config
- name: Store kubeconfig in tempfile
ansible.builtin.copy:
dest: "{{ kubeconfig.path }}"
content: "{{ kubectl_config.stdout }}"
mode: 0600
no_log: true
- name: Add label to node object
kubernetes.core.k8s:
name: "{{ ansible_facts.nodename | lower }}"
kind: Node
state: patched
definition:
metadata:
labels:
ova.airgappedk8s/moref_id: "{{ moref_id }}"
kubeconfig: "{{ kubeconfig.path }}"
register: k8snode_patch
until:
- k8snode_patch.result.metadata.labels['ova.airgappedk8s/moref_id'] is defined
retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark | int) * (playbook.delay.medium | int) }}"

View File

@ -0,0 +1,9 @@
- import_tasks: init.yml
- import_tasks: containerimages.yml
- import_tasks: k3s.yml
- import_tasks: assets.yml
- import_tasks: storage.yml
- import_tasks: registry.yml
- import_tasks: certauthority.yml
- import_tasks: git.yml
- import_tasks: gitops.yml

View File

@ -0,0 +1,27 @@
- block:
- name: Upgrade harbor chart
kubernetes.core.helm:
name: harbor
chart_ref: /opt/metacluster/helm-charts/harbor
release_namespace: harbor
wait: false
kubeconfig: "{{ kubeconfig.path }}"
values: "{{ components['harbor'].chart_values }}"
- name: Ensure harbor API availability
ansible.builtin.uri:
url: https://registry.{{ vapp['metacluster.fqdn'] }}/api/v2.0/health
method: GET
register: api_readycheck
until:
- api_readycheck.json.status is defined
- api_readycheck.json.status == 'healthy'
retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
module_defaults:
ansible.builtin.uri:
validate_certs: no
status_code: [200, 201, 401]
body_format: json

View File

@ -0,0 +1,53 @@
- block:
- name: Increase replicas for each volume
kubernetes.core.k8s:
api_version: longhorn.io/v1beta2
kind: volume
name: "{{ item.metadata.name }}"
namespace: longhorn-system
state: patched
definition: |
spec:
numberOfReplicas: {{ lookup('kubernetes.core.k8s', kind='node', kubeconfig=(kubeconfig.path)) | length | int }}
kubeconfig: "{{ kubeconfig.path }}"
loop: "{{ query('kubernetes.core.k8s', api_version='longhorn.io/v1beta2', kind='volume', namespace='longhorn-system', kubeconfig=(kubeconfig.path)) }}"
loop_control:
label: "{{ item.metadata.name }}"
- name: Wait for replica rebuilds to complete
ansible.builtin.uri:
url: https://storage.{{ vapp['metacluster.fqdn'] }}/v1/volumes
method: GET
register: volume_details
until:
- volume_details.json is defined
- (volume_details.json | json_query('data[? state==`attached`].robustness') | unique | length) == 1
- (volume_details.json | json_query('data[? state==`attached`].robustness') | first) == "healthy"
retries: "{{ ( playbook.retries * 2) | int }}"
delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
- name: Upgrade longhorn chart
kubernetes.core.helm:
name: longhorn
chart_ref: /opt/metacluster/helm-charts/longhorn
release_namespace: longhorn-system
wait: false
kubeconfig: "{{ kubeconfig.path }}"
values: "{{ components['longhorn'].chart_values }}"
- name: Ensure longhorn API availability
ansible.builtin.uri:
url: https://storage.{{ vapp['metacluster.fqdn'] }}/v1
method: GET
register: api_readycheck
until:
- api_readycheck is not failed
retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
module_defaults:
ansible.builtin.uri:
validate_certs: no
status_code: [200, 201]
body_format: json

View File

@ -0,0 +1,3 @@
- import_tasks: vapp.yml
- import_tasks: vcenter.yml
- import_tasks: metacluster.yml

View File

@ -0,0 +1,11 @@
- name: Check for metacluster connectivity
ansible.builtin.uri:
url: https://{{ vapp['metacluster.vip'] }}:6443/livez?verbose
method: GET
validate_certs: no
status_code: [200, 401]
register: api_readycheck
until:
- api_readycheck.json.apiVersion is defined
retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark | int) * (playbook.delay.medium | int) }}"

View File

@ -0,0 +1,20 @@
- name: Check for expected vApp properties
ansible.builtin.assert:
that:
- vapp[item] is defined
- (vapp[item] | length) > 0
quiet: true
loop:
- guestinfo.dnsserver
- guestinfo.gateway
- guestinfo.hostname
- guestinfo.ipaddress
- guestinfo.prefixlength
- guestinfo.rootsshkey
- hv.fqdn
- hv.password
- hv.username
- metacluster.fqdn
- metacluster.password
- metacluster.token
- metacluster.vip

View File

@ -0,0 +1,57 @@
- name: Gather hypervisor details
ansible.builtin.shell:
cmd: govc ls -L {{ item.moref }} | awk -F/ '{print ${{ item.part }}}'
environment:
GOVC_INSECURE: '1'
GOVC_URL: "{{ vapp['hv.fqdn'] }}"
GOVC_USERNAME: "{{ vapp['hv.username'] }}"
GOVC_PASSWORD: "{{ vapp['hv.password'] }}"
register: govc_inventory
loop:
- attribute: cluster
moref: >-
$(govc object.collect -json VirtualMachine:{{ moref_id }} | \
jq -r '.[] | select(.Name == "runtime").Val.Host | .Type + ":" + .Value')
part: (NF-1)
- attribute: datacenter
moref: VirtualMachine:{{ moref_id }}
part: 2
- attribute: datastore
moref: >-
$(govc object.collect -json VirtualMachine:{{ moref_id }} | \
jq -r '.[] | select(.Name == "datastore").Val.ManagedObjectReference | .[].Type + ":" + .[].Value')
part: NF
- attribute: folder
moref: >-
$(govc object.collect -json VirtualMachine:{{ moref_id }} | \
jq -r '.[] | select(.Name == "parent").Val | .Type + ":" + .Value')
part: 0
# - attribute: host
# moref: >-
# $(govc object.collect -json VirtualMachine:{{ moref_id }} | \
# jq -r '.[] | select(.Name == "runtime").Val.Host | .Type + ":" + .Value')
# part: NF
- attribute: network
moref: >-
$(govc object.collect -json VirtualMachine:{{ moref_id }} | \
jq -r '.[] | select(.Name == "network").Val.ManagedObjectReference | .[].Type + ":" + .[].Value')
part: NF
- attribute: resourcepool
moref: >-
$(govc object.collect -json VirtualMachine:{{ moref_id }} | \
jq -r '.[] | select(.Name == "resourcePool").Val | .Type + ":" + .Value')
part: 0
loop_control:
label: "{{ item.attribute }}"
- name: Retrieve hypervisor TLS thumbprint
ansible.builtin.shell:
cmd: openssl s_client -connect {{ vapp['hv.fqdn'] }}:443 < /dev/null 2>/dev/null | openssl x509 -fingerprint -noout -in /dev/stdin | awk -F'=' '{print $2}'
register: tls_thumbprint
- name: Store hypervisor details in dictionary
ansible.builtin.set_fact:
vcenter_info: "{{ vcenter_info | default({}) | combine({ item.item.attribute : item.stdout }) }}"
loop: "{{ govc_inventory.results }}"
loop_control:
label: "{{ item.item.attribute }}"

View File

@ -0,0 +1,4 @@
- import_tasks: hypervisor.yml
- import_tasks: registry.yml
- import_tasks: nodetemplates.yml
# - import_tasks: clusterapi.yml

View File

@ -0,0 +1,73 @@
- block:
- name: Check for existing template on hypervisor
community.vmware.vmware_guest_info:
name: "{{ (filename | basename | split('.'))[:-1] | join('.') }}"
register: existing_ova
ignore_errors: yes
- name: Store inventory path of existing template
ansible.builtin.set_fact:
nodetemplate_inventorypath: "{{ existing_ova.instance.hw_folder ~ '/' ~ existing_ova.instance.hw_name }}"
when: existing_ova is not failed
- block:
- name: Parse OVA file for network mappings
ansible.builtin.shell:
cmd: govc import.spec -json {{ filename }}
environment:
GOVC_INSECURE: '1'
GOVC_URL: "{{ vapp['hv.fqdn'] }}"
GOVC_USERNAME: "{{ vapp['hv.username'] }}"
GOVC_PASSWORD: "{{ vapp['hv.password'] }}"
register: ova_spec
- name: Deploy OVA template on hypervisor
community.vmware.vmware_deploy_ovf:
cluster: "{{ vcenter_info.cluster }}"
datastore: "{{ vcenter_info.datastore }}"
name: "{{ (filename | basename | split('.'))[:-1] | join('.') }}"
networks: "{u'{{ ova_spec.stdout | from_json | json_query('NetworkMapping[0].Name') }}':u'{{ vcenter_info.network }}'}"
allow_duplicates: no
power_on: false
ovf: "{{ filename }}"
register: ova_deploy
- name: Add additional placeholder disk
community.vmware.vmware_guest_disk:
name: "{{ ova_deploy.instance.hw_name }}"
disk:
- size: 1Gb
scsi_controller: 1
scsi_type: paravirtual
unit_number: 0
# Disabled to allow disks to be resized; at the cost of cloning speed
# - name: Create snapshot on deployed VM
# community.vmware.vmware_guest_snapshot:
# name: "{{ ova_deploy.instance.hw_name }}"
# state: present
# snapshot_name: "{{ ansible_date_time.iso8601_basic_short }}-base"
- name: Mark deployed VM as templates
community.vmware.vmware_guest:
name: "{{ ova_deploy.instance.hw_name }}"
is_template: yes
- name: Store inventory path of deployed template
ansible.builtin.set_fact:
nodetemplate_inventorypath: "{{ ova_deploy.instance.hw_folder ~ '/' ~ ova_deploy.instance.hw_name }}"
when: existing_ova is failed
vars:
filename: "{{ query('ansible.builtin.fileglob', '/opt/metacluster/node-templates/*.ova') | first }}"
module_defaults:
group/vmware:
hostname: "{{ vapp['hv.fqdn'] }}"
validate_certs: no
username: "{{ vapp['hv.username'] }}"
password: "{{ vapp['hv.password'] }}"
datacenter: "{{ vcenter_info.datacenter }}"
folder: "{{ vcenter_info.folder }}"

View File

@ -0,0 +1,17 @@
- block:
- name: Copy kubeadm container images to dedicated project
ansible.builtin.uri:
url: https://registry.{{ vapp['metacluster.fqdn'] }}/api/v2.0/projects/kubeadm/repositories/{{ ( item | regex_findall('([^:/]+)') )[-2] }}/artifacts?from=library/{{ item | replace('/', '%2F') | replace(':', '%3A') }}
method: POST
headers:
Authorization: "Basic {{ ('admin:' ~ vapp['metacluster.password']) | b64encode }}"
body:
from: "{{ item }}"
loop: "{{ lookup('ansible.builtin.file', '/opt/metacluster/cluster-api/imagelist').splitlines() }}"
module_defaults:
ansible.builtin.uri:
validate_certs: no
status_code: [200, 201, 409]
body_format: json

View File

@ -0,0 +1,34 @@
- name: Create destination folder
ansible.builtin.file:
path: /opt/firstboot
state: directory
- name: Create firstboot script file
ansible.builtin.template:
src: firstboot.j2
dest: /opt/firstboot/firstboot.sh
owner: root
group: root
mode: o+x
- name: Create @reboot crontab job
ansible.builtin.cron:
name: firstboot
special_time: reboot
job: "/opt/firstboot/firstboot.sh >/dev/tty1 2>&1"
- name: Copy payload folder (common)
ansible.builtin.copy:
src: ansible_payload/common/
dest: /opt/firstboot/ansible/
owner: root
group: root
mode: '0644'
- name: Copy payload folder (per appliancetype)
ansible.builtin.copy:
src: ansible_payload/{{ appliancetype }}/
dest: /opt/firstboot/ansible/
owner: root
group: root
mode: '0644'

View File

@ -0,0 +1,10 @@
#!/bin/bash
# Workaround for ansible output regression
export PYTHONUNBUFFERED=1
# Apply firstboot configuration w/ ansible
/usr/local/bin/ansible-playbook /opt/firstboot/ansible/playbook.yml | tee -a /var/log/firstboot.log > /dev/tty1 2>&1
# Cleanup console
clear > /dev/tty1

View File

@ -0,0 +1,13 @@
- name: Delete cloud-init package
ansible.builtin.apt:
name: cloud-init
state: absent
purge: yes
- name: Delete cloud-init files
ansible.builtin.file:
path: "{{ item }}"
state: absent
loop:
- /etc/cloud
- /var/lib/cloud

View File

@ -0,0 +1,5 @@
- name: Enable crontab logging
ansible.builtin.lineinfile:
path: /etc/rsyslog.d/50-default.conf
regexp: '^#cron\.\*.*'
line: "cron.*\t\t\t\t./var/log/cron.log"

View File

@ -0,0 +1,7 @@
- import_tasks: tty.yml
- import_tasks: snapd.yml
- import_tasks: cloud-init.yml
- import_tasks: logging.yml
- import_tasks: services.yml
- import_tasks: packages.yml
- import_tasks: sysctl.yml

View File

@ -0,0 +1,47 @@
- name: Configure 'needrestart' package
ansible.builtin.lineinfile:
path: /etc/needrestart/needrestart.conf
regexp: "{{ item.regexp }}"
line: "{{ item.line }}"
loop:
- regexp: "^#\\$nrconf\\{restart\\} = 'i';"
line: "$nrconf{restart} = 'a';"
- regexp: "^#\\$nrconf\\{kernelhints\\} = -1;"
line: "$nrconf{kernelhints} = -1;"
loop_control:
label: "{{ item.line }}"
- name: Install additional packages
ansible.builtin.apt:
pkg: "{{ packages.apt }}"
state: latest
update_cache: yes
install_recommends: no
- name: Upgrade all packages
ansible.builtin.apt:
name: '*'
state: latest
update_cache: yes
- name: Install additional python packages
ansible.builtin.pip:
name: "{{ item }}"
executable: pip3
state: latest
loop: "{{ packages.pip }}"
- name: Create folder
ansible.builtin.file:
path: /etc/ansible
state: directory
- name: Configure Ansible defaults
ansible.builtin.template:
src: ansible.j2
dest: /etc/ansible/ansible.cfg
- name: Cleanup
ansible.builtin.apt:
autoremove: yes
purge: yes

View File

@ -0,0 +1,5 @@
- name: Disable & mask networkd-wait-online
ansible.builtin.systemd:
name: systemd-networkd-wait-online
enabled: no
masked: yes

View File

@ -0,0 +1,19 @@
- name: Delete snapd package
ansible.builtin.apt:
name: snapd
state: absent
purge: yes
- name: Delete leftover files
ansible.builtin.file:
path: /root/snap
state: absent
- name: Hold snapd package
ansible.builtin.dpkg_selections:
name: snapd
selection: hold
- name: Reload systemd unit configurations
ansible.builtin.systemd:
daemon_reload: yes

View File

@ -0,0 +1,11 @@
- name: Configure inotify limits
ansible.posix.sysctl:
name: "{{ item.name }}"
value: "{{ item.value }}"
loop:
- name: fs.inotify.max_user_instances
value: '512'
- name: fs.inotify.max_user_watches
value: '524288'
loop_control:
label: "{{ item.name ~ '=' ~ item.value }}"

View File

@ -0,0 +1,18 @@
- name: Disable extra tty
ansible.builtin.lineinfile:
path: /etc/systemd/logind.conf
regexp: "{{ item.regexp }}"
line: "{{ item.line }}"
loop:
- regexp: '^#NAutoVTs='
line: 'NAutoVTs=1'
- regexp: '^#ReserveVT='
line: 'ReserveVT=11'
loop_control:
label: "{{ item.line }}"
- name: Mask getty@tty1 service
ansible.builtin.systemd:
name: getty@tty1
enabled: no
masked: yes

View File

@ -0,0 +1,2 @@
[defaults]
callbacks_enabled = ansible.posix.profile_tasks

View File

@ -0,0 +1,13 @@
packages:
apt:
- jq
- python3-pip
pip:
# - ansible-core<2.14.0
- ansible-core
- jinja2
- lxml
- markupsafe
- pip
- setuptools
- wheel

View File

@ -0,0 +1,365 @@
platform:
k3s:
version: v1.25.9+k3s1
packaged_components:
- name: traefik
namespace: kube-system
config: |2
additionalArguments:
- "--certificatesResolvers.stepca.acme.caserver=https://step-certificates.step-ca.svc.cluster.local/acme/acme/directory"
- "--certificatesResolvers.stepca.acme.email=admin"
- "--certificatesResolvers.stepca.acme.storage=/data/acme.json"
- "--certificatesResolvers.stepca.acme.tlsChallenge=true"
- "--certificatesresolvers.stepca.acme.certificatesduration=24"
globalArguments: []
ingressRoute:
dashboard:
enabled: false
ports:
ssh:
port: 8022
protocol: TCP
web:
redirectTo: websecure
websecure:
tls:
certResolver: stepca
updateStrategy:
type: Recreate
rollingUpdate: null
helm_repositories:
- name: argo
url: https://argoproj.github.io/argo-helm
- name: authentik
url: https://charts.goauthentik.io
# - name: codecentric
# url: https://codecentric.github.io/helm-charts
# - name: dex
# url: https://charts.dexidp.io
- name: gitea-charts
url: https://dl.gitea.io/charts/
- name: harbor
url: https://helm.goharbor.io
- name: jetstack
url: https://charts.jetstack.io
- name: longhorn
url: https://charts.longhorn.io
- name: prometheus-community
url: https://prometheus-community.github.io/helm-charts
- name: smallstep
url: https://smallstep.github.io/helm-charts/
components:
argo-cd:
helm:
version: 5.27.4 # (= ArgoCD v2.6.7)
chart: argo/argo-cd
parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sort -u | awk '!/ /'
chart_values: !unsafe |
configs:
secret:
argocdServerAdminPassword: "{{ vapp['metacluster.password'] | password_hash('bcrypt') }}"
server:
extraArgs:
- --insecure
ingress:
enabled: true
hosts:
- gitops.{{ vapp['metacluster.fqdn'] }}
authentik:
helm:
version: 2023.3.1
chart: authentik/authentik
parse_logic: helm template . --set postgresql.enabled=true,redis.enabled=true | yq --no-doc eval '.. | .image? | select(.)' | sort -u | awk '!/ /'
chart_values: !unsafe |
authentik:
avatars: none
secret_key: "{{ lookup('ansible.builtin.password', '/dev/null length=64 chars=ascii_lowercase,digits seed=' ~ vapp['guestinfo.hostname']) }}"
postgresql:
password: "{{ lookup('ansible.builtin.password', '/dev/null length=32 chars=ascii_lowercase,digits seed=' ~ vapp['guestinfo.hostname']) }}"
env:
AUTHENTIK_BOOTSTRAP_PASSWORD: "{{ vapp['metacluster.password'] }}"
ingress:
enabled: true
hosts:
- host: auth.{{ vapp['metacluster.fqdn'] }}
paths:
- path: "/"
pathType: Prefix
postgresql:
enabled: true
postgresqlPassword: "{{ lookup('ansible.builtin.password', '/dev/null length=32 chars=ascii_lowercase,digits seed=' ~ vapp['guestinfo.hostname']) }}"
redis:
enabled: true
cert-manager:
helm:
version: 1.11.0
chart: jetstack/cert-manager
parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sort -u | awk '!/ /'
# chart_values: !unsafe |
# installCRDs: true
clusterapi:
management:
version:
# Must match the version referenced at `dependencies.static_binaries[.filename==clusterctl].url`
base: v1.4.0
# Must match the version referenced at `components.cert-manager.helm.version`
cert_manager: v1.11.0
infrastructure_vsphere: v1.6.0
ipam_incluster: v0.1.0-alpha.2
# Refer to `https://console.cloud.google.com/gcr/images/cloud-provider-vsphere/GLOBAL/cpi/release/manager` for available tags
cpi_vsphere: v1.25.2
workload:
version:
calico: v3.25.0
k8s: v1.25.9
node_template:
url: https://{{ repo_username }}:{{ repo_password }}@sn.itch.fyi/Repository/rel/ubuntu-2204-kube-v1.25.9.ova
# dex:
# helm:
# version: 0.13.0 # (= Dex 2.35.3)
# chart: dex/dex
# parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sort -u | awk '!/ /'
# chart_values: !unsafe |
# config:
# connectors:
# - type: ldap
# id: ldap
# name: "LDAP"
# config:
# host: "{{ vapp['ldap.fqdn'] }}:636"
# insecureNoSSL: false
# insecureSkipVerify: true
# bindDN: "{{ vapp['ldap.dn'] }}"
# bindPW: "{{ vapp['ldap.password'] }}"
# usernamePrompt: "Username"
# userSearch:
# baseDN: OU=Administrators,OU=Useraccounts,DC=bessems,DC=eu
# filter: "(objectClass=person)"
# username: userPrincipalName
# idAttr: DN
# emailAttr: userPrincipalName
# nameAttr: cn
# groupSearch:
# baseDN: OU=Roles,OU=Groups,DC=bessems,DC=eu
# filter: "(objectClass=group)"
# userMatchers:
# - userAttr: DN
# groupAttr: member
# nameAttr: cn
# enablePasswordDB: true
# issuer: https://oidc.{{ vapp['metacluster.fqdn'] }}
# storage:
# type: kubernetes
# config:
# inCluster: true
# ingress:
# enabled: true
# hosts:
# - host: oidc.{{ vapp['metacluster.fqdn'] }}
# paths:
# - path: /
# pathType: Prefix
gitea:
helm:
version: v7.0.2 # (= Gitea v1.18.3)
chart: gitea-charts/gitea
parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sort -u | sed '/:/!s/$/:latest/'
chart_values: !unsafe |
gitea:
admin:
username: administrator
password: "{{ vapp['metacluster.password'] }}"
email: admin@{{ vapp['metacluster.fqdn'] }}
config:
server:
OFFLINE_MODE: true
PROTOCOL: http
ROOT_URL: https://git.{{ vapp['metacluster.fqdn'] }}/
image:
pullPolicy: IfNotPresent
ingress:
enabled: true
hosts:
- host: git.{{ vapp['metacluster.fqdn'] }}
paths:
- path: /
pathType: Prefix
service:
ssh:
type: ClusterIP
port: 22
clusterIP:
harbor:
helm:
version: 1.11.0 # (= Harbor v2.7.0)
chart: harbor/harbor
parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sort -u | awk '!/ /'
chart_values: !unsafe |
expose:
ingress:
annotations: {}
hosts:
core: registry.{{ vapp['metacluster.fqdn'] }}
tls:
certSource: none
enabled: false
externalURL: https://registry.{{ vapp['metacluster.fqdn'] }}
harborAdminPassword: "{{ vapp['metacluster.password'] }}"
notary:
enabled: false
persistence:
persistentVolumeClaim:
registry:
size: 25Gi
# keycloakx:
# helm:
# version: 2.1.1 # (= Keycloak 20.0.3)
# chart: codecentric/keycloakx
# parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sort -u | awk '!/ /'
# chart_values: !unsafe |
# command:
# - "/opt/keycloak/bin/kc.sh"
# - "start"
# - "--http-enabled=true"
# - "--http-port=8080"
# - "--hostname-strict=false"
# - "--hostname-strict-https=false"
# extraEnv: |
# - name: KEYCLOAK_ADMIN
# value: admin
# - name: KEYCLOAK_ADMIN_PASSWORD
# value: {{ vapp['metacluster.password'] }}
# - name: KC_PROXY
# value: "passthrough"
# - name: JAVA_OPTS_APPEND
# value: >-
# -Djgroups.dns.query={% raw %}{{ include "keycloak.fullname" . }}{% endraw %}-headless
# ingress:
# enabled: true
# rules:
# - host: keycloak.{{ vapp['metacluster.fqdn'] }}
# paths:
# - path: /
# pathType: Prefix
# tls: []
kube-prometheus-stack:
helm:
version: 45.2.0
chart: prometheus-community/kube-prometheus-stack
parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sort -u | awk '!/ /'
chart_values: !unsafe |
alertmanager:
enabled: false
global:
imageRegistry: registry.{{ vapp['metacluster.fqdn'] }}
kubevip:
# Must match the version referenced at `dependencies.container_images`
version: v0.5.8
longhorn:
helm:
version: 1.4.1
chart: longhorn/longhorn
parse_logic: cat values.yaml | yq eval '.. | select(has("repository")) | .repository + ":" + .tag'
chart_values: !unsafe |
defaultSettings:
allowNodeDrainWithLastHealthyReplica: true
defaultDataPath: /mnt/blockstorage
defaultReplicaCount: 1
ingress:
enabled: true
host: storage.{{ vapp['metacluster.fqdn'] }}
persistence:
defaultClassReplicaCount: 1
step-certificates:
helm:
version: 1.23.0
chart: smallstep/step-certificates
parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sed '/:/!s/$/:latest/' | sort -u
chart_values: !unsafe |
ca:
dns: ca.{{ vapp['metacluster.fqdn'] }},step-certificates.step-ca.svc.cluster.local,127.0.0.1
password: "{{ vapp['metacluster.password'] }}"
provisioner:
name: admin
password: "{{ vapp['metacluster.password'] }}"
inject:
secrets:
ca_password: "{{ vapp['metacluster.password'] | b64encode }}"
provisioner_password: "{{ vapp['metacluster.password'] | b64encode }}"
service:
targetPort: 9000
dependencies:
ansible_galaxy_collections:
- ansible.posix
- ansible.utils
- community.crypto
- community.general
- community.vmware
- kubernetes.core
container_images:
# This should match the image tag referenced at `platform.packaged_components[.name==traefik].config`
- busybox:1
- ghcr.io/kube-vip/kube-vip:v0.5.8
# The following list is generated by running the following commands:
# $ clusterctl init -i vsphere:<version> [...]
# $ clusterctl generate cluster <name> [...] | yq eval '.data.data' | yq --no-doc eval '.. | .image? | select(.)' | sort -u
- gcr.io/cloud-provider-vsphere/cpi/release/manager:v1.18.1
- gcr.io/cloud-provider-vsphere/csi/release/driver:v2.1.0
- gcr.io/cloud-provider-vsphere/csi/release/syncer:v2.1.0
- quay.io/k8scsi/csi-attacher:v3.0.0
- quay.io/k8scsi/csi-node-driver-registrar:v2.0.1
- quay.io/k8scsi/csi-provisioner:v2.0.0
- quay.io/k8scsi/livenessprobe:v2.1.0
static_binaries:
- filename: clusterctl
url: https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.0/clusterctl-linux-amd64
- filename: govc
url: https://github.com/vmware/govmomi/releases/download/v0.29.0/govc_Linux_x86_64.tar.gz
archive: compressed
- filename: helm
url: https://get.helm.sh/helm-v3.10.2-linux-amd64.tar.gz
archive: compressed
extra_opts: --strip-components=1
- filename: kubectl-slice
url: https://github.com/patrickdappollonio/kubectl-slice/releases/download/v1.2.5/kubectl-slice_linux_x86_64.tar.gz
archive: compressed
- filename: skopeo
url: https://code.spamasaurus.com/api/packages/djpbessems/generic/skopeo/v1.12.0/skopeo_linux_amd64
- filename: step
url: https://dl.step.sm/gh-release/cli/gh-release-header/v0.23.0/step_linux_0.23.0_amd64.tar.gz
archive: compressed
extra_opts: --strip-components=2
- filename: yq
url: http://github.com/mikefarah/yq/releases/download/v4.30.5/yq_linux_amd64
packages:
apt:
- lvm2
pip:
- jmespath
- kubernetes
- netaddr
- passlib
- pyvmomi

View File

@ -0,0 +1,27 @@
downstream:
helm_repositories:
- name: longhorn
url: https://charts.longhorn.io
- name: sealed-secrets
url: https://bitnami-labs.github.io/sealed-secrets
helm_charts:
longhorn:
version: 1.4.1
chart: longhorn/longhorn
namespace: longhorn-system
parse_logic: cat values.yaml | yq eval '.. | select(has("repository")) | .repository + ":" + .tag'
chart_values: !unsafe |
defaultSettings:
createDefaultDiskLabeledNodes: true
defaultDataPath: /mnt/blockstorage
sealed-secrets:
version: 2.8.1 # (= Sealed Secrets v0.20.2)
chart: sealed-secrets/sealed-secrets
namespace: sealed-secrets
parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sort -u | awk '!/ /'
# chart_values: !unsafe |
# # Empty

View File

@ -1,16 +0,0 @@
script = <<-EOH
$nic = get-netadapter
Get-NetAdapterBinding InterfaceAlias $nic.name ComponentID ms_tcpip6
EOH
control "ipv6" do
title 'Disabled network protocol IPv6'
desc '
This test assures that IPv6 is disabled
'
describe powershell(script) do
its('stdout') { should match 'False' }
end
end

Some files were not shown because too many files have changed in this diff Show More