summaryrefslogtreecommitdiffstats
path: root/ansible/roles
AgeCommit message (Collapse)AuthorFilesLines
2019-05-16Molecule tests for application role.Samuli Silvius8-8/+133
Issue-ID: OOM-1812 Change-Id: Ifb6f5a10afb4014b20be77a4141371e561d346ce Signed-off-by: Samuli Silvius <s.silvius@partner.samsung.com>
2019-05-15Fix idempotence issue in dns roleBartek Grzybowski2-19/+12
Docker_container module was called twice: in a taks 'Start dns server container' and then as a handler but there was a divergent set o parameters for the module in them. This had the efect of the container being started by the means of the task itself but immediately after it was killed and started again by the handler because it had different set of arguments for the module. The fix is to include the handler itself as a task so the whole run is idempotent. Change-Id: I9078f9dfe5894d94d4b6a9e44411f034508992e7 Issue-ID: OOM-1845 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2019-05-10Merge "Don't set 'container' env in Molecule containers"Samuli Silvius5-12/+2
2019-05-10Fix 'cleanup' stage in 'nfs' role testBartek Grzybowski1-0/+1
This commit reverts removal of 'ignore_unreachable' option in 'cleanup.yml' for 'nfs' role tests in 96a4baf. It's needed for cleanup stage to succeed if called prior to 'create' stage (default 'test' matrix behaviour) Change-Id: I9177fb950786f05a55c45a0089fb3632503f14f5 Issue-ID: OOM-1809 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2019-05-09Don't set 'container' env in Molecule containersBartek Grzybowski5-12/+2
Molecule role tests that use pre build images had superfluous 'container' env variable declaration. It's not needed as this env is already set in Dockerfiles, for both: pre-built and custom built images. Change-Id: Iee9cc38919da894ee6cc6a2a5f1acc60d76865de Issue-ID: OOM-1841 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2019-04-26Cleanup Rancher containers after Molecule convergeBartek Grzybowski2-6/+6
Rancher role test do remove rancher/agent and rancher/server containers at 'cleanup' stage but Rancher Agent spawned containers are left orphaned. This patch adds tasks to remove them. This patch also adds custom ansible module for listing docker containers (as of ansible 2.7.10 no upstream module provides that feature, even new docker_container_info info module in ansible's devel branch doesn't have it) Change-Id: I6325dc81063b55b70136280273f8f6138c7a0375 Issue-ID: OOM-1811 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2019-04-24Merge changes from topic 'rancher_api'Michal Ptacek2-0/+81
* changes: Add support for resetting the admin password Add support for rancher authentication Refactor rancher1_api module Add support for rancher 1.6 API
2019-04-24Add support for resetting the admin passwordPetr Ospalý2-0/+9
The module rancher1_api can now reset an admin password of the default admin account (account_id: '1a1') and keep local authentication enabled. By default the authentication is not enabled, because the ansible module rancher_k8s_environment.py is not idempotent and it would need to be rewritten. Change-Id: Ib432537651b91216c32438ec1233dba3602e3faf Issue-ID: OOM-1734 Signed-off-by: Petr Ospalý <p.ospaly@partner.samsung.com>
2019-04-24Add support for rancher authenticationPetr Ospalý2-0/+20
This commit adds a new mode to the rancher1_api module, which enables the rancher local authentication (username/password). There is an already predefined rancher admin user called 'admin' and that is the account, which this mode modifies. Due to the complex API and the fact that rancher 1.6 is soon to be obsoleted, this module is going the simpler route and it is just editing this default admin account instead of creating a completely arbitrary username/password credentials. For that reason is using the 'account_id', which is unique for all accounts and the default admin account of rancher has '1a1'. As of now this module cannot handle changed password once the auth. is enabled. Change-Id: Iea8923c71bdb82267c966a00d62f0f43eb5adb76 Issue-ID: OOM-1734 Signed-off-by: Petr Ospalý <p.ospaly@partner.samsung.com>
2019-04-19Merge "Optimize test for 'resource-data' role"Samuli Silvius1-1/+1
2019-04-18Optimize test for 'resource-data' roleBartek Grzybowski1-1/+1
Moved 'file' package installation from Molecule's 'prepare' stage to Dockerfile to shorten the test invocation. Change-Id: Icbb805c54a4fd42003d0cde037fa56208bd6008a Issue-ID: OOM-1809 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2019-04-17Sanitize Molecule code for 'nfs' roleBartek Grzybowski2-4/+1
Cleaning up of nfs mounts should only happen on clients, not on server itself. Explicit declaration of 'cleanup' stage playbook not needed as it's in the default location. Change-Id: I54e00220048f01160c15fc9631ae62586596114c Issue-ID: OOM-1809 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2019-04-17Refactor rancher1_api modulePetr Ospalý1-8/+20
This rewrite enables to add easier more features supported by the rancher API. The initial idea of a simple get and set through the JSON REST API is not feasible. To achieve something with the API one may have to setup more options on different URLs and in a particular order. For this reason the module comes with the mechanism of "modes", which is a wrapper around some feature in the rancher and which can require multiple steps to do. Rancher1_api module could also support "raw" mode where the user will not be limited by a few implemented modes in the module, but he can craft all requests by hand - but due to the fact that such thing can be done easily with just curl command and ansible shell module, there is no benefit in doing so. Especially when rancher 1.6 is already obsoleted within the ONAP. The useful value of this module is to give the user a simple means to set something in the rancher and hide all the boilerplate from him via a mode. - Original logic was rewritten to utilize the "mode" mechanism. - New module structure is also easier to test outside of ansible. Issue-ID: OOM-1681 Change-Id: I0e7932199df9ec1acd80af545060199867ad17fa Signed-off-by: Petr Ospalý <p.ospaly@partner.samsung.com>
2019-04-17Add support for rancher 1.6 APIPetr Ospalý2-0/+40
- New ansible module to handle rancher API - Setting up of the cattle db and log related options to achieve lower space usage. As of this moment it does what was intended: - it setups new values for db and log related options - it can be used for any other setting options Change-Id: I25048469df0cb035cc6eac39740210cdfa175ada Issue-ID: OOM-1681 Signed-off-by: Petr Ospalý <p.ospaly@partner.samsung.com>
2019-04-17Merge "Molecule tests for chrony role"Samuli Silvius6-4/+108
2019-04-17Improve nfs roleMichal Zegan8-8/+31
This commit improves the nfs role by using cluster_ip variable instead of ansible_host for getting nfs client/server address, and using /etc/exports.d instead of /etc/exports for exporting nfs filesystem. Also, this commit fixes other issues in molecule found along the way. Change-Id: Ibd4ea5d4fd937116e2dc9e1b6f85c3e019f62e17 Issue-ID: OOM-1770 Signed-off-by: Michal Zegan <m.zegan@samsung.com>
2019-04-17Molecule tests for rancher roleSamuli Silvius8-2/+155
Issue-ID: OOM-1775 Change-Id: I6ea11db932cd77e03909e4c72acc4b92a544eb4b Signed-off-by: Samuli Silvius <s.silvius@partner.samsung.com>
2019-04-16Molecule tests for chrony roleBartek Grzybowski6-4/+108
Change-Id: I2cfee4ef44b1aa0ddff0b5d93712390988846c90 Issue-ID: OOM-1710 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2019-04-16Fix for running Molecule on Centos hostBartek Grzybowski1-0/+1
On Centos7.6 /dev/loop* device nodes are created dynamically upon alocation (by default there is no /dev/loop<N> device nodes) - this has effect of failing to allocate those in Docker container, even when run in privileged mode. Change-Id: If2c852de3a74ea7fe1df9f5c863f184b9bc13acb Issue-ID: OOM-1774 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2019-04-16Molecule tests for certificates roleSamuli Silvius11-2/+169
Issue-ID: OOM-1762 Change-Id: Ic13d7ec775a52ad95fc0388e8b84ea8ab7367666 Signed-off-by: Samuli Silvius <s.silvius@partner.samsung.com>
2019-04-16Molecule tests for docker roleSamuli Silvius6-2/+96
Issue-ID: OOM-1759 Change-Id: I9e1ee7f248147b3f7229625c7a20fa84e8e67aac Signed-off-by: Samuli Silvius <s.silvius@partner.samsung.com>
2019-04-16Merge "Molecule tests for resource-data role"Michal Ptacek8-2/+134
2019-04-16Merge "Molecule tests for firewall role"Michal Ptacek6-0/+86
2019-04-16Merge "Molecule role tests for setup role"Michal Ptacek7-2/+83
2019-04-16Molecule role tests for setup roleSamuli Silvius7-2/+83
Issue-ID: OOM-1742 Change-Id: I3087952f3d4e5de20af83e714c0d5444999a5ee2 Signed-off-by: Samuli Silvius <s.silvius@partner.samsung.com>
2019-04-16Molecule tests for firewall roleSamuli Silvius6-0/+86
Issue-ID: OOM-1757 Change-Id: I48639bd0fb67383a58f736aa1c12c38e3ddc9ab0 Signed-off-by: Samuli Silvius <s.silvius@partner.samsung.com>
2019-04-16Molecule tests for package-repository roleSamuli Silvius8-4/+122
Issue-ID: OOM-1755 Change-Id: Iac20072200f24a3102c9ed2edf5c5aa8054dd9c2 Signed-off-by: Samuli Silvius <s.silvius@partner.samsung.com>
2019-04-16Molecule tests for resource-data roleSamuli Silvius8-2/+134
Initial molecule tests. Tests now ssh transfer but test files fully supports also testing nfs transfer. Creating nfs transfer as separate scenario later when find out better ways to share common code. Issue-ID: OOM-1754 Change-Id: Ia728ecfed4378c01f7e305d5a4446b0172fe42d9 Signed-off-by: Samuli Silvius <s.silvius@partner.samsung.com>
2019-04-09Update image name for MoleculeBartek Grzybowski1-2/+2
Sanitizing image name for Molecule testing with new updated naming pattern. Change-Id: I1565242f0ddd88b0df758ebb3519f2e059f22c02 Issue-ID: OOM-1774 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2019-04-05Changing version control for rancherTomáš Levora1-2/+2
Changing the way of version control for rancher in accordance with patchset #83634 Issue-ID: OOM-1767 Change-Id: I67f08dcf47f469c35da9a62ff435e187fae07724 Signed-off-by: Tomáš Levora <t.levora@partner.samsung.com>
2019-04-05Adding versions for infra related docker imagesTomáš Levora9-26/+36
1. latest tag replaced by version number for vnc server 2. added specific version for own_nginx image 3. version control improved in ansible roles accordingly Solves OOM-1766 Issue-ID: OOM-1767 Change-Id: I147c56b46a419188099d8ed3e78fed68810893e2 Signed-off-by: Tomáš Levora <t.levora@partner.samsung.com>
2019-04-05Merge changes I2e1aef32,Ib93e9d2aMichal Ptacek9-8/+130
* changes: Molecule test for nfs role Fix nfs role issues based on molecule testing
2019-04-03Merge "Improving docker restart handler"Michal Ptacek2-4/+19
2019-04-03Verify offline app repo is workingBartek Grzybowski2-0/+32
A patch for failing fast if configured offline application repository is not working properly. Just adding repo to repolist doesn't guarantee it's really operational. Change-Id: I65372b9b1ea5f5dcb797548b14e3ae1295668592 Issue-ID: OOM-1689 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2019-04-03Merge "Support time synchronization on hosts"Michal Ptacek4-0/+69
2019-04-03Merge "Improve kubectl role testability."Samuli Silvius1-1/+1
2019-04-03Merge "Improve rancher role testability"Samuli Silvius8-15/+32
2019-04-02Support time synchronization on hostsBartek Grzybowski4-0/+69
This change introduces functionality to synchronize infra/kube nodes' clock with external NTP authority. Configuring external time source is optional, however default behaviour will be to setup NTP time source on infra-node and sync kube-nodes clock with it. It's also possible to setup custom time zone. Change-Id: I725ce9a306da1977628b6c03d5ff10fca77fb3b0 Issue-ID: OOM-1710 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2019-04-01Merge "Wrong filename does not fail transfer"Samuli Silvius1-8/+19
2019-04-01Molecule test for nfs roleSamuli Silvius7-1/+117
Issue-ID: OOM-1756 Change-Id: I2e1aef3296689c284a4b530e6a2022302c7b86f7 Signed-off-by: Samuli Silvius <s.silvius@partner.samsung.com>
2019-04-01Fix nfs role issues based on molecule testingSamuli Silvius3-8/+14
Based on Molecule testing fix following issues on nfs role. - enable nfs services (previously only started) - create handler for exportfs to deal idempotency - add all kubernetes nodes to exports as it was dependent on ansible inventory order wheather correct hosts was on the list - add inventory_hostname as default host incase ansible_host variable not defined. Issue-ID: OOM-1756 Change-Id: Ib93e9d2a9cf49003d04dd5f890294eda1eb966ff Signed-off-by: Samuli Silvius <s.silvius@partner.samsung.com>
2019-04-01Merge "nginx update for long server names"Samuli Silvius1-0/+1
2019-04-01Allow passing any values to override.yamlMichal Zegan1-6/+6
This change allows passing any values that will then be stored to override.yaml. These values are passed from the "overrides" key, that may be set either as an extra variable or in inventory/group_vars. The root certificate is merged with the overrides dictionary before saving the file. Change-Id: I772c342b3c9eafe1849d1678b810319afaaf75bf Issue-ID: OOM-1752 Signed-off-by: Michal Zegan <m.zegan@samsung.com>
2019-04-01Improve application role testabilitySamuli Silvius10-52/+68
Remove different phases for application role as those are supposed to run after each other anyway from playbook and pre/post steps can be disabled by other means. Enable Helm override file generation customization by delegating it to separate role. Separate Helm file transfer to own module. NOTE: install.yml with all Helm commands (shell/command) is not idempotent and should be fixed with separate commit. Issue-ID: OOM-1655 Change-Id: Ib29773c4d64a0529c71c3f93c2af7265ae94059f Signed-off-by: Samuli Silvius <s.silvius@partner.samsung.com>
2019-04-01Merge "Fix idempotence for firewall role"Michal Ptacek1-0/+1
2019-03-29Fix helm install command not showing errorMilan Verespej1-0/+2
Issue-ID: OOM-1737 Change-Id: I240415793ea2a078ab6c6d9c0727852dc2d9ada3 Signed-off-by: Milan Verespej <m.verespej@partner.samsung.com>
2019-03-28nginx update for long server nameseronkeo1-0/+1
This issue addresses the following error when starting nginx container: nginx: [emerg] could not build the \ server_names_hash, you should increase \ server_names_hash_bucket_size: 64 Change-Id: I369075edd16801aca6b09c6727370060225c428c Issue-ID: OOM-1765 Signed-off-by: eronkeo <ronan.keogh@est.tech>
2019-03-28Improving docker restart handlerMichal Ptacek2-4/+19
There is a bug in docker which leads to not properly shutdown service preventing subsequent startup. https://github.com/moby/moby/issues/30348 This commit is preventing this problem to appear. Change-Id: I29505610bd9954af01d73264e5414fdb2b9ac99d Issue-ID: OOM-1735 Signed-off-by: Michal Ptacek <m.ptacek@partner.samsung.com>
2019-03-26Wrong filename does not fail transferSamuli Silvius1-8/+19
User typo on resource package filename or dir does not cause install to fail but just skips that resource package. Change resource paths handling to skip resource only if variable is not defined or empty, but if a value is given resource must exist or transfer fails otherwise. Issue-ID: OOM-1736 Change-Id: I765c5dc8eb5e58875f032e056f9a8360aee702c0 Signed-off-by: Samuli Silvius <s.silvius@partner.samsung.com>
2019-03-26Add python-jsonpointer as a new dependencyPetr Ospalý1-0/+5
Our custom ansible module requires python-jsonpointer module to deal with jsons. Change-Id: Idd7bfcf8fcf75e4397fba51d8219b73c57df5f0e Issue-ID: OOM-1758 Signed-off-by: Petr Ospalý <p.ospaly@partner.samsung.com>