summaryrefslogtreecommitdiffstats
path: root/ansible/roles
AgeCommit message (Collapse)AuthorFilesLines
2021-06-17[ANSIBLE] Configure custom Grafana dashboardBartek Grzybowski4-1/+346
A new dashboard provider is set up in Grafana which reads the dash json definition from the file uploaded to Grafana PV Change-Id: I2704fe85e838e9aba2a846172334af467b9f2045 Issue-ID: INT-1926 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-06-15[ANSIBLE] Setup persistent volume for Grafana dashboardsBartek Grzybowski2-3/+13
Change-Id: Ifb45abae0c8a7716addbd62d340423f1c1e44c03 Issue-ID: INT-1926 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-06-10[ANSIBLE] Generate helm values file for kube-prometheus stackBartek Grzybowski2-0/+23
Default values file is provided and any of it's contents can be overriden by setting relevant keys in 'kube_prometheus_helm_values' dict on provisioner run time. Change-Id: I1655d64704e1ad6e9cd9650622ae1a92de902a8f Issue-ID: INT-1926 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-06-10[ANSIBLE] Create host paths for PVs and set their permissionsBartek Grzybowski2-0/+10
Access mode for hostPath type kubernetes PVs has to be set explicitly as setting it with pod's securityContext is not supported. Change-Id: I60ed71001fc7859440510f17c1989b35d28c37b5 Issue-ID: INT-1926 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-06-08[ANSIBLE] Add 'k8s-persistent-volume' roleBartek Grzybowski3-0/+31
This role will setup predefined k8s persistent volumes. It leverages the community.kubernetes.k8s ansible module. Change-Id: If71481b6b0da60872498063ff29c8da5a3830fc5 Issue-ID: INT-1926 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-06-08[MOLECULE] Add setup for new 'k8s-persistent-volume' roleBartek Grzybowski4-0/+49
Change-Id: If7eb6c058746a98566f41d8354159624293ba58d Issue-ID: INT-1926 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-06-08[ANSIBLE] Setup kube-prometheus-stack roleBartek Grzybowski4-6/+19
Change-Id: I687fa1743cd2b778a0b07ed9e51a4a2e2d142934 Issue-ID: INT-1926 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-06-02[MOLECULE] Setup Molecule for kube-prometheus-stack roleBartek Grzybowski3-0/+18
Change-Id: Id1c40e6a7da0ad0c42b162835f09630630569dd2 Issue-ID: INT-1926 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-06-01[ANSIBLE] Add 'kube-prometheus-stack' role skeletonBartek Grzybowski8-0/+63
Change-Id: I413186d6dc78baea4d1f22e4ed2f419f6e49bd25 Issue-ID: INT-1926 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-04-20[MOLECULE 3.3.0] Fix verifier tests for several rolesBartek Grzybowski8-12/+10
Change-Id: I54f618fbb3d1bfefca329e647f78ba9b93f8a283 Issue-ID: OOM-2722 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-04-20[MOLECULE] Fix 'application' role runBartek Grzybowski2-3/+3
Add ansible-lint ignore rule to skip warning about unnamed task Fix verifier test Change-Id: Ie75c379b1678a594ad9a3e95442d04fc58939e6e Issue-ID: OOM-2722 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-04-19[MOLECULE] Drop 'destroy' playbook for rke roleBartek Grzybowski2-35/+0
No longer required since change Ia221da6666d558e086cd24155f5bd81237d82388 Change-Id: I7ec15d63daaa3e3cdb6dbed2a4e2643bfcb99370 Issue-ID: OOM-2722 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-04-15[ANSIBLE][MOLECULE] Skip checking packager cache cleaning idempotencyBartek Grzybowski4-38/+7
Change-Id: I621bd2ed4452c10a6747392a709d1c17282a11ef Issue-ID: OOM-2722 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-04-15[ANSIBLE 3.2.0] Upgrade 'chartmuseum' role's tasks to ansible 3.2.0Bartek Grzybowski2-0/+2
Change-Id: I96504d94eb4322857979a6ec37b2d63d4fe074df Issue-ID: OOM-2722 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-04-15[ANSIBLE 3.2.0] Fix regex pattern in 'certificates' roleBartek Grzybowski2-1/+20
[MOLECULE] Add verifier test for SubjectAlternativeName validation Issue-ID: OOM-2722 Change-Id: I8ff9fb88d5166f3d5eba5f364f9110b3b12cd47e Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-04-15[ANSIBLE 3.2.0] Upgrade 'nexus' role's tasks to ansible 3.2.0Bartek Grzybowski2-0/+4
Change-Id: Ibeaea4b3b627c356521b4c847d56eeb922a8cca1 Issue-ID: OOM-2722 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-04-13[ANSIBLE 3.2.0] Use 'listen' directive for docker handlerBartek Grzybowski2-20/+20
Using 'import_tasks' for multiple step handler is no longer supported, while 'include_tasks' has some side effects. Change-Id: I61c14c937f80dfcd1780cdc2885ac781be613978 Issue-ID: OOM-2722 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-04-13[ANSIBLE 3.2.0] Upgrade 'vncserver' role's tasks to ansible 3.2.0Bartek Grzybowski1-0/+2
Change-Id: Ie721fac402c3cd5725c770313194a9ad98a07f2d Issue-ID: OOM-2722 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-04-13[ANSIBLE 3.2.0] Upgrade 'nginx' role's tasks to ansible 3.2.0Bartek Grzybowski1-0/+3
Change-Id: Ieba3f13a29240e0f8ed8ff6acb5472559a9134a5 Issue-ID: OOM-2722 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-04-13[ANSIBLE 3.2.0] Upgrade 'dns' role's tasks to ansible 3.2.0Bartek Grzybowski2-0/+2
Change-Id: I6984396d15d0592313978c751fd109ee06d8febf Issue-ID: OOM-2722 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-04-13[ANSIBLE] Drop published ports listBartek Grzybowski1-3/+0
Published ports are discarded by docker engine when using host network mode so no need to define them. Change-Id: I71537b4191e8f05d77991d08444144031747c0b7 Issue-ID: OOM-2722 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-04-09[ANSIBLE 3.2.0] Upgrade 'certificates' role tasks to be ansible 3.2.0 compliantBartek Grzybowski1-16/+2
Change-Id: Id1d8da0a1dabdbe79cdb24179ddeff5564b00f17 Issue-ID: OOM-2722 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-04-09[MOLECULE] Fix 'certificates' setup and verifier testsBartek Grzybowski7-77/+29
Change-Id: I13d4774f6860f6c3e396f58f1c60ae589beea9b1 Issue-ID: OOM-2722 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-04-09[MOLECULE] Add cleanup task for 'certificates' roleBartek Grzybowski2-0/+7
Change-Id: Ifb9c9627d840158d8a4be3a1d1a1ea75dc4038c3 Issue-ID: OOM-2722 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-04-09[MOLECULE 3.3.0] Drop scenario name in molecule.ymlBartek Grzybowski32-55/+0
In Molecule 3.x.x it's no longer needed, scenario name is assumed from its directory name. Ref.: https://github.com/ansible-community/molecule/issues/2560 Change-Id: I3b25dae499d4f40851ac3fe0183ee7ab913b7dd7 Issue-ID: OOM-2722 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-04-08[MOLECULE 3.3.0] Update converge playbook file namesBartek Grzybowski42-21/+21
In 3.x.x version family of Molecule the 'playbook.yml' file for 'converge' action has changed to 'converge.yml'. Ref.: https://github.com/ansible-community/molecule/issues/2560 Change-Id: I8710ebd5710237be138f2aff8943d6c949058dbd Issue-ID: OOM-2722 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-04-08[MOLECULE 3.3.0] Upgrade linters Molecule setupBartek Grzybowski60-246/+224
In 3.x.x version family of Molecule the syntax for linters invocation has been changed. Ref.: https://molecule.readthedocs.io/en/latest/configuration.html#lint Change-Id: I82d1fd996eb5853953ea6bc74dcbb88a485a2084 Issue-ID: OOM-2722 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-03-31Upgrade Kubernetes Dashboard to v2.0.5Bartek Grzybowski1-3/+18
Currently used 2.0.0-beta4 supported k8s 1.15 at max Change-Id: I9565eaa78ebbca48377d65d87c77bc0893b29487 Issue-ID: OOM-2715 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-03-03Upgrade rke version to 1.2.4 in Molecule setupBartek Grzybowski1-3/+0
Kubectl dependency is removed as it's no longer needed for rke tests. Change-Id: I0191b105e2a4cce1fe6e66678f4ce57fd2ce19ee Issue-ID: OOM-2686 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-03-02Upgrade Kubernetes version deployed by RKE to v1.19.6Bartek Grzybowski2-61/+2
Manual system_images assignment in rke's cluster config is dropped as for any particular kubernetes release Rancher project holds a predefined, static map connecting Rancher's Kubernetes version with particular system images, so it's enough to define k8s version. Ref.: https://rancher.com/docs/rke/latest/en/config-options/system-images/ Change-Id: I027589c86500bbc5260caaa4aef7065d23d2241c Issue-ID: OOM-2686 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-02-12Run chartmuseum as a docker containerBartek Grzybowski8-57/+48
A docker container for chartmuseum is run with chart storage volume mounted from hosts' resource dir for chart repo persistence across container/infra restarts. Change-Id: I692ff7a3d95414b439b15b5414bc8b959eb79414 Issue-ID: OOM-2665 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-02-11Update 'helm deploy' failure criteriaBartek Grzybowski1-1/+1
Contrary to helm v2, helm v3 prints regular output to stderr hence stderr output presence can no longer be used as failure criteria. Since 'deploy' plugin (for any helm release) prints a list of charts that failed to deploy at the end of it's run, it's output is used to detect deployment failure. Change-Id: I340e4e1a5be0949d866ddedfb49c0d23a48e67cf Issue-ID: OOM-2665 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-02-10Fix kubeconfig file permissionsBartek Grzybowski1-1/+1
Kubeconfig file should not be world readable. Helm v3 prints relevant warning to stderr if it's (kubeconfig) mode is incorrect. Change-Id: I9d2b8618cd3e43a49345e96f6ed5169438a29cef Issue-ID: OOM-2665 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-02-09Ensure k8s namespace for ONAP existsBartek Grzybowski1-0/+6
Helm v3 does not automatically create namespace when either of "install" or "upgrade" subcommand is called even with "--namespace" option. Change-Id: I8595d8d9cdcb904b6c032695bae4d945fd07176c Issue-ID: OOM-2665 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-02-09Customize helm "--timeout" option format if running helm v3Bartek Grzybowski2-2/+2
Helm v3 requires unit definition for 'timeout' option which is not supported by Helm v2. Change-Id: Ia5839e5c412be1700459c70d43d2e6cc0400633d Issue-ID: OOM-2665 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-02-05Redirect chartmuseum stdout/stderr to /dev/nullBartek Grzybowski1-4/+8
Chartmuseum logs to it's stdout/stderr during it's normal operations and since the shell pipe opened by ansible is gone once playbook finishes this resulted in chartmuseum process crashing with "broken pipe" message. Change-Id: I0e2a5471df23f5881248ecb529a0193505f56cfe Issue-ID: OOM-2665 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-02-04Drop DIND specific test env settings for 'rke' role/playbookBartek Grzybowski2-40/+0
DIND usage was already dropped so those settings are no longer required. Change-Id: Ifd2b5f26196f84ff0167558c1d5cd4c8218124d7 Issue-ID: OOM-2665 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-02-04Add test scenario for Helm v3Bartek Grzybowski6-0/+65
Change-Id: Iad5478f70533719e1076f3961613fddffb14eebd Issue-ID: OOM-2665 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-02-04Refactor Helm role test setupBartek Grzybowski9-12/+25
Test setup variable inclusion reworked for better sanity. General Molecule docker image is used instead of pre-built one. Change-Id: I013b9d7b92ded86220e6f2092ce75ee47b094d89 Issue-ID: OOM-2665 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-02-04Fix Helm v3 data dir setupBartek Grzybowski2-4/+8
Verifier test is also added to ensure correct plugin deployment. Change-Id: I2e43d942f39fc7ecfe34c22d84ba0f59978ec225 Issue-ID: OOM-2665 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-02-04Add tasks to setup Helm v3 on infra nodeBartek Grzybowski2-0/+15
Change-Id: I959184624f93753ff7217728c3c6011e82f91ef6 Issue-ID: OOM-2665 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-02-03Change 'rke' role testing strategyBartek Grzybowski7-77/+11
So far Molecule framework setup allowed full rke cluster deployment in testing env but since rke cluster often fails to deploy in resource constrained CI environment this change switches testing strategy to only simulate 'rke up' operation. Change-Id: Ia221da6666d558e086cd24155f5bd81237d82388 Issue-ID: OOM-2665 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-01-26Add Molecule test scenario to verify 'chartmuseum' role on UbuntuBartek Grzybowski1-0/+38
Change-Id: Ic3f78a9fd46bef8e3e2138d9c04850db00651b63 Issue-ID: OOM-2665 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-01-26Add 'chartmuseum' roleBartek Grzybowski8-0/+107
Added 'chartmuseum' role which runs Helm repository server using chartmuseum. Change-Id: I8745cd7e602e147fb656297e0afb8e82a5d058ff Issue-ID: OOM-2665 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-01-26Split Helm v2 setup to separate playbookBartek Grzybowski3-56/+59
Logically splitting the application playbook to put Helm v2 and v3 specific setup actions into separate tasks file. Change-Id: I20446a196bb2687e27fdeb6a45a83565b676fc42 Issue-ID: OOM-2665 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-01-26Improve 'application' role test coverageBartek Grzybowski1-1/+1
Helm plugin installation task is now also covered Change-Id: Ib0a724de5dc1b300ea6cd27fe363b99b071d787b Issue-ID: OOM-2665 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-01-26Add Helm v3 plugin deployment playbookBartek Grzybowski9-5/+111
Change-Id: I3999dd64dd87f163a3306b74cec88019d821759e Issue-ID: OOM-2665 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-01-26Move Helm v2 plugin installation logic into separate playbookBartek Grzybowski5-25/+30
Change-Id: Icc767450da832d8792b7bdf33f85e5ffc97ee435 Issue-ID: OOM-2665 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-09-17Add feature to install shell autocompletion for kubectlBartek Grzybowski3-0/+28
Change-Id: I732dcd92144f9a8489a351047ab88b53ca36759e Issue-ID: OOM-2564 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-05-28Updating RKE version to Frankfurt6.0.0-ONAPTomáš Levora1-8/+10
Updating RKE to v1.0.4 for Kubernetes 1.15.9 Issue-ID: OOM-2403 Signed-off-by: Tomáš Levora <t.levora@partner.samsung.com> Change-Id: I87c3f9f4800aa40f62d7569b4ecf3fa373a16796