From a7d8471bac1c2195d64be967934ad07d9314b671 Mon Sep 17 00:00:00 2001 From: to-bar <46519524+to-bar@users.noreply.github.com> Date: Tue, 15 Oct 2019 14:50:24 +0200 Subject: [PATCH 01/25] Preserve https_proxy for pipenv install --- core/src/epicli/.devcontainer/devcontainer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/epicli/.devcontainer/devcontainer.json b/core/src/epicli/.devcontainer/devcontainer.json index f1468e951a..dca1a261ed 100644 --- a/core/src/epicli/.devcontainer/devcontainer.json +++ b/core/src/epicli/.devcontainer/devcontainer.json @@ -11,8 +11,8 @@ "davidanson.vscode-markdownlint" ], "settings": { - "python.pythonPath": "/usr/local/bin/python", + "python.pythonPath": "/usr/local/bin/python" }, - "postCreateCommand": "sudo pipenv install --system --dev", + "postCreateCommand": "sudo --preserve-env=https_proxy pipenv install --system --dev", "runArgs": [ "-u", "vscode" ] } From 7d50fa2bca83420db015c989e224c8cb0a865bc0 Mon Sep 17 00:00:00 2001 From: to-bar <46519524+to-bar@users.noreply.github.com> Date: Tue, 15 Oct 2019 15:19:05 +0200 Subject: [PATCH 02/25] Added examples of frequently used arguments --- core/src/epicli/.vscode/launch.json | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/core/src/epicli/.vscode/launch.json b/core/src/epicli/.vscode/launch.json index cda814f208..0e3a62a4e4 100644 --- a/core/src/epicli/.vscode/launch.json +++ b/core/src/epicli/.vscode/launch.json @@ -9,18 +9,21 @@ "type": "python", "request": "launch", "program": "${workspaceFolder}/cli/epicli.py", - "cwd": "${workspaceFolder}", + "cwd": "${workspaceFolder}", "pythonPath": "${config:python.pythonPath}", "env": { "PYTHONPATH": "${workspaceFolder}" }, "console": "integratedTerminal", - "args": ["apply", "-f", "${workspaceFolder}/PATH_TO_YOUR_DATA_YAML"] + "args": ["apply", "-f", "${workspaceFolder}/clusters/YOUR_DATA_YAML.yml"] + // "args": ["apply", "-f", "${workspaceFolder}/clusters/YOUR_DATA_YAML.yml", "--offline-requirements", "${workspaceFolder}/downloads/epirepo"] + // "args": ["delete", "-b", "${workspaceFolder}/clusters/build/dir"] + // "args": ["init", "-p", "PROVIDER", "-n", "NAME"] }, { "name": "python unit tests", "type": "python", "request": "launch", "program": "${workspaceFolder}/run-tests.py", - "cwd": "${workspaceFolder}", + "cwd": "${workspaceFolder}", "pythonPath": "${config:python.pythonPath}", "env": { "PYTHONPATH": "${workspaceFolder}" }, "console": "integratedTerminal", @@ -31,7 +34,7 @@ "type": "python", "request": "launch", "program": "${workspaceFolder}/run-tests.py", - "cwd": "${workspaceFolder}", + "cwd": "${workspaceFolder}", "pythonPath": "${config:python.pythonPath}", "env": { "PYTHONPATH": "${workspaceFolder}" }, "console": "integratedTerminal", From 6dc640f995293e279ea77959411c38ab93f74ecd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 22 Oct 2019 11:53:57 +0200 Subject: [PATCH 03/25] Bump ecdsa from 0.13.2 to 0.13.3 in /examples/keycloak/implicit/python (#625) Bumps [ecdsa](https://github.com/warner/python-ecdsa) from 0.13.2 to 0.13.3. - [Release notes](https://github.com/warner/python-ecdsa/releases) - [Changelog](https://github.com/warner/python-ecdsa/blob/master/NEWS) - [Commits](https://github.com/warner/python-ecdsa/compare/python-ecdsa-0.13.2...python-ecdsa-0.13.3) Signed-off-by: dependabot[bot] --- .../keycloak/implicit/python/Pipfile.lock | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/examples/keycloak/implicit/python/Pipfile.lock b/examples/keycloak/implicit/python/Pipfile.lock index 95f07596cf..2dea44615a 100644 --- a/examples/keycloak/implicit/python/Pipfile.lock +++ b/examples/keycloak/implicit/python/Pipfile.lock @@ -25,10 +25,11 @@ }, "ecdsa": { "hashes": [ - "sha256:20c17e527e75acad8f402290e158a6ac178b91b881f941fc6ea305bfdfb9657c", - "sha256:5c034ffa23413ac923541ceb3ac14ec15a0d2530690413bff58c12b80e56d884" + "sha256:163c80b064a763ea733870feb96f9dd9b92216cfcacd374837af18e4e8ec3d4d", + "sha256:9814e700890991abeceeb2242586024d4758c8fc18445b194a49bd62d85861db" ], - "version": "==0.13.2" + "index": "pypi", + "version": "==0.13.3" }, "flask": { "hashes": [ @@ -40,9 +41,9 @@ }, "future": { "hashes": [ - "sha256:67045236dcfd6816dc439556d009594abf643e5eb48992e36beac09c2ca659b8" + "sha256:858e38522e8fd0d3ce8f0c1feaf0603358e366d5403209674c7b617fa0c24093" ], - "version": "==0.17.1" + "version": "==0.18.1" }, "itsdangerous": { "hashes": [ @@ -53,10 +54,10 @@ }, "jinja2": { "hashes": [ - "sha256:065c4f02ebe7f7cf559e49ee5a95fb800a9e4528727aec6f24402a5374c65013", - "sha256:14dd6caf1527abb21f08f86c784eac40853ba93edb79552aa1e4b8aef1b61c7b" + "sha256:74320bb91f31270f9551d46522e33af46a80c3d619f4a4bf42b3164d30b5911f", + "sha256:9fe95f19286cfefaa917656583d020be14e7859c6b0252588391e47db34527de" ], - "version": "==2.10.1" + "version": "==2.10.3" }, "markupsafe": { "hashes": [ @@ -93,10 +94,10 @@ }, "pyasn1": { "hashes": [ - "sha256:da2420fe13a9452d8ae97a0e478adde1dee153b11ba832a95b223a2ba01c10f7", - "sha256:da6b43a8c9ae93bc80e2739efb38cc776ba74a886e3e9318d65fe81a8b8a2c6e" + "sha256:62cdade8b5530f0b185e09855dd422bc05c0bbff6b72ff61381c09dac7befd8c", + "sha256:a9495356ca1d66ed197a0f72b41eb1823cf7ea8b5bd07191673e8147aecf8604" ], - "version": "==0.4.5" + "version": "==0.4.7" }, "python-jose": { "hashes": [ @@ -122,10 +123,10 @@ }, "werkzeug": { "hashes": [ - "sha256:865856ebb55c4dcd0630cdd8f3331a1847a819dda7e8c750d3db6f2aa6c0209c", - "sha256:a0b915f0815982fb2a09161cb8f31708052d0951c3ba433ccc5e1aa276507ca6" + "sha256:7280924747b5733b246fe23972186c6b348f9ae29724135a6dfc1e53cea433e7", + "sha256:e5f4a1f98b52b18a93da705a7458e55afb26f32bff83ff5d19189f92462d65c4" ], - "version": "==0.15.4" + "version": "==0.16.0" } }, "develop": {} From 9b3f8c9145770ddf57706b672be91db51391778d Mon Sep 17 00:00:00 2001 From: Luuk van Venrooij Date: Wed, 23 Oct 2019 12:03:06 +0200 Subject: [PATCH 04/25] Added design document for modular cli. --- docs/design-docs/modular-cli/modular-cli.png | 3 + docs/design-docs/modular-cli/moduler-cli.md | 177 +++++++++++++++++++ 2 files changed, 180 insertions(+) create mode 100644 docs/design-docs/modular-cli/modular-cli.png create mode 100644 docs/design-docs/modular-cli/moduler-cli.md diff --git a/docs/design-docs/modular-cli/modular-cli.png b/docs/design-docs/modular-cli/modular-cli.png new file mode 100644 index 0000000000..a638f51402 --- /dev/null +++ b/docs/design-docs/modular-cli/modular-cli.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07dfa44e78fea49a85c6d339c537c7cb4d06334c8d707deac949cc6f878eefd1 +size 91618 diff --git a/docs/design-docs/modular-cli/moduler-cli.md b/docs/design-docs/modular-cli/moduler-cli.md new file mode 100644 index 0000000000..4caeb9fcbb --- /dev/null +++ b/docs/design-docs/modular-cli/moduler-cli.md @@ -0,0 +1,177 @@ +# Epicli modular design document + +Affected version: 0.4.x + +## Goals + +Make epicli easier to work on with multiple teams and make it easier to maintain/extend by: + +1. Splitting up the monotithic Epicli into seperate modules which can run as standalone CLI tools or be linked together through Epicli. +2. Create an extendable plug and play system for roles which can be assigned to components based on certain tasks: apply, upgrade, backup, restore, test etc + +## Architectural design + +The current monitlithic epicli will be split up into the following modules. + +![Module cli design proposal](modular-cli.png) + +### Core + +Shared code between other modules and not executable as standalone. Responsible for: + +- Config +- Logging +- Helpers +- Data schema handling: Loading, defaults, validating etv. +- Build output handling: Loading, saving, updating etc. +- Ansible runner + +### Infrastructure + +Module for creating/destroying cloud infrastructure on AWS/Azure/Google... + "Analysing" existing infrastructure. Maybe at a later time we want to split up the different cloud providers into plugins as well. + +Functionality (rough outline and subjected to change): + +1. template: + ``` + "epicli infra template -f outfile.yaml -p awz/azure/google/any (--all)" + "infra template -f outfile.yaml -p awz/azure/google/any (--all)"? + "Infrastructure.template(...)" + Task: Generate a template yaml with epiphany-cluster definition + possible infra docs when --all is defined + Input: File to output data, provider and possible all flag + Output: outfile.yaml template + ``` +2. apply: + ``` + "epicli infra apply -f data.yaml" + "infra apply -f data.yaml"? + "Infrastructure.apply(...)" + Task: Create/Update infrastucture on AWS/Azure/Google... + Input: Yaml with at least epiphany-cluster + possible infra docs + Output: manifest, ansible inventory and terrafrom files + ``` +3. analyse: + ``` + "epicli infra analyse -f data.yaml" + "infra analyse -f data.yaml"? + "Infrastructure.analyse(...)" + Task: Analysing existing infrastructure + Input: Yaml with at least epiphany-cluster + possible infra docs + Output: manifest, ansible inventory + ``` +4. destroy: + ``` + "epicli infra destroy -b /buildfolder/" + "infra destroy -b /buildfolder/"? + "Infrastructure.destroy(...)" + Task: Destroy all infrastucture on AWS/Azure/Google? + Input: Build folder with manifest and terrafrom files + Output: Deletes the build folder. + ``` + +### Repository + +Module for creating and tearing down a repo + preparing requirements for offline installation. + +Functionality (rough outline and subjected to change): + +1. template: + ``` + "epicli repo template -f outfile.yaml (--all)" + "repo template -f outfile.yaml (--all)"? + "Repository.template(...)" + Task: Generate a template yaml for a repository + Input: File to output data, provider and possible all flag + Output: outfile.yaml template + ``` +2. prepare: + ``` + "epicli repo prepare -os (ubuntu-1904/redhat-7/centos-7)" + "repo prepare -o /outputdirectory/"? + "Repo.prepare(...)" + Task: Create the scripts for downloading requirements for a repo for offline installation for a certain OS. + Input: Os which we want to output the scripts for: (ubuntu-1904/redhat-7/centos-7) + Output: Outputs the scripts scripts + ``` +3. create: + ``` + "epicli repo create -b /buildfolder/ (--offline /foldertodownloadedrequirements)" + "repo create -b /buildfolder/"? + "Repo.create(...)" + Task: Create the repository on a machine (either by running requirement script or copying already prepared ) and sets up the other VMs/machines to point to said repo machine. (Offline and offline depending on --offline flag) + Input: Build folder with manifest and ansible inventory and posible offline requirements folder for onprem installation. + Output: repository manifest or something only with the location of the repo? + ``` +4. teardown: + ``` + "epicli repo teardown -b /buildfolder/" + "repo teardown -b /buildfolder/"? + "Repo.teardown(...)" + Task: Disable the repository and resets the other VMs/machines to their previous state. + Input: Build folder with manifest and ansible inventory + Output: - + ``` + +### Components + +Module for applying a command on a component which can contain one or multiple roles. It will take the Ansible inventory to determin which roles should be applied to which component. The command each role can implement are (rough outline and subjected to change): + +- apply: Command to install roles for components +- backup: Command to backup roles for components +- restore: Command to backup roles for components +- upgrade: Command to upgrade roles for components +- test: Command to upgrade roles for components + +The `apply` command should be implemented for every role but the rest is optional. From an implementation perspective each role will be just a seperate folder inside the plugins directory inside the `components` module folder with command folders which will contain the ansible tasks: + +``` +components-| + |-plugins-| + |-master-| + | |-apply + | |-backup + | |-restore + | |-upgrade + | |-test + | + |-node-| + | |-apply + | |-backup + | |-restore + | |-upgrade + | |-test + | + |-kafka-| + | |-apply + | |-upgrade + | |-test +``` + +Based on the Ansible inventory and the command we can easily select which roles to apply to which components. For the commands we probably also want to introduce some extra flags to only execute commands for certain components. + +Finally we want to add support for an external plugin directory where teams can specify there own role plguins which are not (jet) available inside Epiphany itself. A feature that can also be used by other teams to more easily start contributing developing new components. + +### Epicli + +Bundles all executable modules (Infrastructure, Repository, Component) and adds functions to chain them together: + +Functionality (rough outline and subjected to change): + +1. template: + ``` + "epicli template -f outfile.yaml -p awz/azure/google/any (--all)" + "Epicli.template(...)" + Task: Generate a template yaml with epiphany-cluster definition + possible infrastrucure, repo and component configurations + Input: File to output data, provider and possible all flag + Output: outfile.yaml with templates + ``` +2. apply: + ``` + "epicli apply -f input.yaml" + "Epicli.template(...)" + Task: Sets up a cluster from start to finish + Input: File to output data, provider and possible all flag + Output: Build folder with manifest, ansible inventory, terrafrom files, component setup. + ``` + +... \ No newline at end of file From b45bb34af2434864adc36379fdb9d8d1755a6328 Mon Sep 17 00:00:00 2001 From: Luuk van Venrooij <11056665+seriva@users.noreply.github.com> Date: Wed, 23 Oct 2019 14:04:39 +0200 Subject: [PATCH 05/25] Update docs/design-docs/modular-cli/moduler-cli.md Co-Authored-By: erzetpe --- docs/design-docs/modular-cli/moduler-cli.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/design-docs/modular-cli/moduler-cli.md b/docs/design-docs/modular-cli/moduler-cli.md index 4caeb9fcbb..e19f1c5888 100644 --- a/docs/design-docs/modular-cli/moduler-cli.md +++ b/docs/design-docs/modular-cli/moduler-cli.md @@ -11,7 +11,7 @@ Make epicli easier to work on with multiple teams and make it easier to maintain ## Architectural design -The current monitlithic epicli will be split up into the following modules. +The current monolithic epicli will be split up into the following modules. ![Module cli design proposal](modular-cli.png) @@ -174,4 +174,4 @@ Functionality (rough outline and subjected to change): Output: Build folder with manifest, ansible inventory, terrafrom files, component setup. ``` -... \ No newline at end of file +... From 78b01343838dc6ba9a84e34a95152841de57a077 Mon Sep 17 00:00:00 2001 From: Luuk van Venrooij <11056665+seriva@users.noreply.github.com> Date: Wed, 23 Oct 2019 14:04:58 +0200 Subject: [PATCH 06/25] Update docs/design-docs/modular-cli/moduler-cli.md Co-Authored-By: erzetpe --- docs/design-docs/modular-cli/moduler-cli.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/design-docs/modular-cli/moduler-cli.md b/docs/design-docs/modular-cli/moduler-cli.md index e19f1c5888..7ddd388234 100644 --- a/docs/design-docs/modular-cli/moduler-cli.md +++ b/docs/design-docs/modular-cli/moduler-cli.md @@ -114,7 +114,7 @@ Functionality (rough outline and subjected to change): ### Components -Module for applying a command on a component which can contain one or multiple roles. It will take the Ansible inventory to determin which roles should be applied to which component. The command each role can implement are (rough outline and subjected to change): +Module for applying a command on a component which can contain one or multiple roles. It will take the Ansible inventory to determine which roles should be applied to which component. The command each role can implement are (rough outline and subjected to change): - apply: Command to install roles for components - backup: Command to backup roles for components From 9a7e67532c6e89e3510923d71f5ced91d0675817 Mon Sep 17 00:00:00 2001 From: Luuk van Venrooij <11056665+seriva@users.noreply.github.com> Date: Wed, 23 Oct 2019 14:05:04 +0200 Subject: [PATCH 07/25] Update docs/design-docs/modular-cli/moduler-cli.md Co-Authored-By: erzetpe --- docs/design-docs/modular-cli/moduler-cli.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/design-docs/modular-cli/moduler-cli.md b/docs/design-docs/modular-cli/moduler-cli.md index 7ddd388234..6c6ed22c09 100644 --- a/docs/design-docs/modular-cli/moduler-cli.md +++ b/docs/design-docs/modular-cli/moduler-cli.md @@ -149,7 +149,7 @@ components-| Based on the Ansible inventory and the command we can easily select which roles to apply to which components. For the commands we probably also want to introduce some extra flags to only execute commands for certain components. -Finally we want to add support for an external plugin directory where teams can specify there own role plguins which are not (jet) available inside Epiphany itself. A feature that can also be used by other teams to more easily start contributing developing new components. +Finally we want to add support for an external plugin directory where teams can specify there own role plguins which are not (yet) available inside Epiphany itself. A feature that can also be used by other teams to more easily start contributing developing new components. ### Epicli From 7f7fe2202bc4342f8a9b95a0ee3584ea16d3efaf Mon Sep 17 00:00:00 2001 From: Luuk van Venrooij Date: Wed, 23 Oct 2019 14:38:06 +0200 Subject: [PATCH 08/25] Removed legacy Epiphany code --- core/ansible.cfg | 6 - core/bin/README.md | 20 - core/bin/replacer | 92 -- core/bin/template_engine | 126 -- core/core/src/ansible/backup.yml | 9 - core/core/src/ansible/common.yml | 11 - core/core/src/ansible/deployments.yml | 11 - .../src/ansible/elasticsearch-curator.yml | 8 - core/core/src/ansible/elasticsearch.yml | 8 - core/core/src/ansible/filebeat.yml | 11 - core/core/src/ansible/grafana.yml | 7 - core/core/src/ansible/group_vars/kafka.yml | 1 - core/core/src/ansible/haproxy.yml | 11 - core/core/src/ansible/haproxy_exporter.yml | 11 - .../src/ansible/haproxy_tls_termination.yml | 11 - core/core/src/ansible/jmx-exporter.yml | 7 - core/core/src/ansible/kafka-exporter.yml | 7 - core/core/src/ansible/kafka.yml | 8 - core/core/src/ansible/kafka_verify.yml | 18 - core/core/src/ansible/kibana.yml | 8 - core/core/src/ansible/master.yml | 8 - core/core/src/ansible/node_exporter.yml | 7 - core/core/src/ansible/postgresql.yml | 8 - core/core/src/ansible/prometheus.yml | 7 - core/core/src/ansible/rabbitmq.yml | 8 - core/core/src/ansible/reboot.yml | 8 - core/core/src/ansible/recovery.yml | 9 - .../ansible/roles/backup/defaults/main.yml | 2 - .../src/ansible/roles/backup/tasks/main.yml | 69 - .../ansible/roles/common/files/keys/epiphany | 1 - .../src/ansible/roles/common/files/motd.tail | 25 - .../ansible/roles/common/files/operations.sh | 16 - .../ansible/roles/common/handlers/main.yml | 9 - .../src/ansible/roles/common/tasks/Debian.yml | 56 - .../src/ansible/roles/common/tasks/RedHat.yml | 58 - .../ansible/roles/common/tasks/epiuser.yml | 38 - .../tasks/firewall/configure-fw-Debian.yml | 44 - .../tasks/firewall/configure-fw-RedHat.yml | 26 - .../common/tasks/firewall/configure-fw.yml | 18 - .../src/ansible/roles/common/tasks/main.yml | 134 -- .../ansible/roles/common/tasks/security.yml | 15 - .../src/ansible/roles/common/vars/main.yml | 2 - .../roles/deployments/defaults/main.yml | 3 - .../applications/auth-service/cleanup.yml | 4 - .../auth-service/configure-database.yml | 15 - .../auth-service/create-service.yml | 18 - .../tasks/applications/auth-service/main.yml | 15 - .../auth-service/set-variables.yml | 21 - .../applications/auth-service/validation.yml | 4 - .../tasks/applications/rabbitmq/cleanup.yml | 5 - .../rabbitmq/create-namespace.yml | 13 - .../applications/rabbitmq/create-rbac.yml | 13 - .../applications/rabbitmq/create-service.yml | 13 - .../tasks/applications/rabbitmq/main.yml | 24 - .../rabbitmq/set-erlang-cookie.yml | 67 - .../applications/rabbitmq/set-variables.yml | 46 - .../ansible/roles/deployments/tasks/main.yml | 15 - .../auth-service/auth-service.yml.j2 | 244 --- .../rabbitmq/rabbitmq-namespace.yml.j2 | 5 - .../templates/rabbitmq/rabbitmq-rbac.yml.j2 | 29 - .../templates/rabbitmq/rabbitmq-secret.yml.j2 | 11 - .../templates/rabbitmq/rabbitmq.yml.j2 | 137 -- .../ansible/roles/docker/defaults/main.yml | 5 - .../ansible/roles/docker/handlers/main.yml | 5 - .../src/ansible/roles/docker/tasks/Debian.yml | 26 - .../src/ansible/roles/docker/tasks/RedHat.yml | 22 - .../roles/docker/tasks/configure-docker.yml | 27 - .../src/ansible/roles/docker/tasks/main.yml | 6 - .../roles/docker/templates/daemon.json.j2 | 7 - .../elasticsearch-curator/defaults/main.yml | 14 - .../elasticsearch-curator/tasks/Debian.yml | 7 - .../elasticsearch-curator/tasks/RedHat.yml | 6 - .../elasticsearch-curator/tasks/main.yml | 14 - .../roles/elasticsearch/defaults/main.yml | 1 - .../roles/elasticsearch/tasks/Debian.yml | 25 - .../roles/elasticsearch/tasks/RedHat.yml | 25 - .../roles/elasticsearch/tasks/main.yml | 5 - .../elasticsearch/tasks/set-pam-limits.yml | 11 - .../ansible/roles/filebeat/defaults/main.yml | 3 - .../ansible/roles/filebeat/handlers/main.yml | 6 - .../ansible/roles/filebeat/tasks/Debian.yml | 7 - .../ansible/roles/filebeat/tasks/RedHat.yml | 7 - .../filebeat/tasks/configure-filebeat.yml | 33 - .../src/ansible/roles/filebeat/tasks/main.yml | 21 - .../templates/extra-dependencies.conf.j2 | 4 - .../roles/filebeat/templates/filebeat.yml.j2 | 232 --- .../ansible/roles/grafana/defaults/main.yml | 218 --- .../ansible/roles/grafana/handlers/main.yml | 6 - .../ansible/roles/grafana/tasks/api_keys.yml | 41 - .../ansible/roles/grafana/tasks/configure.yml | 53 - .../roles/grafana/tasks/dashboards.yml | 80 - .../roles/grafana/tasks/datasources.yml | 39 - .../ansible/roles/grafana/tasks/install.yml | 110 -- .../src/ansible/roles/grafana/tasks/main.yml | 63 - .../roles/grafana/tasks/notifications.yml | 23 - .../ansible/roles/grafana/tasks/plugins.yml | 15 - .../ansible/roles/grafana/tasks/preflight.yml | 84 - .../roles/grafana/templates/grafana.ini.j2 | 175 --- .../grafana/templates/grafana.yum.repo.j2 | 10 - .../roles/grafana/templates/ldap.toml.j2 | 33 - .../src/ansible/roles/grafana/vars/debian.yml | 7 - .../src/ansible/roles/grafana/vars/redhat.yml | 3 - .../ansible/roles/haproxy/defaults/main.yml | 2 - .../haproxy/files/haproxy_rsyslog_Debian.conf | 1 - .../haproxy/files/haproxy_rsyslog_RedHat.conf | 7 - .../ansible/roles/haproxy/tasks/Debian.yml | 42 - .../ansible/roles/haproxy/tasks/RedHat.yml | 63 - .../src/ansible/roles/haproxy/tasks/main.yml | 5 - .../haproxy/templates/haproxy_Debian.cfg.j2 | 28 - .../haproxy/templates/haproxy_RedHat.cfg.j2 | 28 - .../roles/haproxy_exporter/defaults/main.yml | 12 - .../tasks/haproxy_exporter.yml | 81 - .../roles/haproxy_exporter/tasks/main.yml | 3 - .../templates/file_sd_haproxy_config.yml.j2 | 7 - .../prometheus-haproxy-exporter.service.j2 | 12 - .../haproxy_tls_termination/defaults/main.yml | 8 - .../files/haproxy_rsyslog_Debian.conf | 1 - .../files/haproxy_rsyslog_RedHat.conf | 7 - .../haproxy_tls_termination/tasks/Debian.yml | 109 -- .../haproxy_tls_termination/tasks/RedHat.yml | 119 -- .../tasks/certificate_generate.yml | 45 - .../haproxy_tls_termination/tasks/main.yml | 5 - .../tasks/setup_logrotate.yml | 9 - .../templates/haproxy_Debian.cfg.j2 | 94 -- .../templates/haproxy_RedHat.cfg.j2 | 99 -- .../templates/logrotate.conf.j2 | 14 - .../roles/jmx-exporter/defaults/main.yml | 9 - .../ansible/roles/jmx-exporter/tasks/main.yml | 44 - .../ansible/roles/jmx-exporter/vars/main.yml | 0 .../roles/kafka-exporter/defaults/main.yml | 12 - .../roles/kafka-exporter/handlers/main.yml | 21 - .../kafka-exporter/tasks/kafka-exporter.yml | 83 - .../roles/kafka-exporter/tasks/main.yml | 3 - .../templates/file_sd_config.yml.j2 | 7 - .../templates/kafka-exporter.service.j2 | 12 - .../roles/kafka-exporter/vars/main.yml | 9 - .../src/ansible/roles/kafka/defaults/main.yml | 89 -- .../roles/kafka/files/jmx-kafka-config.yml | 89 -- .../roles/kafka/files/kafka_generate_ssl.sh | 224 --- .../roles/kafka/files/log4j.properties | 86 -- .../src/ansible/roles/kafka/handlers/main.yml | 20 - .../src/ansible/roles/kafka/tasks/main.yml | 17 - .../src/ansible/roles/kafka/tasks/metrics.yml | 59 - .../ansible/roles/kafka/tasks/setup-kafka.yml | 150 -- .../src/ansible/roles/kafka/tasks/start.yml | 11 - .../src/ansible/roles/kafka/tasks/stop.yml | 4 - .../roles/kafka/tasks/verify-kafka.yml | 14 - .../kafka/templates/client-ssl.properties.j2 | 4 - .../kafka/templates/file_sd_config.yml.j2 | 7 - .../roles/kafka/templates/kafka.conf.j2 | 18 - .../roles/kafka/templates/kafka.service.j2 | 22 - .../templates/kafka_producer_consumer.py.j2 | 77 - .../kafka/templates/kafka_server_jaas.conf.j2 | 9 - .../kafka/templates/kafka_ssl_automated.sh.j2 | 57 - .../roles/kafka/templates/logrotate.conf.j2 | 8 - .../kafka/templates/server.properties.j2 | 171 --- .../src/ansible/roles/kafka/vars/main.yml | 7 - .../ansible/roles/kibana/defaults/main.yml | 3 - .../src/ansible/roles/kibana/tasks/Debian.yml | 38 - .../src/ansible/roles/kibana/tasks/RedHat.yml | 44 - .../src/ansible/roles/kibana/tasks/main.yml | 4 - .../roles/kibana/tasks/setup-logging.yml | 33 - .../roles/kibana/templates/logrotate.conf.j2 | 8 - .../roles/kubernetes-common/meta/main.yml | 3 - .../tasks/configure-kubelet.yml | 48 - .../tasks/install-packages.yml | 31 - .../roles/kubernetes-common/tasks/main.yml | 2 - .../templates/11-cgroup.conf.j2 | 5 - .../templates/config.yaml.j2 | 3 - .../ansible/roles/master/defaults/main.yml | 21 - .../src/ansible/roles/master/files/calico.yml | 782 ---------- .../src/ansible/roles/master/files/canal.yml | 606 -------- .../roles/master/files/coredns-config.yml | 192 --- .../ansible/roles/master/files/jsonpath.json | 1 - .../roles/master/files/kube-flannel.yml | 531 ------- .../master/files/kubernetes-dashboard.yml | 281 ---- .../roles/master/files/role-binding.yml | 12 - .../roles/master/files/sample-role.yml | 5 - .../src/ansible/roles/master/meta/main.yml | 3 - .../roles/master/tasks/kubernetes-storage.yml | 33 - .../src/ansible/roles/master/tasks/main.yml | 17 - .../roles/master/tasks/registry-secrets.yml | 7 - .../roles/master/tasks/single-master.yml | 173 --- .../templates/k8s-persistent-volume.yml.j2 | 13 - .../templates/k8s-storage-secret.yml.j2 | 8 - .../src/ansible/roles/master/vars/main.yml | 2 - .../roles/node_exporter/defaults/main.yml | 43 - .../roles/node_exporter/handlers/main.yml | 21 - .../roles/node_exporter/tasks/main.yml | 5 - .../tasks/prometheus-node-exporter.yml | 83 - .../templates/file_sd_config.yml.j2 | 7 - .../templates/prometheus-node-exporter.j2 | 58 - .../prometheus-node-exporter.service.j2 | 12 - .../ansible/roles/node_exporter/vars/main.yml | 9 - .../roles/postgresql/defaults/main.yml | 5 - .../ansible/roles/postgresql/tasks/Debian.yml | 36 - .../ansible/roles/postgresql/tasks/RedHat.yml | 62 - .../ansible/roles/postgresql/tasks/main.yml | 5 - .../postgresql/tasks/replication-Debian.yml | 126 -- .../postgresql/tasks/replication-RedHat.yml | 153 -- .../roles/postgresql/templates/pgpass.j2 | 1 - .../postgresql/templates/recovery.conf.j2 | 3 - .../roles/prometheus/defaults/main.yml | 296 ---- .../prometheus/files/k8s-rolebinding.yml | 39 - .../files/prometheus/targets/.placeholder | 0 .../roles/prometheus/handlers/main.yml | 13 - .../tasks/configure-alertmanager.yml | 29 - .../roles/prometheus/tasks/configure.yml | 36 - .../prometheus/tasks/install-alertmanager.yml | 50 - .../roles/prometheus/tasks/install.yml | 101 -- .../ansible/roles/prometheus/tasks/main.yml | 59 - .../roles/prometheus/tasks/preflight.yml | 100 -- .../roles/prometheus/templates/alert.rules.j2 | 9 - .../templates/alertmanager.service.j2 | 19 - .../prometheus/templates/alertmanager.yml.j2 | 64 - .../templates/prometheus.service.j2 | 48 - .../prometheus/templates/prometheus.yml.j2 | 34 - .../ansible/roles/prometheus/vars/debian.yml | 4 - .../ansible/roles/prometheus/vars/main.yml | 7 - .../ansible/roles/prometheus/vars/redhat.yml | 4 - .../ansible/roles/rabbitmq/defaults/main.yml | 14 - .../ansible/roles/rabbitmq/tasks/Debian.yml | 28 - .../ansible/roles/rabbitmq/tasks/RedHat.yml | 19 - .../rabbitmq/tasks/configure-policies.yml | 9 - .../rabbitmq/tasks/configure-rabbitmq.yml | 36 - .../rabbitmq/tasks/cookie-setup/master.yml | 67 - .../rabbitmq/tasks/cookie-setup/nodes.yml | 27 - .../tasks/enable-and-start-service.yml | 10 - .../roles/rabbitmq/tasks/join-cluster.yml | 18 - .../src/ansible/roles/rabbitmq/tasks/main.yml | 20 - .../rabbitmq/tasks/set-erlang-cookie.yml | 8 - .../roles/rabbitmq/tasks/set-logrotate.yml | 9 - .../roles/rabbitmq/tasks/set-ulimits.yml | 16 - .../roles/rabbitmq/tasks/set-variables.yml | 43 - .../roles/rabbitmq/templates/erlang-cookie.j2 | 1 - .../rabbitmq/templates/logrotate-config.j2 | 12 - .../rabbitmq/templates/rabbitmq-env.conf.j2 | 4 - .../rabbitmq/templates/rabbitmq-server.j2 | 8 - .../src/ansible/roles/reboot/tasks/main.yml | 15 - .../ansible/roles/recovery/defaults/main.yml | 2 - .../src/ansible/roles/recovery/tasks/main.yml | 132 -- .../ansible/roles/upgrade/defaults/main.yml | 1 - .../src/ansible/roles/upgrade/tasks/main.yml | 34 - .../roles/upgrade/tasks/upgrade_master.yml | 118 -- .../roles/upgrade/tasks/upgrade_nodes.yml | 83 - .../ansible/roles/upgrade/tasks/verify.yml | 42 - .../src/ansible/roles/upgrade/tasks/wait.yml | 37 - .../ansible/roles/worker/defaults/main.yml | 18 - .../src/ansible/roles/worker/meta/main.yml | 3 - .../src/ansible/roles/worker/tasks/main.yml | 81 - .../src/ansible/roles/worker/vars/main.yml | 2 - .../ansible/roles/zookeeper/defaults/main.yml | 30 - .../zookeeper/files/jmx-zookeeper-config.yml | 23 - .../ansible/roles/zookeeper/handlers/main.yml | 19 - .../ansible/roles/zookeeper/tasks/main.yml | 109 -- .../ansible/roles/zookeeper/tasks/metrics.yml | 57 - .../zookeeper/templates/file_sd_config.yml.j2 | 7 - .../zookeeper/templates/log4j.properties.j2 | 58 - .../ansible/roles/zookeeper/templates/myid.j2 | 5 - .../ansible/roles/zookeeper/templates/zoo.j2 | 20 - .../zookeeper/templates/zookeeper.service.j2 | 20 - .../src/ansible/roles/zookeeper/vars/main.yml | 0 core/core/src/ansible/upgrade.yml | 31 - core/core/src/ansible/worker.yml | 10 - core/core/src/ansible/zookeeper.yml | 8 - core/core/src/docker/deploy/Dockerfile | 9 - core/core/src/docker/deploy/init.sh | 12 - core/core/src/docker/dev/Dockerfile | 84 - core/core/src/docker/sonarqube/Dockerfile | 6 - core/core/src/docker/test-CI/Dockerfile | 23 - core/core/src/docker/test-CI/prepare_sp.sh | 58 - core/core/src/docker/test-CI/run.sh | 27 - core/core/src/docker/test/Dockerfile | 54 - core/core/src/docker/test/run.sh | 3 - .../src/scripts/azure/fill_in_manifest.py | 52 - .../src/scripts/azure/gen_templates_azure.sh | 102 -- core/core/src/scripts/azure/run_build.sh | 232 --- core/core/src/scripts/common/base_colors.sh | 119 -- core/core/src/scripts/common/functions.sh | 69 - .../scripts/helpers/simple-log-collector.sh | 51 - .../kubernetes/get-id-rsa-from-value.sh | 33 - .../src/scripts/kubernetes/get-init-token.sh | 46 - .../kubernetes/linux/make-executable.sh | 24 - .../master/apply-kubernetes-dashboard.sh | 33 - .../linux/master/init-kubernetes-master.sh | 57 - .../linux/master/resources/kube-flannel.yml | 159 -- .../master/resources/kubernetes-dashboard.yml | 167 -- .../linux/master/resources/nginx.yml | 38 - .../linux/master/resources/role-binding.yml | 12 - .../linux/master/resources/sample-role.yml | 5 - .../kubernetes/linux/master/untaint-master.sh | 38 - .../linux/node/init-kubernetes-nodes.sh | 49 - .../linux/prepare-system-kubernetes-redhat.sh | 55 - .../linux/prepare-system-kubernetes-ubuntu.sh | 40 - .../windows/node/0_DownloadRequired.ps1 | 51 - .../windows/node/1_InstallDocker.ps1 | 6 - .../kubernetes/windows/node/2_SetupNode.ps1 | 31 - .../kubernetes/windows/node/Dockerfile | 3 - .../src/scripts/vsts/run-template-engine.sh | 28 - core/core/src/templates/README.md | 3 - .../core/src/templates/azure/az_get_ips.sh.j2 | 43 - core/core/src/templates/azure/backend.sh.j2 | 123 -- core/core/src/templates/azure/backend.tf.j2 | 29 - core/core/src/templates/azure/base.tf.j2 | 61 - .../core/src/templates/azure/config.tfvars.j2 | 24 - core/core/src/templates/azure/del_rg.sh.j2 | 83 - core/core/src/templates/azure/del_sp.sh.j2 | 89 -- core/core/src/templates/azure/env.sh.j2 | 39 - core/core/src/templates/azure/gen_sp.sh.j2 | 205 --- .../src/templates/azure/k8s_storage.tf.j2 | 45 - core/core/src/templates/azure/locks.tf.j2 | 26 - core/core/src/templates/azure/login.sh.j2 | 72 - core/core/src/templates/azure/main.tf.j2 | 414 ----- core/core/src/templates/azure/outputs.tf.j2 | 19 - core/core/src/templates/azure/release.sh.j2 | 71 - .../core/src/templates/azure/security.yaml.j2 | 25 - core/core/src/templates/azure/variables.tf.j2 | 28 - core/core/src/templates/azure/version.sh.j2 | 29 - core/core/src/templates/common/ansible.cfg.j2 | 12 - core/core/src/templates/common/ansible.sh.j2 | 232 --- .../src/templates/common/ansible_inventory.j2 | 37 - core/core/src/templates/common/hosts.j2 | 26 - core/core/src/templates/common/main.yml.j2 | 14 - .../src/templates/common/manifest.yaml.j2 | 200 --- core/core/src/templates/common/proxy.sh.j2 | 31 - core/core/src/templates/common/version.sh.j2 | 29 - core/core/test/kubernetes/README.md | 21 - .../kubernetes/install-test-prerequisites.sh | 47 - .../core/test/kubernetes/run-sonobuoy-test.sh | 59 - core/core/test/serverspec/.rspec | 2 - core/core/test/serverspec/Gemfile | 5 - core/core/test/serverspec/Gemfile.lock | 47 - core/core/test/serverspec/README.md | 32 - core/core/test/serverspec/Rakefile | 80 - core/core/test/serverspec/rvm.sh | 937 ------------ .../deployments/auth-service/auth-service.rb | 57 - .../spec/deployments/deployments_spec.rb | 12 - .../spec/deployments/rabbitmq/rabbitmq.rb | 172 --- .../elasticsearch-curator_spec.rb | 15 - .../spec/elasticsearch/elasticsearch_spec.rb | 60 - .../serverspec/spec/filebeat/filebeat_spec.rb | 60 - .../serverspec/spec/grafana/grafana_spec.rb | 107 -- .../haproxy_exporter/haproxy_exporter_spec.rb | 42 - .../haproxy_tls_termination_spec.rb | 89 -- .../spec/jmx-exporter/jmx_exporter_spec.rb | 54 - .../kafka-exporter/kafka_exporter_spec.rb | 41 - .../test/serverspec/spec/kafka/kafka_spec.rb | 115 -- .../serverspec/spec/kibana/kibana_spec.rb | 77 - .../serverspec/spec/master/master_spec.rb | 176 --- .../spec/node_exporter/node_exporter_spec.rb | 50 - .../spec/postgresql/postgresql_spec.rb | 268 ---- .../spec/prometheus/prometheus_spec.rb | 322 ---- .../serverspec/spec/rabbitmq/rabbitmq_spec.rb | 180 --- core/core/test/serverspec/spec/spec_helper.rb | 87 -- .../spec/zookeeper/zookeeper_spec.rb | 85 -- core/data/azure/infrastructure/README.md | 39 - .../epiphany-bld-apps/data.yaml | 1279 ---------------- .../epiphany-playground/README.md | 8 - .../epiphany-playground/basic-data.yaml | 26 - .../epiphany-qa-basic/basic-data.yaml | 33 - .../epiphany-qa-template/data.yaml.j2 | 1348 ----------------- .../epiphany-single-machine/data.yaml | 602 -------- .../epiphany-template/data.yaml.j2 | 1316 ---------------- core/data/metal/epiphany-lab/data.yaml | 403 ----- .../metal/epiphany-single-machine/data.yaml | 243 --- core/data/vbox/README.md | 7 - core/data/vmware/README.md | 3 - core/data/vmware/epiphany-lab/data.yaml | 403 ----- core/epiphany | 374 ----- core/epiphany-simple-config.yaml | 41 - core/manifest.yaml | 15 - core/proxy.sh | 25 - core/version.sh | 29 - 373 files changed, 24326 deletions(-) delete mode 100644 core/ansible.cfg delete mode 100644 core/bin/README.md delete mode 100644 core/bin/replacer delete mode 100755 core/bin/template_engine delete mode 100644 core/core/src/ansible/backup.yml delete mode 100644 core/core/src/ansible/common.yml delete mode 100644 core/core/src/ansible/deployments.yml delete mode 100644 core/core/src/ansible/elasticsearch-curator.yml delete mode 100644 core/core/src/ansible/elasticsearch.yml delete mode 100644 core/core/src/ansible/filebeat.yml delete mode 100644 core/core/src/ansible/grafana.yml delete mode 100644 core/core/src/ansible/group_vars/kafka.yml delete mode 100644 core/core/src/ansible/haproxy.yml delete mode 100644 core/core/src/ansible/haproxy_exporter.yml delete mode 100644 core/core/src/ansible/haproxy_tls_termination.yml delete mode 100644 core/core/src/ansible/jmx-exporter.yml delete mode 100644 core/core/src/ansible/kafka-exporter.yml delete mode 100644 core/core/src/ansible/kafka.yml delete mode 100644 core/core/src/ansible/kafka_verify.yml delete mode 100644 core/core/src/ansible/kibana.yml delete mode 100644 core/core/src/ansible/master.yml delete mode 100644 core/core/src/ansible/node_exporter.yml delete mode 100644 core/core/src/ansible/postgresql.yml delete mode 100644 core/core/src/ansible/prometheus.yml delete mode 100644 core/core/src/ansible/rabbitmq.yml delete mode 100644 core/core/src/ansible/reboot.yml delete mode 100644 core/core/src/ansible/recovery.yml delete mode 100644 core/core/src/ansible/roles/backup/defaults/main.yml delete mode 100644 core/core/src/ansible/roles/backup/tasks/main.yml delete mode 100644 core/core/src/ansible/roles/common/files/keys/epiphany delete mode 100644 core/core/src/ansible/roles/common/files/motd.tail delete mode 100755 core/core/src/ansible/roles/common/files/operations.sh delete mode 100644 core/core/src/ansible/roles/common/handlers/main.yml delete mode 100644 core/core/src/ansible/roles/common/tasks/Debian.yml delete mode 100644 core/core/src/ansible/roles/common/tasks/RedHat.yml delete mode 100644 core/core/src/ansible/roles/common/tasks/epiuser.yml delete mode 100644 core/core/src/ansible/roles/common/tasks/firewall/configure-fw-Debian.yml delete mode 100644 core/core/src/ansible/roles/common/tasks/firewall/configure-fw-RedHat.yml delete mode 100644 core/core/src/ansible/roles/common/tasks/firewall/configure-fw.yml delete mode 100644 core/core/src/ansible/roles/common/tasks/main.yml delete mode 100644 core/core/src/ansible/roles/common/tasks/security.yml delete mode 100644 core/core/src/ansible/roles/common/vars/main.yml delete mode 100644 core/core/src/ansible/roles/deployments/defaults/main.yml delete mode 100644 core/core/src/ansible/roles/deployments/tasks/applications/auth-service/cleanup.yml delete mode 100644 core/core/src/ansible/roles/deployments/tasks/applications/auth-service/configure-database.yml delete mode 100644 core/core/src/ansible/roles/deployments/tasks/applications/auth-service/create-service.yml delete mode 100644 core/core/src/ansible/roles/deployments/tasks/applications/auth-service/main.yml delete mode 100644 core/core/src/ansible/roles/deployments/tasks/applications/auth-service/set-variables.yml delete mode 100644 core/core/src/ansible/roles/deployments/tasks/applications/auth-service/validation.yml delete mode 100644 core/core/src/ansible/roles/deployments/tasks/applications/rabbitmq/cleanup.yml delete mode 100644 core/core/src/ansible/roles/deployments/tasks/applications/rabbitmq/create-namespace.yml delete mode 100644 core/core/src/ansible/roles/deployments/tasks/applications/rabbitmq/create-rbac.yml delete mode 100644 core/core/src/ansible/roles/deployments/tasks/applications/rabbitmq/create-service.yml delete mode 100644 core/core/src/ansible/roles/deployments/tasks/applications/rabbitmq/main.yml delete mode 100644 core/core/src/ansible/roles/deployments/tasks/applications/rabbitmq/set-erlang-cookie.yml delete mode 100644 core/core/src/ansible/roles/deployments/tasks/applications/rabbitmq/set-variables.yml delete mode 100644 core/core/src/ansible/roles/deployments/tasks/main.yml delete mode 100644 core/core/src/ansible/roles/deployments/templates/auth-service/auth-service.yml.j2 delete mode 100644 core/core/src/ansible/roles/deployments/templates/rabbitmq/rabbitmq-namespace.yml.j2 delete mode 100644 core/core/src/ansible/roles/deployments/templates/rabbitmq/rabbitmq-rbac.yml.j2 delete mode 100644 core/core/src/ansible/roles/deployments/templates/rabbitmq/rabbitmq-secret.yml.j2 delete mode 100644 core/core/src/ansible/roles/deployments/templates/rabbitmq/rabbitmq.yml.j2 delete mode 100644 core/core/src/ansible/roles/docker/defaults/main.yml delete mode 100644 core/core/src/ansible/roles/docker/handlers/main.yml delete mode 100644 core/core/src/ansible/roles/docker/tasks/Debian.yml delete mode 100644 core/core/src/ansible/roles/docker/tasks/RedHat.yml delete mode 100644 core/core/src/ansible/roles/docker/tasks/configure-docker.yml delete mode 100644 core/core/src/ansible/roles/docker/tasks/main.yml delete mode 100644 core/core/src/ansible/roles/docker/templates/daemon.json.j2 delete mode 100644 core/core/src/ansible/roles/elasticsearch-curator/defaults/main.yml delete mode 100644 core/core/src/ansible/roles/elasticsearch-curator/tasks/Debian.yml delete mode 100644 core/core/src/ansible/roles/elasticsearch-curator/tasks/RedHat.yml delete mode 100644 core/core/src/ansible/roles/elasticsearch-curator/tasks/main.yml delete mode 100644 core/core/src/ansible/roles/elasticsearch/defaults/main.yml delete mode 100644 core/core/src/ansible/roles/elasticsearch/tasks/Debian.yml delete mode 100644 core/core/src/ansible/roles/elasticsearch/tasks/RedHat.yml delete mode 100644 core/core/src/ansible/roles/elasticsearch/tasks/main.yml delete mode 100644 core/core/src/ansible/roles/elasticsearch/tasks/set-pam-limits.yml delete mode 100644 core/core/src/ansible/roles/filebeat/defaults/main.yml delete mode 100644 core/core/src/ansible/roles/filebeat/handlers/main.yml delete mode 100644 core/core/src/ansible/roles/filebeat/tasks/Debian.yml delete mode 100644 core/core/src/ansible/roles/filebeat/tasks/RedHat.yml delete mode 100644 core/core/src/ansible/roles/filebeat/tasks/configure-filebeat.yml delete mode 100644 core/core/src/ansible/roles/filebeat/tasks/main.yml delete mode 100644 core/core/src/ansible/roles/filebeat/templates/extra-dependencies.conf.j2 delete mode 100644 core/core/src/ansible/roles/filebeat/templates/filebeat.yml.j2 delete mode 100644 core/core/src/ansible/roles/grafana/defaults/main.yml delete mode 100644 core/core/src/ansible/roles/grafana/handlers/main.yml delete mode 100644 core/core/src/ansible/roles/grafana/tasks/api_keys.yml delete mode 100644 core/core/src/ansible/roles/grafana/tasks/configure.yml delete mode 100644 core/core/src/ansible/roles/grafana/tasks/dashboards.yml delete mode 100644 core/core/src/ansible/roles/grafana/tasks/datasources.yml delete mode 100644 core/core/src/ansible/roles/grafana/tasks/install.yml delete mode 100644 core/core/src/ansible/roles/grafana/tasks/main.yml delete mode 100644 core/core/src/ansible/roles/grafana/tasks/notifications.yml delete mode 100644 core/core/src/ansible/roles/grafana/tasks/plugins.yml delete mode 100644 core/core/src/ansible/roles/grafana/tasks/preflight.yml delete mode 100644 core/core/src/ansible/roles/grafana/templates/grafana.ini.j2 delete mode 100644 core/core/src/ansible/roles/grafana/templates/grafana.yum.repo.j2 delete mode 100644 core/core/src/ansible/roles/grafana/templates/ldap.toml.j2 delete mode 100644 core/core/src/ansible/roles/grafana/vars/debian.yml delete mode 100644 core/core/src/ansible/roles/grafana/vars/redhat.yml delete mode 100644 core/core/src/ansible/roles/haproxy/defaults/main.yml delete mode 100644 core/core/src/ansible/roles/haproxy/files/haproxy_rsyslog_Debian.conf delete mode 100644 core/core/src/ansible/roles/haproxy/files/haproxy_rsyslog_RedHat.conf delete mode 100644 core/core/src/ansible/roles/haproxy/tasks/Debian.yml delete mode 100644 core/core/src/ansible/roles/haproxy/tasks/RedHat.yml delete mode 100644 core/core/src/ansible/roles/haproxy/tasks/main.yml delete mode 100644 core/core/src/ansible/roles/haproxy/templates/haproxy_Debian.cfg.j2 delete mode 100644 core/core/src/ansible/roles/haproxy/templates/haproxy_RedHat.cfg.j2 delete mode 100644 core/core/src/ansible/roles/haproxy_exporter/defaults/main.yml delete mode 100644 core/core/src/ansible/roles/haproxy_exporter/tasks/haproxy_exporter.yml delete mode 100644 core/core/src/ansible/roles/haproxy_exporter/tasks/main.yml delete mode 100644 core/core/src/ansible/roles/haproxy_exporter/templates/file_sd_haproxy_config.yml.j2 delete mode 100644 core/core/src/ansible/roles/haproxy_exporter/templates/prometheus-haproxy-exporter.service.j2 delete mode 100644 core/core/src/ansible/roles/haproxy_tls_termination/defaults/main.yml delete mode 100644 core/core/src/ansible/roles/haproxy_tls_termination/files/haproxy_rsyslog_Debian.conf delete mode 100644 core/core/src/ansible/roles/haproxy_tls_termination/files/haproxy_rsyslog_RedHat.conf delete mode 100644 core/core/src/ansible/roles/haproxy_tls_termination/tasks/Debian.yml delete mode 100644 core/core/src/ansible/roles/haproxy_tls_termination/tasks/RedHat.yml delete mode 100644 core/core/src/ansible/roles/haproxy_tls_termination/tasks/certificate_generate.yml delete mode 100644 core/core/src/ansible/roles/haproxy_tls_termination/tasks/main.yml delete mode 100644 core/core/src/ansible/roles/haproxy_tls_termination/tasks/setup_logrotate.yml delete mode 100644 core/core/src/ansible/roles/haproxy_tls_termination/templates/haproxy_Debian.cfg.j2 delete mode 100644 core/core/src/ansible/roles/haproxy_tls_termination/templates/haproxy_RedHat.cfg.j2 delete mode 100644 core/core/src/ansible/roles/haproxy_tls_termination/templates/logrotate.conf.j2 delete mode 100644 core/core/src/ansible/roles/jmx-exporter/defaults/main.yml delete mode 100644 core/core/src/ansible/roles/jmx-exporter/tasks/main.yml delete mode 100644 core/core/src/ansible/roles/jmx-exporter/vars/main.yml delete mode 100644 core/core/src/ansible/roles/kafka-exporter/defaults/main.yml delete mode 100644 core/core/src/ansible/roles/kafka-exporter/handlers/main.yml delete mode 100644 core/core/src/ansible/roles/kafka-exporter/tasks/kafka-exporter.yml delete mode 100644 core/core/src/ansible/roles/kafka-exporter/tasks/main.yml delete mode 100644 core/core/src/ansible/roles/kafka-exporter/templates/file_sd_config.yml.j2 delete mode 100644 core/core/src/ansible/roles/kafka-exporter/templates/kafka-exporter.service.j2 delete mode 100644 core/core/src/ansible/roles/kafka-exporter/vars/main.yml delete mode 100644 core/core/src/ansible/roles/kafka/defaults/main.yml delete mode 100644 core/core/src/ansible/roles/kafka/files/jmx-kafka-config.yml delete mode 100755 core/core/src/ansible/roles/kafka/files/kafka_generate_ssl.sh delete mode 100644 core/core/src/ansible/roles/kafka/files/log4j.properties delete mode 100644 core/core/src/ansible/roles/kafka/handlers/main.yml delete mode 100644 core/core/src/ansible/roles/kafka/tasks/main.yml delete mode 100644 core/core/src/ansible/roles/kafka/tasks/metrics.yml delete mode 100644 core/core/src/ansible/roles/kafka/tasks/setup-kafka.yml delete mode 100644 core/core/src/ansible/roles/kafka/tasks/start.yml delete mode 100644 core/core/src/ansible/roles/kafka/tasks/stop.yml delete mode 100644 core/core/src/ansible/roles/kafka/tasks/verify-kafka.yml delete mode 100644 core/core/src/ansible/roles/kafka/templates/client-ssl.properties.j2 delete mode 100644 core/core/src/ansible/roles/kafka/templates/file_sd_config.yml.j2 delete mode 100644 core/core/src/ansible/roles/kafka/templates/kafka.conf.j2 delete mode 100644 core/core/src/ansible/roles/kafka/templates/kafka.service.j2 delete mode 100644 core/core/src/ansible/roles/kafka/templates/kafka_producer_consumer.py.j2 delete mode 100644 core/core/src/ansible/roles/kafka/templates/kafka_server_jaas.conf.j2 delete mode 100644 core/core/src/ansible/roles/kafka/templates/kafka_ssl_automated.sh.j2 delete mode 100644 core/core/src/ansible/roles/kafka/templates/logrotate.conf.j2 delete mode 100644 core/core/src/ansible/roles/kafka/templates/server.properties.j2 delete mode 100644 core/core/src/ansible/roles/kafka/vars/main.yml delete mode 100644 core/core/src/ansible/roles/kibana/defaults/main.yml delete mode 100644 core/core/src/ansible/roles/kibana/tasks/Debian.yml delete mode 100644 core/core/src/ansible/roles/kibana/tasks/RedHat.yml delete mode 100644 core/core/src/ansible/roles/kibana/tasks/main.yml delete mode 100644 core/core/src/ansible/roles/kibana/tasks/setup-logging.yml delete mode 100644 core/core/src/ansible/roles/kibana/templates/logrotate.conf.j2 delete mode 100644 core/core/src/ansible/roles/kubernetes-common/meta/main.yml delete mode 100644 core/core/src/ansible/roles/kubernetes-common/tasks/configure-kubelet.yml delete mode 100644 core/core/src/ansible/roles/kubernetes-common/tasks/install-packages.yml delete mode 100644 core/core/src/ansible/roles/kubernetes-common/tasks/main.yml delete mode 100644 core/core/src/ansible/roles/kubernetes-common/templates/11-cgroup.conf.j2 delete mode 100644 core/core/src/ansible/roles/kubernetes-common/templates/config.yaml.j2 delete mode 100644 core/core/src/ansible/roles/master/defaults/main.yml delete mode 100644 core/core/src/ansible/roles/master/files/calico.yml delete mode 100644 core/core/src/ansible/roles/master/files/canal.yml delete mode 100644 core/core/src/ansible/roles/master/files/coredns-config.yml delete mode 100644 core/core/src/ansible/roles/master/files/jsonpath.json delete mode 100644 core/core/src/ansible/roles/master/files/kube-flannel.yml delete mode 100644 core/core/src/ansible/roles/master/files/kubernetes-dashboard.yml delete mode 100644 core/core/src/ansible/roles/master/files/role-binding.yml delete mode 100644 core/core/src/ansible/roles/master/files/sample-role.yml delete mode 100644 core/core/src/ansible/roles/master/meta/main.yml delete mode 100644 core/core/src/ansible/roles/master/tasks/kubernetes-storage.yml delete mode 100644 core/core/src/ansible/roles/master/tasks/main.yml delete mode 100644 core/core/src/ansible/roles/master/tasks/registry-secrets.yml delete mode 100644 core/core/src/ansible/roles/master/tasks/single-master.yml delete mode 100644 core/core/src/ansible/roles/master/templates/k8s-persistent-volume.yml.j2 delete mode 100644 core/core/src/ansible/roles/master/templates/k8s-storage-secret.yml.j2 delete mode 100644 core/core/src/ansible/roles/master/vars/main.yml delete mode 100644 core/core/src/ansible/roles/node_exporter/defaults/main.yml delete mode 100644 core/core/src/ansible/roles/node_exporter/handlers/main.yml delete mode 100644 core/core/src/ansible/roles/node_exporter/tasks/main.yml delete mode 100644 core/core/src/ansible/roles/node_exporter/tasks/prometheus-node-exporter.yml delete mode 100644 core/core/src/ansible/roles/node_exporter/templates/file_sd_config.yml.j2 delete mode 100644 core/core/src/ansible/roles/node_exporter/templates/prometheus-node-exporter.j2 delete mode 100644 core/core/src/ansible/roles/node_exporter/templates/prometheus-node-exporter.service.j2 delete mode 100644 core/core/src/ansible/roles/node_exporter/vars/main.yml delete mode 100644 core/core/src/ansible/roles/postgresql/defaults/main.yml delete mode 100644 core/core/src/ansible/roles/postgresql/tasks/Debian.yml delete mode 100644 core/core/src/ansible/roles/postgresql/tasks/RedHat.yml delete mode 100644 core/core/src/ansible/roles/postgresql/tasks/main.yml delete mode 100644 core/core/src/ansible/roles/postgresql/tasks/replication-Debian.yml delete mode 100644 core/core/src/ansible/roles/postgresql/tasks/replication-RedHat.yml delete mode 100644 core/core/src/ansible/roles/postgresql/templates/pgpass.j2 delete mode 100644 core/core/src/ansible/roles/postgresql/templates/recovery.conf.j2 delete mode 100644 core/core/src/ansible/roles/prometheus/defaults/main.yml delete mode 100644 core/core/src/ansible/roles/prometheus/files/k8s-rolebinding.yml delete mode 100644 core/core/src/ansible/roles/prometheus/files/prometheus/targets/.placeholder delete mode 100644 core/core/src/ansible/roles/prometheus/handlers/main.yml delete mode 100644 core/core/src/ansible/roles/prometheus/tasks/configure-alertmanager.yml delete mode 100644 core/core/src/ansible/roles/prometheus/tasks/configure.yml delete mode 100644 core/core/src/ansible/roles/prometheus/tasks/install-alertmanager.yml delete mode 100644 core/core/src/ansible/roles/prometheus/tasks/install.yml delete mode 100644 core/core/src/ansible/roles/prometheus/tasks/main.yml delete mode 100644 core/core/src/ansible/roles/prometheus/tasks/preflight.yml delete mode 100644 core/core/src/ansible/roles/prometheus/templates/alert.rules.j2 delete mode 100644 core/core/src/ansible/roles/prometheus/templates/alertmanager.service.j2 delete mode 100644 core/core/src/ansible/roles/prometheus/templates/alertmanager.yml.j2 delete mode 100644 core/core/src/ansible/roles/prometheus/templates/prometheus.service.j2 delete mode 100644 core/core/src/ansible/roles/prometheus/templates/prometheus.yml.j2 delete mode 100644 core/core/src/ansible/roles/prometheus/vars/debian.yml delete mode 100644 core/core/src/ansible/roles/prometheus/vars/main.yml delete mode 100644 core/core/src/ansible/roles/prometheus/vars/redhat.yml delete mode 100644 core/core/src/ansible/roles/rabbitmq/defaults/main.yml delete mode 100644 core/core/src/ansible/roles/rabbitmq/tasks/Debian.yml delete mode 100644 core/core/src/ansible/roles/rabbitmq/tasks/RedHat.yml delete mode 100644 core/core/src/ansible/roles/rabbitmq/tasks/configure-policies.yml delete mode 100644 core/core/src/ansible/roles/rabbitmq/tasks/configure-rabbitmq.yml delete mode 100644 core/core/src/ansible/roles/rabbitmq/tasks/cookie-setup/master.yml delete mode 100644 core/core/src/ansible/roles/rabbitmq/tasks/cookie-setup/nodes.yml delete mode 100644 core/core/src/ansible/roles/rabbitmq/tasks/enable-and-start-service.yml delete mode 100644 core/core/src/ansible/roles/rabbitmq/tasks/join-cluster.yml delete mode 100644 core/core/src/ansible/roles/rabbitmq/tasks/main.yml delete mode 100644 core/core/src/ansible/roles/rabbitmq/tasks/set-erlang-cookie.yml delete mode 100644 core/core/src/ansible/roles/rabbitmq/tasks/set-logrotate.yml delete mode 100644 core/core/src/ansible/roles/rabbitmq/tasks/set-ulimits.yml delete mode 100644 core/core/src/ansible/roles/rabbitmq/tasks/set-variables.yml delete mode 100644 core/core/src/ansible/roles/rabbitmq/templates/erlang-cookie.j2 delete mode 100644 core/core/src/ansible/roles/rabbitmq/templates/logrotate-config.j2 delete mode 100644 core/core/src/ansible/roles/rabbitmq/templates/rabbitmq-env.conf.j2 delete mode 100644 core/core/src/ansible/roles/rabbitmq/templates/rabbitmq-server.j2 delete mode 100644 core/core/src/ansible/roles/reboot/tasks/main.yml delete mode 100644 core/core/src/ansible/roles/recovery/defaults/main.yml delete mode 100644 core/core/src/ansible/roles/recovery/tasks/main.yml delete mode 100644 core/core/src/ansible/roles/upgrade/defaults/main.yml delete mode 100644 core/core/src/ansible/roles/upgrade/tasks/main.yml delete mode 100644 core/core/src/ansible/roles/upgrade/tasks/upgrade_master.yml delete mode 100644 core/core/src/ansible/roles/upgrade/tasks/upgrade_nodes.yml delete mode 100644 core/core/src/ansible/roles/upgrade/tasks/verify.yml delete mode 100644 core/core/src/ansible/roles/upgrade/tasks/wait.yml delete mode 100644 core/core/src/ansible/roles/worker/defaults/main.yml delete mode 100644 core/core/src/ansible/roles/worker/meta/main.yml delete mode 100644 core/core/src/ansible/roles/worker/tasks/main.yml delete mode 100644 core/core/src/ansible/roles/worker/vars/main.yml delete mode 100644 core/core/src/ansible/roles/zookeeper/defaults/main.yml delete mode 100644 core/core/src/ansible/roles/zookeeper/files/jmx-zookeeper-config.yml delete mode 100644 core/core/src/ansible/roles/zookeeper/handlers/main.yml delete mode 100644 core/core/src/ansible/roles/zookeeper/tasks/main.yml delete mode 100644 core/core/src/ansible/roles/zookeeper/tasks/metrics.yml delete mode 100644 core/core/src/ansible/roles/zookeeper/templates/file_sd_config.yml.j2 delete mode 100644 core/core/src/ansible/roles/zookeeper/templates/log4j.properties.j2 delete mode 100644 core/core/src/ansible/roles/zookeeper/templates/myid.j2 delete mode 100644 core/core/src/ansible/roles/zookeeper/templates/zoo.j2 delete mode 100644 core/core/src/ansible/roles/zookeeper/templates/zookeeper.service.j2 delete mode 100644 core/core/src/ansible/roles/zookeeper/vars/main.yml delete mode 100644 core/core/src/ansible/upgrade.yml delete mode 100644 core/core/src/ansible/worker.yml delete mode 100644 core/core/src/ansible/zookeeper.yml delete mode 100644 core/core/src/docker/deploy/Dockerfile delete mode 100755 core/core/src/docker/deploy/init.sh delete mode 100644 core/core/src/docker/dev/Dockerfile delete mode 100644 core/core/src/docker/sonarqube/Dockerfile delete mode 100644 core/core/src/docker/test-CI/Dockerfile delete mode 100644 core/core/src/docker/test-CI/prepare_sp.sh delete mode 100644 core/core/src/docker/test-CI/run.sh delete mode 100644 core/core/src/docker/test/Dockerfile delete mode 100755 core/core/src/docker/test/run.sh delete mode 100755 core/core/src/scripts/azure/fill_in_manifest.py delete mode 100755 core/core/src/scripts/azure/gen_templates_azure.sh delete mode 100755 core/core/src/scripts/azure/run_build.sh delete mode 100755 core/core/src/scripts/common/base_colors.sh delete mode 100755 core/core/src/scripts/common/functions.sh delete mode 100644 core/core/src/scripts/helpers/simple-log-collector.sh delete mode 100755 core/core/src/scripts/kubernetes/get-id-rsa-from-value.sh delete mode 100755 core/core/src/scripts/kubernetes/get-init-token.sh delete mode 100755 core/core/src/scripts/kubernetes/linux/make-executable.sh delete mode 100755 core/core/src/scripts/kubernetes/linux/master/apply-kubernetes-dashboard.sh delete mode 100755 core/core/src/scripts/kubernetes/linux/master/init-kubernetes-master.sh delete mode 100644 core/core/src/scripts/kubernetes/linux/master/resources/kube-flannel.yml delete mode 100644 core/core/src/scripts/kubernetes/linux/master/resources/kubernetes-dashboard.yml delete mode 100644 core/core/src/scripts/kubernetes/linux/master/resources/nginx.yml delete mode 100644 core/core/src/scripts/kubernetes/linux/master/resources/role-binding.yml delete mode 100644 core/core/src/scripts/kubernetes/linux/master/resources/sample-role.yml delete mode 100755 core/core/src/scripts/kubernetes/linux/master/untaint-master.sh delete mode 100755 core/core/src/scripts/kubernetes/linux/node/init-kubernetes-nodes.sh delete mode 100755 core/core/src/scripts/kubernetes/linux/prepare-system-kubernetes-redhat.sh delete mode 100755 core/core/src/scripts/kubernetes/linux/prepare-system-kubernetes-ubuntu.sh delete mode 100644 core/core/src/scripts/kubernetes/windows/node/0_DownloadRequired.ps1 delete mode 100644 core/core/src/scripts/kubernetes/windows/node/1_InstallDocker.ps1 delete mode 100644 core/core/src/scripts/kubernetes/windows/node/2_SetupNode.ps1 delete mode 100644 core/core/src/scripts/kubernetes/windows/node/Dockerfile delete mode 100755 core/core/src/scripts/vsts/run-template-engine.sh delete mode 100644 core/core/src/templates/README.md delete mode 100644 core/core/src/templates/azure/az_get_ips.sh.j2 delete mode 100644 core/core/src/templates/azure/backend.sh.j2 delete mode 100644 core/core/src/templates/azure/backend.tf.j2 delete mode 100644 core/core/src/templates/azure/base.tf.j2 delete mode 100644 core/core/src/templates/azure/config.tfvars.j2 delete mode 100644 core/core/src/templates/azure/del_rg.sh.j2 delete mode 100644 core/core/src/templates/azure/del_sp.sh.j2 delete mode 100644 core/core/src/templates/azure/env.sh.j2 delete mode 100644 core/core/src/templates/azure/gen_sp.sh.j2 delete mode 100644 core/core/src/templates/azure/k8s_storage.tf.j2 delete mode 100644 core/core/src/templates/azure/locks.tf.j2 delete mode 100644 core/core/src/templates/azure/login.sh.j2 delete mode 100644 core/core/src/templates/azure/main.tf.j2 delete mode 100644 core/core/src/templates/azure/outputs.tf.j2 delete mode 100644 core/core/src/templates/azure/release.sh.j2 delete mode 100644 core/core/src/templates/azure/security.yaml.j2 delete mode 100644 core/core/src/templates/azure/variables.tf.j2 delete mode 100644 core/core/src/templates/azure/version.sh.j2 delete mode 100644 core/core/src/templates/common/ansible.cfg.j2 delete mode 100644 core/core/src/templates/common/ansible.sh.j2 delete mode 100644 core/core/src/templates/common/ansible_inventory.j2 delete mode 100644 core/core/src/templates/common/hosts.j2 delete mode 100644 core/core/src/templates/common/main.yml.j2 delete mode 100644 core/core/src/templates/common/manifest.yaml.j2 delete mode 100644 core/core/src/templates/common/proxy.sh.j2 delete mode 100644 core/core/src/templates/common/version.sh.j2 delete mode 100644 core/core/test/kubernetes/README.md delete mode 100755 core/core/test/kubernetes/install-test-prerequisites.sh delete mode 100755 core/core/test/kubernetes/run-sonobuoy-test.sh delete mode 100644 core/core/test/serverspec/.rspec delete mode 100644 core/core/test/serverspec/Gemfile delete mode 100644 core/core/test/serverspec/Gemfile.lock delete mode 100644 core/core/test/serverspec/README.md delete mode 100644 core/core/test/serverspec/Rakefile delete mode 100755 core/core/test/serverspec/rvm.sh delete mode 100644 core/core/test/serverspec/spec/deployments/auth-service/auth-service.rb delete mode 100644 core/core/test/serverspec/spec/deployments/deployments_spec.rb delete mode 100644 core/core/test/serverspec/spec/deployments/rabbitmq/rabbitmq.rb delete mode 100644 core/core/test/serverspec/spec/elasticsearch-curator/elasticsearch-curator_spec.rb delete mode 100644 core/core/test/serverspec/spec/elasticsearch/elasticsearch_spec.rb delete mode 100644 core/core/test/serverspec/spec/filebeat/filebeat_spec.rb delete mode 100644 core/core/test/serverspec/spec/grafana/grafana_spec.rb delete mode 100644 core/core/test/serverspec/spec/haproxy_exporter/haproxy_exporter_spec.rb delete mode 100644 core/core/test/serverspec/spec/haproxy_tls_termination/haproxy_tls_termination_spec.rb delete mode 100644 core/core/test/serverspec/spec/jmx-exporter/jmx_exporter_spec.rb delete mode 100644 core/core/test/serverspec/spec/kafka-exporter/kafka_exporter_spec.rb delete mode 100644 core/core/test/serverspec/spec/kafka/kafka_spec.rb delete mode 100644 core/core/test/serverspec/spec/kibana/kibana_spec.rb delete mode 100644 core/core/test/serverspec/spec/master/master_spec.rb delete mode 100644 core/core/test/serverspec/spec/node_exporter/node_exporter_spec.rb delete mode 100644 core/core/test/serverspec/spec/postgresql/postgresql_spec.rb delete mode 100644 core/core/test/serverspec/spec/prometheus/prometheus_spec.rb delete mode 100644 core/core/test/serverspec/spec/rabbitmq/rabbitmq_spec.rb delete mode 100644 core/core/test/serverspec/spec/spec_helper.rb delete mode 100644 core/core/test/serverspec/spec/zookeeper/zookeeper_spec.rb delete mode 100644 core/data/azure/infrastructure/README.md delete mode 100644 core/data/azure/infrastructure/epiphany-bld-apps/data.yaml delete mode 100644 core/data/azure/infrastructure/epiphany-playground/README.md delete mode 100644 core/data/azure/infrastructure/epiphany-playground/basic-data.yaml delete mode 100644 core/data/azure/infrastructure/epiphany-qa-basic/basic-data.yaml delete mode 100644 core/data/azure/infrastructure/epiphany-qa-template/data.yaml.j2 delete mode 100644 core/data/azure/infrastructure/epiphany-single-machine/data.yaml delete mode 100644 core/data/azure/infrastructure/epiphany-template/data.yaml.j2 delete mode 100644 core/data/metal/epiphany-lab/data.yaml delete mode 100644 core/data/metal/epiphany-single-machine/data.yaml delete mode 100644 core/data/vbox/README.md delete mode 100644 core/data/vmware/README.md delete mode 100644 core/data/vmware/epiphany-lab/data.yaml delete mode 100755 core/epiphany delete mode 100644 core/epiphany-simple-config.yaml delete mode 100644 core/manifest.yaml delete mode 100755 core/proxy.sh delete mode 100755 core/version.sh diff --git a/core/ansible.cfg b/core/ansible.cfg deleted file mode 100644 index e6b11cea0f..0000000000 --- a/core/ansible.cfg +++ /dev/null @@ -1,6 +0,0 @@ -# Ansible config file for the project -# Force the inventory to be 'development' so you will need to use -i on all ansible commands. This is for safety reasons - -[defaults] -# inventory = development -# gathering = smart diff --git a/core/bin/README.md b/core/bin/README.md deleted file mode 100644 index a3c5770ea0..0000000000 --- a/core/bin/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# Bin Folder - -This folder holds all of the binaries and scripts that are maintained outside of Epiphany but used by Epiphany. This folder does *NOT* hold output from the /build folder. The /build folder is used for holding the output of any generated code or rendered output from the build process. - -## template_engine - -The `template_engine` is a Python app that takes 3 parameters: - -- Input template -- Output file -- Data file - -```bash -./template_engine \ - -i /data/terraform/pipeline/main.tf.j2 \ - -o /build/terraform/pipeline/main.tf \ - -d /data/terraform/pipeline/pipeline.yaml -``` - -It uses `Jinja2` templating syntax so you can have templates embedded in templates for complex needs or just simple code/data generation. The data is in a `yaml` format. The input template should have a `.j2` file extension but it's not required. diff --git a/core/bin/replacer b/core/bin/replacer deleted file mode 100644 index 3790f0017e..0000000000 --- a/core/bin/replacer +++ /dev/null @@ -1,92 +0,0 @@ -#!/usr/bin/env python - -from jinja2 import Environment, FileSystemLoader -import traceback -import os -import yaml -import argparse -import sys -import json - - -def load_files(base_file, replacer_file): - dictbase = dict() - dictreplace = dict() - try: - with open(base_file) as base_data: - dictbase = yaml.safe_load(base_data) - - with open(replacer_file) as replacer_data: - dictreplace = yaml.safe_load(replacer_data) - - except Exception as e: - print traceback.print_exc(file=sys.stdout) - exit(1) - - # The 'core: azure: standard: vms:' part of the data.yaml is matched separetly to allow users - # to define different number of vms than 2 in the simplified config file. - dictbase_replaced_vms = vm_matching(dictbase, dictreplace) - - return replacer(dictbase_replaced_vms, dictreplace) - - -def vm_matching(base, replace): - # Assumes current structure of the data.yaml is preserved in the future - distincts - # between worker vm config and the master vm config. - random_vm_master = base['core']['azure']['standard']['vms'][0].copy() - random_vm_worker = base['core']['azure']['standard']['vms'][1].copy() - - base['core']['azure']['standard']['vms'] = [] - - # This copies default master/worker vm configs desired number of times. - for vm_number in range(0, len(replace['core']['azure']['standard']['vms'])): - if 'master' in replace['core']['azure']['standard']['vms'][vm_number]['roles']: - random_vm_object = random_vm_master.copy() - base['core']['azure']['standard']['vms'].append(random_vm_object) - else: - random_vm_object = random_vm_worker.copy() - base['core']['azure']['standard']['vms'].append(random_vm_object) - - # Replacing for the vms configs. - for vm_number in range(0, len(replace['core']['azure']['standard']['vms'])): - replacer(base['core']['azure']['standard']['vms'][vm_number], - replace['core']['azure']['standard']['vms'][vm_number]) - return base - - -# Replacing the rest of the data.yaml file -def replacer(base, replace): - for key_old in base: - for key_new in replace: - # Ignore vms as this part is already done - if key_old == 'vms' or key_new == 'vms': - pass - - # There is 15 different 'name' properties in the data.yaml, - # it is still possible that this will get seriously broken if the structure of the data.yaml changes. - elif type(base[key_old]) is dict: - if key_new == key_old and type(replace[key_new]) is dict: - replacer(base[key_old], replace[key_new]) - - # Replacing on the matched keys - only nested list of dicts is 'vms' which we handled before - # Lists have to be replaced whole - elif key_old == key_new: - base[key_old] = replace[key_new] - return base - - -if __name__ == '__main__': - p = argparse.ArgumentParser(description='Replacer Engine', prog='Replacer_Engine') - p.add_argument('--base_file', '-b', help='The template input file.') - p.add_argument('--replacer_file', '-r', help='The rendered output file.') - - options = p.parse_args() - - replaced_data_yaml = load_files(options.base_file, options.replacer_file) - - a = yaml.safe_dump(replaced_data_yaml, default_flow_style=False, indent=2, allow_unicode=True) - - b = a.replace("null", "") - - with open(options.base_file, 'w') as f: - f.write(b) diff --git a/core/bin/template_engine b/core/bin/template_engine deleted file mode 100755 index 3cc4617413..0000000000 --- a/core/bin/template_engine +++ /dev/null @@ -1,126 +0,0 @@ -#!/usr/bin/env python -# -# Author: Hans Chris Jones -# Copyright 2018, LambdaStack -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# NOTE: You need to pass in the full paths to the file references below. The data is file should be private and it's -# not in the project. The reason is you should create a YAML file that fits how you want to configure your -# environment. For eample, you can have a small YAML data file for configuring the kickstart/ISO process and then -# maybe one for building out the missing USER and/or SYSTEM data used in the CHEF Environment files. A sample -# environment file ships with the project for vagrant called vagrant.json. However, a production.json should -# really be a jinja2 template like base_environment.json.j2 with as much default data and with template {{ }} placeholders -# for the actual data. The output of this process should be the TRUE production.json file. Also, it's a good idea -# to name your production.json file more descriptive of the environment it actually belongs to. For example, -# prod-dc101.json or something like it. - -from jinja2 import Environment, FileSystemLoader -# import jinja2.ext.loopcontrols -import traceback -import os -import yaml -import argparse -import sys -import json - - -# All three file paths must be full paths to each. -def render_template(data_file, in_file, out_file, json_arg, yaml_arg): - dict = "" - - # If the -j flag was passed then convert the yaml to pretty json in sorted order - if json_arg: - with open(data_file) as data: - dict = yaml.load(data) - print json.dumps(dict, indent=4, sort_keys=True) - exit(0) - - if yaml_arg: - with open(data_file) as data: - dict = json.load(data) - print yaml.safe_dump(dict, indent=2, allow_unicode=True, default_flow_style=False) - exit(0) - - # Start the template processing - try: - #env = Environment(autoescape=False, loader=FileSystemLoader('/')), trim_blocks=True) - env = Environment(loader=FileSystemLoader('/')) - env.filters['jsonify'] = json.dumps - - with open(data_file) as data: - dict = yaml.load(data, Loader=yaml.FullLoader) - - # Render template and print generated config to console - template = env.get_template(in_file) - - with open(out_file, 'w') as f: - output = template.render(dict) - f.write(output) - - except Exception as e: - # Print out error, traceback and debug info... - print - print '='*60 - print "Template Engine stopped due to the following error ===> ", e - print '-'*60 - print 'Debugging Output:' - print traceback.print_exc(file=sys.stdout) - print '-'*60 - print 'Data dictionary:' - print - print json.dumps(dict, indent=4, sort_keys=True) - print '='*60 - print "Template Engine stopped due to the following error ===> ", e - print 'Scan up to see traceback and JSON data (traceback at both top and bottom of this output)' - print '-'*60 - print 'Debugging Output:' - print traceback.print_exc(file=sys.stdout) - print '='*60 - print - exit(1) - - -# Used to pass a string instead of input file as a template -# dict is json dictionary of the values to sub -def render_string(in_string, dict): - return Environment().from_string(in_string).render(dict) - - -# Standard way of calling... -# ./template_engine -i