From 2a36228b797c807820c7f20a2605110fce446bf1 Mon Sep 17 00:00:00 2001 From: PhillypHenning Date: Mon, 21 Nov 2022 15:11:28 -0500 Subject: [PATCH] Removing irrelevant example files --- .../helm.bitops.config.yaml | 11 - .../terraform.bitops.config.yaml | 10 - .../bitops+cloudformation-blog/README.md | 16 -- .../bitops.after-deploy.d/my-after-script.sh | 2 - .../my-before-script.sh | 9 - .../test/cloudformation/bitops.config.yaml | 11 - .../test/cloudformation/parameters.json | 12 - .../test/cloudformation/template.yaml | 129 ----------- docs/examples/bitops+eks/README.md | 16 -- .../bitops+eks/test/helm/my-chart/Chart.yaml | 23 -- .../bitops.after-deploy.d/my-after-script.sh | 2 - .../my-before-script.sh | 2 - .../test/helm/my-chart/bitops.config.yaml | 15 -- .../test/helm/my-chart/templates/NOTES.txt | 21 -- .../test/helm/my-chart/templates/_helpers.tpl | 62 ------ .../helm/my-chart/templates/deployment.yaml | 61 ------ .../test/helm/my-chart/templates/hpa.yaml | 28 --- .../test/helm/my-chart/templates/ingress.yaml | 41 ---- .../test/helm/my-chart/templates/service.yaml | 15 -- .../my-chart/templates/serviceaccount.yaml | 12 - .../templates/tests/test-connection.yaml | 15 -- .../bitops+eks/test/helm/my-chart/values.yaml | 79 ------- .../bitops.after-deploy.d/my-after-script.sh | 2 - .../my-before-script.sh | 2 - .../test/terraform/bitops.config.yaml | 6 - .../bitops+eks/test/terraform/eks-cluster.tf | 26 --- .../bitops+eks/test/terraform/kubeconfig | 29 --- .../bitops+eks/test/terraform/outputs.tf | 4 - .../bitops+eks/test/terraform/providers.tf | 24 -- .../test/terraform/security-groups.tf | 14 -- .../examples/bitops+eks/test/terraform/vpc.tf | 34 --- .../_scripts/deploy/deploy.sh | 50 ----- .../_scripts/secrets/aws/README.md | 73 ------- .../_scripts/secrets/aws/create.sh | 38 ---- .../_scripts/secrets/aws/delete.sh | 28 --- .../_scripts/secrets/aws/describe.sh | 27 --- .../_scripts/secrets/aws/get-file.sh | 50 ----- .../_scripts/secrets/aws/get.sh | 27 --- .../_scripts/secrets/aws/list.sh | 19 -- .../_scripts/secrets/aws/save-file.sh | 46 ---- .../_scripts/secrets/aws/save.sh | 62 ------ .../_scripts/secrets/aws/update.sh | 33 --- .../build-tools/terraform/.terraform.lock.hcl | 59 ----- .../build-tools/terraform/backend.tf | 11 - .../s3-create-tf-state-bucket.sh | 2 - .../build-tools/terraform/bitops.config.yaml | 4 - .../build-tools/terraform/ecs-iam.tf | 67 ------ .../build-tools/terraform/ecs.tf | 13 -- .../build-tools/terraform/networking.tf | 56 ----- .../build-tools/terraform/provider.tf | 14 -- .../build-tools/terraform/secrets.tf | 25 --- .../build-tools/terraform/task.tf | 184 ---------------- .../build-tools/terraform/terraform.tfvars | 41 ---- .../build-tools/terraform/variables.tf | 119 ---------- .../build-tools/terraform/vpc.tf | 6 - .../dev/terraform/.terraform.lock.hcl | 59 ----- .../dev/terraform/acm.tf | 21 -- .../s3-create-tf-state-bucket.sh | 2 - .../dev/terraform/bitops.config.yaml | 4 - .../dev/terraform/cloudfront-angular.tf | 93 -------- .../dev/terraform/cloudfront-ecom-catalog.tf | 80 ------- .../dev/terraform/cloudfront-react.tf | 93 -------- .../terraform/js-rewrite/cf-url-rewrite.js | 80 ------- .../dev/terraform/providers.tf | 25 --- .../dev/terraform/route53-angular.tf | 16 -- .../dev/terraform/route53-ecom-catalog.tf | 11 - .../dev/terraform/route53-react.tf | 13 -- .../dev/terraform/route53.tf | 5 - .../dev/terraform/terraform.tfvars | 27 --- .../dev/terraform/variables.tf | 52 ----- .../terraform/.terraform.lock.hcl | 59 ----- .../global-tools/terraform/backend.tf | 11 - .../s3-create-tf-state-bucket.sh | 2 - .../global-tools/terraform/bitops.config.yaml | 6 - .../global-tools/terraform/ecr.tf | 8 - .../global-tools/terraform/iam-ci-user.tf | 138 ------------ .../terraform/lambda-static-test.tf | 146 ------------- .../global-tools/terraform/provider.tf | 15 -- .../global-tools/terraform/s3-sites.tf | 26 --- .../terraform/templates/s3-policy.json | 12 - .../global-tools/terraform/variables.tf | 5 - docs/examples/bitops+helm-blog/README.md | 16 -- .../test/helm/monitoring/Chart.yaml | 16 -- .../test/helm/monitoring/bitops.config.yaml | 11 - .../helm/monitoring/templates/dashboard.yaml | 146 ------------- .../test/helm/monitoring/values.yaml | 13 -- .../test/helm/my-chart/Chart.yaml | 23 -- .../bitops.after-deploy.d/my-after-script.sh | 2 - .../my-before-script.sh | 2 - .../test/helm/my-chart/bitops.config.yaml | 15 -- .../test/helm/my-chart/templates/NOTES.txt | 21 -- .../test/helm/my-chart/templates/_helpers.tpl | 62 ------ .../helm/my-chart/templates/deployment.yaml | 61 ------ .../test/helm/my-chart/templates/hpa.yaml | 28 --- .../test/helm/my-chart/templates/ingress.yaml | 41 ---- .../test/helm/my-chart/templates/service.yaml | 15 -- .../my-chart/templates/serviceaccount.yaml | 12 - .../templates/tests/test-connection.yaml | 15 -- .../test/helm/my-chart/values.yaml | 80 ------- .../README.md | 23 -- .../ansible/wait-for-inventory-hosts.py | 28 --- .../_scripts/ansible/wait-for-it.sh | 183 ---------------- .../st2-bitops-test/ansible/Gemfile | 6 - .../st2-bitops-test/ansible/LICENSE | 202 ----------------- .../st2-bitops-test/ansible/README.md | 135 ------------ .../st2-bitops-test/ansible/Vagrantfile | 59 ----- .../st2-bitops-test/ansible/ansible.cfg | 5 - .../bitops.after-deploy.d/my-after-script.sh | 2 - .../my-before-script.sh | 3 - .../ansible/bitops.config.yaml | 4 - .../st2-bitops-test/ansible/extra-vars.json | 6 - .../st2-bitops-test/ansible/meta/main.yml | 41 ---- .../roles/StackStorm.epel/meta/main.yml | 14 -- .../roles/StackStorm.epel/tasks/main.yml | 19 -- .../roles/StackStorm.ewc/defaults/main.yml | 41 ---- .../roles/StackStorm.ewc/handlers/main.yml | 5 - .../roles/StackStorm.ewc/meta/main.yml | 27 --- .../tasks/ewc_repos_cleanup_debian.yml | 9 - .../tasks/ewc_repos_cleanup_redhat.yml | 9 - .../StackStorm.ewc/tasks/ewc_repos_debian.yml | 93 -------- .../StackStorm.ewc/tasks/ewc_repos_redhat.yml | 35 --- .../StackStorm.ewc/tasks/ewc_repos_setup.yml | 66 ------ .../roles/StackStorm.ewc/tasks/ldap.yml | 30 --- .../roles/StackStorm.ewc/tasks/license.yml | 76 ------- .../roles/StackStorm.ewc/tasks/main.yml | 73 ------- .../roles/StackStorm.ewc/tasks/rbac.yml | 70 ------ .../rbac_assignments/assignments.yml.j2 | 5 - .../templates/rbac_roles/roles.yml.j2 | 6 - .../vars/enterprise-unstable.yml | 2 - .../roles/StackStorm.ewc/vars/enterprise.yml | 2 - .../vars/staging-enterprise-unstable.yml | 2 - .../vars/staging-enterprise.yml | 2 - .../defaults/main.yml | 23 -- .../StackStorm.ewc_smoketests/meta/main.yml | 27 --- .../StackStorm.ewc_smoketests/tasks/main.yml | 89 -------- .../tasks/teardown.yml | 38 ---- .../rbac_assignments/assignments.yml.j2 | 5 - .../templates/rbac_roles/roles.yml.j2 | 6 - .../roles/StackStorm.git/handlers/main.yml | 8 - .../roles/StackStorm.git/tasks/main.yml | 32 --- .../roles/StackStorm.git/vars/main.yml | 9 - .../StackStorm.mongodb/defaults/main.yml | 3 - .../StackStorm.mongodb/handlers/main.yml | 6 - .../roles/StackStorm.mongodb/meta/main.yml | 21 -- .../roles/StackStorm.mongodb/tasks/main.yml | 19 -- .../StackStorm.mongodb/tasks/mongodb_auth.yml | 15 -- .../tasks/mongodb_debian.yml | 39 ---- .../tasks/mongodb_redhat.yml | 51 ----- .../roles/StackStorm.mongodb/vars/debian.yml | 6 - .../roles/StackStorm.mongodb/vars/main.yml | 2 - .../roles/StackStorm.mongodb/vars/redhat.yml | 5 - .../StackStorm.mongodb/vars/redhat_8.yml | 4 - .../roles/StackStorm.nginx/handlers/main.yml | 12 - .../roles/StackStorm.nginx/meta/main.yml | 20 -- .../roles/StackStorm.nginx/tasks/main.yml | 32 --- .../StackStorm.nginx/tasks/nginx_debian.yml | 37 ---- .../StackStorm.nginx/tasks/nginx_redhat.yml | 95 -------- .../roles/StackStorm.nginx/vars/redhat.yml | 3 - .../roles/StackStorm.nginx/vars/redhat_8.yml | 3 - .../roles/StackStorm.nodejs/defaults/main.yml | 3 - .../roles/StackStorm.nodejs/meta/main.yml | 19 -- .../roles/StackStorm.nodejs/tasks/main.yml | 4 - .../StackStorm.nodejs/tasks/nodejs_debian.yml | 40 ---- .../StackStorm.nodejs/tasks/nodejs_redhat.yml | 75 ------- .../StackStorm.rabbitmq/defaults/main.yml | 5 - .../StackStorm.rabbitmq/handlers/main.yml | 6 - .../roles/StackStorm.rabbitmq/meta/main.yml | 18 -- .../roles/StackStorm.rabbitmq/tasks/main.yml | 61 ------ .../roles/StackStorm.rabbitmq/vars/main.yml | 2 - .../roles/StackStorm.st2/defaults/main.yml | 39 ---- .../roles/StackStorm.st2/handlers/main.yml | 34 --- .../roles/StackStorm.st2/meta/main.yml | 27 --- .../roles/StackStorm.st2/tasks/auth.yml | 76 ------- .../roles/StackStorm.st2/tasks/config.yml | 17 -- .../roles/StackStorm.st2/tasks/datastore.yml | 32 --- .../StackStorm.st2/tasks/flush_handlers.yml | 3 - .../roles/StackStorm.st2/tasks/main.yml | 142 ------------ .../roles/StackStorm.st2/tasks/packs.yml | 20 -- .../roles/StackStorm.st2/tasks/proxy.yml | 18 -- .../roles/StackStorm.st2/tasks/user.yml | 59 ----- .../roles/StackStorm.st2/tasks/version.yml | 15 -- .../roles/StackStorm.st2/vars/main.yml | 39 ---- .../roles/StackStorm.st2/vars/redhat.yml | 3 - .../roles/StackStorm.st2/vars/redhat_8.yml | 3 - .../StackStorm.st2chatops/defaults/main.yml | 17 -- .../StackStorm.st2chatops/handlers/main.yml | 6 - .../roles/StackStorm.st2chatops/meta/main.yml | 26 --- .../StackStorm.st2chatops/tasks/main.yml | 206 ------------------ .../roles/StackStorm.st2chatops/vars/main.yml | 13 -- .../StackStorm.st2repo/defaults/main.yml | 3 - .../roles/StackStorm.st2repo/meta/main.yml | 21 -- .../roles/StackStorm.st2repo/tasks/main.yml | 4 - .../tasks/st2repo_debian.yml | 37 ---- .../tasks/st2repo_redhat.yml | 41 ---- .../roles/StackStorm.st2repo/vars/stable.yml | 2 - .../vars/staging-stable.yml | 2 - .../vars/staging-unstable.yml | 2 - .../StackStorm.st2repo/vars/unstable.yml | 2 - .../StackStorm.st2smoketests/tasks/main.yml | 68 ------ .../tasks/st2chatops.yml | 26 --- .../roles/StackStorm.st2web/defaults/main.yml | 12 - .../roles/StackStorm.st2web/meta/main.yml | 23 -- .../StackStorm.st2web/tasks/certificate.yml | 42 ---- .../roles/StackStorm.st2web/tasks/main.yml | 84 ------- .../roles/StackStorm.st2web/vars/main.yml | 5 - .../st2-bitops-test/ansible/stackstorm.yml | 28 --- .../ansible/test/integration/default.yml | 1 - .../bitops.after-deploy.d/my-after-script.sh | 2 - .../my-before-script.sh | 2 - .../terraform/bitops.config.yaml | 6 - .../st2-bitops-test/terraform/inventory.tf | 12 - .../st2-bitops-test/terraform/inventory.tmpl | 6 - .../st2-bitops-test/terraform/main.tf | 134 ------------ .../bitops+terraform+ansible-blog/README.md | 16 -- .../test/ansible/ansible.cfg | 3 - .../bitops.after-deploy.d/my-after-script.sh | 2 - .../my-before-script.sh | 2 - .../test/ansible/bitops.config.yaml | 3 - .../test/ansible/inventory.yml | 10 - .../test/ansible/playbook.yaml | 4 - .../bitops.after-deploy.d/my-after-script.sh | 2 - .../my-before-script.sh | 2 - .../test/terraform/bitops.config.yaml | 7 - .../test/terraform/inventory.tf | 13 -- .../test/terraform/inventory.tmpl | 6 - .../test/terraform/main.tf | 115 ---------- docs/examples/bitops+terraform-blog/README.md | 16 -- .../bitops.after-deploy.d/my-after-script.sh | 2 - .../my-before-script.sh | 2 - .../prod/terraform/bitops.config.yaml | 7 - .../prod/terraform/main.tf | 18 -- .../bitops.after-deploy.d/my-after-script.sh | 2 - .../my-before-script.sh | 2 - .../test/terraform/bitops.config.yaml | 7 - .../test/terraform/main.tf | 18 -- .../examples/bitops-deploy-heyemoji/README.md | 16 -- .../test/ansible/ansible.cfg | 7 - .../test/ansible/bitops.config.yaml | 3 - .../test/ansible/playbook.yaml | 15 -- .../test/ansible/tasks/build.yml | 7 - .../test/ansible/tasks/fetch.yml | 5 - .../test/ansible/tasks/install.yml | 24 -- .../test/ansible/tasks/start.yml | 20 -- .../test/ansible/vars/default.yml | 15 -- .../test/terraform/ami.tf | 16 -- .../bitops.after-deploy.d/my-after-script.sh | 2 - .../my-before-script.sh | 2 - .../test/terraform/bitops.config.yaml | 6 - .../test/terraform/instance.tf | 23 -- .../test/terraform/inventory.tmpl | 6 - .../test/terraform/locals.tf | 14 -- .../test/terraform/providers.tf | 24 -- .../test/terraform/security-groups.tf | 46 ---- .../test/terraform/vars.tf | 10 - .../test/terraform/vpc.tf | 35 --- .../examples/bitops2-terraform-blog/README.md | 20 -- .../_default/_tf_modules/eks/createcluster.tf | 48 ---- .../_default/_tf_modules/eks/variables.tf | 7 - .../test/terraform/bitops.config.yaml | 1 - .../test/terraform/main.tf | 31 --- .../test/terraform/test-vars.auto.tfvars.json | 11 - .../test/terraform/variables.tf | 7 - .../bitops.after-deploy.d/my-after-script.sh | 2 - .../my-before-script.sh | 2 - .../test/cloudformation/bitops.config.yaml | 14 -- .../test/cloudformation/parameters.json | 7 - .../cloudformation/parameters/secrets.json | 4 - .../cloudformation/parameters/version.json | 6 - .../test/cloudformation/template.yaml | 26 --- .../helm-default-environment/README.md | 10 - .../my-first-chart-default-values.yaml | 0 .../helm/my-first-chart/values-versions.yaml | 0 .../default/helm/my-first-chart/values.yaml | 0 .../test/helm/bitops.config.yaml | 3 - .../values-files/my-first-chart-values.yaml | 0 .../helm/my-first-chart/values-versions.yaml | 0 .../test/helm/my-first-chart/values.yaml | 0 .../ansible/bitops.config.yml | 0 .../cloudformation/bitops.config.yml | 0 .../helm/bitops.config.yml | 0 .../helm/chartA/bitops.config.yml | 0 .../helm/chartB/bitops.config.yml | 0 .../terraform/bitops.config.yml | 0 .../test-serviceA/ansible/bitops.config.yml | 0 .../cloudformation/bitops.config.yml | 0 .../test-serviceA/helm/bitops.config.yml | 0 .../helm/chartA/bitops.config.yml | 0 .../helm/chartB/bitops.config.yml | 0 .../test-serviceA/terraform/bitops.config.yml | 0 docs/examples/terraform-and-ansible/README.md | 64 ------ .../test/ansible/ansible.cfg | 2 - .../test/ansible/bitops.config.yaml | 3 - .../test/ansible/playbook.yaml | 4 - .../debug-ansible-inventory.sh | 2 - .../test/terraform/bitops.config.yaml | 6 - .../test/terraform/hosts.tmpl | 5 - .../test/terraform/main.tf | 12 - .../terraform-and-azure/bitops.config.yaml | 7 - .../terraform-and-azure/bitops.schema.yaml | 0 .../terraform/bitops.config.yaml | 6 - .../terraform-and-azure/terraform/linux_vm.tf | 153 ------------- .../terraform-and-azure/terraform/resource.tf | 8 - .../terraform-and-gcp/bitops.config.yaml | 7 - .../terraform-and-gcp/bitops.schema.yaml | 0 .../terraform/bitops.config.yaml | 6 - .../terraform-and-gcp/terraform/main.tf | 82 ------- .../terraform-and-gcp/terraform/output.tf | 9 - .../terraform-and-gcp/terraform/provider.tf | 9 - .../terraform/terraform.tfvars | 6 - .../terraform-and-gcp/terraform/variables.tf | 26 --- .../terraform-default-environment/README.md | 18 -- .../default/terraform/bitops.config.yaml | 6 - .../default/terraform/main.tf | 5 - .../production/terraform/bitops.config.yaml | 6 - .../production/terraform/main.tf | 5 - .../test/terraform/bitops.config.yaml | 6 - .../test/terraform/main.tf | 5 - .../terraform-lifecycle-hooks/README.md | 29 --- .../bitops.after-deploy.d/my-after-script.sh | 3 - .../my-before-script.sh | 3 - .../test/terraform/bitops.config.yaml | 6 - .../test/terraform/main.tf | 5 - 322 files changed, 8129 deletions(-) delete mode 100644 docs/example-config-files/helm.bitops.config.yaml delete mode 100644 docs/example-config-files/terraform.bitops.config.yaml delete mode 100644 docs/examples/bitops+cloudformation-blog/README.md delete mode 100755 docs/examples/bitops+cloudformation-blog/test/cloudformation/bitops.after-deploy.d/my-after-script.sh delete mode 100755 docs/examples/bitops+cloudformation-blog/test/cloudformation/bitops.before-deploy.d/my-before-script.sh delete mode 100644 docs/examples/bitops+cloudformation-blog/test/cloudformation/bitops.config.yaml delete mode 100644 docs/examples/bitops+cloudformation-blog/test/cloudformation/parameters.json delete mode 100644 docs/examples/bitops+cloudformation-blog/test/cloudformation/template.yaml delete mode 100644 docs/examples/bitops+eks/README.md delete mode 100644 docs/examples/bitops+eks/test/helm/my-chart/Chart.yaml delete mode 100755 docs/examples/bitops+eks/test/helm/my-chart/bitops.after-deploy.d/my-after-script.sh delete mode 100755 docs/examples/bitops+eks/test/helm/my-chart/bitops.before-deploy.d/my-before-script.sh delete mode 100644 docs/examples/bitops+eks/test/helm/my-chart/bitops.config.yaml delete mode 100644 docs/examples/bitops+eks/test/helm/my-chart/templates/NOTES.txt delete mode 100644 docs/examples/bitops+eks/test/helm/my-chart/templates/_helpers.tpl delete mode 100644 docs/examples/bitops+eks/test/helm/my-chart/templates/deployment.yaml delete mode 100644 docs/examples/bitops+eks/test/helm/my-chart/templates/hpa.yaml delete mode 100644 docs/examples/bitops+eks/test/helm/my-chart/templates/ingress.yaml delete mode 100644 docs/examples/bitops+eks/test/helm/my-chart/templates/service.yaml delete mode 100644 docs/examples/bitops+eks/test/helm/my-chart/templates/serviceaccount.yaml delete mode 100644 docs/examples/bitops+eks/test/helm/my-chart/templates/tests/test-connection.yaml delete mode 100644 docs/examples/bitops+eks/test/helm/my-chart/values.yaml delete mode 100755 docs/examples/bitops+eks/test/terraform/bitops.after-deploy.d/my-after-script.sh delete mode 100755 docs/examples/bitops+eks/test/terraform/bitops.before-deploy.d/my-before-script.sh delete mode 100644 docs/examples/bitops+eks/test/terraform/bitops.config.yaml delete mode 100644 docs/examples/bitops+eks/test/terraform/eks-cluster.tf delete mode 100644 docs/examples/bitops+eks/test/terraform/kubeconfig delete mode 100644 docs/examples/bitops+eks/test/terraform/outputs.tf delete mode 100644 docs/examples/bitops+eks/test/terraform/providers.tf delete mode 100644 docs/examples/bitops+eks/test/terraform/security-groups.tf delete mode 100644 docs/examples/bitops+eks/test/terraform/vpc.tf delete mode 100755 docs/examples/bitops+fast+react+static+renderer/_scripts/deploy/deploy.sh delete mode 100644 docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/README.md delete mode 100755 docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/create.sh delete mode 100755 docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/delete.sh delete mode 100755 docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/describe.sh delete mode 100755 docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/get-file.sh delete mode 100755 docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/get.sh delete mode 100755 docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/list.sh delete mode 100755 docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/save-file.sh delete mode 100755 docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/save.sh delete mode 100755 docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/update.sh delete mode 100644 docs/examples/bitops+fast+react+static+renderer/build-tools/terraform/.terraform.lock.hcl delete mode 100755 docs/examples/bitops+fast+react+static+renderer/build-tools/terraform/backend.tf delete mode 100755 docs/examples/bitops+fast+react+static+renderer/build-tools/terraform/bitops.before-deploy.d/s3-create-tf-state-bucket.sh delete mode 100644 docs/examples/bitops+fast+react+static+renderer/build-tools/terraform/bitops.config.yaml delete mode 100644 docs/examples/bitops+fast+react+static+renderer/build-tools/terraform/ecs-iam.tf delete mode 100644 docs/examples/bitops+fast+react+static+renderer/build-tools/terraform/ecs.tf delete mode 100644 docs/examples/bitops+fast+react+static+renderer/build-tools/terraform/networking.tf delete mode 100644 docs/examples/bitops+fast+react+static+renderer/build-tools/terraform/provider.tf delete mode 100644 docs/examples/bitops+fast+react+static+renderer/build-tools/terraform/secrets.tf delete mode 100644 docs/examples/bitops+fast+react+static+renderer/build-tools/terraform/task.tf delete mode 100644 docs/examples/bitops+fast+react+static+renderer/build-tools/terraform/terraform.tfvars delete mode 100644 docs/examples/bitops+fast+react+static+renderer/build-tools/terraform/variables.tf delete mode 100644 docs/examples/bitops+fast+react+static+renderer/build-tools/terraform/vpc.tf delete mode 100644 docs/examples/bitops+fast+react+static+renderer/dev/terraform/.terraform.lock.hcl delete mode 100644 docs/examples/bitops+fast+react+static+renderer/dev/terraform/acm.tf delete mode 100755 docs/examples/bitops+fast+react+static+renderer/dev/terraform/bitops.before-deploy.d/s3-create-tf-state-bucket.sh delete mode 100644 docs/examples/bitops+fast+react+static+renderer/dev/terraform/bitops.config.yaml delete mode 100644 docs/examples/bitops+fast+react+static+renderer/dev/terraform/cloudfront-angular.tf delete mode 100644 docs/examples/bitops+fast+react+static+renderer/dev/terraform/cloudfront-ecom-catalog.tf delete mode 100644 docs/examples/bitops+fast+react+static+renderer/dev/terraform/cloudfront-react.tf delete mode 100644 docs/examples/bitops+fast+react+static+renderer/dev/terraform/js-rewrite/cf-url-rewrite.js delete mode 100644 docs/examples/bitops+fast+react+static+renderer/dev/terraform/providers.tf delete mode 100644 docs/examples/bitops+fast+react+static+renderer/dev/terraform/route53-angular.tf delete mode 100644 docs/examples/bitops+fast+react+static+renderer/dev/terraform/route53-ecom-catalog.tf delete mode 100644 docs/examples/bitops+fast+react+static+renderer/dev/terraform/route53-react.tf delete mode 100644 docs/examples/bitops+fast+react+static+renderer/dev/terraform/route53.tf delete mode 100644 docs/examples/bitops+fast+react+static+renderer/dev/terraform/terraform.tfvars delete mode 100644 docs/examples/bitops+fast+react+static+renderer/dev/terraform/variables.tf delete mode 100755 docs/examples/bitops+fast+react+static+renderer/global-tools/terraform/.terraform.lock.hcl delete mode 100755 docs/examples/bitops+fast+react+static+renderer/global-tools/terraform/backend.tf delete mode 100755 docs/examples/bitops+fast+react+static+renderer/global-tools/terraform/bitops.before-deploy.d/s3-create-tf-state-bucket.sh delete mode 100644 docs/examples/bitops+fast+react+static+renderer/global-tools/terraform/bitops.config.yaml delete mode 100644 docs/examples/bitops+fast+react+static+renderer/global-tools/terraform/ecr.tf delete mode 100644 docs/examples/bitops+fast+react+static+renderer/global-tools/terraform/iam-ci-user.tf delete mode 100644 docs/examples/bitops+fast+react+static+renderer/global-tools/terraform/lambda-static-test.tf delete mode 100755 docs/examples/bitops+fast+react+static+renderer/global-tools/terraform/provider.tf delete mode 100644 docs/examples/bitops+fast+react+static+renderer/global-tools/terraform/s3-sites.tf delete mode 100644 docs/examples/bitops+fast+react+static+renderer/global-tools/terraform/templates/s3-policy.json delete mode 100644 docs/examples/bitops+fast+react+static+renderer/global-tools/terraform/variables.tf delete mode 100644 docs/examples/bitops+helm-blog/README.md delete mode 100644 docs/examples/bitops+helm-blog/test/helm/monitoring/Chart.yaml delete mode 100644 docs/examples/bitops+helm-blog/test/helm/monitoring/bitops.config.yaml delete mode 100644 docs/examples/bitops+helm-blog/test/helm/monitoring/templates/dashboard.yaml delete mode 100644 docs/examples/bitops+helm-blog/test/helm/monitoring/values.yaml delete mode 100644 docs/examples/bitops+helm-blog/test/helm/my-chart/Chart.yaml delete mode 100755 docs/examples/bitops+helm-blog/test/helm/my-chart/bitops.after-deploy.d/my-after-script.sh delete mode 100755 docs/examples/bitops+helm-blog/test/helm/my-chart/bitops.before-deploy.d/my-before-script.sh delete mode 100644 docs/examples/bitops+helm-blog/test/helm/my-chart/bitops.config.yaml delete mode 100644 docs/examples/bitops+helm-blog/test/helm/my-chart/templates/NOTES.txt delete mode 100644 docs/examples/bitops+helm-blog/test/helm/my-chart/templates/_helpers.tpl delete mode 100644 docs/examples/bitops+helm-blog/test/helm/my-chart/templates/deployment.yaml delete mode 100644 docs/examples/bitops+helm-blog/test/helm/my-chart/templates/hpa.yaml delete mode 100644 docs/examples/bitops+helm-blog/test/helm/my-chart/templates/ingress.yaml delete mode 100644 docs/examples/bitops+helm-blog/test/helm/my-chart/templates/service.yaml delete mode 100644 docs/examples/bitops+helm-blog/test/helm/my-chart/templates/serviceaccount.yaml delete mode 100644 docs/examples/bitops+helm-blog/test/helm/my-chart/templates/tests/test-connection.yaml delete mode 100644 docs/examples/bitops+helm-blog/test/helm/my-chart/values.yaml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/README.md delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/_scripts/ansible/wait-for-inventory-hosts.py delete mode 100755 docs/examples/bitops+terraform+ansible+stackstorm-blog/_scripts/ansible/wait-for-it.sh delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/Gemfile delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/LICENSE delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/README.md delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/Vagrantfile delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/ansible.cfg delete mode 100755 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/bitops.after-deploy.d/my-after-script.sh delete mode 100755 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/bitops.before-deploy.d/my-before-script.sh delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/bitops.config.yaml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/extra-vars.json delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/meta/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.epel/meta/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.epel/tasks/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/defaults/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/handlers/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/meta/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/ewc_repos_cleanup_debian.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/ewc_repos_cleanup_redhat.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/ewc_repos_debian.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/ewc_repos_redhat.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/ewc_repos_setup.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/ldap.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/license.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/rbac.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/templates/rbac_assignments/assignments.yml.j2 delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/templates/rbac_roles/roles.yml.j2 delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/vars/enterprise-unstable.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/vars/enterprise.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/vars/staging-enterprise-unstable.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/vars/staging-enterprise.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc_smoketests/defaults/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc_smoketests/meta/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc_smoketests/tasks/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc_smoketests/tasks/teardown.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc_smoketests/templates/rbac_assignments/assignments.yml.j2 delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc_smoketests/templates/rbac_roles/roles.yml.j2 delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.git/handlers/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.git/tasks/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.git/vars/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/defaults/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/handlers/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/meta/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/tasks/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/tasks/mongodb_auth.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/tasks/mongodb_debian.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/tasks/mongodb_redhat.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/vars/debian.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/vars/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/vars/redhat.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/vars/redhat_8.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nginx/handlers/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nginx/meta/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nginx/tasks/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nginx/tasks/nginx_debian.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nginx/tasks/nginx_redhat.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nginx/vars/redhat.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nginx/vars/redhat_8.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nodejs/defaults/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nodejs/meta/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nodejs/tasks/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nodejs/tasks/nodejs_debian.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nodejs/tasks/nodejs_redhat.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.rabbitmq/defaults/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.rabbitmq/handlers/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.rabbitmq/meta/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.rabbitmq/tasks/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.rabbitmq/vars/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/defaults/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/handlers/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/meta/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/auth.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/config.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/datastore.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/flush_handlers.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/packs.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/proxy.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/user.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/version.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/vars/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/vars/redhat.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/vars/redhat_8.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2chatops/defaults/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2chatops/handlers/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2chatops/meta/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2chatops/tasks/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2chatops/vars/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/defaults/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/meta/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/tasks/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/tasks/st2repo_debian.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/tasks/st2repo_redhat.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/vars/stable.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/vars/staging-stable.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/vars/staging-unstable.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/vars/unstable.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2smoketests/tasks/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2smoketests/tasks/st2chatops.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2web/defaults/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2web/meta/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2web/tasks/certificate.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2web/tasks/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2web/vars/main.yml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/stackstorm.yml delete mode 120000 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/test/integration/default.yml delete mode 100755 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/terraform/bitops.after-deploy.d/my-after-script.sh delete mode 100755 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/terraform/bitops.before-deploy.d/my-before-script.sh delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/terraform/bitops.config.yaml delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/terraform/inventory.tf delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/terraform/inventory.tmpl delete mode 100644 docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/terraform/main.tf delete mode 100644 docs/examples/bitops+terraform+ansible-blog/README.md delete mode 100644 docs/examples/bitops+terraform+ansible-blog/test/ansible/ansible.cfg delete mode 100755 docs/examples/bitops+terraform+ansible-blog/test/ansible/bitops.after-deploy.d/my-after-script.sh delete mode 100755 docs/examples/bitops+terraform+ansible-blog/test/ansible/bitops.before-deploy.d/my-before-script.sh delete mode 100644 docs/examples/bitops+terraform+ansible-blog/test/ansible/bitops.config.yaml delete mode 100644 docs/examples/bitops+terraform+ansible-blog/test/ansible/inventory.yml delete mode 100644 docs/examples/bitops+terraform+ansible-blog/test/ansible/playbook.yaml delete mode 100755 docs/examples/bitops+terraform+ansible-blog/test/terraform/bitops.after-deploy.d/my-after-script.sh delete mode 100755 docs/examples/bitops+terraform+ansible-blog/test/terraform/bitops.before-deploy.d/my-before-script.sh delete mode 100644 docs/examples/bitops+terraform+ansible-blog/test/terraform/bitops.config.yaml delete mode 100644 docs/examples/bitops+terraform+ansible-blog/test/terraform/inventory.tf delete mode 100644 docs/examples/bitops+terraform+ansible-blog/test/terraform/inventory.tmpl delete mode 100644 docs/examples/bitops+terraform+ansible-blog/test/terraform/main.tf delete mode 100644 docs/examples/bitops+terraform-blog/README.md delete mode 100755 docs/examples/bitops+terraform-blog/prod/terraform/bitops.after-deploy.d/my-after-script.sh delete mode 100755 docs/examples/bitops+terraform-blog/prod/terraform/bitops.before-deploy.d/my-before-script.sh delete mode 100644 docs/examples/bitops+terraform-blog/prod/terraform/bitops.config.yaml delete mode 100644 docs/examples/bitops+terraform-blog/prod/terraform/main.tf delete mode 100755 docs/examples/bitops+terraform-blog/test/terraform/bitops.after-deploy.d/my-after-script.sh delete mode 100755 docs/examples/bitops+terraform-blog/test/terraform/bitops.before-deploy.d/my-before-script.sh delete mode 100644 docs/examples/bitops+terraform-blog/test/terraform/bitops.config.yaml delete mode 100644 docs/examples/bitops+terraform-blog/test/terraform/main.tf delete mode 100644 docs/examples/bitops-deploy-heyemoji/README.md delete mode 100644 docs/examples/bitops-deploy-heyemoji/test/ansible/ansible.cfg delete mode 100644 docs/examples/bitops-deploy-heyemoji/test/ansible/bitops.config.yaml delete mode 100644 docs/examples/bitops-deploy-heyemoji/test/ansible/playbook.yaml delete mode 100644 docs/examples/bitops-deploy-heyemoji/test/ansible/tasks/build.yml delete mode 100644 docs/examples/bitops-deploy-heyemoji/test/ansible/tasks/fetch.yml delete mode 100644 docs/examples/bitops-deploy-heyemoji/test/ansible/tasks/install.yml delete mode 100644 docs/examples/bitops-deploy-heyemoji/test/ansible/tasks/start.yml delete mode 100644 docs/examples/bitops-deploy-heyemoji/test/ansible/vars/default.yml delete mode 100644 docs/examples/bitops-deploy-heyemoji/test/terraform/ami.tf delete mode 100755 docs/examples/bitops-deploy-heyemoji/test/terraform/bitops.after-deploy.d/my-after-script.sh delete mode 100755 docs/examples/bitops-deploy-heyemoji/test/terraform/bitops.before-deploy.d/my-before-script.sh delete mode 100644 docs/examples/bitops-deploy-heyemoji/test/terraform/bitops.config.yaml delete mode 100644 docs/examples/bitops-deploy-heyemoji/test/terraform/instance.tf delete mode 100644 docs/examples/bitops-deploy-heyemoji/test/terraform/inventory.tmpl delete mode 100644 docs/examples/bitops-deploy-heyemoji/test/terraform/locals.tf delete mode 100644 docs/examples/bitops-deploy-heyemoji/test/terraform/providers.tf delete mode 100644 docs/examples/bitops-deploy-heyemoji/test/terraform/security-groups.tf delete mode 100644 docs/examples/bitops-deploy-heyemoji/test/terraform/vars.tf delete mode 100644 docs/examples/bitops-deploy-heyemoji/test/terraform/vpc.tf delete mode 100644 docs/examples/bitops2-terraform-blog/README.md delete mode 100644 docs/examples/bitops2-terraform-blog/_default/_tf_modules/eks/createcluster.tf delete mode 100644 docs/examples/bitops2-terraform-blog/_default/_tf_modules/eks/variables.tf delete mode 100644 docs/examples/bitops2-terraform-blog/test/terraform/bitops.config.yaml delete mode 100644 docs/examples/bitops2-terraform-blog/test/terraform/main.tf delete mode 100644 docs/examples/bitops2-terraform-blog/test/terraform/test-vars.auto.tfvars.json delete mode 100644 docs/examples/bitops2-terraform-blog/test/terraform/variables.tf delete mode 100755 docs/examples/cloudformation-combine-parms/test/cloudformation/bitops.after-deploy.d/my-after-script.sh delete mode 100755 docs/examples/cloudformation-combine-parms/test/cloudformation/bitops.before-deploy.d/my-before-script.sh delete mode 100644 docs/examples/cloudformation-combine-parms/test/cloudformation/bitops.config.yaml delete mode 100644 docs/examples/cloudformation-combine-parms/test/cloudformation/parameters.json delete mode 100644 docs/examples/cloudformation-combine-parms/test/cloudformation/parameters/secrets.json delete mode 100644 docs/examples/cloudformation-combine-parms/test/cloudformation/parameters/version.json delete mode 100644 docs/examples/cloudformation-combine-parms/test/cloudformation/template.yaml delete mode 100644 docs/examples/helm-default-environment/README.md delete mode 100644 docs/examples/helm-default-environment/default/helm/my-first-chart/values-files/my-first-chart-default-values.yaml delete mode 100644 docs/examples/helm-default-environment/default/helm/my-first-chart/values-versions.yaml delete mode 100644 docs/examples/helm-default-environment/default/helm/my-first-chart/values.yaml delete mode 100644 docs/examples/helm-default-environment/test/helm/bitops.config.yaml delete mode 100644 docs/examples/helm-default-environment/test/helm/my-first-chart/values-files/my-first-chart-values.yaml delete mode 100644 docs/examples/helm-default-environment/test/helm/my-first-chart/values-versions.yaml delete mode 100644 docs/examples/helm-default-environment/test/helm/my-first-chart/values.yaml delete mode 100644 docs/examples/operations-repo-empty/production-serviceA/ansible/bitops.config.yml delete mode 100644 docs/examples/operations-repo-empty/production-serviceA/cloudformation/bitops.config.yml delete mode 100644 docs/examples/operations-repo-empty/production-serviceA/helm/bitops.config.yml delete mode 100644 docs/examples/operations-repo-empty/production-serviceA/helm/chartA/bitops.config.yml delete mode 100644 docs/examples/operations-repo-empty/production-serviceA/helm/chartB/bitops.config.yml delete mode 100644 docs/examples/operations-repo-empty/production-serviceA/terraform/bitops.config.yml delete mode 100644 docs/examples/operations-repo-empty/test-serviceA/ansible/bitops.config.yml delete mode 100644 docs/examples/operations-repo-empty/test-serviceA/cloudformation/bitops.config.yml delete mode 100644 docs/examples/operations-repo-empty/test-serviceA/helm/bitops.config.yml delete mode 100644 docs/examples/operations-repo-empty/test-serviceA/helm/chartA/bitops.config.yml delete mode 100644 docs/examples/operations-repo-empty/test-serviceA/helm/chartB/bitops.config.yml delete mode 100644 docs/examples/operations-repo-empty/test-serviceA/terraform/bitops.config.yml delete mode 100644 docs/examples/terraform-and-ansible/README.md delete mode 100644 docs/examples/terraform-and-ansible/test/ansible/ansible.cfg delete mode 100644 docs/examples/terraform-and-ansible/test/ansible/bitops.config.yaml delete mode 100644 docs/examples/terraform-and-ansible/test/ansible/playbook.yaml delete mode 100755 docs/examples/terraform-and-ansible/test/terraform/bitops.after-deploy.d/debug-ansible-inventory.sh delete mode 100644 docs/examples/terraform-and-ansible/test/terraform/bitops.config.yaml delete mode 100644 docs/examples/terraform-and-ansible/test/terraform/hosts.tmpl delete mode 100644 docs/examples/terraform-and-ansible/test/terraform/main.tf delete mode 100644 docs/examples/terraform-and-azure/bitops.config.yaml delete mode 100644 docs/examples/terraform-and-azure/bitops.schema.yaml delete mode 100644 docs/examples/terraform-and-azure/terraform/bitops.config.yaml delete mode 100644 docs/examples/terraform-and-azure/terraform/linux_vm.tf delete mode 100644 docs/examples/terraform-and-azure/terraform/resource.tf delete mode 100644 docs/examples/terraform-and-gcp/bitops.config.yaml delete mode 100644 docs/examples/terraform-and-gcp/bitops.schema.yaml delete mode 100644 docs/examples/terraform-and-gcp/terraform/bitops.config.yaml delete mode 100644 docs/examples/terraform-and-gcp/terraform/main.tf delete mode 100644 docs/examples/terraform-and-gcp/terraform/output.tf delete mode 100644 docs/examples/terraform-and-gcp/terraform/provider.tf delete mode 100644 docs/examples/terraform-and-gcp/terraform/terraform.tfvars delete mode 100644 docs/examples/terraform-and-gcp/terraform/variables.tf delete mode 100644 docs/examples/terraform-default-environment/README.md delete mode 100644 docs/examples/terraform-default-environment/default/terraform/bitops.config.yaml delete mode 100644 docs/examples/terraform-default-environment/default/terraform/main.tf delete mode 100644 docs/examples/terraform-default-environment/production/terraform/bitops.config.yaml delete mode 100644 docs/examples/terraform-default-environment/production/terraform/main.tf delete mode 100644 docs/examples/terraform-default-environment/test/terraform/bitops.config.yaml delete mode 100644 docs/examples/terraform-default-environment/test/terraform/main.tf delete mode 100644 docs/examples/terraform-lifecycle-hooks/README.md delete mode 100755 docs/examples/terraform-lifecycle-hooks/test/terraform/bitops.after-deploy.d/my-after-script.sh delete mode 100755 docs/examples/terraform-lifecycle-hooks/test/terraform/bitops.before-deploy.d/my-before-script.sh delete mode 100644 docs/examples/terraform-lifecycle-hooks/test/terraform/bitops.config.yaml delete mode 100644 docs/examples/terraform-lifecycle-hooks/test/terraform/main.tf diff --git a/docs/example-config-files/helm.bitops.config.yaml b/docs/example-config-files/helm.bitops.config.yaml deleted file mode 100644 index 82147055..00000000 --- a/docs/example-config-files/helm.bitops.config.yaml +++ /dev/null @@ -1,11 +0,0 @@ -helm: - cli: - namespace: bitops - debug: false - atomic: true - options: - release-name: bitops-eks - kubeconfig: - fetch: - enabled: true - cluster-name: bitops-eks \ No newline at end of file diff --git a/docs/example-config-files/terraform.bitops.config.yaml b/docs/example-config-files/terraform.bitops.config.yaml deleted file mode 100644 index 8189b028..00000000 --- a/docs/example-config-files/terraform.bitops.config.yaml +++ /dev/null @@ -1,10 +0,0 @@ -terraform: - cli: - backend-config: - - KEY1=foo - - KEY2=bar - options: - command: apply - version: "0.13.2" - fetch-kubeconfig: false - init-upgrade: true \ No newline at end of file diff --git a/docs/examples/bitops+cloudformation-blog/README.md b/docs/examples/bitops+cloudformation-blog/README.md deleted file mode 100644 index 36a2f413..00000000 --- a/docs/examples/bitops+cloudformation-blog/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Bitops Operations Repo - -Welcome to Bitops! This serves as a starting point for deploying your application to the cloud. - -This repo can be run as is with -``` -docker run \ --e ENVIRONMENT="test" \ --e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \ --e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \ --e AWS_DEFAULT_REGION="us-east-2" \ --v $(pwd):/opt/bitops_deployment \ -bitovi/bitops:latest -``` - -For more information, check out official BitOps docs https://bitovi.github.io/bitops/ \ No newline at end of file diff --git a/docs/examples/bitops+cloudformation-blog/test/cloudformation/bitops.after-deploy.d/my-after-script.sh b/docs/examples/bitops+cloudformation-blog/test/cloudformation/bitops.after-deploy.d/my-after-script.sh deleted file mode 100755 index 510a131f..00000000 --- a/docs/examples/bitops+cloudformation-blog/test/cloudformation/bitops.after-deploy.d/my-after-script.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -echo "I am an after cloudformation lifecycle script!" \ No newline at end of file diff --git a/docs/examples/bitops+cloudformation-blog/test/cloudformation/bitops.before-deploy.d/my-before-script.sh b/docs/examples/bitops+cloudformation-blog/test/cloudformation/bitops.before-deploy.d/my-before-script.sh deleted file mode 100755 index d27ff896..00000000 --- a/docs/examples/bitops+cloudformation-blog/test/cloudformation/bitops.before-deploy.d/my-before-script.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -set -e -PARAMS_FILE=$CLOUDFORMATION_ROOT/parameters.json - -cat $PARAMS_FILE | jq 'map(select(.ParameterKey == "DBUser").ParameterValue='\"$CF_DB_USERNAME\"')' > out.tmp -mv out.tmp $CLOUDFORMATION_ROOT/parameters.json - -cat $PARAMS_FILE | jq 'map(select(.ParameterKey == "DBPassword").ParameterValue='\"$CF_DB_PASSWORD\"')' > out.tmp -mv out.tmp $CLOUDFORMATION_ROOT/parameters.json \ No newline at end of file diff --git a/docs/examples/bitops+cloudformation-blog/test/cloudformation/bitops.config.yaml b/docs/examples/bitops+cloudformation-blog/test/cloudformation/bitops.config.yaml deleted file mode 100644 index 9e994dcc..00000000 --- a/docs/examples/bitops+cloudformation-blog/test/cloudformation/bitops.config.yaml +++ /dev/null @@ -1,11 +0,0 @@ -cloudformation: - cli: - validate-cfn: true - cfn-stack-action: deploy - options: - cfn-stack-name: bitops-stack-test - cfn-files: - template-file: template.yaml - parameters: - enabled: true - template-param-file: parameters.json \ No newline at end of file diff --git a/docs/examples/bitops+cloudformation-blog/test/cloudformation/parameters.json b/docs/examples/bitops+cloudformation-blog/test/cloudformation/parameters.json deleted file mode 100644 index 9e0a2bbe..00000000 --- a/docs/examples/bitops+cloudformation-blog/test/cloudformation/parameters.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "ParameterKey": "DBUser", - "ParameterValue": "PlaceholderUser", - "UsePreviousValue": false - }, - { - "ParameterKey": "DBPassword", - "ParameterValue": "PlaceholderPassword", - "UsePreviousValue": false - } -] \ No newline at end of file diff --git a/docs/examples/bitops+cloudformation-blog/test/cloudformation/template.yaml b/docs/examples/bitops+cloudformation-blog/test/cloudformation/template.yaml deleted file mode 100644 index 2e6b7ae3..00000000 --- a/docs/examples/bitops+cloudformation-blog/test/cloudformation/template.yaml +++ /dev/null @@ -1,129 +0,0 @@ -AWSTemplateFormatVersion: 2010-09-09 -Description: >- - Sample template showing how to create a highly-available, RDS DBInstance with - a read replica. **WARNING** This template creates an Amazon Relational - Database Service database instance and Amazon CloudWatch alarms. You will be - billed for the AWS resources used if you create a stack from this template. -Parameters: - DBName: - Default: MyDatabase - Description: The database name - Type: String - MinLength: '1' - MaxLength: '64' - AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*' - ConstraintDescription: must begin with a letter and contain only alphanumeric characters. - DBUser: - NoEcho: 'true' - Description: The database admin account username - Type: String - MinLength: '1' - MaxLength: '16' - AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*' - ConstraintDescription: must begin with a letter and contain only alphanumeric characters. - DBPassword: - NoEcho: 'true' - Description: The database admin account password - Type: String - MinLength: '1' - MaxLength: '41' - AllowedPattern: '[a-zA-Z0-9]+' - ConstraintDescription: must contain only alphanumeric characters. - DBAllocatedStorage: - Default: '5' - Description: The size of the database (Gb) - Type: Number - MinValue: '5' - MaxValue: '1024' - ConstraintDescription: must be between 5 and 1024Gb. - DBInstanceClass: - Description: The database instance type - Type: String - Default: db.t2.small - AllowedValues: - - db.t2.micro - - db.t2.small - - db.t2.medium - - db.t2.large - ConstraintDescription: must select a valid database instance type. - EC2SecurityGroup: - Description: >- - The EC2 security group that contains instances that need access to the - database - Default: default - Type: String - AllowedPattern: '[a-zA-Z0-9\-]+' - ConstraintDescription: must be a valid security group name. - MultiAZ: - Description: Multi-AZ master database - Type: String - Default: 'false' - AllowedValues: - - 'true' - - 'false' - ConstraintDescription: must be true or false. -Resources: - DBEC2SecurityGroup: - Type: 'AWS::EC2::SecurityGroup' - Properties: - GroupDescription: Open database for access - SecurityGroupIngress: - - IpProtocol: tcp - FromPort: '3306' - ToPort: '3306' - SourceSecurityGroupName: !Ref EC2SecurityGroup - MasterDB: - Type: 'AWS::RDS::DBInstance' - Properties: - DBName: !Ref DBName - AllocatedStorage: !Ref DBAllocatedStorage - DBInstanceClass: !Ref DBInstanceClass - Engine: MySQL - MasterUsername: !Ref DBUser - MasterUserPassword: !Ref DBPassword - MultiAZ: !Ref MultiAZ - Tags: - - Key: Name - Value: Master Database - VPCSecurityGroups: - - !GetAtt - - DBEC2SecurityGroup - - GroupId - DeletionPolicy: Snapshot - ReplicaDB: - Type: 'AWS::RDS::DBInstance' - Properties: - SourceDBInstanceIdentifier: !Ref MasterDB - DBInstanceClass: !Ref DBInstanceClass - Tags: - - Key: Name - Value: Read Replica Database -Outputs: - MasterJDBCConnectionString: - Description: JDBC connection string for the master database - Value: !Join - - '' - - - 'jdbc:mysql://' - - !GetAtt - - MasterDB - - Endpoint.Address - - ':' - - !GetAtt - - MasterDB - - Endpoint.Port - - / - - !Ref DBName - ReplicaJDBCConnectionString: - Description: JDBC connection string for the replica database - Value: !Join - - '' - - - 'jdbc:mysql://' - - !GetAtt - - ReplicaDB - - Endpoint.Address - - ':' - - !GetAtt - - ReplicaDB - - Endpoint.Port - - / - - !Ref DBName \ No newline at end of file diff --git a/docs/examples/bitops+eks/README.md b/docs/examples/bitops+eks/README.md deleted file mode 100644 index 1940f41e..00000000 --- a/docs/examples/bitops+eks/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Bitops Operations Repo - -Welcome to Bitops! This serves as a starting point for deploying your application to the cloud. - -This repo can be run as is with -``` -docker run \ --e ENVIRONMENT="test" \ --e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \ --e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \ --e AWS_DEFAULT_REGION="us-east-1" \ --v $(pwd):/opt/bitops_deployment \ -bitovi/bitops:latest -``` - -For more information, check out official BitOps docs https://bitovi.github.io/bitops/ \ No newline at end of file diff --git a/docs/examples/bitops+eks/test/helm/my-chart/Chart.yaml b/docs/examples/bitops+eks/test/helm/my-chart/Chart.yaml deleted file mode 100644 index 156eecdb..00000000 --- a/docs/examples/bitops+eks/test/helm/my-chart/Chart.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: v2 -name: my-chart -description: A Helm chart for Kubernetes - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -appVersion: 1.16.0 diff --git a/docs/examples/bitops+eks/test/helm/my-chart/bitops.after-deploy.d/my-after-script.sh b/docs/examples/bitops+eks/test/helm/my-chart/bitops.after-deploy.d/my-after-script.sh deleted file mode 100755 index fb04e2a4..00000000 --- a/docs/examples/bitops+eks/test/helm/my-chart/bitops.after-deploy.d/my-after-script.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -echo "I am an after helm lifecycle script!" \ No newline at end of file diff --git a/docs/examples/bitops+eks/test/helm/my-chart/bitops.before-deploy.d/my-before-script.sh b/docs/examples/bitops+eks/test/helm/my-chart/bitops.before-deploy.d/my-before-script.sh deleted file mode 100755 index 4efbd950..00000000 --- a/docs/examples/bitops+eks/test/helm/my-chart/bitops.before-deploy.d/my-before-script.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -echo "I am a before helm lifecycle script!" \ No newline at end of file diff --git a/docs/examples/bitops+eks/test/helm/my-chart/bitops.config.yaml b/docs/examples/bitops+eks/test/helm/my-chart/bitops.config.yaml deleted file mode 100644 index dc8e0f18..00000000 --- a/docs/examples/bitops+eks/test/helm/my-chart/bitops.config.yaml +++ /dev/null @@ -1,15 +0,0 @@ -helm: - cli: - namespace: bitops - timeout: 60s - set: - - "key1=value1" - - "key2=value2" - debug: false - atomic: true - options: - release-name: bitops-release - kubeconfig: - fetch: - enabled: true - cluster-name: bitops-eks \ No newline at end of file diff --git a/docs/examples/bitops+eks/test/helm/my-chart/templates/NOTES.txt b/docs/examples/bitops+eks/test/helm/my-chart/templates/NOTES.txt deleted file mode 100644 index 7061b8e6..00000000 --- a/docs/examples/bitops+eks/test/helm/my-chart/templates/NOTES.txt +++ /dev/null @@ -1,21 +0,0 @@ -1. Get the application URL by running these commands: -{{- if .Values.ingress.enabled }} -{{- range $host := .Values.ingress.hosts }} - {{- range .paths }} - http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }} - {{- end }} -{{- end }} -{{- else if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "my-chart.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" .Values.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "my-chart.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "my-chart.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") - echo http://$SERVICE_IP:{{ .Values.service.port }} -{{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "my-chart.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - echo "Visit http://127.0.0.1:8080 to use your application" - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80 -{{- end }} diff --git a/docs/examples/bitops+eks/test/helm/my-chart/templates/_helpers.tpl b/docs/examples/bitops+eks/test/helm/my-chart/templates/_helpers.tpl deleted file mode 100644 index b059a2f8..00000000 --- a/docs/examples/bitops+eks/test/helm/my-chart/templates/_helpers.tpl +++ /dev/null @@ -1,62 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "my-chart.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "my-chart.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "my-chart.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "my-chart.labels" -}} -helm.sh/chart: {{ include "my-chart.chart" . }} -{{ include "my-chart.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "my-chart.selectorLabels" -}} -app.kubernetes.io/name: {{ include "my-chart.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "my-chart.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "my-chart.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} diff --git a/docs/examples/bitops+eks/test/helm/my-chart/templates/deployment.yaml b/docs/examples/bitops+eks/test/helm/my-chart/templates/deployment.yaml deleted file mode 100644 index 1d70c81c..00000000 --- a/docs/examples/bitops+eks/test/helm/my-chart/templates/deployment.yaml +++ /dev/null @@ -1,61 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "my-chart.fullname" . }} - labels: - {{- include "my-chart.labels" . | nindent 4 }} -spec: -{{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} -{{- end }} - selector: - matchLabels: - {{- include "my-chart.selectorLabels" . | nindent 6 }} - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "my-chart.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "my-chart.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - containers: - - name: {{ .Chart.Name }} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - ports: - - name: http - containerPort: 80 - protocol: TCP - livenessProbe: - httpGet: - path: / - port: http - readinessProbe: - httpGet: - path: / - port: http - resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/docs/examples/bitops+eks/test/helm/my-chart/templates/hpa.yaml b/docs/examples/bitops+eks/test/helm/my-chart/templates/hpa.yaml deleted file mode 100644 index 3f23429e..00000000 --- a/docs/examples/bitops+eks/test/helm/my-chart/templates/hpa.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "my-chart.fullname" . }} - labels: - {{- include "my-chart.labels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "my-chart.fullname" . }} - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} - metrics: - {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} - {{- end }} - {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} - {{- end }} -{{- end }} diff --git a/docs/examples/bitops+eks/test/helm/my-chart/templates/ingress.yaml b/docs/examples/bitops+eks/test/helm/my-chart/templates/ingress.yaml deleted file mode 100644 index 6b814982..00000000 --- a/docs/examples/bitops+eks/test/helm/my-chart/templates/ingress.yaml +++ /dev/null @@ -1,41 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $fullName := include "my-chart.fullname" . -}} -{{- $svcPort := .Values.service.port -}} -{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} -kind: Ingress -metadata: - name: {{ $fullName }} - labels: - {{- include "my-chart.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ .host | quote }} - http: - paths: - {{- range .paths }} - - path: {{ . }} - backend: - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} - {{- end }} - {{- end }} - {{- end }} diff --git a/docs/examples/bitops+eks/test/helm/my-chart/templates/service.yaml b/docs/examples/bitops+eks/test/helm/my-chart/templates/service.yaml deleted file mode 100644 index 40cbf425..00000000 --- a/docs/examples/bitops+eks/test/helm/my-chart/templates/service.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "my-chart.fullname" . }} - labels: - {{- include "my-chart.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - protocol: TCP - name: http - selector: - {{- include "my-chart.selectorLabels" . | nindent 4 }} diff --git a/docs/examples/bitops+eks/test/helm/my-chart/templates/serviceaccount.yaml b/docs/examples/bitops+eks/test/helm/my-chart/templates/serviceaccount.yaml deleted file mode 100644 index 68668d61..00000000 --- a/docs/examples/bitops+eks/test/helm/my-chart/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "my-chart.serviceAccountName" . }} - labels: - {{- include "my-chart.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/docs/examples/bitops+eks/test/helm/my-chart/templates/tests/test-connection.yaml b/docs/examples/bitops+eks/test/helm/my-chart/templates/tests/test-connection.yaml deleted file mode 100644 index f6e2d486..00000000 --- a/docs/examples/bitops+eks/test/helm/my-chart/templates/tests/test-connection.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "my-chart.fullname" . }}-test-connection" - labels: - {{- include "my-chart.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": test-success -spec: - containers: - - name: wget - image: busybox - command: ['wget'] - args: ['{{ include "my-chart.fullname" . }}:{{ .Values.service.port }}'] - restartPolicy: Never diff --git a/docs/examples/bitops+eks/test/helm/my-chart/values.yaml b/docs/examples/bitops+eks/test/helm/my-chart/values.yaml deleted file mode 100644 index 4e145d60..00000000 --- a/docs/examples/bitops+eks/test/helm/my-chart/values.yaml +++ /dev/null @@ -1,79 +0,0 @@ -# Default values for my-chart. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - repository: nginx - pullPolicy: IfNotPresent - # Overrides the image tag whose default is the chart appVersion. - tag: "" - -imagePullSecrets: [] -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "" - -podAnnotations: {} - -podSecurityContext: {} - # fsGroup: 2000 - -securityContext: {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 - -service: - type: ClusterIP - port: 80 - -ingress: - enabled: false - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - hosts: - - host: chart-example.local - paths: [] - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -autoscaling: - enabled: false - minReplicas: 1 - maxReplicas: 100 - targetCPUUtilizationPercentage: 80 - # targetMemoryUtilizationPercentage: 80 - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/docs/examples/bitops+eks/test/terraform/bitops.after-deploy.d/my-after-script.sh b/docs/examples/bitops+eks/test/terraform/bitops.after-deploy.d/my-after-script.sh deleted file mode 100755 index dabc6d25..00000000 --- a/docs/examples/bitops+eks/test/terraform/bitops.after-deploy.d/my-after-script.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -echo "I am an after terraform lifecycle script!" \ No newline at end of file diff --git a/docs/examples/bitops+eks/test/terraform/bitops.before-deploy.d/my-before-script.sh b/docs/examples/bitops+eks/test/terraform/bitops.before-deploy.d/my-before-script.sh deleted file mode 100755 index 7b98fb8d..00000000 --- a/docs/examples/bitops+eks/test/terraform/bitops.before-deploy.d/my-before-script.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -aws s3api create-bucket --bucket "my-bitops-blog-bucket" --region $AWS_DEFAULT_REGION --create-bucket-configuration LocationConstraint=$AWS_DEFAULT_REGION || true diff --git a/docs/examples/bitops+eks/test/terraform/bitops.config.yaml b/docs/examples/bitops+eks/test/terraform/bitops.config.yaml deleted file mode 100644 index 8ab52e5b..00000000 --- a/docs/examples/bitops+eks/test/terraform/bitops.config.yaml +++ /dev/null @@ -1,6 +0,0 @@ -terraform: - cli: {} - options: - command: apply - version: "0.13.2" - fetch-kubeconfig: false \ No newline at end of file diff --git a/docs/examples/bitops+eks/test/terraform/eks-cluster.tf b/docs/examples/bitops+eks/test/terraform/eks-cluster.tf deleted file mode 100644 index df7f4aae..00000000 --- a/docs/examples/bitops+eks/test/terraform/eks-cluster.tf +++ /dev/null @@ -1,26 +0,0 @@ -locals { - cluster_name = "bitops-eks" -} - -module "eks" { - source = "terraform-aws-modules/eks/aws" - cluster_name = local.cluster_name - cluster_version = "1.17" - subnets = module.vpc.private_subnets - vpc_id = module.vpc.vpc_id - manage_aws_auth = false - write_kubeconfig = false - worker_groups = [ - { - name = "worker-group" - instance_type = "t2.small" - asg_desired_capacity = 2 - additional_security_group_ids = [aws_security_group.worker_nodes.id] - }, - ] - node_groups = { - test = { - instance_type = "t3.small" - } - } -} diff --git a/docs/examples/bitops+eks/test/terraform/kubeconfig b/docs/examples/bitops+eks/test/terraform/kubeconfig deleted file mode 100644 index 1c44af93..00000000 --- a/docs/examples/bitops+eks/test/terraform/kubeconfig +++ /dev/null @@ -1,29 +0,0 @@ -apiVersion: v1 -preferences: {} -kind: Config - -clusters: -- cluster: - server: https://B085B8C3D0B7231CC0A0686199C875C6.gr7.us-east-2.eks.amazonaws.com - certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUN5RENDQWJDZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJd01USXdPREl4TXpJeU5Gb1hEVE13TVRJd05qSXhNekl5TkZvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTVk4CkxMVmg5bFlUbkl2YzIyQ3lNTWg2cXMxVnI5NmF1aGtuRzRORHJ5VGx2emZxZHdlUE1jUjFSTm1pQnVDQVFOd3EKOTZiWDUzU2dLUlpTUC9rTzVZS3RKbVFGTUlBT3dFZkR3OVVaa2ZxVXpDQzN6ZS9xNTE3TFkxbGN3ek05RVUrOQpBVkpNME5heGxQeUZyRmJlNHQ3dm5TSnVSL20rUUd2MS9sY2hCbVFYREhScXdiRmIyWklEeVVDa2VKc2NYUWRXCnRBWFE5WTdpalJkSHlBdG82OVh3dTNQZDFkejJiMnN0UlNqNVhIRENiWjJEWUxFV2dOdWtwUEtPTzhwT25HTDUKdERONFNkRHQ4RVlGc1JTSlFRUjBxb3k5a0plWjRNM29SQ0lDLzUzcUJyM3l4NlVGT1hhNGxWc3NEeWpGOXJFcgowT3pTaDRHd08zZWdKaXZ3THVNQ0F3RUFBYU1qTUNFd0RnWURWUjBQQVFIL0JBUURBZ0trTUE4R0ExVWRFd0VCCi93UUZNQU1CQWY4d0RRWUpLb1pJaHZjTkFRRUxCUUFEZ2dFQkFDanZJMTJlNWtHVjYwbUpOM0tJMDE5eTNHY3MKRmRDbnJMWUZQcTZiTUJPRjlYRm9qT0VtR2hHcVo3dVVaaGkvOGE1NXpUK0cxMjA0b2RzbmZHMFZSRTFSSE8zZgpOVHJXRVpQbnNIdGNjZWVZV0xXbCtoMnVhUnBhRndkQUI3L2taeHF3QjcvMjcyUFVOY3krdWxrdGRIbFpOVTIrCmg3MEtJVG9QMnQ4eUtaQ0syNlNKR2R6ai81UEpuUyt4OHJEWXZHOElQUGQrcXovaHlPd3dtZWhEVklDZFZhdGoKNUY0OU9Ba05MVFU5M080aFgzalg5cklFV1dHUytoYjJLV1F2dlZJNlZURkRGbkV1WUdNaC9zTVI4dUZsSjJ0NgpJNk96ZmhkOHVNZW1PT0xwbGtDeHZqVHlCellPVWVWdHMxcEFsd3FYSi93VE5JSFRkbmNOb0V6WXZzVT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= - name: eks_bitops-eks - -contexts: -- context: - cluster: eks_bitops-eks - user: eks_bitops-eks - name: eks_bitops-eks - -current-context: eks_bitops-eks - -users: -- name: eks_bitops-eks - user: - exec: - apiVersion: client.authentication.k8s.io/v1alpha1 - command: aws-iam-authenticator - args: - - "token" - - "-i" - - "bitops-eks" - diff --git a/docs/examples/bitops+eks/test/terraform/outputs.tf b/docs/examples/bitops+eks/test/terraform/outputs.tf deleted file mode 100644 index a46dd397..00000000 --- a/docs/examples/bitops+eks/test/terraform/outputs.tf +++ /dev/null @@ -1,4 +0,0 @@ -output "kubeconfig" { - description = "kubectl config as generated by the module." - value = module.eks.kubeconfig -} \ No newline at end of file diff --git a/docs/examples/bitops+eks/test/terraform/providers.tf b/docs/examples/bitops+eks/test/terraform/providers.tf deleted file mode 100644 index 903821b1..00000000 --- a/docs/examples/bitops+eks/test/terraform/providers.tf +++ /dev/null @@ -1,24 +0,0 @@ -terraform { - required_version = ">= 0.12" - backend "s3" { - bucket = "my-bitops-blog-bucket" - key = "state" - } -} - -provider "local" { - version = "~> 1.2" -} - -provider "null" { - version = "~> 2.1" -} - -provider "template" { - version = "~> 2.1" -} - -provider "aws" { - version = ">= 2.28.1" - region = "us-east-2" -} \ No newline at end of file diff --git a/docs/examples/bitops+eks/test/terraform/security-groups.tf b/docs/examples/bitops+eks/test/terraform/security-groups.tf deleted file mode 100644 index ce34ed48..00000000 --- a/docs/examples/bitops+eks/test/terraform/security-groups.tf +++ /dev/null @@ -1,14 +0,0 @@ -resource "aws_security_group" "worker_nodes" { - name_prefix = "all_worker_management" - vpc_id = module.vpc.vpc_id - - ingress { - from_port = 22 - to_port = 22 - protocol = "tcp" - - cidr_blocks = [ - local.cidr - ] - } -} diff --git a/docs/examples/bitops+eks/test/terraform/vpc.tf b/docs/examples/bitops+eks/test/terraform/vpc.tf deleted file mode 100644 index ad4985e1..00000000 --- a/docs/examples/bitops+eks/test/terraform/vpc.tf +++ /dev/null @@ -1,34 +0,0 @@ -locals { - cidr = "10.0.0.0/16" -} - -data "aws_availability_zones" "available" {} - -module "vpc" { - source = "terraform-aws-modules/vpc/aws" - version = "2.6.0" - - name = "bitops-vpc" - cidr = local.cidr - azs = data.aws_availability_zones.available.names - private_subnets = [cidrsubnet(local.cidr, 8, 1), cidrsubnet(local.cidr, 8, 2), cidrsubnet(local.cidr, 8, 3)] - public_subnets = [cidrsubnet(local.cidr, 8, 4), cidrsubnet(local.cidr, 8, 5), cidrsubnet(local.cidr, 8, 6)] - enable_nat_gateway = true - single_nat_gateway = true - enable_dns_hostnames = true - - tags = { - "kubernetes.io/cluster/${local.cluster_name}" = "shared" - } - - public_subnet_tags = { - "kubernetes.io/cluster/${local.cluster_name}" = "shared" - "kubernetes.io/role/elb" = "1" - } - - private_subnet_tags = { - "kubernetes.io/cluster/${local.cluster_name}" = "shared" - "kubernetes.io/role/internal-elb" = "1" - } -} - diff --git a/docs/examples/bitops+fast+react+static+renderer/_scripts/deploy/deploy.sh b/docs/examples/bitops+fast+react+static+renderer/_scripts/deploy/deploy.sh deleted file mode 100755 index c8e00379..00000000 --- a/docs/examples/bitops+fast+react+static+renderer/_scripts/deploy/deploy.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash - -set -e - - -echo "In deploy.sh" - -# TODO: use env file instead of directly mapping each env var? -# need to handle local PATH and such.. -# cleanup () { - -# echo "cleaning up deploy/deploy.sh..." -# rm -rf env_file_for_docker -# } -# trap "{ cleanup "$TEMPDIR"; }" EXIT - -# env >> env_file_for_docker -# # sed -i 's/ /_/g' env_file_for_docker - - - -# todo: map this in the gitlab pipeline -if [ -n "$GITHUB_WORKSPACE" ]; then - REPO_PATH="$GITHUB_WORKSPACE" -fi - - -if [ -z "$REPO_PATH" ]; then - echo "Required env var REPO_PATH: not set" - exit 1 -fi - - -echo "Running BitOps for env: $ENVIRONMENT" -docker run --rm --name bitops \ --e AWS_ACCESS_KEY_ID="${AWS_ACCESS_KEY_ID}" \ --e AWS_SECRET_ACCESS_KEY="${AWS_SECRET_ACCESS_KEY}" \ --e AWS_DEFAULT_REGION="${AWS_DEFAULT_REGION}" \ --e ENVIRONMENT="${ENVIRONMENT}" \ --e ENVIRONMENT_HELM_SUBDIRECTORY="${ENVIRONMENT_HELM_SUBDIRECTORY}" \ --e TERRAFORM_SKIP_DEPLOY="${TERRAFORM_SKIP_DEPLOY}" \ --e HELM_SKIP_DEPLOY="${HELM_SKIP_DEPLOY}" \ --e TF_STATE_BUCKET="${TF_STATE_BUCKET}" \ --e KUBECONFIG_BASE64="$KUBECONFIG_BASE64" \ --e PROVIDERS="$PROVIDERS" \ --e DEFAULT_FOLDER_NAME="_default" \ --e HELM_S3_REGION="${HELM_S3_REGION}" \ --v $(echo $REPO_PATH):/opt/bitops_deployment \ -$ADDITIONAL_MOUNT_STRING \ -bitovi/bitops:v1.0.13 diff --git a/docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/README.md b/docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/README.md deleted file mode 100644 index 7a029068..00000000 --- a/docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/README.md +++ /dev/null @@ -1,73 +0,0 @@ -# Secrets Management -A set of scripts to ease secrets management. - -## Prerequisites -- AWS CLI (and an AWS account) -- yq (Mac: `brew install yq`) - -## Common Environment Variables - -These environment variables apply to all scripts - -- `AWS_SECRETS_REGION` - - Description: The AWS region the secret resides in - - Default: `AWS_DEFAULT_REGION` -- `AWS_SECRETS_OUTPUT` - - Description: The output format of the underlying AWS commands - - Default: `yaml` - -## Best Practices - -### Naming -It is best to name each secret something that is scoped to its use. - -To be consistent, the convention should be: -``` -${operations repo name}/${operations repo environment}/${operations repo tool} -``` - -#### Naming for helm -For helm secrets, name the secret according to the full path of the tool. - -For example, an ops repo secret for the Grafana deployment in the `dev-tools` environment might be called: `operations-staffing-app/dev-tools/helm/grafana` - -## Guide -Let's say you have a tool called `dev/helm/my-deployment`. - - -### Creating the secret -Create a `.yaml` file locally called `values-secrets.yaml` which contains a subset of the helm chart values for `my-deployment`, and place it next to the same tool's `values.yaml` file. - -`operations-staffing-app/dev/helm/my-deployment/values-secrets.yaml` -``` -password: foo -``` - -> **Note:** Files named `values-secrets.yaml` are git ignored and will not be checked in. - -Save the secret in AWS: -``` -cd /path/to/operations-staffing-app -AWS_SECRETS_REGION="us-west-1" \ -AWS_SECRETS_SECRET_NAME="operations-staffing-app/dev/helm/my-deployment" \ -AWS_SECRETS_SECRET_DESCRIPTION="Secrets for operations-staffing-app/dev/helm/my-deployment" \ -AWS_SECRETS_SECRET_FILE="operations-staffing-app/dev/helm/my-deployment/values-secrets.yaml" \ -./_scripts/secrets/aws/save-file.sh -``` - -### Include the secret in the deployment -Create a before script in the helm chart directory: -`operations-staffing-app/dev/helm/my-deployment/bitops.before-deploy.d/fetch-secrets.sh` -``` -#!/bin/bash -set -e - -AWS_SECRETS_REGION="us-west-1" \ -AWS_SECRETS_SECRET_NAME="operations-staffing-app/dev/helm/my-deployment" \ -AWS_SECRETS_SECRET_FILE="$HELM_CHART_DIRECTORY/values-secrets.yaml" \ -$ROOT_DIR/_scripts/secrets/aws/get-file.sh -``` - -> **Note:** Ensure the file is executable with `chmod +x ` - -BitOps will then see the `values-secrets.yaml` at deploy time and include it into the helm deployment. \ No newline at end of file diff --git a/docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/create.sh b/docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/create.sh deleted file mode 100755 index da40aad3..00000000 --- a/docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/create.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -set -e - - -# validation -if [ -z "$AWS_SECRETS_SECRET_NAME" ]; then - echo "Environment Variable Required: AWS_SECRETS_SECRET_NAME" - exit 1 -fi -if [ -z "$AWS_SECRETS_SECRET_VALUE" ]; then - echo "Environment Variable Required: AWS_SECRETS_SECRET_VALUE" - exit 1 -fi -if [ -z "$AWS_SECRETS_SECRET_DESCRIPTION" ]; then - echo "Environment Variable Required: AWS_SECRETS_SECRET_DESCRIPTION" - exit 1 -fi - -region_command="" -if [ -n "$AWS_SECRETS_REGION" ]; then - region_command="--region ${AWS_SECRETS_REGION}" -fi - -output_command="--output yaml" -if [ -n "$AWS_SECRETS_OUTPUT" ]; then - output_command="--output ${AWS_SECRETS_OUTPUT}" -fi - -echo "Creating Secret: $AWS_SECRETS_SECRET_NAME" -aws secretsmanager \ -$region_command \ -$output_command \ ---no-cli-pager \ -create-secret \ ---name "$AWS_SECRETS_SECRET_NAME" \ ---description "$AWS_SECRETS_SECRET_DESCRIPTION" \ ---secret-string "$AWS_SECRETS_SECRET_VALUE" diff --git a/docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/delete.sh b/docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/delete.sh deleted file mode 100755 index e92769fc..00000000 --- a/docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/delete.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -set -e - - -# validation -if [ -z "$AWS_SECRETS_SECRET_NAME" ]; then - echo "Environment Variable Required: AWS_SECRETS_SECRET_NAME" - exit 1 -fi - -region_command="" -if [ -n "$AWS_SECRETS_REGION" ]; then - region_command="--region ${AWS_SECRETS_REGION}" -fi - -output_command="--output yaml" -if [ -n "$AWS_SECRETS_OUTPUT" ]; then - output_command="--output ${AWS_SECRETS_OUTPUT}" -fi - -echo "Deleting Secret: $AWS_SECRETS_SECRET_NAME" -aws secretsmanager \ -$region_command \ -$output_command \ ---no-cli-pager \ -delete-secret \ ---secret-id $AWS_SECRETS_SECRET_NAME diff --git a/docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/describe.sh b/docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/describe.sh deleted file mode 100755 index 384e5856..00000000 --- a/docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/describe.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -set -e - - -# validation -if [ -z "$AWS_SECRETS_SECRET_NAME" ]; then - echo "Environment Variable Required: AWS_SECRETS_SECRET_NAME" - exit 1 -fi - -region_command="" -if [ -n "$AWS_SECRETS_REGION" ]; then - region_command="--region ${AWS_SECRETS_REGION}" -fi - -output_command="--output yaml" -if [ -n "$AWS_SECRETS_OUTPUT" ]; then - output_command="--output ${AWS_SECRETS_OUTPUT}" -fi - -aws secretsmanager \ -$region_command \ -$output_command \ ---no-cli-pager \ -describe-secret \ ---secret-id $AWS_SECRETS_SECRET_NAME diff --git a/docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/get-file.sh b/docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/get-file.sh deleted file mode 100755 index 15caadcd..00000000 --- a/docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/get-file.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash - -set -e - - -# validation -if [ -z "$AWS_SECRETS_SECRET_NAME" ]; then - echo "Environment Variable Required: AWS_SECRETS_SECRET_NAME" - exit 1 -fi -if [ -z "$AWS_SECRETS_SECRET_FILE" ]; then - echo "Environment Variable Required: AWS_SECRETS_SECRET_FILE" - exit 1 -fi - -region_command="" -if [ -n "$AWS_SECRETS_REGION" ]; then - region_command="--region ${AWS_SECRETS_REGION}" -fi - -output_command="--output yaml" -if [ -n "$AWS_SECRETS_OUTPUT" ]; then - output_command="--output ${AWS_SECRETS_OUTPUT}" -fi - -if [ -z "$ROOT_DIR" ]; then - ROOT_DIR="$(pwd)" -fi - - -echo "Getting secret: $AWS_SECRETS_SECRET_NAME" -AWS_SECRETS_SECRET_VALUE_RAW="$(AWS_SECRETS_OUTPUT="$AWS_SECRETS_OUTPUT" \ -AWS_SECRETS_REGION="$AWS_SECRETS_REGION" \ -AWS_SECRETS_SECRET_NAME="$AWS_SECRETS_SECRET_NAME" \ -bash $ROOT_DIR/_scripts/secrets/aws/get.sh)" - - -set +e -SHYAML_RESULT=$(which shyaml) -YQ_RESULT=$(which yq) -set -e - -if [ -n "$SHYAML_RESULT" ]; then - AWS_SECRETS_SECRET_VALUE="$(echo "$AWS_SECRETS_SECRET_VALUE_RAW" | shyaml get-value SecretString)" -elif [ -n "$YQ_RESULT" ]; then - AWS_SECRETS_SECRET_VALUE="$(echo "$AWS_SECRETS_SECRET_VALUE_RAW" | yq ".SecretString")" -fi - -echo "Storing secret in: $AWS_SECRETS_SECRET_FILE" -echo "$AWS_SECRETS_SECRET_VALUE" > "$AWS_SECRETS_SECRET_FILE" \ No newline at end of file diff --git a/docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/get.sh b/docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/get.sh deleted file mode 100755 index 308a1213..00000000 --- a/docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/get.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -set -e - - -# validation -if [ -z "$AWS_SECRETS_SECRET_NAME" ]; then - echo "Environment Variable Required: AWS_SECRETS_SECRET_NAME" - exit 1 -fi - -region_command="" -if [ -n "$AWS_SECRETS_REGION" ]; then - region_command="--region ${AWS_SECRETS_REGION}" -fi - -output_command="--output yaml" -if [ -n "$AWS_SECRETS_OUTPUT" ]; then - output_command="--output ${AWS_SECRETS_OUTPUT}" -fi - -aws secretsmanager \ -$region_command \ -$output_command \ ---no-cli-pager \ -get-secret-value \ ---secret-id $AWS_SECRETS_SECRET_NAME diff --git a/docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/list.sh b/docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/list.sh deleted file mode 100755 index d76a25f4..00000000 --- a/docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/list.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -set -e - -region_command="" -if [ -n "$AWS_SECRETS_REGION" ]; then - region_command="--region ${AWS_SECRETS_REGION}" -fi - -output_command="--output yaml" -if [ -n "$AWS_SECRETS_OUTPUT" ]; then - output_command="--output ${AWS_SECRETS_OUTPUT}" -fi - -aws secretsmanager \ -$region_command \ -$output_command \ ---no-cli-pager \ -list-secrets diff --git a/docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/save-file.sh b/docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/save-file.sh deleted file mode 100755 index 8e352b0f..00000000 --- a/docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/save-file.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -set -e - - -# validation -if [ -z "$AWS_SECRETS_SECRET_NAME" ]; then - echo "Environment Variable Required: AWS_SECRETS_SECRET_NAME" - exit 1 -fi -if [ -z "$AWS_SECRETS_SECRET_FILE" ]; then - echo "Environment Variable Required: AWS_SECRETS_SECRET_FILE" - exit 1 -fi -if [ ! -f "$AWS_SECRETS_SECRET_FILE" ]; then - echo "Environment Variable should be a file: AWS_SECRETS_SECRET_FILE ($AWS_SECRETS_SECRET_FILE)" - exit 1 -fi -if [ -z "$AWS_SECRETS_SECRET_DESCRIPTION" ]; then - echo "Environment Variable Required: AWS_SECRETS_SECRET_DESCRIPTION" - exit 1 -fi - -region_command="" -if [ -n "$AWS_SECRETS_REGION" ]; then - region_command="--region ${AWS_SECRETS_REGION}" -fi - -output_command="--output yaml" -if [ -n "$AWS_SECRETS_OUTPUT" ]; then - output_command="--output ${AWS_SECRETS_OUTPUT}" -fi - -if [ -z "$ROOT_DIR" ]; then - ROOT_DIR="$(pwd)" -fi - - -AWS_SECRETS_SECRET_VALUE="$(cat "$AWS_SECRETS_SECRET_FILE")" - -AWS_SECRETS_OUTPUT="$AWS_SECRETS_OUTPUT" \ -AWS_SECRETS_REGION="$AWS_SECRETS_REGION" \ -AWS_SECRETS_SECRET_NAME="$AWS_SECRETS_SECRET_NAME" \ -AWS_SECRETS_SECRET_VALUE="$AWS_SECRETS_SECRET_VALUE" \ -AWS_SECRETS_SECRET_DESCRIPTION="$AWS_SECRETS_SECRET_DESCRIPTION" \ -bash $ROOT_DIR/_scripts/secrets/aws/save.sh diff --git a/docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/save.sh b/docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/save.sh deleted file mode 100755 index 1f9d2dca..00000000 --- a/docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/save.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash - -set -e - - -# validation -if [ -z "$AWS_SECRETS_SECRET_NAME" ]; then - echo "Environment Variable Required: AWS_SECRETS_SECRET_NAME" - exit 1 -fi -if [ -z "$AWS_SECRETS_SECRET_VALUE" ]; then - echo "Environment Variable Required: AWS_SECRETS_SECRET_VALUE" - exit 1 -fi -if [ -z "$AWS_SECRETS_SECRET_DESCRIPTION" ]; then - echo "Environment Variable Required: AWS_SECRETS_SECRET_DESCRIPTION" - exit 1 -fi - -region_command="" -if [ -n "$AWS_SECRETS_REGION" ]; then - region_command="--region ${AWS_SECRETS_REGION}" -fi - -output_command="--output yaml" -if [ -n "$AWS_SECRETS_OUTPUT" ]; then - output_command="--output ${AWS_SECRETS_OUTPUT}" -fi - -if [ -z "$ROOT_DIR" ]; then - ROOT_DIR="$(pwd)" -fi - -echo "Checking if secret exists: ${AWS_SECRETS_SECRET_NAME}" -set +e -EXISTING_SECRET="$(AWS_SECRETS_OUTPUT="$AWS_SECRETS_OUTPUT" \ -AWS_SECRETS_REGION="$AWS_SECRETS_REGION" \ -AWS_SECRETS_SECRET_NAME="$AWS_SECRETS_SECRET_NAME" \ -bash $ROOT_DIR/_scripts/secrets/aws/get.sh 2>&1)" -MISSING_SECRET="$(echo "$EXISTING_SECRET" | grep "Secrets Manager can't find the specified secret.")" -set -e - -if [ -n "$MISSING_SECRET" ]; then - echo " Secret not found. Creating." - AWS_SECRETS_OUTPUT="$AWS_SECRETS_OUTPUT" \ - AWS_SECRETS_REGION="$AWS_SECRETS_REGION" \ - AWS_SECRETS_SECRET_NAME="$AWS_SECRETS_SECRET_NAME" \ - AWS_SECRETS_SECRET_VALUE="$AWS_SECRETS_SECRET_VALUE" \ - AWS_SECRETS_SECRET_DESCRIPTION="$AWS_SECRETS_SECRET_DESCRIPTION" \ - bash $ROOT_DIR/_scripts/secrets/aws/create.sh -else - echo " Secret found. Updating." - AWS_SECRETS_OUTPUT="$AWS_SECRETS_OUTPUT" \ - AWS_SECRETS_REGION="$AWS_SECRETS_REGION" \ - AWS_SECRETS_SECRET_NAME="$AWS_SECRETS_SECRET_NAME" \ - AWS_SECRETS_SECRET_VALUE="$AWS_SECRETS_SECRET_VALUE" \ - AWS_SECRETS_SECRET_DESCRIPTION="$AWS_SECRETS_SECRET_DESCRIPTION" \ - bash $ROOT_DIR/_scripts/secrets/aws/update.sh -fi - - - diff --git a/docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/update.sh b/docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/update.sh deleted file mode 100755 index 05e66f43..00000000 --- a/docs/examples/bitops+fast+react+static+renderer/_scripts/secrets/aws/update.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -set -e - - -# validation -if [ -z "$AWS_SECRETS_SECRET_NAME" ]; then - echo "Environment Variable Required: AWS_SECRETS_SECRET_NAME" - exit 1 -fi -if [ -z "$AWS_SECRETS_SECRET_VALUE" ]; then - echo "Environment Variable Required: AWS_SECRETS_SECRET_VALUE" - exit 1 -fi - -region_command="" -if [ -n "$AWS_SECRETS_REGION" ]; then - region_command="--region ${AWS_SECRETS_REGION}" -fi - -output_command="--output yaml" -if [ -n "$AWS_SECRETS_OUTPUT" ]; then - output_command="--output ${AWS_SECRETS_OUTPUT}" -fi - -echo "Updating Secret: $AWS_SECRETS_SECRET_NAME" -aws secretsmanager \ -$region_command \ -$output_command \ ---no-cli-pager \ -put-secret-value \ ---secret-id $AWS_SECRETS_SECRET_NAME \ ---secret-string "$AWS_SECRETS_SECRET_VALUE" diff --git a/docs/examples/bitops+fast+react+static+renderer/build-tools/terraform/.terraform.lock.hcl b/docs/examples/bitops+fast+react+static+renderer/build-tools/terraform/.terraform.lock.hcl deleted file mode 100644 index 5941c280..00000000 --- a/docs/examples/bitops+fast+react+static+renderer/build-tools/terraform/.terraform.lock.hcl +++ /dev/null @@ -1,59 +0,0 @@ -# This file is maintained automatically by "terraform init". -# Manual edits may be lost in future updates. - -provider "registry.terraform.io/hashicorp/aws" { - version = "3.37.0" - constraints = ">= 2.66.0, >= 2.70.0" - hashes = [ - "h1:RvLGIfRZfbzY58wUja9B6CvGdgVVINy7zLVBdLqIelA=", - "zh:064c9b21bcd69be7a8631ccb3eccb8690c6a9955051145920803ef6ce6fc06bf", - "zh:277dd05750187a41282cf6e066e882eac0dd0056e3211d125f94bf62c19c4b8b", - "zh:47050211f72dcbf3d99c82147abd2eefbb7238efb94d5188979f60de66c8a3df", - "zh:4a4e0d070399a050847545721dae925c192a2d6354802fdfbea73769077acca5", - "zh:4cbc46f79239c85d69389f9e91ca9a9ebf6a8a937cfada026c5a037fd09130fb", - "zh:6548dcb1ac4a388ed46034a5317fa74b3b0b0f68eec03393f2d4d09342683f95", - "zh:75b4a82596aa525d95b0b2847fe648368c6e2b054059c4dc4dcdee01d374b592", - "zh:75cf5cc674b61c82300667a82650f56722618b119ab0526b47b5ecbb4bbf49d0", - "zh:93c896682359039960c38eb5a4b29d1cc06422f228db0572b90330427e2a21ec", - "zh:c7256663aedbc9de121316b6d0623551386a476fc12b8eb77e88532ce15de354", - "zh:e995c32f49c23b5938200386e08b2a3fd69cf5102b5299366c0608bbeac68429", - ] -} - -provider "registry.terraform.io/hashicorp/kubernetes" { - version = "2.1.0" - hashes = [ - "h1:L/3XfqLQ4bS1PjH/FksJPm+MYIOxCwn97ozbfSwg/VQ=", - "zh:22e2bcef08fb7f97ed503a27e3725d9d14fdd09fe3aa144fae8a7f78ed27856a", - "zh:2380cc2a91239b80ea380af8a7fcdcc7396f5213a71a251a5505c962ac6cb9c2", - "zh:496ea2818d5480590ada763672be051f4e76dc12c6a61fde2faa0c909e174eb7", - "zh:4e5b6c230d9a8da8a0f12e5db198f158f2c26432ad8e1c6ac22770ce7ec39118", - "zh:55ad614beffda4cdc918ad87dca09bb7b961f12183c0923230301f73e23e9665", - "zh:6849c52899091fa2f6714d8e5180a4affffc4b2ad03dc2250043d4b32049e16e", - "zh:7a6f0d9da5172b3770af98d59263e142313a8b2c4048271893c6003493ad1c89", - "zh:7c97fb24e60c41fa16f6305620d18ae51545c329f46f92988493a4c51a4e43e5", - "zh:a08111c4898544c40c62437cc28798d1f4d7298f61ddaf3f48dddec042d3519f", - "zh:be7493bff6b9f95fe203c295bfc5933111e7c8a5f3bd9e9ae143a0d699d516f8", - "zh:e4c94adc65b5ad5551893f58c19e1c766f212f16220087ca3e940a89449ac285", - ] -} - -provider "registry.terraform.io/hashicorp/random" { - version = "2.2.1" - constraints = "~> 2.2.1" - hashes = [ - "h1:iWhVR6Y/LViCMhAP+t/Al75aviZFoWpi8W4KUxNIv9I=", - "zh:072ce92b0138ee65df2e4e2e6e5f6632fa12a7e6453b91399bad89291855d426", - "zh:5731987fe61051515f449033e456ee55207caf17ef41096eb82247810585f53b", - "zh:6f18b10175708bb5839e1f2082dcc02651b876786cd54ec415a091f3821807c3", - "zh:7fa7737661380d18cba3cdc71c4ec6f2fd281b9d61112f6b48d06ca8bbf97771", - "zh:8466cb8fbb4de887b23039082a6e3dc85aeabce86dd808e2a7a65e4e1c51dbae", - "zh:888c63417701c13bbe785ab11dc690d4803e6a2156318cf188970b7b6400b99e", - "zh:a231df55d36fbad1a6705f5d3be4f7459a73ec76117d13f22aa83c10fc610278", - "zh:b62d9a4cd64a2d229070260f4abfef476ebbd7c5511b43e9cdccf23ce938f630", - "zh:b6bd1a325f909bb93f7c9bef00eb306bef1e406cbdf557901d755a3e7a4a5448", - "zh:b9f59afc23cc5567075f76313214baa1e5ce909325229e23c9a4666f7b26e7f7", - "zh:d040220c09b8d9d6bd937572bd5b14bc069af2b883185a873460530d8a1de6e6", - "zh:f254c1f943eb016ae07ebe91b23f813dc79f2064616c65f98c8f64ce23be90c4", - ] -} diff --git a/docs/examples/bitops+fast+react+static+renderer/build-tools/terraform/backend.tf b/docs/examples/bitops+fast+react+static+renderer/build-tools/terraform/backend.tf deleted file mode 100755 index 50407ed0..00000000 --- a/docs/examples/bitops+fast+react+static+renderer/build-tools/terraform/backend.tf +++ /dev/null @@ -1,11 +0,0 @@ -# Backend configuration is loaded early so we can't use variables - - -terraform { - backend "s3" { - region = "us-west-2" - bucket = "bitovi-operations-cheetah-build-tools" - key = "bitovi-operations-cheetah-build-tools" - encrypt = true #AES-256encryption - } -} diff --git a/docs/examples/bitops+fast+react+static+renderer/build-tools/terraform/bitops.before-deploy.d/s3-create-tf-state-bucket.sh b/docs/examples/bitops+fast+react+static+renderer/build-tools/terraform/bitops.before-deploy.d/s3-create-tf-state-bucket.sh deleted file mode 100755 index fd1d506e..00000000 --- a/docs/examples/bitops+fast+react+static+renderer/build-tools/terraform/bitops.before-deploy.d/s3-create-tf-state-bucket.sh +++ /dev/null @@ -1,2 +0,0 @@ -echo "Creating Bucket: $TF_STATE_BUCKET" -aws s3api create-bucket --bucket $TF_STATE_BUCKET --region $AWS_DEFAULT_REGION --create-bucket-configuration LocationConstraint=$AWS_DEFAULT_REGION || true \ No newline at end of file diff --git a/docs/examples/bitops+fast+react+static+renderer/build-tools/terraform/bitops.config.yaml b/docs/examples/bitops+fast+react+static+renderer/build-tools/terraform/bitops.config.yaml deleted file mode 100644 index 20109511..00000000 --- a/docs/examples/bitops+fast+react+static+renderer/build-tools/terraform/bitops.config.yaml +++ /dev/null @@ -1,4 +0,0 @@ -terraform: - cli: {} - options: - command: apply diff --git a/docs/examples/bitops+fast+react+static+renderer/build-tools/terraform/ecs-iam.tf b/docs/examples/bitops+fast+react+static+renderer/build-tools/terraform/ecs-iam.tf deleted file mode 100644 index 4b47a79a..00000000 --- a/docs/examples/bitops+fast+react+static+renderer/build-tools/terraform/ecs-iam.tf +++ /dev/null @@ -1,67 +0,0 @@ - -resource "aws_iam_role" "ecsTaskExecutionRole" { - name = "${var.app_name}-execution-task-role" - assume_role_policy = data.aws_iam_policy_document.assume_role_policy.json - tags = merge(var.common_tags,{ - Name = "${var.app_name}-iam-role" - }) -} - -data "aws_iam_policy_document" "assume_role_policy" { - statement { - actions = ["sts:AssumeRole"] - - principals { - type = "Service" - identifiers = ["ecs-tasks.amazonaws.com"] - } - } -} - -resource "aws_iam_role_policy_attachment" "ecsTaskExecutionRole_policy" { - role = aws_iam_role.ecsTaskExecutionRole.name - policy_arn = "arn:aws:iam::aws:policy/service-role/AmazonEC2ContainerServiceforEC2Role" -} - - -# attach the ci-user policy (see global-tools/terraform/iam-ci-user.tf) -resource "aws_iam_role_policy_attachment" "build_ci_user_policy" { - role = aws_iam_role.ecsTaskExecutionRole.name - policy_arn = "arn:aws:iam::368433847371:policy/ci-user-s3" -} - -# attach a policy to invalidate the cloudfront cache -resource "aws_iam_policy" "cloudfront" { - name = "build-tools-cloudfront-invalidation" - - # angular - # "arn:aws:cloudfront::368433847371:distribution/E34450W1O9P7SH", - # react - # "arn:aws:cloudfront::368433847371:distribution/E1P5X4XDUERR45", - policy = < url.com/index.html - url.com/index.js -> url.com/index.js - url.com/index.css -> url.com/index.css - url.com/foo/index.html -> url.com/foo/index.html - url.com/foo/image.jpeg -> url.com/foo/image.jpeg - - // pathEndsWithSlash - do not modify (cloudfront/s3 will take care of this) - url.com/foo/ -> url.com/foo/ - - // pathHasNoSlash - do not modify (cloudfront/s3 will take care of this) - url.com -> url.com - - // else - append `/index.html` - url.com/foo -> url.com/foo/index.html - */ - var modifyUri = uri => { - console.log("uri", uri); - - var uriSplit = uri.split("/"); - var uriSplitLast = uriSplit[uriSplit.length - 1]; - // console.log("uriSplit", uriSplit); - // console.log("uriSplitLast", uriSplitLast); - - - //if only one item, the string did not contain a slash - var pathHasNoSlash = uriSplit.length <= 1; - // console.log("pathHasNoSlash", pathHasNoSlash); - - //if the last item is empty, the string ended with a slash - var pathEndsWithSlash = uriSplitLast === ""; - // console.log("pathEndsWithSlash", pathEndsWithSlash); - - // if the last item ends with `.*`, the string ended with an extension - var pathEndsWithExtension = /\..*/.test(uriSplitLast); - // console.log("pathEndsWithExtension", pathEndsWithExtension); - - // if the path has no slash - // or if the path ends with extension - // or if the path ends with a slash - // do not modify - if (pathHasNoSlash || pathEndsWithExtension || pathEndsWithSlash){ - return uri; - } - - //otherwise, append `/index.html` - uri = `${uri}/index.html`; - return uri; -}; - - -/* Test -var uris = [ - "url.com/index", - "url.com/index.html", - "url.com/index.js", - "url.com/index.css", - "url.com/foo/index.html", - "url.com/foo/image.jpeg", - "url.com/foo/", - "url.com", - "url.com/foo" -]; - -uris.forEach(uri => { - var newUri = modifyUri(uri); - console.log(`${uri} - ${newUri}`); -}); -*/ - -function handler (event) { - var request = event.request; - var newUri = modifyUri(request.uri); - - console.log(`Modifying: ${request.uri} - ${newUri}`); - - request.uri = newUri; - return request; -}; \ No newline at end of file diff --git a/docs/examples/bitops+fast+react+static+renderer/dev/terraform/providers.tf b/docs/examples/bitops+fast+react+static+renderer/dev/terraform/providers.tf deleted file mode 100644 index a771d5ea..00000000 --- a/docs/examples/bitops+fast+react+static+renderer/dev/terraform/providers.tf +++ /dev/null @@ -1,25 +0,0 @@ -terraform { - required_version = ">= 0.13" - - required_providers { - aws = { - source = "hashicorp/aws" - version = "~> 3.0" - } - } - - backend "s3" { - bucket = "bitovi-operations-cheetah-dev" - key = "bitovi-operations-cheetah-dev" - region = "us-west-2" - } -} - -provider "aws" { - region = "us-west-2" -} - -provider "aws" { - alias = "acm_provider" - region = "us-east-1" -} diff --git a/docs/examples/bitops+fast+react+static+renderer/dev/terraform/route53-angular.tf b/docs/examples/bitops+fast+react+static+renderer/dev/terraform/route53-angular.tf deleted file mode 100644 index ad4ee755..00000000 --- a/docs/examples/bitops+fast+react+static+renderer/dev/terraform/route53-angular.tf +++ /dev/null @@ -1,16 +0,0 @@ - - -resource "aws_route53_record" "root-a" { - zone_id = var.bitovi-cheetah.com-zone-id - name = var.subdomain_name_angular - type = "A" - - alias { - name = aws_cloudfront_distribution.angular_s3_distribution.domain_name - zone_id = aws_cloudfront_distribution.angular_s3_distribution.hosted_zone_id - evaluate_target_health = false - } -} - - - diff --git a/docs/examples/bitops+fast+react+static+renderer/dev/terraform/route53-ecom-catalog.tf b/docs/examples/bitops+fast+react+static+renderer/dev/terraform/route53-ecom-catalog.tf deleted file mode 100644 index ca1cbcf9..00000000 --- a/docs/examples/bitops+fast+react+static+renderer/dev/terraform/route53-ecom-catalog.tf +++ /dev/null @@ -1,11 +0,0 @@ -resource "aws_route53_record" "catalog" { - zone_id = aws_route53_zone.main.zone_id - name = var.domain_name_catalog - type = "A" - - alias { - name = aws_cloudfront_distribution.catalog_s3_distribution.domain_name - zone_id = aws_cloudfront_distribution.catalog_s3_distribution.hosted_zone_id - evaluate_target_health = false - } -} \ No newline at end of file diff --git a/docs/examples/bitops+fast+react+static+renderer/dev/terraform/route53-react.tf b/docs/examples/bitops+fast+react+static+renderer/dev/terraform/route53-react.tf deleted file mode 100644 index 5c241eba..00000000 --- a/docs/examples/bitops+fast+react+static+renderer/dev/terraform/route53-react.tf +++ /dev/null @@ -1,13 +0,0 @@ - - -resource "aws_route53_record" "root-react" { - zone_id = var.bitovi-cheetah.com-zone-id - name = var.subdomain_name_react - type = "A" - - alias { - name = aws_cloudfront_distribution.react_s3_distribution.domain_name - zone_id = aws_cloudfront_distribution.react_s3_distribution.hosted_zone_id - evaluate_target_health = false - } -} \ No newline at end of file diff --git a/docs/examples/bitops+fast+react+static+renderer/dev/terraform/route53.tf b/docs/examples/bitops+fast+react+static+renderer/dev/terraform/route53.tf deleted file mode 100644 index bb846c5d..00000000 --- a/docs/examples/bitops+fast+react+static+renderer/dev/terraform/route53.tf +++ /dev/null @@ -1,5 +0,0 @@ -# Route 53 for domain -resource "aws_route53_zone" "main" { - name = var.domain_name - tags = var.common_tags -} \ No newline at end of file diff --git a/docs/examples/bitops+fast+react+static+renderer/dev/terraform/terraform.tfvars b/docs/examples/bitops+fast+react+static+renderer/dev/terraform/terraform.tfvars deleted file mode 100644 index 8cacda38..00000000 --- a/docs/examples/bitops+fast+react+static+renderer/dev/terraform/terraform.tfvars +++ /dev/null @@ -1,27 +0,0 @@ -domain_name = "bitovi-cheetah.com" -subdomain_name_angular = "angular.bitovi-cheetah.com" -subdomain_name_react = "react.bitovi-cheetah.com" -s3_domain_name = "bitovi-operations-cheetah-sites.s3-website-us-west-2.amazonaws.com" -# s3_domain_name = "bitovi-operations-cheetah-sites.s3.us-west-2.amazonaws.com" -# s3_domain_name = "bitovi-operations-cheetah-sites.s3.amazonaws.com" -bucket_name = "bitovi-operations-cheetah-sites" -# https://console.aws.amazon.com/route53/v2/hostedzones#EditHostedZone/Z06474611GS5JE6QLWZJK #This value is obtained from the AWS Console. It is the zone id for the bitovi-cheetah.com zone. -# NOTE THIS HOSTED ZONE CHANGED WITH DOMAIN NAME CHANGE TO bitovi-cheetah.com -bitovi-cheetah.com-zone-id = "Z06474611GS5JE6QLWZJK" - -# angular path and version -app_subpath_angular = "angular" -app_version_angular = "latest" - -# react path and version -app_subpath_react = "react" -app_version_react = "latest" - - - -common_tags = { - OperationsRepo = "bitovi/operations-cheetah" - OperationsRepoEnvironment = "dev" - } - - diff --git a/docs/examples/bitops+fast+react+static+renderer/dev/terraform/variables.tf b/docs/examples/bitops+fast+react+static+renderer/dev/terraform/variables.tf deleted file mode 100644 index 7e6a8bd0..00000000 --- a/docs/examples/bitops+fast+react+static+renderer/dev/terraform/variables.tf +++ /dev/null @@ -1,52 +0,0 @@ -variable "domain_name" { - type = string - description = "The domain name for the website." - -} -variable "s3_domain_name" { - type = string - description = "The domain name given by s3" -} - -variable "bucket_name" { - type = string - description = "The name of the bucket without the www. prefix. Normally domain_name." -} - -variable "bucket_prefix" { - description = "This value should be the commit hash of an artifact directory (one that pushes stuff to s3)." -} - -variable "common_tags" { - description = "Common tags you want applied to all components." -} - -variable "subdomain_name_angular" { - description = "nomenclature for angular subdomain." -} - -variable "subdomain_name_react" { - description = "nomenclature for react subdomain." -} - - -variable "bitovi-cheetah.com-zone-id" { - description = "zone id for the bitovi-cheetah.com zone" -} - -variable "app_subpath_angular" { - description = "This value should correspond to the root directory in the s3 bucket for angular" -} - -variable "app_version_angular" { - description = "This value should correspond subdirectory of the angular subpath" -} - - -variable "app_subpath_react" { - description = "This value should correspond to the root directory in the s3 bucket for react" -} - -variable "app_version_react" { - description = "This value should correspond subdirectory of the react subpath" -} diff --git a/docs/examples/bitops+fast+react+static+renderer/global-tools/terraform/.terraform.lock.hcl b/docs/examples/bitops+fast+react+static+renderer/global-tools/terraform/.terraform.lock.hcl deleted file mode 100755 index 5941c280..00000000 --- a/docs/examples/bitops+fast+react+static+renderer/global-tools/terraform/.terraform.lock.hcl +++ /dev/null @@ -1,59 +0,0 @@ -# This file is maintained automatically by "terraform init". -# Manual edits may be lost in future updates. - -provider "registry.terraform.io/hashicorp/aws" { - version = "3.37.0" - constraints = ">= 2.66.0, >= 2.70.0" - hashes = [ - "h1:RvLGIfRZfbzY58wUja9B6CvGdgVVINy7zLVBdLqIelA=", - "zh:064c9b21bcd69be7a8631ccb3eccb8690c6a9955051145920803ef6ce6fc06bf", - "zh:277dd05750187a41282cf6e066e882eac0dd0056e3211d125f94bf62c19c4b8b", - "zh:47050211f72dcbf3d99c82147abd2eefbb7238efb94d5188979f60de66c8a3df", - "zh:4a4e0d070399a050847545721dae925c192a2d6354802fdfbea73769077acca5", - "zh:4cbc46f79239c85d69389f9e91ca9a9ebf6a8a937cfada026c5a037fd09130fb", - "zh:6548dcb1ac4a388ed46034a5317fa74b3b0b0f68eec03393f2d4d09342683f95", - "zh:75b4a82596aa525d95b0b2847fe648368c6e2b054059c4dc4dcdee01d374b592", - "zh:75cf5cc674b61c82300667a82650f56722618b119ab0526b47b5ecbb4bbf49d0", - "zh:93c896682359039960c38eb5a4b29d1cc06422f228db0572b90330427e2a21ec", - "zh:c7256663aedbc9de121316b6d0623551386a476fc12b8eb77e88532ce15de354", - "zh:e995c32f49c23b5938200386e08b2a3fd69cf5102b5299366c0608bbeac68429", - ] -} - -provider "registry.terraform.io/hashicorp/kubernetes" { - version = "2.1.0" - hashes = [ - "h1:L/3XfqLQ4bS1PjH/FksJPm+MYIOxCwn97ozbfSwg/VQ=", - "zh:22e2bcef08fb7f97ed503a27e3725d9d14fdd09fe3aa144fae8a7f78ed27856a", - "zh:2380cc2a91239b80ea380af8a7fcdcc7396f5213a71a251a5505c962ac6cb9c2", - "zh:496ea2818d5480590ada763672be051f4e76dc12c6a61fde2faa0c909e174eb7", - "zh:4e5b6c230d9a8da8a0f12e5db198f158f2c26432ad8e1c6ac22770ce7ec39118", - "zh:55ad614beffda4cdc918ad87dca09bb7b961f12183c0923230301f73e23e9665", - "zh:6849c52899091fa2f6714d8e5180a4affffc4b2ad03dc2250043d4b32049e16e", - "zh:7a6f0d9da5172b3770af98d59263e142313a8b2c4048271893c6003493ad1c89", - "zh:7c97fb24e60c41fa16f6305620d18ae51545c329f46f92988493a4c51a4e43e5", - "zh:a08111c4898544c40c62437cc28798d1f4d7298f61ddaf3f48dddec042d3519f", - "zh:be7493bff6b9f95fe203c295bfc5933111e7c8a5f3bd9e9ae143a0d699d516f8", - "zh:e4c94adc65b5ad5551893f58c19e1c766f212f16220087ca3e940a89449ac285", - ] -} - -provider "registry.terraform.io/hashicorp/random" { - version = "2.2.1" - constraints = "~> 2.2.1" - hashes = [ - "h1:iWhVR6Y/LViCMhAP+t/Al75aviZFoWpi8W4KUxNIv9I=", - "zh:072ce92b0138ee65df2e4e2e6e5f6632fa12a7e6453b91399bad89291855d426", - "zh:5731987fe61051515f449033e456ee55207caf17ef41096eb82247810585f53b", - "zh:6f18b10175708bb5839e1f2082dcc02651b876786cd54ec415a091f3821807c3", - "zh:7fa7737661380d18cba3cdc71c4ec6f2fd281b9d61112f6b48d06ca8bbf97771", - "zh:8466cb8fbb4de887b23039082a6e3dc85aeabce86dd808e2a7a65e4e1c51dbae", - "zh:888c63417701c13bbe785ab11dc690d4803e6a2156318cf188970b7b6400b99e", - "zh:a231df55d36fbad1a6705f5d3be4f7459a73ec76117d13f22aa83c10fc610278", - "zh:b62d9a4cd64a2d229070260f4abfef476ebbd7c5511b43e9cdccf23ce938f630", - "zh:b6bd1a325f909bb93f7c9bef00eb306bef1e406cbdf557901d755a3e7a4a5448", - "zh:b9f59afc23cc5567075f76313214baa1e5ce909325229e23c9a4666f7b26e7f7", - "zh:d040220c09b8d9d6bd937572bd5b14bc069af2b883185a873460530d8a1de6e6", - "zh:f254c1f943eb016ae07ebe91b23f813dc79f2064616c65f98c8f64ce23be90c4", - ] -} diff --git a/docs/examples/bitops+fast+react+static+renderer/global-tools/terraform/backend.tf b/docs/examples/bitops+fast+react+static+renderer/global-tools/terraform/backend.tf deleted file mode 100755 index 621a290b..00000000 --- a/docs/examples/bitops+fast+react+static+renderer/global-tools/terraform/backend.tf +++ /dev/null @@ -1,11 +0,0 @@ -# Backend configuration is loaded early so we can't use variables - - -terraform { - backend "s3" { - region = "us-west-2" - bucket = "bitovi-operations-cheetah-global-tools" - key = "bitovi-operations-cheetah-global-tools" - encrypt = true #AES-256encryption - } -} diff --git a/docs/examples/bitops+fast+react+static+renderer/global-tools/terraform/bitops.before-deploy.d/s3-create-tf-state-bucket.sh b/docs/examples/bitops+fast+react+static+renderer/global-tools/terraform/bitops.before-deploy.d/s3-create-tf-state-bucket.sh deleted file mode 100755 index fd1d506e..00000000 --- a/docs/examples/bitops+fast+react+static+renderer/global-tools/terraform/bitops.before-deploy.d/s3-create-tf-state-bucket.sh +++ /dev/null @@ -1,2 +0,0 @@ -echo "Creating Bucket: $TF_STATE_BUCKET" -aws s3api create-bucket --bucket $TF_STATE_BUCKET --region $AWS_DEFAULT_REGION --create-bucket-configuration LocationConstraint=$AWS_DEFAULT_REGION || true \ No newline at end of file diff --git a/docs/examples/bitops+fast+react+static+renderer/global-tools/terraform/bitops.config.yaml b/docs/examples/bitops+fast+react+static+renderer/global-tools/terraform/bitops.config.yaml deleted file mode 100644 index 873d9db4..00000000 --- a/docs/examples/bitops+fast+react+static+renderer/global-tools/terraform/bitops.config.yaml +++ /dev/null @@ -1,6 +0,0 @@ -terraform: - cli: {} - options: - command: apply - init-upgrade: true - diff --git a/docs/examples/bitops+fast+react+static+renderer/global-tools/terraform/ecr.tf b/docs/examples/bitops+fast+react+static+renderer/global-tools/terraform/ecr.tf deleted file mode 100644 index 27510473..00000000 --- a/docs/examples/bitops+fast+react+static+renderer/global-tools/terraform/ecr.tf +++ /dev/null @@ -1,8 +0,0 @@ -resource "aws_ecr_repository" "bitovi" { - name = "ecom" - image_tag_mutability = "MUTABLE" - - image_scanning_configuration { - scan_on_push = true - } -} \ No newline at end of file diff --git a/docs/examples/bitops+fast+react+static+renderer/global-tools/terraform/iam-ci-user.tf b/docs/examples/bitops+fast+react+static+renderer/global-tools/terraform/iam-ci-user.tf deleted file mode 100644 index 46a11817..00000000 --- a/docs/examples/bitops+fast+react+static+renderer/global-tools/terraform/iam-ci-user.tf +++ /dev/null @@ -1,138 +0,0 @@ -#IAM USER Config - -resource "aws_iam_user" "this" { - name = "ci-user" - path = "/cheetah/" - force_destroy = true - tags = { - OperationsRepo = "bitovi/operations-cheetah" - OperationsRepoEnvironment = "global-tools" - } -} - -resource "aws_iam_access_key" "v0" { - user = aws_iam_user.this.name -} - - - -#policy -resource "aws_iam_policy" "s3" { - name = "ci-user-s3" - description = "policy for s3" - - - policy = <=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} -kind: Ingress -metadata: - name: {{ $fullName }} - labels: - {{- include "my-chart.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ .host | quote }} - http: - paths: - {{- range .paths }} - - path: {{ . }} - backend: - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} - {{- end }} - {{- end }} - {{- end }} diff --git a/docs/examples/bitops+helm-blog/test/helm/my-chart/templates/service.yaml b/docs/examples/bitops+helm-blog/test/helm/my-chart/templates/service.yaml deleted file mode 100644 index 89a0f0d8..00000000 --- a/docs/examples/bitops+helm-blog/test/helm/my-chart/templates/service.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "my-chart.fullname" . }} - labels: - {{- include "my-chart.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: 8080 - protocol: TCP - name: http - selector: - {{- include "my-chart.selectorLabels" . | nindent 4 }} diff --git a/docs/examples/bitops+helm-blog/test/helm/my-chart/templates/serviceaccount.yaml b/docs/examples/bitops+helm-blog/test/helm/my-chart/templates/serviceaccount.yaml deleted file mode 100644 index 68668d61..00000000 --- a/docs/examples/bitops+helm-blog/test/helm/my-chart/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "my-chart.serviceAccountName" . }} - labels: - {{- include "my-chart.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/docs/examples/bitops+helm-blog/test/helm/my-chart/templates/tests/test-connection.yaml b/docs/examples/bitops+helm-blog/test/helm/my-chart/templates/tests/test-connection.yaml deleted file mode 100644 index f6e2d486..00000000 --- a/docs/examples/bitops+helm-blog/test/helm/my-chart/templates/tests/test-connection.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "my-chart.fullname" . }}-test-connection" - labels: - {{- include "my-chart.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": test-success -spec: - containers: - - name: wget - image: busybox - command: ['wget'] - args: ['{{ include "my-chart.fullname" . }}:{{ .Values.service.port }}'] - restartPolicy: Never diff --git a/docs/examples/bitops+helm-blog/test/helm/my-chart/values.yaml b/docs/examples/bitops+helm-blog/test/helm/my-chart/values.yaml deleted file mode 100644 index f4cb5f4c..00000000 --- a/docs/examples/bitops+helm-blog/test/helm/my-chart/values.yaml +++ /dev/null @@ -1,80 +0,0 @@ -# Default values for my-chart. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - repository: ghcr.io/donejs/place-my-order - pullPolicy: IfNotPresent - # Overrides the image tag whose default is the chart appVersion. - tag: "latest" - -imagePullSecrets: [] -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "" - -podAnnotations: - prometheus.io/scrape: "true" - -podSecurityContext: {} - # fsGroup: 2000 - -securityContext: {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 - -service: - type: ClusterIP - port: 80 - -ingress: - enabled: false - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - hosts: - - host: chart-example.local - paths: [] - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -autoscaling: - enabled: false - minReplicas: 1 - maxReplicas: 100 - targetCPUUtilizationPercentage: 80 - # targetMemoryUtilizationPercentage: 80 - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/README.md b/docs/examples/bitops+terraform+ansible+stackstorm-blog/README.md deleted file mode 100644 index e6b6019f..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# Bitops Operations Repo - -Welcome to Bitops! This serves as a starting point for deploying StackStorm to the cloud. - -This repo can be run as is with -``` -export AWS_ACCESS_KEY_ID=ABCDEF012345 -export AWS_SECRET_ACCESS_KEY=8BuJW2LIlQaTvInalkq0Xzu5ogcf -export AWS_DEFAULT_REGION=us-west-1 -export TF_STATE_BUCKET=st2-bitops-bucket -export ST2_GITHUB_TOKEN=wL/SK5g37dz6GqL07YEXKObR6 -docker run \ --e ENVIRONMENT="st2-bitops-test" \ --e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \ --e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \ --e AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION \ --e TF_STATE_BUCKET=$TF_STATE_BUCKET \ --e ST2_GITHUB_TOKEN=$ST2_GITHUB_TOKEN \ --v $(pwd):/opt/bitops_deployment \ -bitovi/bitops:latest -``` - -For more information, check out official BitOps docs https://bitovi.github.io/bitops/ diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/_scripts/ansible/wait-for-inventory-hosts.py b/docs/examples/bitops+terraform+ansible+stackstorm-blog/_scripts/ansible/wait-for-inventory-hosts.py deleted file mode 100644 index a543869d..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/_scripts/ansible/wait-for-inventory-hosts.py +++ /dev/null @@ -1,28 +0,0 @@ -import yaml -import subprocess -import os - -port = "22" -timeout = "60" -TEMPDIR = os.getenv('TEMPDIR') -ENVROOT = os.getenv('ENVROOT') - -try: - tf_inventory_path = "{}/terraform/inventory.yaml".format(ENVROOT) - with open(tf_inventory_path,'r') as file: - try: - print("Running wait for host script:") - inventory = yaml.safe_load(file) - bitops_hosts = inventory["bitops_servers"]["hosts"] - # Check for multiple bitops_hosts, if found wait for first host in list - if isinstance(bitops_hosts, str): - print("Waiting for host:", bitops_hosts) - else: - bitops_hosts = bitops_hosts[0] - print("Waiting for host:", bitops_hosts) - wait_for_command = "{}/_scripts/ansible/wait-for-it.sh -h {} -p {} -t {}".format(TEMPDIR,bitops_hosts,port,timeout) - result = subprocess.call(wait_for_command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - except yaml.YAMLError as exception: - print(exception) -except IOError: - print("Terraform inventory file not found. Skipping wait for hosts.") \ No newline at end of file diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/_scripts/ansible/wait-for-it.sh b/docs/examples/bitops+terraform+ansible+stackstorm-blog/_scripts/ansible/wait-for-it.sh deleted file mode 100755 index a3533121..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/_scripts/ansible/wait-for-it.sh +++ /dev/null @@ -1,183 +0,0 @@ -#!/usr/bin/env bash -# Use this script to test if a given TCP host/port are available -# wait-for-it provided by: https://github.com/vishnubob/wait-for-it - -WAITFORIT_cmdname=${0##*/} - -echoerr() { if [[ $WAITFORIT_QUIET -ne 1 ]]; then echo "$@" 1>&2; fi } - -usage() -{ - cat << USAGE >&2 -Usage: - $WAITFORIT_cmdname host:port [-s] [-t timeout] [-- command args] - -h HOST | --host=HOST Host or IP under test - -p PORT | --port=PORT TCP port under test - Alternatively, you specify the host and port as host:port - -s | --strict Only execute subcommand if the test succeeds - -q | --quiet Don't output any status messages - -t TIMEOUT | --timeout=TIMEOUT - Timeout in seconds, zero for no timeout - -- COMMAND ARGS Execute command with args after the test finishes -USAGE - exit 1 -} - -wait_for() -{ - if [[ $WAITFORIT_TIMEOUT -gt 0 ]]; then - echoerr "$WAITFORIT_cmdname: waiting $WAITFORIT_TIMEOUT seconds for $WAITFORIT_HOST:$WAITFORIT_PORT" - else - echoerr "$WAITFORIT_cmdname: waiting for $WAITFORIT_HOST:$WAITFORIT_PORT without a timeout" - fi - WAITFORIT_start_ts=$(date +%s) - while : - do - if [[ $WAITFORIT_ISBUSY -eq 1 ]]; then - nc -z $WAITFORIT_HOST $WAITFORIT_PORT - WAITFORIT_result=$? - else - (echo -n > /dev/tcp/$WAITFORIT_HOST/$WAITFORIT_PORT) >/dev/null 2>&1 - WAITFORIT_result=$? - fi - if [[ $WAITFORIT_result -eq 0 ]]; then - WAITFORIT_end_ts=$(date +%s) - echoerr "$WAITFORIT_cmdname: $WAITFORIT_HOST:$WAITFORIT_PORT is available after $((WAITFORIT_end_ts - WAITFORIT_start_ts)) seconds" - break - fi - sleep 1 - done - return $WAITFORIT_result -} - -wait_for_wrapper() -{ - # In order to support SIGINT during timeout: http://unix.stackexchange.com/a/57692 - if [[ $WAITFORIT_QUIET -eq 1 ]]; then - timeout $WAITFORIT_BUSYTIMEFLAG $WAITFORIT_TIMEOUT $0 --quiet --child --host=$WAITFORIT_HOST --port=$WAITFORIT_PORT --timeout=$WAITFORIT_TIMEOUT & - else - timeout $WAITFORIT_BUSYTIMEFLAG $WAITFORIT_TIMEOUT $0 --child --host=$WAITFORIT_HOST --port=$WAITFORIT_PORT --timeout=$WAITFORIT_TIMEOUT & - fi - WAITFORIT_PID=$! - trap "kill -INT -$WAITFORIT_PID" INT - wait $WAITFORIT_PID - WAITFORIT_RESULT=$? - if [[ $WAITFORIT_RESULT -ne 0 ]]; then - echoerr "$WAITFORIT_cmdname: timeout occurred after waiting $WAITFORIT_TIMEOUT seconds for $WAITFORIT_HOST:$WAITFORIT_PORT" - fi - return $WAITFORIT_RESULT -} - -# process arguments -while [[ $# -gt 0 ]] -do - case "$1" in - *:* ) - WAITFORIT_hostport=(${1//:/ }) - WAITFORIT_HOST=${WAITFORIT_hostport[0]} - WAITFORIT_PORT=${WAITFORIT_hostport[1]} - shift 1 - ;; - --child) - WAITFORIT_CHILD=1 - shift 1 - ;; - -q | --quiet) - WAITFORIT_QUIET=1 - shift 1 - ;; - -s | --strict) - WAITFORIT_STRICT=1 - shift 1 - ;; - -h) - WAITFORIT_HOST="$2" - if [[ $WAITFORIT_HOST == "" ]]; then break; fi - shift 2 - ;; - --host=*) - WAITFORIT_HOST="${1#*=}" - shift 1 - ;; - -p) - WAITFORIT_PORT="$2" - if [[ $WAITFORIT_PORT == "" ]]; then break; fi - shift 2 - ;; - --port=*) - WAITFORIT_PORT="${1#*=}" - shift 1 - ;; - -t) - WAITFORIT_TIMEOUT="$2" - if [[ $WAITFORIT_TIMEOUT == "" ]]; then break; fi - shift 2 - ;; - --timeout=*) - WAITFORIT_TIMEOUT="${1#*=}" - shift 1 - ;; - --) - shift - WAITFORIT_CLI=("$@") - break - ;; - --help) - usage - ;; - *) - echoerr "Unknown argument: $1" - usage - ;; - esac -done - -if [[ "$WAITFORIT_HOST" == "" || "$WAITFORIT_PORT" == "" ]]; then - echoerr "Error: you need to provide a host and port to test." - usage -fi - -WAITFORIT_TIMEOUT=${WAITFORIT_TIMEOUT:-15} -WAITFORIT_STRICT=${WAITFORIT_STRICT:-0} -WAITFORIT_CHILD=${WAITFORIT_CHILD:-0} -WAITFORIT_QUIET=${WAITFORIT_QUIET:-0} - -# Check to see if timeout is from busybox? -WAITFORIT_TIMEOUT_PATH=$(type -p timeout) -WAITFORIT_TIMEOUT_PATH=$(realpath $WAITFORIT_TIMEOUT_PATH 2>/dev/null || readlink -f $WAITFORIT_TIMEOUT_PATH) - -WAITFORIT_BUSYTIMEFLAG="" -if [[ $WAITFORIT_TIMEOUT_PATH =~ "busybox" ]]; then - WAITFORIT_ISBUSY=1 - # Check if busybox timeout uses -t flag - # (recent Alpine versions don't support -t anymore) - if timeout &>/dev/stdout | grep -q -e '-t '; then - WAITFORIT_BUSYTIMEFLAG="-t" - fi -else - WAITFORIT_ISBUSY=0 -fi - -if [[ $WAITFORIT_CHILD -gt 0 ]]; then - wait_for - WAITFORIT_RESULT=$? - exit $WAITFORIT_RESULT -else - if [[ $WAITFORIT_TIMEOUT -gt 0 ]]; then - wait_for_wrapper - WAITFORIT_RESULT=$? - else - wait_for - WAITFORIT_RESULT=$? - fi -fi - -if [[ $WAITFORIT_CLI != "" ]]; then - if [[ $WAITFORIT_RESULT -ne 0 && $WAITFORIT_STRICT -eq 1 ]]; then - echoerr "$WAITFORIT_cmdname: strict mode, refusing to execute subprocess" - exit $WAITFORIT_RESULT - fi - exec "${WAITFORIT_CLI[@]}" -else - exit $WAITFORIT_RESULT -fi \ No newline at end of file diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/Gemfile b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/Gemfile deleted file mode 100644 index c95a6b77..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/Gemfile +++ /dev/null @@ -1,6 +0,0 @@ -source 'https://rubygems.org' - -gem 'test-kitchen' -gem 'kitchen-ansible' -gem 'kitchen-docker' -gem 'kitchen-sync' diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/LICENSE b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/LICENSE deleted file mode 100644 index 8f71f43f..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - 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. - diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/README.md b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/README.md deleted file mode 100644 index e8e486c4..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/README.md +++ /dev/null @@ -1,135 +0,0 @@ -# Ansible-st2 -Ansible playbooks to deploy [StackStorm](https://github.com/stackstorm/st2). -> [StackStorm](http://stackstorm.com/) is event-driven automation platform written in Python. -With over [50+ integrations](https://github.com/StackStorm/st2contrib/tree/master/packs) like GitHub, Docker, Nagios, NewRelic, AWS, Ansible it allows you to wire together your existing infrastructure into complex Workflows with auto-remediation and many more. -Aka IFTTT orchestration for Ops. - -[![Build Status](https://travis-ci.org/StackStorm/ansible-st2.svg?branch=master)](https://travis-ci.org/StackStorm/ansible-st2) -[![Repository deb/rpm](https://img.shields.io/badge/Repository-deb/rpm-blue.svg)](https://packagecloud.io/StackStorm/stable/) -[![Join our community Slack](https://stackstorm-community.herokuapp.com/badge.svg)](https://stackstorm.com/community-signup) - -## Supported platforms -* Ubuntu Xenial (16.04) -* Ubuntu Bionic (18.04) -* RHEL7 / CentOS7 -* RHEL8 / CentOS8 - -> If you're using the provided Vagrantfile, note that it uses Bionic by default. - -> In order to access StackStorm Web UI, please don't forget to ensure that http/https ports are opened in your firewall system. - -## Requirements -At least 2GB of memory and 3.5GB of disk space is required, since StackStorm is shipped with RabbitMQ, Mongo and nginx. - -## Installation -```sh -# stackstorm -ansible-playbook stackstorm.yml -``` - -## Variables -Below is the list of variables you can redefine in your playbook to customize st2 deployment: - -| Variable | Default | Description | -| ------------------------ | ------------- | ------------ | -| **st2repo** -| `st2repo_name` | `stable` | StackStorm PackageCloud repository to install. [`stable`](https://packagecloud.io/StackStorm/stable/), [`unstable`](https://packagecloud.io/StackStorm/unstable/), [`staging-stable`](https://packagecloud.io/StackStorm/staging-stable/), [`staging-unstable`](https://packagecloud.io/StackStorm/staging-unstable/) -| **st2** -| `st2_version` | `latest` | StackStorm version to install. `present` to install available package, `latest` to get automatic updates, or pin it to numeric version like `2.2.0`. -| `st2_revision` | `1` | StackStorm revision to install. Used only with pinned `st2_version`. -| `st2_config` | `{}` | Hash with StackStorm configuration settings to set in [`st2.conf`](https://github.com/StackStorm/st2/blob/master/conf/st2.conf.sample) ini file. -| `st2_system_user` | `stanley` | System user from which st2 will execute local/remote shell actions. -| `st2_system_user_in_sudoers` | `yes`| Add `st2_system_user` to the sudoers (recommended for most `st2` features to work). -| `st2_ssh_key_file` | `/home/{{st2_system_user}}/.ssh/{{st2_system_user}}_rsa` | Path to `st2_system_user` SSH private key. It will be autogenerated by default. -| `st2_auth_enable` | `yes` | Enable StackStorm standalone authentication. -| `st2_auth_username` | `testu` | Username used by StackStorm standalone authentication. -| `st2_auth_password` | `testp` | Password used by StackStorm standalone authentication. -| `st2_save_credentials` | `yes` | Save credentials for local CLI in `/root/.st2/config` file. -| `st2_packs` | `[ st2 ]` | List of packs to install. This flag does not work with a `--python3` only pack. -| **st2web** -| `st2web_ssl_certificate` | `null` | String with custom SSL certificate (`.crt`). If not provided, self-signed certificate will be generated. -| `st2web_ssl_certificate_key` | `null` | String with custom SSL certificate secret key (`.key`). If not provided, self-signed certificate will be generated. -| `st2web_nginx_config` | `null` | String with a custom nginx configuration file (`st2.conf`). If not provided, the default st2.conf will be used. -| **ewc** -| `ewc_license` | `null` | EWC license key is required for installing EWC enteprise bits via this ansible role. -| `ewc_repo` | `enterprise` | EWC PackageCloud repository to install. [`enterprise`](https://packagecloud.io/StackStorm/enterprise/), [`enterprise-unstable`](https://packagecloud.io/StackStorm/enterprise-unstable/), [`staging-enterprise`](https://packagecloud.io/StackStorm/staging-enteprise/), [`staging-enterprise-unstable`](https://packagecloud.io/StackStorm/staging-enterprise-unstable/) -| `ewc_version` | `latest` | EWC enterprise version to install. `present` to install available package, `latest` to get automatic updates, or pin it to numeric version like `2.2.0`. The version used here should match `st2_version`. -| `ewc_revision` | `1` | EWC enterprise revision to install. Used only with pinned `ewc_version`. -| `ewc_rbac` | [See `ewc_rbac` variable in role defaults](roles/StackStorm.ewc/defaults/main.yml) | EWC RBAC roles and assignments. This is a dictionary with two keys `roles` and `assignments`. `roles` and `assignments` are in turn both arrays. Each element in the array follows the exact YAML schema for [roles](https://ewc-docs.extremenetworks.com/rbac.html#user-permissions) and [assignments](https://ewc-docs.extremenetworks.com/rbac.html#defining-user-role-assignments) defined in EWC documentation. -| `ewc_ldap` | [See `ewc_ldap` variable in role defaults](roles/StackStorm.ewc/defaults/main.yml) | Settings for EWC LDAP authentication backend. `ewc_ldap` is a dictionary and has one item `backend_kwargs`. `backend_kwargs` should be provided as exactly listed in EWC documentation for [LDAP configuration](https://ewc-docs.extremenetworks.com/authentication.html#auth-backends). -| **st2chatops** -| `st2chatops_version` | `latest` | st2chatops version to install. `present` to install available package, `latest` to get automatic updates, or pin it to numeric version like `2.2.0`. -| `st2chatops_st2_api_key` | | st2 API key to be updated in st2chatops.env using "st2 apikey create -k" in a task -| `st2chatops_hubot_adapter` | | Hubot Adapter to be used for st2chatops. Default is `shell`, but should be changed to one of the [`supported adapters`](`https://github.com/StackStorm/ansible-st2/blob/master/roles/st2chatops/vars/main.yml`).[**Required**] -| `st2chatops_config` | `{ }` | Based on adapter in `st2chatops_hubot_adapter`, provide hash for the adapter settings, to update [`st2chatops.env`](https://github.com/StackStorm/st2chatops/blob/master/st2chatops.env). For example, for `Slack` hubot adapter: `st2chatops_config:` `HUBOT_SLACK_TOKEN: xoxb-CHANGE-ME-PLEASE` -| `st2chatops_version` | `latest` | st2chatops version to install. Use `latest` to get automatic updates or pin it to numeric version like `2.2.0`. - -## Examples -Install latest `stable` StackStorm with all its components on local machine: -```sh -ansible-playbook stackstorm.yml -i 'localhost,' --connection=local -``` - -> Note that keeping `latest` version is useful to update StackStorm by re-running playbook, since it will reinstall st2 if there is new version available. -This is default behavior. If you don't want updates - consider pinning version-revision numbers. - -Install specific numeric version of st2 with pinned revision number as well: -```sh -ansible-playbook stackstorm.yml --extra-vars='st2_version=2.2.0 st2_revision=8' -``` - -## Installing behind a proxy. - -If you are installing from behind a proxy, you can use environment variables `http_proxy`, `https_proxy`, and `no_proxy` in the playbook. For the -st2smoketests, you will need to disable proxy for localhost. - -```yaml - environment: - http_proxy: http://proxy.example.net:3128 - https_proxy: http://proxy.example.net:3128 - no_proxy: 127.0.0.1,localhost -``` - -## Developing -There are a few requirements when developing on `ansible-st2`. - -These are the platforms we must support (must pass end-to-end testing): -- Ubuntu Xenial -- Ubuntu Bionic -- CentOS7 -- CentOS8 -- RHEL7 (via AWS) -- RHEL8 (via AWS) - -Must also support Ansible Idempotence (Eg. Ansible-playbook re-run should end with the following results: `changed=0.*failed=0`) - -For development purposes there is [Vagrantfile](Vagrantfile) available. The following command will setup ubuntu18 box (`ubuntu/bionic64`) by default: -```sh -vagrant up -``` - -Other distros: -```sh -vagrant up ubuntu16 -vagrant up centos7 -vagrant up centos8 -``` - -## Other Installers -You might be interested in other methods to deploy StackStorm engine: -* Configuration Management - * [Chef Cookbook](https://github.com/StackStorm/chef-stackstorm/) - * [Puppet Module](https://github.com/stackstorm/puppet-st2) - -* Manual Instructions - * [Ubuntu 16.04](https://docs.stackstorm.com/install/u16.html) - * [Ubuntu 18.04](https://docs.stackstorm.com/install/u18.html) - * [RHEL8/CentOS8](https://docs.stackstorm.com/install/rhel8.html) - * [RHEL7/CentOS7](https://docs.stackstorm.com/install/rhel7.html) - -## Help -If you're in stuck, our community always ready to help, feel free to: -* Ask questions in our [public Slack channel](https://stackstorm.com/community-signup) -* [Report bug](https://github.com/StackStorm/ansible-st2/issues), provide [feature request](https://github.com/StackStorm/ansible-st2/pulls) or just give us a ✮ star - -Your contribution is more than welcome! diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/Vagrantfile b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/Vagrantfile deleted file mode 100644 index 51e133f5..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/Vagrantfile +++ /dev/null @@ -1,59 +0,0 @@ -# -*- mode: ruby -*- -# vi: set ft=ruby : - -VIRTUAL_MACHINES = { - :ubuntu16 => { - :hostname => 'ansible-st2-ubuntu16', - :box => 'ubuntu/xenial64', - }, - :ubuntu18 => { - :hostname => 'ansible-st2-ubuntu18', - :box => 'ubuntu/bionic64', - }, - :centos7 => { - :hostname => 'ansible-st2-centos7', - :box => 'centos/7', - }, - :centos8 => { - :hostname => 'ansible-st2-centos8', - :box => 'centos/8', - }, -} - -Vagrant.require_version ">= 1.9.1" -Vagrant.configure(2) do |config| - config.vm.network "forwarded_port", guest: 22, host: 2200, auto_correct: true - config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'" - config.ssh.forward_agent = true - - VIRTUAL_MACHINES.each do |name, cfg| - config.vm.define name, autostart: (name == :ubuntu18) do |vm_config| - vm_config.vm.hostname = cfg[:hostname] - vm_config.vm.box = cfg[:box] - - vm_config.vm.provider :virtualbox do |vb| - vb.name = "#{cfg[:hostname]}" - vb.customize ['modifyvm', :id, '--memory', '4096'] - end - - if Vagrant.has_plugin?('vagrant-cachier') - vm_config.cache.scope = :box - end - - if Vagrant.has_plugin?('vagrant-hostmanager') - vm_config.hostmanager.enabled = false - vm_config.hostmanager.manage_host = true - vm_config.hostmanager.ignore_private_ip = false - vm_config.hostmanager.include_offline = true - vm_config.hostmanager.aliases = ["www.#{cfg[:hostname]}"] - vm_config.vm.provision :hostmanager - end - - vm_config.vm.provision :ansible_local do |ansible| - ansible.install = true - ansible.verbose = true - ansible.playbook = "stackstorm.yml" - end - end - end -end diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/ansible.cfg b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/ansible.cfg deleted file mode 100644 index 7305a56a..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/ansible.cfg +++ /dev/null @@ -1,5 +0,0 @@ -# See also `ansible.cfg.galaxy` if installed from Ansible Galaxy -[defaults] -roles_path=roles/ -inventory=../terraform/inventory.yaml -host_key_checking = False diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/bitops.after-deploy.d/my-after-script.sh b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/bitops.after-deploy.d/my-after-script.sh deleted file mode 100755 index 32aa864d..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/bitops.after-deploy.d/my-after-script.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -echo "I am an after ansible lifecycle script!" \ No newline at end of file diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/bitops.before-deploy.d/my-before-script.sh b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/bitops.before-deploy.d/my-before-script.sh deleted file mode 100755 index 6a718c4c..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/bitops.before-deploy.d/my-before-script.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -echo "I am a before ansible lifecycle script!" -python $TEMPDIR/_scripts/ansible/wait-for-inventory-hosts.py \ No newline at end of file diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/bitops.config.yaml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/bitops.config.yaml deleted file mode 100644 index 014b0f58..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/bitops.config.yaml +++ /dev/null @@ -1,4 +0,0 @@ -ansible: - cli: - extra-vars: "@extra-vars.json" - options: {} \ No newline at end of file diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/extra-vars.json b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/extra-vars.json deleted file mode 100644 index d91fbe84..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/extra-vars.json +++ /dev/null @@ -1,6 +0,0 @@ -{"ansible_python_interpreter":"/usr/bin/python", -"st2_auth_username":"st2admin", -"st2_auth_password":"Ch@ngeMe", -"github_token":"{{ lookup('env','ST2_GITHUB_TOKEN') }}", -"st2_packs":["st2","https://dylan-bitovi:{{ github_token }}@github.com/dylan-bitovi/my_st2_pack.git","https://dylan-bitovi:{{ github_token }}@github.com/dylan-bitovi/my_st2_jira.git"] -} \ No newline at end of file diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/meta/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/meta/main.yml deleted file mode 100644 index dc1f7536..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/meta/main.yml +++ /dev/null @@ -1,41 +0,0 @@ -# "Fake role" meta which allows installing `ansible-st2` via ansible-galaxy. -# All the project roles are located under the 'roles' dir. -# See why: https://github.com/StackStorm/ansible-st2/issues/45 -# -# `ansible.cfg` workaround to find stackstorm roles: -# -# [defaults] -# roles_path = /etc/ansible/roles/:/etc/ansible/roles/StackStorm.stackstorm/roles/ ---- -galaxy_info: - description: Install StackStorm (IFTTT for Ops) with all the components like Web UI, ChatOps, EWC and dependant services including RabbitMQ, MongoDB, nginx. - author: armab - company: StackStorm - license: Apache 2.0 - min_ansible_version: 2.5 - platforms: - - name: Ubuntu - versions: - - bionic - - xenial - - name: EL - versions: - - 7 - - 8 - categories: - - system - - ops - - devops - - chatops - - automation - - remediation - - workflows - - stackstorm - - st2 - - st2web - - st2chatops - - bwc - - ewc - - rabbitmq - - mongodb - - nginx diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.epel/meta/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.epel/meta/main.yml deleted file mode 100644 index d5694a32..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.epel/meta/main.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -galaxy_info: - description: Install EPEL repository - author: mierdin - company: StackStorm - license: Apache 2.0 - min_ansible_version: 2.5 - platforms: - - name: EL - versions: - - 7 - - 8 - galaxy_tags: - - system diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.epel/tasks/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.epel/tasks/main.yml deleted file mode 100644 index 13bb5966..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.epel/tasks/main.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -- name: Check if EPEL is installed - stat: - path: /etc/yum.repos.d/epel.repo - register: epel_installed - when: ansible_facts.os_family == "RedHat" - tags: epel - -- name: Install EPEL repo - become: yes - yum: - name: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_facts.distribution_major_version }}.noarch.rpm" - state: present - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - when: ansible_facts.os_family == "RedHat" and not epel_installed.stat.exists - tags: epel diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/defaults/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/defaults/main.yml deleted file mode 100644 index 20f10faa..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/defaults/main.yml +++ /dev/null @@ -1,41 +0,0 @@ ---- -# EWC PackageCloud repository to install: enterprise, enterprise-unstable, staging-enterprise, staging-enterprise-unstable. -ewc_repo: "enterprise" -# `present` to install available package, `latest` to get automatic updates, or pin it to numeric version like `2.2.0`. -ewc_version: latest -# used only if 'ewc_version' is numeric -ewc_revision: 1 - -# EWC license to install EWC enterprise bits -ewc_license: null - -# Specify roles and assignments for EWC RBAC. -# Roles are pushed as YML files to /opt/stackstorm/rbac/roles -# Assignments are pushed as YML files to /opt/stackstorm/rbac/assignments/ -# The schema for roles and assignments follow the exact schema definition -# define in https://ewc-docs.extremenetworks.com/rbac.html#defining-roles-and-permission-grants -# and https://ewc-docs.extremenetworks.com/rbac.html#defining-user-role-assignments. - -ewc_rbac_default_roles: [] - -ewc_rbac_default_assignments: - - name: "{{ st2_system_user }}" - roles: - - admin - - - name: "{{ st2_auth_username }}" - roles: - - system_admin - -ewc_rbac: - roles: "{{ ewc_rbac_default_roles }}" - - assignments: "{{ ewc_rbac_default_assignments }}" - - -# By specifying a valid configuration for LDAP, -# (See https://ewc-docs.extremenetworks.com/authentication.html#ldap ) -# LDAP auth backend is setup for st2 and EWC. -# Note that you just need to provide the backend_kwargs. -ewc_ldap: - backend_kwargs: {} diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/handlers/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/handlers/main.yml deleted file mode 100644 index 6770f3ad..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/handlers/main.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- - -- name: reload ewc_rbac - become: yes - command: st2-apply-rbac-definitions --config-file /etc/st2/st2.conf diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/meta/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/meta/main.yml deleted file mode 100644 index fa59154f..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/meta/main.yml +++ /dev/null @@ -1,27 +0,0 @@ ---- -galaxy_info: - description: Install EWC Entperprise components, setup RBAC and LDAP - author: lakshmi-kannan - company: StackStorm - license: Apache 2.0 - min_ansible_version: 2.5 - platforms: - - name: Ubuntu - versions: - - bionic - - xenial - - name: EL - versions: - - 7 - - 8 - galaxy_tags: - - system - - stackstorm - - bwc - - ewc - - repositories - - packagecloud -dependencies: - - role: StackStorm.st2repo - - role: StackStorm.st2 - - role: StackStorm.st2web diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/ewc_repos_cleanup_debian.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/ewc_repos_cleanup_debian.yml deleted file mode 100644 index f1afcc57..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/ewc_repos_cleanup_debian.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -- name: Cleanup repo list file from disk - become: yes - file: - path: /etc/apt/sources.list.d/StackStorm_{{ ewc_repo }} - state: absent - tags: - - ewc - - enterprise diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/ewc_repos_cleanup_redhat.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/ewc_repos_cleanup_redhat.yml deleted file mode 100644 index 9aeb9348..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/ewc_repos_cleanup_redhat.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -- name: Cleanup repo list file from disk - become: yes - yum_repository: - name: "StackStorm_{{ ewc_repo }}" - state: absent - tags: - - ewc - - enterprise diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/ewc_repos_debian.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/ewc_repos_debian.yml deleted file mode 100644 index 55cf6f9c..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/ewc_repos_debian.yml +++ /dev/null @@ -1,93 +0,0 @@ ---- -- name: Install prereqs (Debian) - become: yes - apt: - name: - - debian-archive-keyring - - apt-transport-https - state: present - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - tags: - - ewc - - enterprise - -- name: "Including ID variable for {{ ewc_repo }}" - include_vars: - file: "{{ ewc_repo }}.yml" - -- name: Get keyring URL - become: yes - no_log: yes - changed_when: no - uri: - url: https://{{ ewc_license }}:@packagecloud.io/install/repositories/StackStorm/{{ ewc_repo }}/gpg_key_url.list?os={{ ansible_facts.distribution | lower }}&dist={{ ansible_facts.distribution_release | lower }}&name={{ ansible_facts.nodename }} - dest: "/etc/packagecloud/StackStorm_{{ ewc_repo }}_gpgkey_url.txt" - force_basic_auth: yes - method: GET - status_code: 201,200 - headers: - Content-Type: "application/x-www-form-urlencoded" - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - -- name: Read ewc_gpgkey_url from file - become: yes - no_log: yes - changed_when: no - command: cat "/etc/packagecloud/StackStorm_{{ ewc_repo }}_gpgkey_url.txt" - register: _ewc_gpgkey_url - -- name: Set ewc_gpgkey_url variable - no_log: yes - set_fact: - ewc_gpgkey_url: "{{ _ewc_gpgkey_url.stdout }}" - - # This is a nasty hack necessary because of how AWS Redirects are interfering - # with both get_url and uri modules in Ansible. The redirect is somehow - # appending another authorization method to the request which AWS rejects. - # This will ultimately need to be fixed upstream. -- name: Download gpgkey - become: yes - command: "curl -L -o /etc/packagecloud/StackStorm_{{ ewc_repo }}_gpgkey.asc {{ ewc_gpgkey_url }}" - args: - creates: "/etc/packagecloud/StackStorm_{{ ewc_repo }}_gpgkey.asc" - warn: False - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - -- name: Add keys to keyring - become: yes - apt_key: - id: "{{ enterprise_key_id }}" - file: "/etc/packagecloud/StackStorm_{{ ewc_repo }}_gpgkey.asc" - state: present - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - tags: - - ewc - - enterprise - -- name: "Add packagecloud.io repository: StackStorm/{{ ewc_repo }}" - become: yes - no_log: yes - apt_repository: - filename: "StackStorm_{{ ewc_repo }}" - repo: 'deb https://{{ ewc_read_token }}:@packagecloud.io/StackStorm/{{ ewc_repo }}/{{ ansible_facts.distribution|lower }}/ {{ ansible_facts.distribution_release|lower }} main' - state: present - update_cache: yes - register: added_ewc_deb_repository - retries: 5 - delay: 3 - until: added_ewc_deb_repository is succeeded - tags: - - ewc - - enterprise diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/ewc_repos_redhat.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/ewc_repos_redhat.yml deleted file mode 100644 index c085d54f..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/ewc_repos_redhat.yml +++ /dev/null @@ -1,35 +0,0 @@ ---- -# Fixes "Failure talking to yum: Cannot retrieve repository metadata (repomd.xml) for repository: StackStorm_stable. Please verify its path and try again" when installing st2 -- name: Update ca-certificates package - become: yes - yum: - name: ca-certificates - state: latest - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - tags: - - ewc - - enterprise - - skip_ansible_lint - -- name: "Add packagecloud.io repository: StackStorm/{{ ewc_repo }}" - become: yes - no_log: yes - yum_repository: - name: "StackStorm_{{ ewc_repo }}" - description: "StackStorm_{{ ewc_repo }}" - file: "StackStorm_{{ ewc_repo }}" - baseurl: https://{{ ewc_read_token }}:@packagecloud.io/StackStorm/{{ ewc_repo }}/el/{{ ansible_facts.distribution_major_version }}/$basearch - repo_gpgcheck: yes - gpgkey: "https://{{ ewc_read_token }}:@packagecloud.io/StackStorm/{{ ewc_repo }}/gpgkey" - sslcacert: /etc/pki/tls/certs/ca-bundle.crt - metadata_expire: 300 - gpgcheck: no - enabled: yes - sslverify: yes - register: added_ewc_rpm_repository - tags: - - ewc - - enterprise diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/ewc_repos_setup.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/ewc_repos_setup.yml deleted file mode 100644 index b5418278..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/ewc_repos_setup.yml +++ /dev/null @@ -1,66 +0,0 @@ ---- -- name: Create packagecloud dir - become: yes - file: - path: "/etc/packagecloud" - mode: "u=rwx,g=rx,o=rx" - owner: st2 - group: st2 - state: directory - tags: - - ewc - - enterprise - -- name: Handle ewc_license change - include_tasks: license.yml - tags: - - ewc - - enterprise - -- name: Get read token for repo from packagecloud - become: yes - no_log: yes - changed_when: no - uri: - url: https://{{ ewc_license }}:@packagecloud.io/install/repositories/StackStorm/{{ ewc_repo }}/tokens.text - # creates: "/etc/packagecloud/StackStorm_{{ ewc_repo }}_read_token.txt" # Don't download if file already exists - dest: "/etc/packagecloud/StackStorm_{{ ewc_repo }}_read_token.txt" - force_basic_auth: yes - method: POST - status_code: 201,200 - headers: - Content-Type: "application/x-www-form-urlencoded" - body: "name={{ ansible_facts.nodename }}" - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - tags: - - ewc - - enterprise - -- name: Read ewc_read_token from file - become: yes - no_log: yes - changed_when: no - command: cat "/etc/packagecloud/StackStorm_{{ ewc_repo }}_read_token.txt" - register: _ewc_read_token - tags: - - ewc - - enterprise - -- name: Set ewc_read_token variable - no_log: yes - set_fact: - ewc_read_token: "{{ _ewc_read_token.stdout }}" - tags: - - ewc - - enterprise - -- name: Add EWC enterprise repos on {{ ansible_os_family | lower }} - include_tasks: ewc_repos_{{ ansible_os_family | lower }}.yml - tags: - - ewc - - enterprise - register: ewc_repo_added - when: ewc_read_token | length > 0 diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/ldap.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/ldap.yml deleted file mode 100644 index 8a44a529..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/ldap.yml +++ /dev/null @@ -1,30 +0,0 @@ ---- -- name: Setup st2.conf auth backend to LDAP - become: yes - # Unfortunately, ``with_dict`` also logs the dict which could leak passwords. - no_log: yes - ini_file: - dest: /etc/st2/st2.conf - section: auth - option: backend - value: ldap - backup: yes - # Don't even setup LDAP if backend_kwargs is not defined - when: ewc_ldap.backend_kwargs is defined and ewc_ldap.backend_kwargs|length > 0 - notify: - - restart st2auth - -- name: Setup st2.conf auth backend_kwargs for LDAP - become: yes - # Unfortunately, ``with_dict`` also logs the dict which could leak passwords. - no_log: yes - ini_file: - dest: /etc/st2/st2.conf - section: auth - option: backend_kwargs - value: "{{ ewc_ldap.backend_kwargs | to_json | string }}" - backup: yes - # Don't even setup LDAP if backend_kwargs is not defined - when: ewc_ldap.backend_kwargs is defined and ewc_ldap.backend_kwargs|length > 0 - notify: - - restart st2auth diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/license.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/license.yml deleted file mode 100644 index cc8fc587..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/license.yml +++ /dev/null @@ -1,76 +0,0 @@ ---- -- name: Check if EWC license hash file is present - stat: - path: /etc/packagecloud/ewc_license_hash.txt - register: ewc_license_hash_file - tags: - - ewc - - enterprise - -- name: Read ewc_license_hash_file if it exits - command: cat /etc/packagecloud/ewc_license_hash.txt - register: _ewc_license_hash - no_log: yes - changed_when: no - when: ewc_license_hash_file.stat.exists - tags: - - ewc - - enterprise - -- name: Set ewc_license_hash from file context - set_fact: - ewc_license_hash: "{{ _ewc_license_hash.stdout }}" - no_log: yes - when: ewc_license_hash_file.stat.exists - tags: - - ewc - - enterprise - -- name: Set ewc_license_hash to incoming hash if not defined - no_log: yes - set_fact: - ewc_license_hash: '{{ ewc_license | hash("sha512") }}' - when: not ewc_license_hash_file.stat.exists - tags: - - ewc - - enterprise - -- name: Write ewc_license_hash to file if file not found on disk - copy: - content: "{{ ewc_license | hash('sha512') }}" - dest: "/etc/packagecloud/ewc_license_hash.txt" - force: yes - become: yes - when: not ewc_license_hash_file.stat.exists - tags: - - ewc - - enterprise - -- name: "Cleanup read token cached file from disk" - become: yes - file: - path: "/etc/packagecloud/StackStorm_{{ ewc_repo }}_read_token.txt" - state: absent - when: ewc_license | hash("sha512") != ewc_license_hash - tags: - - ewc - - enterprise - -- name: "Cleanup repo list file from disk" - include_tasks: "ewc_repos_cleanup_{{ ansible_os_family | lower }}.yml" - when: ewc_license | hash("sha512") != ewc_license_hash - tags: - - ewc - - enterprise - -- name: Write new ewc_license_hash to file - copy: - content: "{{ ewc_license | hash('sha512') }}" - dest: "/etc/packagecloud/ewc_license_hash.txt" - force: yes - become: yes - no_log: yes - when: ewc_license | hash("sha512") != ewc_license_hash - tags: - - ewc - - enterprise diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/main.yml deleted file mode 100644 index 86dc54bc..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/main.yml +++ /dev/null @@ -1,73 +0,0 @@ ---- -- name: Assert that 'ewc_license' is specified correctly - fail: - msg: "License key must be supplied for EWC enterprise installation." - when: ewc_license is not defined or ewc_license is none or ewc_license|length != 48 - -- name: Add EWC enterprise repos - include_tasks: ewc_repos_setup.yml - tags: - - ewc - - enterprise - -- name: Install latest bwc-enterprise package, auto-update - become: yes - package: - name: bwc-enterprise - state: latest - register: ewc_installed - retries: 5 - delay: 3 - until: ewc_installed is succeeded - when: ewc_version == "latest" - tags: - - ewc - - st2 enterprise - - skip_ansible_lint - notify: - - restart st2api - - restart st2auth - -- name: Install present bwc-enterprise package, no auto-update - become: yes - package: - name: bwc-enterprise - state: present - register: ewc_installed - retries: 5 - delay: 3 - until: ewc_installed is succeeded - when: ewc_version == "present" - tags: - - ewc - - st2 enterprise - notify: - - restart st2api - - restart st2auth - -- name: Install pinned bwc-enterprise package - become: yes - package: - name: bwc-enterprise{{ '-' if ansible_os_family == 'RedHat' else '=' }}{{ ewc_version }}-{{ ewc_revision }} - state: present - register: ewc_installed - retries: 5 - delay: 3 - until: ewc_installed is succeeded - when: - - ewc_version != "latest" - - ewc_version != "present" - tags: - - ewc - - st2 enterprise - notify: - - restart st2api - - restart st2auth - -- name: Setup RBAC and setup roles and assignments if ewc_rbac is defined - import_tasks: rbac.yml - when: ewc_rbac is defined - -- name: Setup LDAP and set up LDAP configuration - import_tasks: ldap.yml - when: ewc_ldap is defined diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/rbac.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/rbac.yml deleted file mode 100644 index 937a7aa7..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/tasks/rbac.yml +++ /dev/null @@ -1,70 +0,0 @@ ---- -- name: Copy default RBAC roles to /opt/stackstorm/rbac/roles directory - become: yes - template: - src: rbac_roles/roles.yml.j2 - dest: /opt/stackstorm/rbac/roles/{{ item.name }}.yaml - owner: st2 - group: st2 - loop: "{{ ewc_rbac_default_roles }}" - notify: - - reload ewc_rbac - -- name: Copy user defined RBAC roles to /opt/stackstorm/rbac/roles directory - become: yes - template: - src: rbac_roles/roles.yml.j2 - dest: /opt/stackstorm/rbac/roles/{{ item.name }}.yaml - owner: st2 - group: st2 - loop: "{{ ewc_rbac.roles }}" - when: ewc_rbac.roles is defined - notify: - - reload ewc_rbac - -- name: Copy default RBAC assignments to /opt/stackstorm/rbac/assignments directory - become: yes - template: - src: rbac_assignments/assignments.yml.j2 - dest: /opt/stackstorm/rbac/assignments/{{ item.name }}.yaml - owner: st2 - group: st2 - loop: "{{ ewc_rbac_default_assignments }}" - notify: - - reload ewc_rbac - -- name: Copy user defined RBAC assignments to /opt/stackstorm/rbac/assignments directory - become: yes - template: - src: rbac_assignments/assignments.yml.j2 - dest: /opt/stackstorm/rbac/assignments/{{ item.name }}.yaml - owner: st2 - group: st2 - loop: "{{ ewc_rbac.assignments }}" - when: ewc_rbac.assignments is defined - notify: - - reload ewc_rbac - -- name: Enable RBAC in st2 configuration - become: yes - ini_file: - dest: /etc/st2/st2.conf - section: rbac - option: enable - value: True - backup: yes - notify: - - restart st2api - - reload ewc_rbac - -- name: Configure RBAC backend in st2 configuration - become: yes - ini_file: - dest: /etc/st2/st2.conf - section: rbac - option: backend - value: enterprise - backup: yes - notify: - - restart st2api - - reload ewc_rbac diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/templates/rbac_assignments/assignments.yml.j2 b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/templates/rbac_assignments/assignments.yml.j2 deleted file mode 100644 index 67a90ec1..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/templates/rbac_assignments/assignments.yml.j2 +++ /dev/null @@ -1,5 +0,0 @@ ---- - -username: {{ item.name }} -roles: - {{ item.roles | to_nice_yaml(2) | indent(2) }} diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/templates/rbac_roles/roles.yml.j2 b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/templates/rbac_roles/roles.yml.j2 deleted file mode 100644 index 13d512a9..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/templates/rbac_roles/roles.yml.j2 +++ /dev/null @@ -1,6 +0,0 @@ ---- - -name: {{ item.name }} -description: {{ item.description }} -permission_grants: - {{ item.permission_grants | to_nice_yaml(2) | indent(2) }} diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/vars/enterprise-unstable.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/vars/enterprise-unstable.yml deleted file mode 100644 index d0d98525..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/vars/enterprise-unstable.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -enterprise_key_id: AEFF7A20DC68594D diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/vars/enterprise.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/vars/enterprise.yml deleted file mode 100644 index 3ee124bd..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/vars/enterprise.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -enterprise_key_id: E8518D3790C81C76 diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/vars/staging-enterprise-unstable.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/vars/staging-enterprise-unstable.yml deleted file mode 100644 index aef603fd..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/vars/staging-enterprise-unstable.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -enterprise_key_id: D8A9369569165CC0 diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/vars/staging-enterprise.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/vars/staging-enterprise.yml deleted file mode 100644 index b8e98530..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc/vars/staging-enterprise.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -enterprise_key_id: 216C528AB257619D diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc_smoketests/defaults/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc_smoketests/defaults/main.yml deleted file mode 100644 index 6a2d9b4f..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc_smoketests/defaults/main.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- - -ewc_smoke_tests_user: ewc_smoke_tests_user -ewc_smoke_tests_password: holyjolly - -ewc_smoke_tests_rbac: - roles: - - name: ewc_smoke_tests_basic - description: "This role has access only to action core.local in pack 'core'" - permission_grants: - - - resource_uid: "action:core:local" - permission_types: - - "action_execute" - - "action_view" - - - permission_types: - - "runner_type_list" - - assignments: - - name: "{{ ewc_smoke_tests_user }}" - roles: - - ewc_smoke_tests_basic diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc_smoketests/meta/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc_smoketests/meta/main.yml deleted file mode 100644 index 2052740a..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc_smoketests/meta/main.yml +++ /dev/null @@ -1,27 +0,0 @@ ---- -galaxy_info: - description: Test EWC enteprise components were installed correctly. - author: lakshmi-kannan - company: StackStorm - license: Apache 2.0 - min_ansible_version: 2.5 - platforms: - - name: Ubuntu - versions: - - bionic - - xenial - - name: EL - versions: - - 7 - - 8 - galaxy_tags: - - stackstorm - - bwc - - ewc - - repositories - - packagecloud -dependencies: - - role: StackStorm.st2repo - - role: StackStorm.st2 - - role: StackStorm.st2web - - role: StackStorm.ewc diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc_smoketests/tasks/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc_smoketests/tasks/main.yml deleted file mode 100644 index 9fc8665d..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc_smoketests/tasks/main.yml +++ /dev/null @@ -1,89 +0,0 @@ ---- - -# Small suite of smoke tests to ensure that EWC role has deployed as expected - -- name: auth | Add a new ewc_smoke_tests_user in st2 htpasswd file - become: true - htpasswd: - path: /etc/st2/htpasswd - name: "{{ ewc_smoke_tests_user }}" - password: "{{ ewc_smoke_tests_password }}" - changed_when: no - notify: - - restart st2api - - restart st2stream - tags: - - ewc-smoke-tests - -- name: Copy smoke tests RBAC roles to /opt/stackstorm/rbac/roles directory - become: yes - template: - src: rbac_roles/roles.yml.j2 - dest: /opt/stackstorm/rbac/roles/{{ item.name }}.yaml - owner: st2 - group: st2 - loop: "{{ ewc_smoke_tests_rbac.roles }}" - changed_when: no - when: ewc_smoke_tests_rbac.roles is defined - notify: - - reload ewc_rbac - tags: - - ewc-smoke-tests - -- name: Copy smoke tests RBAC assignments to /opt/stackstorm/rbac/assignments directory - become: yes - template: - src: rbac_assignments/assignments.yml.j2 - dest: /opt/stackstorm/rbac/assignments/{{ item.name }}.yaml - owner: st2 - group: st2 - loop: "{{ ewc_smoke_tests_rbac.assignments }}" - changed_when: no - when: ewc_smoke_tests_rbac.assignments is defined - notify: - - reload ewc_rbac - tags: - - ewc-smoke-tests - -- meta: flush_handlers - tags: - - ewc-smoke-tests - -- name: Get authentication token for ewc_smoke_tests # Note this will not use LDAP. - command: st2 auth "{{ ewc_smoke_tests_user }}" -p "{{ ewc_smoke_tests_password }}" -t - register: st2_token_smoke_tests_user - changed_when: no - tags: - - ewc-smoke-tests - -- name: Test a simple core.local action as user ``ewc_smoke_tests_user`` - command: st2 run core.local -- date -R - environment: - ST2_AUTH_TOKEN: "{{ st2_token_smoke_tests_user.stdout }}" - changed_when: no - tags: - - ewc-smoke-tests - -- name: Test some other action that "{{ ewc_smoke_tests_user }}" cannot run - command: st2 run core.http url="https://www.google.com" - environment: - ST2_AUTH_TOKEN: "{{ st2_token_smoke_tests_user.stdout }}" - ignore_errors: yes - changed_when: no - register: ewc_smoke_tests_forbidden_action - tags: - - ewc-smoke-tests - -- name: Assert forbidden error was indeed thrown - fail: - msg: "St2 action was forbidden to run because of RBAC permissions but action still ran." - changed_when: no - when: "ewc_smoke_tests_forbidden_action.stdout.find('Forbidden') == -1" - tags: - - ewc-smoke-tests - -- name: Teardown test artifacts - import_tasks: teardown.yml - changed_when: no - tags: - - ewc-smoke-tests diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc_smoketests/tasks/teardown.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc_smoketests/tasks/teardown.yml deleted file mode 100644 index a4b3084f..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc_smoketests/tasks/teardown.yml +++ /dev/null @@ -1,38 +0,0 @@ ---- - -- name: Remove EWC smoke tests user from htpasswd file - become: yes - htpasswd: - path: /etc/st2/htpasswd - name: "{{ ewc_smoke_tests_user }}" - state: absent - changed_when: no - notify: - - reload ewc_rbac - tags: - - ewc-smoke-tests - -- name: Remove RBAC smoke tests roles # This doesn't cleanup role from DB. - become: yes - file: - state: absent - path: /opt/stackstorm/rbac/roles/{{ item.name }}.yml - loop: "{{ ewc_smoke_tests_rbac.roles }}" - when: ewc_smoke_tests_rbac.roles is defined - changed_when: no - notify: - - reload ewc_rbac - tags: - - ewc-smoke-tests - -- name: Remove RBAC smoke tests assignments # This doesn't cleanup assignment from DB. - become: yes - file: - state: absent - path: /opt/stackstorm/rbac/assignments/{{ ewc_smoke_tests_user }}.yml - when: ewc_smoke_tests_rbac.assignments is defined - changed_when: no - notify: - - reload ewc_rbac - tags: - - ewc-smoke-tests diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc_smoketests/templates/rbac_assignments/assignments.yml.j2 b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc_smoketests/templates/rbac_assignments/assignments.yml.j2 deleted file mode 100644 index 67a90ec1..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc_smoketests/templates/rbac_assignments/assignments.yml.j2 +++ /dev/null @@ -1,5 +0,0 @@ ---- - -username: {{ item.name }} -roles: - {{ item.roles | to_nice_yaml(2) | indent(2) }} diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc_smoketests/templates/rbac_roles/roles.yml.j2 b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc_smoketests/templates/rbac_roles/roles.yml.j2 deleted file mode 100644 index 13d512a9..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.ewc_smoketests/templates/rbac_roles/roles.yml.j2 +++ /dev/null @@ -1,6 +0,0 @@ ---- - -name: {{ item.name }} -description: {{ item.description }} -permission_grants: - {{ item.permission_grants | to_nice_yaml(2) | indent(2) }} diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.git/handlers/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.git/handlers/main.yml deleted file mode 100644 index 5f785fe5..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.git/handlers/main.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: reload st2packconfigs - become: yes - command: st2ctl reload --register-configs - -- name: restart st2sensors - become: yes - command: st2ctl restart st2sensorcontainer diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.git/tasks/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.git/tasks/main.yml deleted file mode 100644 index 62a24e1b..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.git/tasks/main.yml +++ /dev/null @@ -1,32 +0,0 @@ ---- -- name: Check for 'github_token' environmental variable - fail: - msg: "GitHub token environmental variable is required for the git ansible role." - when: github_token is not defined or github_token is none or github_token|length != 40 - -- name: Temporarily auth access the data store - become: true - no_log: yes - changed_when: no - command: st2 login {{ st2_auth_username }} -p {{ st2_auth_password }} -l 60 - -- name: Add GitHub token to ST2 key-value store - become: true - no_log: yes - changed_when: no - command: st2 key set github_token {{ github_token }} --encrypt - -- name: Set config info - become: true - copy: - dest: "/opt/stackstorm/configs/git.yaml" - content: | - --- - repositories: - {% for item in repositories %} - - url: "{{ item.url }}" - branch: "{{ item.branch }}" - {% endfor %} - notify: - - reload st2packconfigs - - restart st2sensors diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.git/vars/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.git/vars/main.yml deleted file mode 100644 index 9792ecb3..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.git/vars/main.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -# Default GitHub username for private repos -github_username: "dylan-bitovi" - -repositories: - - url: "https://{{ github_username }}:{% raw %}{{ st2kv.system.github_token | decrypt_kv }}{% endraw %}@github.com/{{ github_username }}/my_st2_pack.git" - branch: "main" - - url: "https://{{ github_username }}:{% raw %}{{ st2kv.system.github_token | decrypt_kv }}{% endraw %}@github.com/{{ github_username }}/my_st2_jira.git" - branch: "main" \ No newline at end of file diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/defaults/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/defaults/main.yml deleted file mode 100644 index 407094e9..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/defaults/main.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -# MongoDB default version -mongodb_version: "4.0" diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/handlers/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/handlers/main.yml deleted file mode 100644 index 20be1dae..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/handlers/main.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -- name: restart mongodb - become: yes - service: - name: mongod - state: restarted diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/meta/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/meta/main.yml deleted file mode 100644 index a9e570ef..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/meta/main.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -galaxy_info: - description: Install MongoDB - author: humblearner - company: StackStorm - license: Apache - min_ansible_version: 2.5 - platforms: - - name: Ubuntu - versions: - - bionic - - xenial - - name: EL - versions: - - 7 - - 8 - galaxy_tags: - - system -dependencies: - - role: StackStorm.epel - when: ansible_facts.os_family == 'RedHat' diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/tasks/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/tasks/main.yml deleted file mode 100644 index 874f7c12..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/tasks/main.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -- name: Retrieve variables - include_vars: "{{ item }}" - with_first_found: - - "{{ ansible_os_family | lower }}_{{ ansible_distribution_major_version }}.yml" - - "{{ ansible_os_family | lower }}.yml" - tags: [databases, mongodb] - -- name: Install mongodb on {{ ansible_facts.distribution }} - include_tasks: mongodb_{{ ansible_os_family | lower }}.yml - tags: [databases, mongodb] - -- name: Start & Enable mongodb - become: yes - service: - name: mongod - state: started - enabled: yes - tags: [databases, mongodb] diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/tasks/mongodb_auth.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/tasks/mongodb_auth.yml deleted file mode 100644 index 8f4f2de6..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/tasks/mongodb_auth.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -- name: Install pip (for the installation of pymongo) - become: yes - package: - name: python-pip - state: present - tags: [databases, mongodb] - -- name: Install pymongo (for the mongodb_user module) - # Use pip because system packages are too old for adequate mongodb support. - # https://docs.mongodb.com/ecosystem/drivers/driver-compatibility-reference/#python-driver-compatibility - become: yes - pip: - name: "pymongo>=3.10.1,<4.0.0" - tags: [databases, mongodb] diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/tasks/mongodb_debian.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/tasks/mongodb_debian.yml deleted file mode 100644 index 328ee7ae..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/tasks/mongodb_debian.yml +++ /dev/null @@ -1,39 +0,0 @@ ---- -- name: apt | Add mongodb key - become: yes - apt_key: - # Don't use mongodb.org key location due to SNI verification problems under Ubuntu Trusty - keyserver: "hkp://keyserver.ubuntu.com:80" - id: "{{ mongodb_apt_keys[mongodb_major_minor_version] }}" - state: present - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - tags: [databases, mongodb] - -- name: apt | Add mongodb repository - become: yes - apt_repository: - repo: 'deb http://repo.mongodb.org/apt/{{ ansible_facts.distribution|lower }} {{ ansible_facts.distribution_release|lower }}/mongodb-org/{{ mongodb_major_minor_version }} multiverse' - state: present - tags: [databases, mongodb] - -- name: apt | Install mongodb - become: yes - apt: - name: - # re-installing different version of 'mongodb-org' meta package doesn't automatically - # upgrade or downgrade its dependencies. So we need to explicitly list them one-by-one. - - mongodb-org={{ mongodb_version }}* - - mongodb-org-shell={{ mongodb_version }}* - - mongodb-org-server={{ mongodb_version }}* - - mongodb-org-mongos={{ mongodb_version }}* - - mongodb-org-tools={{ mongodb_version }}* - state: present - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - notify: restart mongodb - tags: [databases, mongodb] diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/tasks/mongodb_redhat.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/tasks/mongodb_redhat.yml deleted file mode 100644 index 57346aed..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/tasks/mongodb_redhat.yml +++ /dev/null @@ -1,51 +0,0 @@ ---- -- name: yum | Install mongodb dependencies - become: yes - yum: - name: "{{ mongo_dependencies }}" - # Failed to validate the SSL certificate for www.mongodb.org:443. Make sure your managed systems have a valid CA certificate installed. If the website serving the url uses SNI you need python >= 2.7.9 on your managed machine or you can install the `urllib3`, `pyopenssl`, `ndg-httpsclient`, and `pyasn1` python modules to perform SNI verification in python >= 2.6. You can use validate_certs=False if you do not need to confirm the servers identity but this is unsafe and not recommended. Paths checked for this platform: /etc/ssl/certs, /etc/pki/ca-trust/extracted/pem, /etc/pki/tls/certs, /usr/share/ca-certificates/cacert.org, /etc/ansible - state: present - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - tags: [databases, mongodb] - -- name: yum | Add mongodb key {{ mongodb_major_minor_version }} - become: yes - rpm_key: - key: https://www.mongodb.org/static/pgp/server-{{ mongodb_major_minor_version }}.asc - state: present - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - tags: [databases, mongodb] - -- name: yum | Add mongodb repository - become: yes - yum_repository: - name: mongodb-org-{{ mongodb_major_minor_version }} - description: MongoDB Repository - gpgcheck: yes - enabled: yes - baseurl: https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/{{ mongodb_major_minor_version }}/x86_64/ - gpgkey: https://www.mongodb.org/static/pgp/server-{{ mongodb_major_minor_version }}.asc - state: present - tags: [databases, mongodb] - -- name: yum | Install mongodb - become: yes - yum: - name: mongodb-org-{{ mongodb_version }}* - state: present - # TODO: Allow yum downgrade since Ansible 2.4 - # https://github.com/ansible/ansible/pull/21516 - # allow_downgrade: yes - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - notify: - - restart mongodb - tags: [databases, mongodb] diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/vars/debian.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/vars/debian.yml deleted file mode 100644 index 071c49fe..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/vars/debian.yml +++ /dev/null @@ -1,6 +0,0 @@ -# Use the following URL to find the key: https://www.mongodb.org/static/pgp/server-{{ mongodb_major_minor_version }}.asc -mongodb_apt_keys: - "3.2": "42F3E95A2C4F08279C4960ADD68FA50FEA312927" - "3.4": "0C49F3730359A14518585931BC711F9BA15703C6" - "3.6": "2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5" - "4.0": "9DA31620334BD75D9DCB49F368818C72E52529D4" diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/vars/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/vars/main.yml deleted file mode 100644 index 68c74efa..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/vars/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -# Extract mongodb "major.minor" version -mongodb_major_minor_version: "{{ (mongodb_version|string)[:3] }}" diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/vars/redhat.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/vars/redhat.yml deleted file mode 100644 index 2f7b3596..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/vars/redhat.yml +++ /dev/null @@ -1,5 +0,0 @@ -mongo_dependencies: - - python-urllib3 - - pyOpenSSL - - python-pyasn1 - - python-ndg_httpsclient diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/vars/redhat_8.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/vars/redhat_8.yml deleted file mode 100644 index 4832d851..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.mongodb/vars/redhat_8.yml +++ /dev/null @@ -1,4 +0,0 @@ -mongo_dependencies: - - python3-urllib3 - - python3-pyOpenSSL - - python3-pyasn1 diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nginx/handlers/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nginx/handlers/main.yml deleted file mode 100644 index 5c810241..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nginx/handlers/main.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -- name: restart nginx - become: yes - service: - name: nginx - state: restarted - -- name: reload nginx - become: yes - service: - name: nginx - state: reloaded diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nginx/meta/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nginx/meta/main.yml deleted file mode 100644 index 84ba2a55..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nginx/meta/main.yml +++ /dev/null @@ -1,20 +0,0 @@ ---- -galaxy_info: - description: Install nginx org - author: humblearner - company: StackStorm - license: Apache 2.0 - min_ansible_version: 2.5 - tags: nginx - platforms: - - name: Ubuntu - versions: - - bionic - - xenial - - name: EL - versions: - - 7 - - 8 - galaxy_tags: - - web - - nginx diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nginx/tasks/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nginx/tasks/main.yml deleted file mode 100644 index f42bdc59..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nginx/tasks/main.yml +++ /dev/null @@ -1,32 +0,0 @@ ---- -- name: Install nginx on {{ ansible_facts.distribution }} - include_tasks: nginx_{{ ansible_os_family | lower }}.yml - tags: nginx - -- name: Create common virtual host folders - become: yes - file: - state: directory - path: "{{ item }}" - loop: - - /etc/nginx/sites-available/ - - /etc/nginx/sites-enabled/ - tags: nginx - -- name: Ensure site-enabled is loaded - become: yes - lineinfile: - state: present - dest: /etc/nginx/nginx.conf - regexp: 'include /etc/nginx/sites-enabled/' - insertafter: ' include /etc/nginx/conf.d/' - line: ' include /etc/nginx/sites-enabled/*;' - tags: nginx - -- name: Start & Enable nginx - become: yes - service: - name: nginx - state: started - enabled: yes - tags: nginx diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nginx/tasks/nginx_debian.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nginx/tasks/nginx_debian.yml deleted file mode 100644 index 633c175e..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nginx/tasks/nginx_debian.yml +++ /dev/null @@ -1,37 +0,0 @@ ---- -- name: Add nginx key - become: yes - apt_key: - url: http://nginx.org/keys/nginx_signing.key - id: 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 - state: present - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - tags: nginx - -- name: Add nginx repos - become: yes - apt_repository: - repo: "deb http://nginx.org/packages/ubuntu/ {{ ansible_facts.distribution_release|lower }} nginx" - state: present - tags: nginx - -- name: Install nginx - become: yes - apt: - name: nginx - state: present - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - tags: nginx - -- name: Remove default site - become: yes - file: - path: /etc/nginx/sites-enabled/default - state: absent - tags: nginx diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nginx/tasks/nginx_redhat.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nginx/tasks/nginx_redhat.yml deleted file mode 100644 index e2cc082d..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nginx/tasks/nginx_redhat.yml +++ /dev/null @@ -1,95 +0,0 @@ ---- -- name: Install vars - include_vars: "{{ item }}" - with_first_found: - - "{{ ansible_os_family | lower }}_{{ ansible_distribution_major_version }}.yml" - - "{{ ansible_os_family | lower }}.yml" - -- name: Add nginx key - become: yes - rpm_key: - key: http://nginx.org/keys/nginx_signing.key - state: present - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - tags: nginx - -- name: Add nginx repos - become: yes - yum_repository: - name: nginx - description: nginx repo - baseurl: http://nginx.org/packages/rhel/{{ ansible_facts.distribution_major_version }}/x86_64/ - gpgcheck: yes - enabled: yes - state: present - tags: nginx - -- name: Install nginx - become: yes - yum: - name: nginx - state: present - disablerepo: epel - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - tags: nginx - -- name: Remove default site - become: yes - file: - path: /etc/nginx/conf.d/default.conf - state: absent - tags: nginx - -- name: Comment out server line - become: yes - replace: - path: /etc/nginx/nginx.conf - backup: yes - regexp: '^(?![#])(.*server\s*{)' - replace: '#\1' - tags: nginx - when: (ansible_facts.os_family == 'RedHat' and ansible_facts.distribution_major_version == '8') - -- name: Comment out after server block - become: yes - replace: - path: /etc/nginx/nginx.conf - backup: yes - after: '\s*server\s*{' - regexp: '^(?![#}])(.+)$' - replace: '#\1' - tags: nginx - when: (ansible_facts.os_family == 'RedHat' and ansible_facts.distribution_major_version == '8') - -- name: Install dependencies for SELinux Ansible module - become: yes - yum: - name: "{{ selinux_dependencies }}" - state: present - register: nginx_selinux_dependencies - retries: 5 - delay: 3 - until: nginx_selinux_dependencies is succeeded - tags: nginx - -- name: Update SELinux facts after installing dependencies - become: yes - setup: - filter: ansible_selinux - when: nginx_selinux_dependencies.changed - tags: nginx, skip_ansible_lint - -- name: Adjust SELinux to allow network access for nginx - become: yes - seboolean: - name: httpd_can_network_connect - state: yes - persistent: yes - when: ansible_facts.selinux.status == "enabled" and ansible_facts.selinux.mode == "enforcing" - tags: nginx diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nginx/vars/redhat.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nginx/vars/redhat.yml deleted file mode 100644 index 47e53333..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nginx/vars/redhat.yml +++ /dev/null @@ -1,3 +0,0 @@ -selinux_dependencies: - - libsemanage-python - - libselinux-python diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nginx/vars/redhat_8.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nginx/vars/redhat_8.yml deleted file mode 100644 index f93b85f4..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nginx/vars/redhat_8.yml +++ /dev/null @@ -1,3 +0,0 @@ -selinux_dependencies: - - python3-libsemanage - - python3-libselinux diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nodejs/defaults/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nodejs/defaults/main.yml deleted file mode 100644 index e3f94c67..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nodejs/defaults/main.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -# nodejs version to install -nodejs_major_version: "10" diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nodejs/meta/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nodejs/meta/main.yml deleted file mode 100644 index 351707bc..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nodejs/meta/main.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -galaxy_info: - description: Install nodejs - author: humblearner - company: StackStorm - license: Apache - min_ansible_version: 2.5 - tags: nodejs - platforms: - - name: Ubuntu - versions: - - bionic - - xenial - - name: EL - versions: - - 7 - - 8 - galaxy_tags: - - system diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nodejs/tasks/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nodejs/tasks/main.yml deleted file mode 100644 index 5a2fce27..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nodejs/tasks/main.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- name: Install nodejs on {{ ansible_facts.distribution }} - include_tasks: nodejs_{{ ansible_os_family | lower }}.yml - tags: nodejs diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nodejs/tasks/nodejs_debian.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nodejs/tasks/nodejs_debian.yml deleted file mode 100644 index 2eecbc26..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nodejs/tasks/nodejs_debian.yml +++ /dev/null @@ -1,40 +0,0 @@ -- name: Ensure apt-transport-https is installed - become: yes - apt: - name: apt-transport-https - state: present - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - tags: nodejs - -- name: Add nodesource key - become: yes - apt_key: - url: https://keyserver.ubuntu.com/pks/lookup?op=get&fingerprint=on&search=0x1655A0AB68576280 - id: "68576280" - state: present - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - tags: nodejs - -- name: Add nodesource repos debs - become: yes - apt_repository: - repo: "deb https://deb.nodesource.com/node_{{ nodejs_major_version }}.x {{ ansible_facts.distribution_release }} main" - state: present - tags: nodejs - -- name: Install nodejs - become: yes - apt: - name: nodejs={{ nodejs_major_version }}.* - state: present - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - tags: nodejs diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nodejs/tasks/nodejs_redhat.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nodejs/tasks/nodejs_redhat.yml deleted file mode 100644 index f5e3a301..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.nodejs/tasks/nodejs_redhat.yml +++ /dev/null @@ -1,75 +0,0 @@ ---- -- name: Add nodesource key - become: yes - rpm_key: - key: http://rpm.nodesource.com/pub/el/NODESOURCE-GPG-SIGNING-KEY-EL - state: present - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - tags: nodejs - -- name: Remove nodesource repo rpm - # rpm conflicts with yum_repository added file below - become: yes - yum: - name: "nodesource-release-el{{ ansible_facts.distribution_major_version }}-1.noarch" - state: absent - register: nodesource_repo_rm - tags: nodejs - -- name: Determine if nodejs disabled on AppStream for EL8 - become: yes - shell: - cmd: yum module list nodejs --disabled - changed_when: False - ignore_errors: True - args: - warn: False - register: nodejs_disabled - when: ansible_facts.os_family == 'RedHat' and ansible_facts.distribution_major_version == '8' - tags: [nodejs, skip_ansible_lint] - -- name: Disable AppStream repository due to installation conflicts for EL8 - become: yes - shell: - cmd: yum module disable -y nodejs - args: - warn: False - when: ansible_facts.os_family == 'RedHat' and ansible_facts.distribution_major_version == '8' and "AppStream" not in nodejs_disabled.stdout - # Disable warning as yum doesn't support disable module - tags: [nodejs, skip_ansible_lint] - -- name: Add nodesource repo file - become: yes - # This is based on the nodesource repo rpm (both 4.x and 10.x for EL6/7/8), - # but that rpm is not versioned even though it hard-codes the major node.js version. - # So, installing the repo directly (vs via the rpm) simplifies major node.js upgrades. - # see - http://rpm.nodesource.com/pub_10.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm - yum_repository: - file: "nodesource-el{{ ansible_facts.distribution_major_version }}" - name: nodesource - description: "Node.js Packages for Enterprise Linux {{ ansible_facts.distribution_major_version }} - $basearch" - baseurl: https://rpm.nodesource.com/pub_{{ nodejs_major_version }}.x/el/{{ ansible_facts.distribution_major_version }}/$basearch - failovermethod: priority - gpgcheck: yes - gpgkey: file:///etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL - state: present - register: nodesource_repo_add - tags: nodejs - -- name: Install nodejs - become: yes - yum: - name: nodejs-{{ nodejs_major_version }}.* - state: present - # TODO: Allow yum downgrade since Ansible 2.4 - # https://github.com/ansible/ansible/pull/21516 - # allow_downgrade: yes - update_cache: "{{ nodesource_repo_rm is changed or nodesource_repo_add is changed }}" - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - tags: nodejs diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.rabbitmq/defaults/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.rabbitmq/defaults/main.yml deleted file mode 100644 index ea303445..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.rabbitmq/defaults/main.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -rabbitmq_plugins: [] -# To enable the management plugin (in which case you'd want at least one user tagged with administrator): -#rabbitmq_plugins: -# - rabbitmq_management diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.rabbitmq/handlers/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.rabbitmq/handlers/main.yml deleted file mode 100644 index da585657..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.rabbitmq/handlers/main.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -- name: restart rabbitmq - become: yes - service: - name: rabbitmq-server - state: restarted diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.rabbitmq/meta/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.rabbitmq/meta/main.yml deleted file mode 100644 index d72d176d..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.rabbitmq/meta/main.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -galaxy_info: - description: Install Rabbitmq-server - author: humblearner - company: StackStorm - license: Apache - min_ansible_version: 2.5 - platforms: - - name: Ubuntu - versions: - - bionic - - xenial - - name: EL - versions: - - 7 - - 8 - galaxy_tags: - - system diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.rabbitmq/tasks/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.rabbitmq/tasks/main.yml deleted file mode 100644 index 6362fc37..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.rabbitmq/tasks/main.yml +++ /dev/null @@ -1,61 +0,0 @@ ---- -- name: RabbitMQ on RHEL8 requires module(perl:5.26) - become: yes - shell: - cmd: yum -y module enable perl:5.26 - args: - warn: False - when: rabbitmq_on_el8 - register: perl_result - changed_when: - - '"Nothing to do" not in perl_result.stdout' - # Disable warning as yum doesn't support enable module - tags: [rabbitmq, skip_ansible_lint] - -- name: Install rabbit from packagecloud for RH 8 - become: yes - no_log: yes - yum_repository: - name: rabbitmq-server - description: rabbitmq-server - baseurl: https://packagecloud.io/rabbitmq/rabbitmq-server/el/{{ ansible_facts.distribution_major_version }}/$basearch - repo_gpgcheck: yes - gpgkey: "https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey" - sslcacert: /etc/pki/tls/certs/ca-bundle.crt - metadata_expire: 300 - gpgcheck: no - enabled: yes - sslverify: yes - when: rabbitmq_on_el8 - tags: rabbitmq - -- name: Install rabbitmq package on {{ ansible_facts.distribution }} - become: yes - package: - name: rabbitmq-server - state: present - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - notify: - - restart rabbitmq - tags: rabbitmq - -- name: Ensure rabbitmq is enabled and running - become: yes - service: - name: rabbitmq-server - enabled: yes - state: started - tags: rabbitmq - -- name: Add RabbitMQ plugins - become: yes - rabbitmq_plugin: - names: "{{ rabbitmq_plugins|join(',') }}" - state: enabled - # new_only: no = Remove all plguins that aren't listed in rabbitmq_plugins - new_only: no - when: rabbitmq_plugins | bool - tags: rabbitmq diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.rabbitmq/vars/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.rabbitmq/vars/main.yml deleted file mode 100644 index 2cc37ca0..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.rabbitmq/vars/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -rabbitmq_on_el8: "{{ (ansible_facts.os_family == 'RedHat' and ansible_facts.distribution_major_version == '8') }}" diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/defaults/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/defaults/main.yml deleted file mode 100644 index 971c5af8..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/defaults/main.yml +++ /dev/null @@ -1,39 +0,0 @@ ---- -# StackStorm version to install. `present` to install available package, `latest` to get automatic updates or pin it to numeric version like `2.2.0`. -st2_version: latest -# StackStorm revision to install. Used only with pinned `st2_version`. -st2_revision: 1 - -# Hash with StackStorm configuration settings to set in 'st2.conf' ini file -# See https://github.com/StackStorm/st2/blob/master/conf/st2.conf.sample for a full list -st2_config: {} -# Example: -#st2_config: -# auth: -# debug: True -# enable: True -# database: -# username: st2 -# db_name: st2 -# password: random-password123 -# messaging: -# url: amqp://st2:st2@127.0.0.1:5672// - -# System user from which st2 will execute local/remote shell actions -st2_system_user: stanley -# Add `st2_system_user` to the sudoers (recommended for most `st2` features to work) -st2_system_user_in_sudoers: yes -# Path to `st2_system_user` ssh private key. It will be autogenerated if key absent -st2_ssh_key_file: /home/{{ st2_system_user }}/.ssh/{{ st2_system_user }}_rsa - -# Enable StackStorm standalone authentication -st2_auth_enable: yes -# Username used by StackStorm standalone authentication -st2_auth_username: testu -# Password used by StackStorm standalone authentication -st2_auth_password: testp -# Save credentials in ~/.st2/config file -st2_save_credentials: yes -# ST2 packs to be installed (list) -st2_packs: - - st2 diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/handlers/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/handlers/main.yml deleted file mode 100644 index b2b40213..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/handlers/main.yml +++ /dev/null @@ -1,34 +0,0 @@ -- name: restart st2 - become: yes - service: - name: "{{ item }}" - state: restarted - loop: "{{ st2_services }}" - -- name: reload st2 - become: yes - command: st2ctl reload --register-all - -- name: restart st2actionrunner - become: yes - service: - name: st2actionrunner - state: restarted - -- name: restart st2auth - become: yes - service: - name: st2auth - state: restarted - -- name: restart st2api - become: yes - service: - name: st2api - state: restarted - -- name: restart st2stream - become: yes - service: - name: st2stream - state: restarted diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/meta/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/meta/main.yml deleted file mode 100644 index 73e4cfa4..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/meta/main.yml +++ /dev/null @@ -1,27 +0,0 @@ ---- -galaxy_info: - description: Install StackStorm and all its components - author: armab - company: StackStorm - license: Apache 2.0 - min_ansible_version: 2.5 - platforms: - - name: Ubuntu - versions: - - bionic - - xenial - - name: EL - versions: - - 7 - - 8 - galaxy_tags: - - system - - stackstorm - - st2 - - automation - - remediation - - devops -dependencies: - - role: StackStorm.epel - when: ansible_facts.os_family == 'RedHat' - - role: StackStorm.st2repo diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/auth.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/auth.yml deleted file mode 100644 index 357eac94..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/auth.yml +++ /dev/null @@ -1,76 +0,0 @@ -- name: auth | Install auth pre-reqs (Debian) - become: yes - apt: - name: - - python-passlib - - apache2-utils - state: present - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - when: ansible_facts.os_family == 'Debian' - -- name: Include RedHat OS-specific variables - include_vars: "{{ item }}" - with_first_found: - - "{{ ansible_os_family | lower }}_{{ ansible_distribution_major_version }}.yml" - - "{{ ansible_os_family | lower }}.yml" - ignore_errors: true - when: ansible_facts.os_family == 'RedHat' - -- name: auth | Install auth pre-reqs (RedHat) - become: yes - yum: - name: - - httpd-tools - - "{{ passlib }}" - state: present - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - when: ansible_facts.os_family == 'RedHat' - -- name: auth | Create htpasswd file - become: true - htpasswd: - path: /etc/st2/htpasswd - name: "{{ st2_auth_username }}" - password: "{{ st2_auth_password }}" - notify: - - restart st2api - - restart st2stream - -- name: auth | Enable authentication - become: yes - ini_file: - dest: /etc/st2/st2.conf - section: auth - option: enable - value: True - backup: yes - notify: - - restart st2api - - restart st2stream - -- name: auth | Create root's CLI configuration directory - become: yes - file: - path: /root/.st2 - state: directory - when: st2_save_credentials | bool - -- name: auth | Save credentials in CLI configuration file - become: yes - blockinfile: - dest: /root/.st2/config - create: yes - mode: 0600 - owner: root - group: root - block: | - [credentials] - username = {{ st2_auth_username }} - password = {{ st2_auth_password }} - when: st2_save_credentials | bool diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/config.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/config.yml deleted file mode 100644 index 2fa7f97e..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/config.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -- name: Change '[{{ _conf_section_name }}]' options in st2.conf - become: yes - ini_file: - dest: /etc/st2/st2.conf - section: "{{ _conf_section_name }}" - option: "{{ _conf_option.0 }}" - value: "{{ _conf_option.1 | string }}" - # dict2items not available until 2.6, so use Jinja's dictsort instead - loop: "{{ _conf_options | dictsort }}" - loop_control: - loop_var: _conf_option - # prevent logging passwords, auth URIs, and secrets - no_log: "{{ _conf_option.0 in st2_config_no_log[_conf_section_name]|default([]) }}" - notify: - - restart st2 - tags: st2, config diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/datastore.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/datastore.yml deleted file mode 100644 index e2610d2a..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/datastore.yml +++ /dev/null @@ -1,32 +0,0 @@ ---- -- name: Make stackstorm encryption keys directory - become: yes - file: - path: "{{ st2_datastore_key_file | dirname }}" - state: directory - mode: 0750 - owner: root - group: st2 - -- name: Generate st2 encryption key - become: yes - command: st2-generate-symmetric-crypto-key --key-path {{ st2_datastore_key_file }} - args: - creates: "{{ st2_datastore_key_file }}" - -- name: Fix permissions on datastore encryption key - become: yes - file: - path: "{{ st2_datastore_key_file }}" - mode: 0640 - owner: root - group: st2 - -- name: Configure encryption key in st2.conf - become: yes - ini_file: - path: /etc/st2/st2.conf - section: keyvalue - option: encryption_key_path - value: "{{ st2_datastore_key_file }}" - notify: restart st2api diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/flush_handlers.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/flush_handlers.yml deleted file mode 100644 index dc4800ef..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/flush_handlers.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -- meta: flush_handlers - tags: st2, st2_packs diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/main.yml deleted file mode 100644 index acdac3ab..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/main.yml +++ /dev/null @@ -1,142 +0,0 @@ ---- -- name: Verify python3-devel is available in enabled repo - become: yes - shell: - cmd: yum info python3-devel - changed_when: false - register: _rpm_check - args: - warn: False - ignore_errors: yes - when: ansible_facts.os_family == 'RedHat' and ansible_facts.distribution_major_version == '7' - # Disable warning as yum doesn't support info - tags: st2, skip_ansible_lint - -- name: Discover name of optional server rpm - become: yes - shell: - cmd: yum repolist disabled 2> /dev/null | awk -F'/' '/rhel-7-server-rhui-optional-rpms|rhui-REGION-rhel-server-optional|rhel-7-server-optional-rpms/{print $1}' - changed_when: false - register: _reponame - args: - warn: False - when: ansible_facts.os_family == 'RedHat' and ansible_facts.distribution_major_version == '7' and _rpm_check.rc != 0 - # Disable warning as yum doesn't support repolist - tags: st2, skip_ansible_lint - -- name: Install python3-devel - become: yes - yum: - name: python3-devel - state: present - enablerepo: "{{ _reponame.stdout }}" - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - when: ansible_facts.os_family == 'RedHat' and ansible_facts.distribution_major_version == '7' and _rpm_check.rc != 0 - tags: st2 - -- name: Install latest st2 package, auto-update - become: yes - package: - name: st2 - state: latest - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - when: st2_version == "latest" - notify: - - restart st2 - - reload st2 - tags: st2, skip_ansible_lint - -- name: Install present st2 package, no auto-update - become: yes - package: - name: st2 - state: present - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - when: st2_version == "present" - notify: - - restart st2 - - reload st2 - tags: st2 - -- name: Install pinned st2 package - become: yes - package: - name: st2{{ '-' if ansible_facts.pkg_mgr == 'yum' else '=' }}{{ st2_version }}-{{ st2_revision }} - state: present - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - when: - - st2_version != "latest" - - st2_version != "present" - notify: - - restart st2 - - reload st2 - tags: st2 - -- name: Perform st2 version related operations - import_tasks: version.yml - tags: st2, version - -- name: Create and configure StackStorm system user - import_tasks: user.yml - tags: st2, user - -- name: Configure StackStorm authentication - import_tasks: auth.yml - # Use st2_config.auth.enable setting if available, otherwise use st2_auth_enable - when: (st2_config.auth|default({})).enable|default(st2_auth_enable) - tags: st2, auth - -- name: Configure StackStorm st2.conf settings - # Ansible nested loop to iterate through a hash of hashes - include_tasks: config.yml - vars: - _conf_section_name: "{{ _conf_section.0 }}" - _conf_options: "{{ _conf_section.1 }}" - # dict2items not available until 2.6, so use Jinja's dictsort instead - loop: "{{ st2_config | dictsort }}" - loop_control: - loop_var: _conf_section - tags: st2, config - -- name: Configure the StackStorm datastore - import_tasks: datastore.yml - tags: st2, datastore - -- name: Configure StackStorm to work via proxy - import_tasks: proxy.yml - tags: st2, proxy - -- name: Ensure StackStorm services are enabled and running - become: yes - service: - name: "{{ item }}" - enabled: yes - state: started - loop: "{{ st2_services }}" - tags: st2 - -# Since flush handlers does not support conditionals, we need to have a dedicated playbook -# https://github.com/ansible/ansible/issues/41313#issuecomment-520891625 -- name: Flush handlers to prepare StackStorm if there are packs to install - include_tasks: flush_handlers.yml - when: st2_packs|length > 0 - ignore_errors: yes - tags: st2, st2_packs - -- name: Install StackStorm integration Packs - import_tasks: packs.yml - when: st2_packs|length > 0 - ignore_errors: yes - tags: st2, st2_packs diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/packs.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/packs.yml deleted file mode 100644 index 397dc885..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/packs.yml +++ /dev/null @@ -1,20 +0,0 @@ ---- -- name: Get list of installed st2 packs - command: st2 pack list -j - changed_when: no - check_mode: no - register: _st2_packs_installed - become: true - tags: st2, st2_packs - -- name: Parse list of installed st2 packs - set_fact: - st2_packs_installed: "{{ _st2_packs_installed.stdout|from_json|map(attribute='name')|list() }}" - tags: st2, st2_packs, - -- name: Install st2 packs - command: st2 pack install "{{ item }}" - loop: "{{ st2_packs }}" - when: item not in st2_packs_installed - become: true - tags: st2, st2_packs diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/proxy.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/proxy.yml deleted file mode 100644 index 45f2b54c..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/proxy.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -# Update proxy env vars in StackStorm service config files -- name: proxy | Configure StackStorm services - become: yes - lineinfile: - dest: /etc/{{ 'default' if ansible_facts.pkg_mgr == 'apt' else 'sysconfig' }}/{{ item.0 }} - create: yes - regexp: '^{{ item.1 }}=' - line: "{{ item.1 }}={{ ansible_facts.env.get(item.1) }}" - # NB: Empty ENV var cast to 'None' string in Ansible - state: "{{ 'present' if ansible_facts.env.get(item.1, 'None') != 'None' else 'absent' }}" - vars: - _services: [st2api, st2actionrunner] - _proxy_vars: [http_proxy, https_proxy, no_proxy] - loop: '{{ _services|product(_proxy_vars)|list }}' - notify: - - restart st2actionrunner - - restart st2api diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/user.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/user.yml deleted file mode 100644 index cbe7046b..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/user.yml +++ /dev/null @@ -1,59 +0,0 @@ -# Create system user, on whose behalf remote/local action runners would work -# See: http://docs.stackstorm.com/install/config.html#configure-ssh ---- -- name: user | Create system user - become: yes - user: - name: "{{ st2_system_user }}" - home: "/home/{{ st2_system_user }}" - generate_ssh_key: yes - ssh_key_file: "{{ st2_ssh_key_file }}" - state: present - register: _user - -- name: user | Authorize key-based access for system user - vars: - ansible_ssh_pipelining: true - become: yes - become_user: "{{ st2_system_user }}" - authorized_key: - user: "{{ st2_system_user }}" - key: "{{ _user.ssh_public_key }}" - state: present - -- name: user | Add system user to sudoers - become: yes - lineinfile: - create: yes - dest: /etc/sudoers.d/st2 - mode: 0440 - regexp: "^{{ st2_system_user }} ALL=" - line: "{{ st2_system_user }} ALL=(ALL) NOPASSWD: SETENV: ALL" - state: "{{ 'present' if st2_system_user_in_sudoers else 'absent' }}" - validate: 'visudo -cf %s' - -- name: user | Disable requiretty - become: yes - replace: - dest: "/etc/sudoers" - regexp: '^Defaults\s+\+?requiretty' - replace: '# Defaults requiretty' - when: st2_system_user_in_sudoers | bool - -- name: user | Configure system user in /etc/st2/st2.conf - become: yes - ini_file: - dest: /etc/st2/st2.conf - section: system_user - option: user - value: "{{ st2_system_user }}" - backup: yes - -- name: user | Configure system user ssh key in /etc/st2/st2.conf - become: yes - ini_file: - dest: /etc/st2/st2.conf - section: system_user - option: ssh_key_file - value: "{{ _user.ssh_key_file }}" - backup: yes diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/version.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/version.yml deleted file mode 100644 index d62315b4..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/tasks/version.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -# Getting the current st2 version is required to understand which 'st2_services' to restart -- name: Get installed st2 version - command: /opt/stackstorm/st2/bin/python -c 'import st2common; print(st2common.__version__)' - changed_when: no - check_mode: no - register: _st2_version_installed - -# Injecting 'st2_services' var in the middle of play verified to work with 'restart st2' handler as handlers flushed as last step -- name: Redefine list of services based on st2 version - set_fact: - st2_services: "{{ st2_services }} + {{ item.1 }}" - # dict2items not available until 2.6, so use Jinja's dictsort instead - loop: "{{ st2_services_versioned | dictsort }}" - when: item.0 is version_compare(st2_version_installed, '<=') diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/vars/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/vars/main.yml deleted file mode 100644 index b14dc0bb..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/vars/main.yml +++ /dev/null @@ -1,39 +0,0 @@ -# Default st2 immutable vars ---- -# List of available `st2` services: -# https://github.com/StackStorm/st2/blob/master/st2common/bin/st2ctl#L17 -st2_services: - - st2actionrunner - - st2garbagecollector - - st2notifier - - st2resultstracker - - st2rulesengine - - st2sensorcontainer - - st2api - - st2stream - - st2auth - -# List of additional stackstorm services associated with specific st2 version release -st2_services_versioned: - "2.8": - - st2workflowengine - "2.9": - - st2timersengine - "2.10": - - st2scheduler - -# Placeholder for st2 installed version, determined during run -st2_version_installed: "{{ _st2_version_installed.stdout }}" - -# Where to store the ST2 datastore encryption key (automatically generated during install) -st2_datastore_key_file: /etc/st2/keys/datastore_key.json - -# List of config vars (by section) that should have no_log: true to avoid showing up in ansible output -st2_config_no_log: - coordination: - - url - database: - - username - - password - messaging: - - url diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/vars/redhat.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/vars/redhat.yml deleted file mode 100644 index 4c96b656..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/vars/redhat.yml +++ /dev/null @@ -1,3 +0,0 @@ -# List of python2 variables ---- -passlib: python-passlib diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/vars/redhat_8.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/vars/redhat_8.yml deleted file mode 100644 index 9e1046b2..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2/vars/redhat_8.yml +++ /dev/null @@ -1,3 +0,0 @@ -# List of python3 variables ---- -passlib: python3-passlib diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2chatops/defaults/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2chatops/defaults/main.yml deleted file mode 100644 index 7f12c645..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2chatops/defaults/main.yml +++ /dev/null @@ -1,17 +0,0 @@ -# st2chatops version to install. `present` to install available package, `latest` to get automatic updates, or pin it to numeric version like `2.2.0`. -st2chatops_version: latest - -# Please provide ST2_API_KEY using "st2 apikey create -k" -st2chatops_st2_api_key: CHANGE-ME-PLEASE - -# Hubot Adapter to be used for st2chatops. -# For supported adapters, please check: https://github.com/StackStorm/ansible-st2/blob/master/roles/st2chatops/vars/main.yml -# -# Example, for slack: st2chatops_hubot_adapter: slack -st2chatops_hubot_adapter: shell - -# Hash to configure values for the adapter in "/opt/stackstorm/chatops/st2chatops.env" -# Original: https://github.com/StackStorm/st2chatops/blob/master/st2chatops.env -# -# Example, for slack: st2chatops_config: {"HUBOT_SLACK_TOKEN":"xoxb-CHANGE-ME-PLEASE"} -st2chatops_config: {} diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2chatops/handlers/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2chatops/handlers/main.yml deleted file mode 100644 index 346adf6d..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2chatops/handlers/main.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -- name: restart st2chatops - become: yes - service: - name: st2chatops - state: restarted diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2chatops/meta/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2chatops/meta/main.yml deleted file mode 100644 index bdd58900..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2chatops/meta/main.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -galaxy_info: - description: Install st2chatops - author: humblearner - company: StackStorm - license: Apache 2.0 - min_ansible_version: 2.5 - platforms: - - name: Ubuntu - versions: - - bionic - - xenial - - name: EL - versions: - - 7 - - 8 - galaxy_tags: - - system - - st2 - - devops - - chatops - - automation - - hubot -dependencies: - - role: StackStorm.nodejs - - role: StackStorm.st2 diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2chatops/tasks/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2chatops/tasks/main.yml deleted file mode 100644 index d6ba3e89..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2chatops/tasks/main.yml +++ /dev/null @@ -1,206 +0,0 @@ ---- -- name: Assert st2chatops_hubot_adapter is specified - fail: - msg: > - '"st2chatops_hubot_adapter" must be one of the supported adapters in - https://github.com/StackStorm/st2chatops/blob/master/st2chatops.env' - when: st2chatops_hubot_adapter not in supported_hubot_adapters - tags: st2chatops - -- name: Assert st2chatops_hubot_adapter "{{ st2chatops_hubot_adapter|upper }}" settings are specified - fail: - msg: '"st2chatops_config" hash cannot be empty for "{{ st2chatops_hubot_adapter|upper }}" hubot adapter.' - when: > - (st2chatops_config == None) or - (st2chatops_config == {} and st2chatops_hubot_adapter != "shell") - tags: st2chatops - -- name: Install latest st2chatops package, auto-update - become: yes - package: - name: st2chatops - state: latest - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - when: st2chatops_version == "latest" - notify: - - restart st2chatops - tags: [st2chatops, skip_ansible_lint] - -- name: Install present st2chatops package, no auto-update - become: yes - package: - name: st2chatops - state: present - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - when: st2chatops_version == "present" - notify: - - restart st2chatops - tags: st2chatops - -- name: Install pinned st2chatops package - become: yes - package: - name: st2chatops{{ '-' if ansible_facts.pkg_mgr == 'yum' else '=' }}{{ st2chatops_version }} - state: present - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - when: st2chatops_version != "latest" - notify: - - restart st2chatops - tags: st2chatops - -- name: Check if API key already exist in st2chatops.env - become: yes - command: "grep -e '^export ST2_API_KEY=\"\\${ST2_API_KEY}\"$' /opt/stackstorm/chatops/st2chatops.env" - changed_when: no - ignore_errors: true - register: task_apikey_not_exists - tags: st2chatops - -- name: Add user defined "st2chatops_st2_api_key" in st2chatops.env, from "role" or "defaults/main.yml" - become: yes - replace: - dest: /opt/stackstorm/chatops/st2chatops.env - regexp: '(?<=ST2_API_KEY=)(\"\$\{ST2_API_KEY\}\")$' - replace: '{{ st2chatops_st2_api_key }}' - when: > - (task_apikey_not_exists is succeeded) and - (st2chatops_st2_api_key is defined) and - (st2chatops_st2_api_key != "CHANGE-ME-PLEASE") - register: task_user_st2_api_key - no_log: true - notify: restart st2chatops - tags: st2chatops - -- name: Generate authentication token - command: st2 auth "{{ st2_auth_username }}" -p "{{ st2_auth_password }}" -t - when: task_apikey_not_exists is succeeded and task_user_st2_api_key is not changed - register: task_st2_token - tags: [st2chatops, skip_ansible_lint] - -- name: Generate "st2_api_key" if not provided with the "role" or in "defaults/main.yml" - command: st2 apikey create -k - environment: - ST2_AUTH_TOKEN: "{{ task_st2_token.stdout }}" - when: task_st2_token.changed - register: task_generated_api_key - no_log: true - tags: [st2chatops, skip_ansible_lint] - -- name: Add generated "st2_api_key" in st2chatops.env - become: yes - replace: - dest: /opt/stackstorm/chatops/st2chatops.env - regexp: '(?<=ST2_API_KEY=)(\"\$\{ST2_API_KEY\}\")$' - replace: '{{ task_generated_api_key.stdout }}' - when: task_generated_api_key.changed - register: task_st2_api_key - no_log: true - notify: restart st2chatops - tags: [st2chatops, skip_ansible_lint] - -- name: Comment Username, Password and Auth URL, if API_KEY provided - become: yes - replace: - dest: /opt/stackstorm/chatops/st2chatops.env - regexp: '{{ item }}' - replace: '# \1' - loop: - - '^(export ST2_AUTH_URL.*)' - - '^(export ST2_AUTH_USERNAME.*)' - - '^(export ST2_AUTH_PASSWORD.*)' - when: (task_st2_api_key.changed) or (task_user_st2_api_key.changed) - tags: [st2chatops, skip_ansible_lint] - -- name: Check if any adapter is enabled - command: "grep -e '^export HUBOT_ADAPTER=' /opt/stackstorm/chatops/st2chatops.env" - ignore_errors: true - register: task_adapter_enabled - changed_when: no - tags: st2chatops - -- name: Set variable enabled_adapter - set_fact: - enabled_adapter: '{% set list_var = (task_adapter_enabled.stdout).split("=") %}{{ list_var[1] }}' - ignore_errors: true - changed_when: no - tags: st2chatops - -- name: Comment existing hubot adapters in "/opt/stackstorm/chatops/st2chatops.env" - become: yes - replace: - dest: /opt/stackstorm/chatops/st2chatops.env - regexp: '^(export HUBOT_ADAPTER=.*)' - replace: '# \1' - when: > - (enabled_adapter != st2chatops_hubot_adapter) or - (enabled_adapter is not defined) - notify: restart st2chatops - tags: st2chatops - -- name: Uncomment Hubot "{{ st2chatops_hubot_adapter|upper }}" adapter in "/opt/stackstorm/chatops/st2chatops.env" - become: yes - replace: - dest: /opt/stackstorm/chatops/st2chatops.env - regexp: '^# (export HUBOT_ADAPTER={{ st2chatops_hubot_adapter }})$' - replace: '\1' - changed_when: no - notify: restart st2chatops - tags: st2chatops - -- name: Add entry for "SHELL" adapter - become: yes - lineinfile: - dest: /opt/stackstorm/chatops/st2chatops.env - line: export HUBOT_ADAPTER=shell - when: st2chatops_hubot_adapter == "shell" - notify: restart st2chatops - tags: st2chatops - -- name: Configure "{{ st2chatops_hubot_adapter|upper }}" adapter setttings in "/opt/stackstorm/chatops/st2chatops.env" - become: yes - ini_file: - dest: /opt/stackstorm/chatops/st2chatops.env - section: null - option: 'export {{ _conf_option.0 }}' - value: '{{ _conf_option.1 }}' - no_extra_spaces: yes - # dict2items not available until 2.6, so use Jinja's dictsort instead - loop: '{{ st2chatops_config | dictsort }}' - loop_control: - loop_var: _conf_option - no_log: true - notify: restart st2chatops - tags: st2chatops - -# Update proxy env vars in st2chatops service config file -- name: Configure st2chatops to work via proxy - become: yes - lineinfile: - dest: /etc/{{ 'default' if ansible_facts.pkg_mgr == 'apt' else 'sysconfig' }}/{{ item.0 }} - create: yes - regexp: '^{{ item.1 }}=' - line: "{{ item.1 }}={{ ansible_facts.env.get(item.1) }}" - # NB: Empty ENV var cast to 'None' string in Ansible - state: "{{ 'present' if ansible_facts.env.get(item.1, 'None') != 'None' else 'absent' }}" - vars: - _services: [st2chatops] - _proxy_vars: [http_proxy, https_proxy, no_proxy] - loop: '{{ _services|product(_proxy_vars)|list }}' - notify: - - restart st2chatops - -- name: Ensure st2chatops service is enabled and running - become: yes - service: - name: st2chatops - enabled: yes - tags: st2chatops diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2chatops/vars/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2chatops/vars/main.yml deleted file mode 100644 index 520f1f7d..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2chatops/vars/main.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -supported_hubot_adapters: - - slack - - botframework - - hipchat - - xmpp - - flowdock - - yammer - - spark - - irc - - mattermost - - matteruser - - shell diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/defaults/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/defaults/main.yml deleted file mode 100644 index cac0c0ce..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/defaults/main.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -# StackStorm PackageCloud repository to install: stable, unstable, staging-stable, staging-unstable. -st2repo_name: stable diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/meta/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/meta/main.yml deleted file mode 100644 index 0f8ebb26..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/meta/main.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -galaxy_info: - description: Install StackStorm Community package repository - author: armab - company: StackStorm - license: Apache 2.0 - min_ansible_version: 2.5 - platforms: - - name: Ubuntu - versions: - - bionic - - xenial - - name: EL - versions: - - 7 - - 8 - galaxy_tags: - - system - - stackstorm - - repositories - - packagecloud diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/tasks/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/tasks/main.yml deleted file mode 100644 index de06cd84..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/tasks/main.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- name: Add st2repo on {{ ansible_facts.distribution }} - include_tasks: st2repo_{{ ansible_os_family | lower }}.yml - tags: st2repo diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/tasks/st2repo_debian.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/tasks/st2repo_debian.yml deleted file mode 100644 index ef1f8162..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/tasks/st2repo_debian.yml +++ /dev/null @@ -1,37 +0,0 @@ ---- -- name: Install prereqs (Debian) - become: yes - apt: - name: - - debian-archive-keyring - - apt-transport-https - state: present - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - tags: st2repo - -- name: "Including ID variable for {{ st2repo_name }}" - include_vars: - file: "{{ st2repo_name }}.yml" - -- name: Add keys to keyring - become: yes - apt_key: - id: "{{ key_id }}" - url: https://packagecloud.io/StackStorm/{{ st2repo_name }}/gpgkey - state: present - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - tags: st2repo - -- name: Add StackStorm repo - become: yes - apt_repository: - repo: 'deb https://packagecloud.io/StackStorm/{{ st2repo_name }}/{{ ansible_facts.distribution|lower }}/ {{ ansible_facts.distribution_release|lower }} main' - state: present - update_cache: yes - tags: st2repo diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/tasks/st2repo_redhat.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/tasks/st2repo_redhat.yml deleted file mode 100644 index 0e51a874..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/tasks/st2repo_redhat.yml +++ /dev/null @@ -1,41 +0,0 @@ ---- -# Fixes "Failure talking to yum: Cannot retrieve repository metadata (repomd.xml) for repository: StackStorm_stable. Please verify its path and try again" when installing st2 -- name: Update ca-certificates package - become: yes - yum: - name: ca-certificates - state: latest - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - tags: [st2repo, skip_ansible_lint] - -# See: https://github.com/docker-library/docs/tree/master/centos#package-documentation -# We ship `nginx.conf` via `st2` package doc files, for example -- name: Enable shipping package documentation files for EL - become: yes - ini_file: - dest: /etc/yum.conf - section: main - option: tsflags - value: nodocs - state: absent - when: ansible_facts.os_family == "RedHat" - tags: st2repo - -- name: Add StackStorm repo - become: yes - yum_repository: - name: "StackStorm_{{ st2repo_name }}" - description: "StackStorm_{{ st2repo_name }}" - file: "StackStorm_{{ st2repo_name }}" - baseurl: https://packagecloud.io/StackStorm/{{ st2repo_name }}/el/{{ ansible_facts.distribution_major_version }}/$basearch - repo_gpgcheck: yes - gpgkey: "https://packagecloud.io/StackStorm/{{ st2repo_name }}/gpgkey" - sslcacert: /etc/pki/tls/certs/ca-bundle.crt - metadata_expire: 300 - gpgcheck: no - enabled: yes - sslverify: yes - tags: st2repo diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/vars/stable.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/vars/stable.yml deleted file mode 100644 index f5e5d3eb..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/vars/stable.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -key_id: 3CE01873543A4CCE diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/vars/staging-stable.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/vars/staging-stable.yml deleted file mode 100644 index 4f58ef76..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/vars/staging-stable.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -key_id: 527B93CA96ADF311 diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/vars/staging-unstable.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/vars/staging-unstable.yml deleted file mode 100644 index 4ae8cde1..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/vars/staging-unstable.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -key_id: 9A2236A8CEC0C6A8 diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/vars/unstable.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/vars/unstable.yml deleted file mode 100644 index 1cce5f76..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2repo/vars/unstable.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -key_id: 1CDF3CE710B2CCF3 diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2smoketests/tasks/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2smoketests/tasks/main.yml deleted file mode 100644 index a7c74217..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2smoketests/tasks/main.yml +++ /dev/null @@ -1,68 +0,0 @@ ---- -# Small suite of smoke tests to execute to ensure that the playbook has deployed as expected - -- meta: flush_handlers - tags: - - smoke-tests - -- name: Make sure packs are reloaded - become: yes - command: st2ctl reload --register-all - changed_when: no - tags: - - smoke-tests - -- name: st2 installed - command: st2 --version - changed_when: no - tags: - - smoke-tests - -- name: get authentication token - command: st2 auth "{{ st2_auth_username }}" -p "{{ st2_auth_password }}" -t - register: st2_token - changed_when: no - tags: - - smoke-tests - -- name: st2 run core.local -- date -R - command: st2 run core.local -- date -R - environment: - ST2_AUTH_TOKEN: "{{ st2_token.stdout }}" - changed_when: no - tags: - - smoke-tests - -- name: Check web-ui is up - uri: - url: https://localhost/ - validate_certs: no - changed_when: no - tags: - - smoke-tests - -- name: Install st2 pack from exchange - become: yes - environment: - ST2_AUTH_TOKEN: "{{ st2_token.stdout }}" - command: "st2 pack install st2" - changed_when: no - tags: - - smoke-tests - -- name: Verify if st2 pack was installed - environment: - ST2_AUTH_TOKEN: "{{ st2_token.stdout }}" - command: st2 pack get st2 - changed_when: no - check_mode: no - tags: - - smoke-tests - -- name: Verify st2chatops - import_tasks: st2chatops.yml - # st2chatops is installed - when: st2chatops_version is defined - tags: - - smoke-tests - - st2chatops diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2smoketests/tasks/st2chatops.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2smoketests/tasks/st2chatops.yml deleted file mode 100644 index 36b17047..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2smoketests/tasks/st2chatops.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -- name: Verify st2chatops using bin/hubot - # when editing, make sure it works for at least 2 adapters: 'shell' and 'slack' - shell: set -o pipefail && timeout 10 bash -c '(sleep 5; echo exit ) | bin/hubot' - args: - chdir: /opt/stackstorm/chatops/ - executable: /bin/bash - environment: - HUBOT_LOG_LEVEL: debug - register: hubot_output - failed_when: no - changed_when: no - -# Additional task to provide better error message -- name: Fail if st2chatops couldn't load st2 commands - fail: - msg: | - Please check you 'st2chatops' configuration! - Expected message "{{ item }}" not found in 'hubot' output. - Full chatops log: {{ hubot_output.stdout }} - when: item not in hubot_output.stdout - loop: - - "DEBUG Loading adapter {{ st2chatops_hubot_adapter }}" - - "DEBUG Loading scripts from /opt/stackstorm/chatops/src/scripts" - - "DEBUG Added command: pack get" - - "commands are loaded" diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2web/defaults/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2web/defaults/main.yml deleted file mode 100644 index babac1de..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2web/defaults/main.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -# defaults file for st2web -st2web_revision: 1 - -# String with custom SSL certificate. If not provided, self-signed certificate will be generated. -st2web_ssl_certificate: null - -# String with custom SSL certificate private key. If not provided, self-signed certificate will be generated. -st2web_ssl_certificate_key: null - -# String with a custom nginx configuration file to replace st2.conf. If not provided, the default st2.conf will be used. -st2web_nginx_config: null diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2web/meta/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2web/meta/main.yml deleted file mode 100644 index fbc177c6..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2web/meta/main.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -galaxy_info: - description: Install st2web - author: humblearner - company: StackStorm - license: Apache - min_ansible_version: 2.5 - tags: st2web - platforms: - - name: Ubuntu - versions: - - bionic - - xenial - - name: EL - versions: - - 7 - - 8 - galaxy_tags: - - system -dependencies: - - role: StackStorm.nginx - - role: StackStorm.st2repo - - role: StackStorm.st2 diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2web/tasks/certificate.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2web/tasks/certificate.yml deleted file mode 100644 index 3d1a9f56..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2web/tasks/certificate.yml +++ /dev/null @@ -1,42 +0,0 @@ ---- -- name: Verify if custom SSL certificate was correctly specified - fail: - msg: "When using custom certificate, both 'st2web_ssl_certificate' and 'st2web_ssl_certificate_key' must be provided" - # no XOR in Yaml - when: (st2web_ssl_certificate and not st2web_ssl_certificate_key) or (not st2web_ssl_certificate and st2web_ssl_certificate_key) - -- name: Create SSL certificate directory - become: yes - file: - state: directory - dest: /etc/ssl/st2 - mode: 0700 - owner: root - group: root - -- name: Save custom SSL certificate - become: yes - copy: - content: "{{ item.cert }}" - dest: "{{ item.path }}" - mode: 0600 - owner: root - group: root - loop: - - cert: "{{ st2web_ssl_certificate }}" - path: /etc/ssl/st2/st2.crt - - cert: "{{ st2web_ssl_certificate_key }}" - path: /etc/ssl/st2/st2.key - no_log: yes - notify: - - restart nginx - when: st2web_ssl_certificate and st2web_ssl_certificate_key - -- name: Generate self-signed SSL certificate - become: yes - shell: openssl req -x509 -newkey rsa:2048 -keyout /etc/ssl/st2/st2.key -out /etc/ssl/st2/st2.crt -days 365 -nodes -subj "/C=US/ST=California/L=Palo Alto/O=StackStorm/OU=Information Technology/CN=$(hostname)" - args: - creates: /etc/ssl/st2/st2.key - notify: - - restart nginx - when: not st2web_ssl_certificate and not st2web_ssl_certificate_key diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2web/tasks/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2web/tasks/main.yml deleted file mode 100644 index e84d422f..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2web/tasks/main.yml +++ /dev/null @@ -1,84 +0,0 @@ ---- -- name: Check if enterprise is installed - become: yes - stat: - path: /opt/stackstorm/static/webui/flow/ - register: ewc_installed - -# For enterprise 'bwc-ui' replaces 'st2web' package -- name: "Decide which package to use: 'st2web' vs 'bwc-ui'" - set_fact: - st2web_package_name: bwc-ui - when: ewc_installed.stat.exists - -- name: Install latest {{ st2web_package_name }} package, auto-update - become: yes - package: - name: "{{ st2web_package_name }}" - state: latest - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - when: st2_version == "latest" - tags: st2web, skip_ansible_lint - -- name: Install present {{ st2web_package_name }} package, no auto-update - become: yes - package: - name: "{{ st2web_package_name }}" - state: present - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - when: st2_version == "present" - tags: st2web - -- name: Install pinned {{ st2web_package_name }} package - become: yes - package: - name: "{{ st2web_package_name }}{{ '-' if ansible_facts.pkg_mgr == 'yum' else '=' }}{{ st2_version }}-{{ st2web_revision }}" - state: present - register: _task - retries: 5 - delay: 3 - until: _task is succeeded - when: - - st2_version != "latest" - - st2_version != "present" - tags: st2web - -- name: Configure SSL certificate for st2web UI - import_tasks: certificate.yml - tags: st2web, certificate - -- name: Copy default Nginx config - become: yes - command: cp /usr/share/doc/st2/conf/nginx/st2.conf /etc/nginx/sites-available/ - args: - creates: /etc/nginx/sites-available/st2.conf - notify: - - restart nginx - tags: st2web - when: not st2web_nginx_config - -- name: Copy custom Nginx config - become: yes - copy: - content: "{{ st2web_nginx_config }}" - dest: /etc/nginx/sites-available/st2.conf - notify: - - restart nginx - tags: st2web - when: st2web_nginx_config - -- name: Enable site - become: yes - file: - state: link - src: /etc/nginx/sites-available/st2.conf - dest: /etc/nginx/sites-enabled/st2.conf - notify: - - restart nginx - tags: st2web diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2web/vars/main.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2web/vars/main.yml deleted file mode 100644 index e125b116..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/roles/StackStorm.st2web/vars/main.yml +++ /dev/null @@ -1,5 +0,0 @@ -# Default st2web immutable vars ---- -# Default StackStorm WebUI package name to install -# For enterprise 'bwc-ui' replaces 'st2web' package -st2web_package_name: st2web diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/stackstorm.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/stackstorm.yml deleted file mode 100644 index b56abb9e..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/stackstorm.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -- name: Install st2 - hosts: all - environment: "{{ st2_proxy_env | default({}) }}" - gather_facts: False - pre_tasks: - - name: Install python for Ansible - become: True - raw: test -e /usr/bin/python || (apt install -y python-minimal) - changed_when: False - - name: Gathering facts - setup: - roles: - - StackStorm.mongodb - - StackStorm.rabbitmq - - StackStorm.st2repo - - StackStorm.st2 - - StackStorm.nginx - - StackStorm.st2web - - StackStorm.nodejs - - StackStorm.st2chatops - - StackStorm.st2smoketests - - role: StackStorm.ewc - when: ewc_license is defined and ewc_license is not none and ewc_license | length > 1 - - role: StackStorm.ewc_smoketests - when: ewc_license is defined and ewc_license is not none and ewc_license | length > 1 - - role: StackStorm.git - when: github_token is defined and github_token is not none and github_token | length > 1 \ No newline at end of file diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/test/integration/default.yml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/test/integration/default.yml deleted file mode 120000 index b91542e9..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/ansible/test/integration/default.yml +++ /dev/null @@ -1 +0,0 @@ -../../stackstorm.yml \ No newline at end of file diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/terraform/bitops.after-deploy.d/my-after-script.sh b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/terraform/bitops.after-deploy.d/my-after-script.sh deleted file mode 100755 index e464f135..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/terraform/bitops.after-deploy.d/my-after-script.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -echo "I am an after terraform lifecycle script!" diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/terraform/bitops.before-deploy.d/my-before-script.sh b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/terraform/bitops.before-deploy.d/my-before-script.sh deleted file mode 100755 index 15e1e45f..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/terraform/bitops.before-deploy.d/my-before-script.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -aws s3api create-bucket --bucket $TF_STATE_BUCKET --region $AWS_DEFAULT_REGION --create-bucket-configuration LocationConstraint=$AWS_DEFAULT_REGION || true \ No newline at end of file diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/terraform/bitops.config.yaml b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/terraform/bitops.config.yaml deleted file mode 100644 index 8ab52e5b..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/terraform/bitops.config.yaml +++ /dev/null @@ -1,6 +0,0 @@ -terraform: - cli: {} - options: - command: apply - version: "0.13.2" - fetch-kubeconfig: false \ No newline at end of file diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/terraform/inventory.tf b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/terraform/inventory.tf deleted file mode 100644 index 2e8e7fa9..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/terraform/inventory.tf +++ /dev/null @@ -1,12 +0,0 @@ -resource "local_file" "private_key" { - sensitive_content = tls_private_key.key.private_key_pem - filename = format("%s/%s/%s", abspath(path.root), ".ssh", "st2-bitops-ssh-key.pem") - file_permission = "0600" -} -resource "local_file" "ansible_inventory" { - content = templatefile("inventory.tmpl", { - ip = aws_instance.server.public_ip, - ssh_keyfile = local_file.private_key.filename - }) - filename = format("%s/%s", abspath(path.root), "inventory.yaml") -} \ No newline at end of file diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/terraform/inventory.tmpl b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/terraform/inventory.tmpl deleted file mode 100644 index 8cc849de..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/terraform/inventory.tmpl +++ /dev/null @@ -1,6 +0,0 @@ -bitops_servers: - hosts: - ${ip} - vars: - ansible_ssh_user: ubuntu - ansible_ssh_private_key_file: ${ssh_keyfile} \ No newline at end of file diff --git a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/terraform/main.tf b/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/terraform/main.tf deleted file mode 100644 index 9544dc99..00000000 --- a/docs/examples/bitops+terraform+ansible+stackstorm-blog/st2-bitops-test/terraform/main.tf +++ /dev/null @@ -1,134 +0,0 @@ -terraform { - required_providers { - aws = { - source = "hashicorp/aws" - version = "~> 3.0" - } - } - backend "s3" { - bucket = "st2-bitops-bucket" - key = "state" - } -} - -data "aws_region" "current" {} - -resource "aws_vpc" "main" { - cidr_block = "10.0.0.0/16" -} - -resource "aws_internet_gateway" "gw" { - vpc_id = aws_vpc.main.id -} - -resource "aws_subnet" "main" { - vpc_id = aws_vpc.main.id - cidr_block = aws_vpc.main.cidr_block - availability_zone = "${data.aws_region.current.name}b" -} - -resource "aws_route_table" "rt" { - vpc_id = aws_vpc.main.id - route { - cidr_block = "0.0.0.0/0" - gateway_id = aws_internet_gateway.gw.id - } -} - -resource "aws_route_table_association" "mfi_route_table_association" { - subnet_id = aws_subnet.main.id - route_table_id = aws_route_table.rt.id -} - -data "aws_ami" "ubuntu" { - most_recent = true - filter { - name = "name" - values = ["ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-*"] - } - filter { - name = "virtualization-type" - values = ["hvm"] - } - owners = ["099720109477"] -} - -resource "tls_private_key" "key" { - algorithm = "RSA" - rsa_bits = 4096 -} - -resource "aws_key_pair" "aws_key" { - key_name = "st2-bitops-ssh-key" - public_key = tls_private_key.key.public_key_openssh -} - -resource "aws_security_group" "allow_http" { - name = "allow_http" - description = "Allow HTTP traffic" - vpc_id = aws_vpc.main.id - ingress { - description = "HTTP" - from_port = 80 - to_port = 80 - protocol = "tcp" - cidr_blocks = ["0.0.0.0/0"] - } - egress { - from_port = 0 - to_port = 0 - protocol = "-1" - cidr_blocks = ["0.0.0.0/0"] - } -} - -resource "aws_security_group" "allow_https" { - name = "allow_https" - description = "Allow HTTPS traffic" - vpc_id = aws_vpc.main.id - ingress { - description = "HTTPS" - from_port = 443 - to_port = 443 - protocol = "tcp" - cidr_blocks = ["0.0.0.0/0"] - } - egress { - from_port = 0 - to_port = 0 - protocol = "-1" - cidr_blocks = ["0.0.0.0/0"] - } -} - -resource "aws_security_group" "allow_ssh" { - name = "allow_ssh" - description = "Allow SSH traffic" - vpc_id = aws_vpc.main.id - ingress { - description = "SSH" - from_port = 22 - to_port = 22 - protocol = "tcp" - cidr_blocks = ["0.0.0.0/0"] - } - egress { - from_port = 0 - to_port = 0 - protocol = "-1" - cidr_blocks = ["0.0.0.0/0"] - } -} - -resource "aws_instance" "server" { - ami = data.aws_ami.ubuntu.id - instance_type = "t2.medium" - key_name = aws_key_pair.aws_key.key_name - associate_public_ip_address = true - subnet_id = aws_subnet.main.id - vpc_security_group_ids = [aws_security_group.allow_http.id, aws_security_group.allow_https.id, aws_security_group.allow_ssh.id] - - tags = { - Name = "BitOps - StackStorm test instance" - } -} diff --git a/docs/examples/bitops+terraform+ansible-blog/README.md b/docs/examples/bitops+terraform+ansible-blog/README.md deleted file mode 100644 index 36a2f413..00000000 --- a/docs/examples/bitops+terraform+ansible-blog/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Bitops Operations Repo - -Welcome to Bitops! This serves as a starting point for deploying your application to the cloud. - -This repo can be run as is with -``` -docker run \ --e ENVIRONMENT="test" \ --e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \ --e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \ --e AWS_DEFAULT_REGION="us-east-2" \ --v $(pwd):/opt/bitops_deployment \ -bitovi/bitops:latest -``` - -For more information, check out official BitOps docs https://bitovi.github.io/bitops/ \ No newline at end of file diff --git a/docs/examples/bitops+terraform+ansible-blog/test/ansible/ansible.cfg b/docs/examples/bitops+terraform+ansible-blog/test/ansible/ansible.cfg deleted file mode 100644 index 9d7afd40..00000000 --- a/docs/examples/bitops+terraform+ansible-blog/test/ansible/ansible.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[defaults] -inventory=../terraform/inventory.yaml -host_key_checking = False \ No newline at end of file diff --git a/docs/examples/bitops+terraform+ansible-blog/test/ansible/bitops.after-deploy.d/my-after-script.sh b/docs/examples/bitops+terraform+ansible-blog/test/ansible/bitops.after-deploy.d/my-after-script.sh deleted file mode 100755 index 32aa864d..00000000 --- a/docs/examples/bitops+terraform+ansible-blog/test/ansible/bitops.after-deploy.d/my-after-script.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -echo "I am an after ansible lifecycle script!" \ No newline at end of file diff --git a/docs/examples/bitops+terraform+ansible-blog/test/ansible/bitops.before-deploy.d/my-before-script.sh b/docs/examples/bitops+terraform+ansible-blog/test/ansible/bitops.before-deploy.d/my-before-script.sh deleted file mode 100755 index 3308b12e..00000000 --- a/docs/examples/bitops+terraform+ansible-blog/test/ansible/bitops.before-deploy.d/my-before-script.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -echo "I am a before terraform lifecycle script!" \ No newline at end of file diff --git a/docs/examples/bitops+terraform+ansible-blog/test/ansible/bitops.config.yaml b/docs/examples/bitops+terraform+ansible-blog/test/ansible/bitops.config.yaml deleted file mode 100644 index b719d8dc..00000000 --- a/docs/examples/bitops+terraform+ansible-blog/test/ansible/bitops.config.yaml +++ /dev/null @@ -1,3 +0,0 @@ -ansible: - cli: {} - options: {} \ No newline at end of file diff --git a/docs/examples/bitops+terraform+ansible-blog/test/ansible/inventory.yml b/docs/examples/bitops+terraform+ansible-blog/test/ansible/inventory.yml deleted file mode 100644 index d953d29a..00000000 --- a/docs/examples/bitops+terraform+ansible-blog/test/ansible/inventory.yml +++ /dev/null @@ -1,10 +0,0 @@ -- hosts: bitops_servers - tasks: - - name: ensure nginx is at the latest version - apt: name=nginx state=latest - become: yes - - - name: start nginx - service: - name: nginx - state: started \ No newline at end of file diff --git a/docs/examples/bitops+terraform+ansible-blog/test/ansible/playbook.yaml b/docs/examples/bitops+terraform+ansible-blog/test/ansible/playbook.yaml deleted file mode 100644 index 59e02a59..00000000 --- a/docs/examples/bitops+terraform+ansible-blog/test/ansible/playbook.yaml +++ /dev/null @@ -1,4 +0,0 @@ -- hosts: my-servers - tasks: - - debug: - msg: "Hello from Ansible!" \ No newline at end of file diff --git a/docs/examples/bitops+terraform+ansible-blog/test/terraform/bitops.after-deploy.d/my-after-script.sh b/docs/examples/bitops+terraform+ansible-blog/test/terraform/bitops.after-deploy.d/my-after-script.sh deleted file mode 100755 index dabc6d25..00000000 --- a/docs/examples/bitops+terraform+ansible-blog/test/terraform/bitops.after-deploy.d/my-after-script.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -echo "I am an after terraform lifecycle script!" \ No newline at end of file diff --git a/docs/examples/bitops+terraform+ansible-blog/test/terraform/bitops.before-deploy.d/my-before-script.sh b/docs/examples/bitops+terraform+ansible-blog/test/terraform/bitops.before-deploy.d/my-before-script.sh deleted file mode 100755 index 0224c3df..00000000 --- a/docs/examples/bitops+terraform+ansible-blog/test/terraform/bitops.before-deploy.d/my-before-script.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -aws s3api create-bucket --bucket $TF_STATE_BUCKET \ No newline at end of file diff --git a/docs/examples/bitops+terraform+ansible-blog/test/terraform/bitops.config.yaml b/docs/examples/bitops+terraform+ansible-blog/test/terraform/bitops.config.yaml deleted file mode 100644 index 0d26ee66..00000000 --- a/docs/examples/bitops+terraform+ansible-blog/test/terraform/bitops.config.yaml +++ /dev/null @@ -1,7 +0,0 @@ -terraform: - cli: {} - options: - command: apply - version: "0.13.2" - fetch-kubeconfig: false - workspace: test \ No newline at end of file diff --git a/docs/examples/bitops+terraform+ansible-blog/test/terraform/inventory.tf b/docs/examples/bitops+terraform+ansible-blog/test/terraform/inventory.tf deleted file mode 100644 index 6b95afd3..00000000 --- a/docs/examples/bitops+terraform+ansible-blog/test/terraform/inventory.tf +++ /dev/null @@ -1,13 +0,0 @@ -resource "local_file" "private_key" { - sensitive_content = tls_private_key.key.private_key_pem - filename = format("%s/%s/%s", abspath(path.root), ".ssh", "bitops-ssh-key.pem") - file_permission = "0600" -} - -resource "local_file" "ansible_inventory" { - content = templatefile("inventory.tmpl", { - ip = aws_instance.server.public_ip, - ssh_keyfile = local_file.private_key.filename - }) - filename = format("%s/%s", abspath(path.root), "inventory.yaml") -} diff --git a/docs/examples/bitops+terraform+ansible-blog/test/terraform/inventory.tmpl b/docs/examples/bitops+terraform+ansible-blog/test/terraform/inventory.tmpl deleted file mode 100644 index 9a68dab6..00000000 --- a/docs/examples/bitops+terraform+ansible-blog/test/terraform/inventory.tmpl +++ /dev/null @@ -1,6 +0,0 @@ -bitops_servers: - hosts: - ${ip} - vars: - ansible_ssh_user: ubuntu - ansible_ssh_private_key_file: ${ssh_keyfile} diff --git a/docs/examples/bitops+terraform+ansible-blog/test/terraform/main.tf b/docs/examples/bitops+terraform+ansible-blog/test/terraform/main.tf deleted file mode 100644 index 7986040c..00000000 --- a/docs/examples/bitops+terraform+ansible-blog/test/terraform/main.tf +++ /dev/null @@ -1,115 +0,0 @@ -terraform { - required_providers { - aws = { - source = "hashicorp/aws" - version = "~> 3.0" - } - } - backend "s3" { - bucket = "YOUR_BUCKET_NAME" - key = "state" - } -} - -data "aws_region" "current" {} - -resource "aws_vpc" "main" { - cidr_block = "10.0.0.0/16" -} - -resource "aws_internet_gateway" "gw" { - vpc_id = aws_vpc.main.id -} - -resource "aws_subnet" "main" { - vpc_id = aws_vpc.main.id - cidr_block = aws_vpc.main.cidr_block - availability_zone = "${data.aws_region.current.name}a" -} - -resource "aws_route_table" "rt" { - vpc_id = aws_vpc.main.id - route { - cidr_block = "0.0.0.0/0" - gateway_id = aws_internet_gateway.gw.id - } -} - -resource "aws_route_table_association" "mfi_route_table_association" { - subnet_id = aws_subnet.main.id - route_table_id = aws_route_table.rt.id -} - -data "aws_ami" "ubuntu" { - most_recent = true - filter { - name = "name" - values = ["ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*"] - } - filter { - name = "virtualization-type" - values = ["hvm"] - } - owners = ["099720109477"] -} - -resource "tls_private_key" "key" { - algorithm = "RSA" - rsa_bits = 4096 -} - -resource "aws_key_pair" "aws_key" { - key_name = "bitops-ssh-key" - public_key = tls_private_key.key.public_key_openssh -} - -resource "aws_security_group" "allow_http" { - name = "allow_http" - description = "Allow HTTP traffic" - vpc_id = aws_vpc.main.id - ingress { - description = "HTTP" - from_port = 80 - to_port = 80 - protocol = "tcp" - cidr_blocks = ["0.0.0.0/0"] - } - egress { - from_port = 0 - to_port = 0 - protocol = "-1" - cidr_blocks = ["0.0.0.0/0"] - } -} - -resource "aws_security_group" "allow_ssh" { - name = "allow_ssh" - description = "Allow SSH traffic" - vpc_id = aws_vpc.main.id - ingress { - description = "SSHC" - from_port = 22 - to_port = 22 - protocol = "tcp" - cidr_blocks = ["0.0.0.0/0"] - } - egress { - from_port = 0 - to_port = 0 - protocol = "-1" - cidr_blocks = ["0.0.0.0/0"] - } -} - -resource "aws_instance" "server" { - ami = data.aws_ami.ubuntu.id - instance_type = "t3.micro" - key_name = aws_key_pair.aws_key.key_name - associate_public_ip_address = true - subnet_id = aws_subnet.main.id - vpc_security_group_ids = [aws_security_group.allow_http.id, aws_security_group.allow_ssh.id] - - tags = { - Name = "BitOps test instance" - } -} \ No newline at end of file diff --git a/docs/examples/bitops+terraform-blog/README.md b/docs/examples/bitops+terraform-blog/README.md deleted file mode 100644 index 36a2f413..00000000 --- a/docs/examples/bitops+terraform-blog/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Bitops Operations Repo - -Welcome to Bitops! This serves as a starting point for deploying your application to the cloud. - -This repo can be run as is with -``` -docker run \ --e ENVIRONMENT="test" \ --e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \ --e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \ --e AWS_DEFAULT_REGION="us-east-2" \ --v $(pwd):/opt/bitops_deployment \ -bitovi/bitops:latest -``` - -For more information, check out official BitOps docs https://bitovi.github.io/bitops/ \ No newline at end of file diff --git a/docs/examples/bitops+terraform-blog/prod/terraform/bitops.after-deploy.d/my-after-script.sh b/docs/examples/bitops+terraform-blog/prod/terraform/bitops.after-deploy.d/my-after-script.sh deleted file mode 100755 index dabc6d25..00000000 --- a/docs/examples/bitops+terraform-blog/prod/terraform/bitops.after-deploy.d/my-after-script.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -echo "I am an after terraform lifecycle script!" \ No newline at end of file diff --git a/docs/examples/bitops+terraform-blog/prod/terraform/bitops.before-deploy.d/my-before-script.sh b/docs/examples/bitops+terraform-blog/prod/terraform/bitops.before-deploy.d/my-before-script.sh deleted file mode 100755 index 0224c3df..00000000 --- a/docs/examples/bitops+terraform-blog/prod/terraform/bitops.before-deploy.d/my-before-script.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -aws s3api create-bucket --bucket $TF_STATE_BUCKET \ No newline at end of file diff --git a/docs/examples/bitops+terraform-blog/prod/terraform/bitops.config.yaml b/docs/examples/bitops+terraform-blog/prod/terraform/bitops.config.yaml deleted file mode 100644 index 20855e71..00000000 --- a/docs/examples/bitops+terraform-blog/prod/terraform/bitops.config.yaml +++ /dev/null @@ -1,7 +0,0 @@ -terraform: - cli: {} - options: - command: apply - version: "0.13.2" - fetch-kubeconfig: false - workspace: prod \ No newline at end of file diff --git a/docs/examples/bitops+terraform-blog/prod/terraform/main.tf b/docs/examples/bitops+terraform-blog/prod/terraform/main.tf deleted file mode 100644 index 38089c9f..00000000 --- a/docs/examples/bitops+terraform-blog/prod/terraform/main.tf +++ /dev/null @@ -1,18 +0,0 @@ -terraform { - required_providers { - aws = { - source = "hashicorp/aws" - version = "~> 3.0" - } - } - backend "s3" { - bucket = "YOUR_BUCKET_NAME" - key = "state" - } -} -resource "aws_vpc" "example" { - cidr_block = "10.0.0.0/16" - tags = { - Name = "BitOps Prod Network" - } -} diff --git a/docs/examples/bitops+terraform-blog/test/terraform/bitops.after-deploy.d/my-after-script.sh b/docs/examples/bitops+terraform-blog/test/terraform/bitops.after-deploy.d/my-after-script.sh deleted file mode 100755 index dabc6d25..00000000 --- a/docs/examples/bitops+terraform-blog/test/terraform/bitops.after-deploy.d/my-after-script.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -echo "I am an after terraform lifecycle script!" \ No newline at end of file diff --git a/docs/examples/bitops+terraform-blog/test/terraform/bitops.before-deploy.d/my-before-script.sh b/docs/examples/bitops+terraform-blog/test/terraform/bitops.before-deploy.d/my-before-script.sh deleted file mode 100755 index 0224c3df..00000000 --- a/docs/examples/bitops+terraform-blog/test/terraform/bitops.before-deploy.d/my-before-script.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -aws s3api create-bucket --bucket $TF_STATE_BUCKET \ No newline at end of file diff --git a/docs/examples/bitops+terraform-blog/test/terraform/bitops.config.yaml b/docs/examples/bitops+terraform-blog/test/terraform/bitops.config.yaml deleted file mode 100644 index 0d26ee66..00000000 --- a/docs/examples/bitops+terraform-blog/test/terraform/bitops.config.yaml +++ /dev/null @@ -1,7 +0,0 @@ -terraform: - cli: {} - options: - command: apply - version: "0.13.2" - fetch-kubeconfig: false - workspace: test \ No newline at end of file diff --git a/docs/examples/bitops+terraform-blog/test/terraform/main.tf b/docs/examples/bitops+terraform-blog/test/terraform/main.tf deleted file mode 100644 index 043f1773..00000000 --- a/docs/examples/bitops+terraform-blog/test/terraform/main.tf +++ /dev/null @@ -1,18 +0,0 @@ -terraform { - required_providers { - aws = { - source = "hashicorp/aws" - version = "~> 3.0" - } - } - backend "s3" { - bucket = "my-bitops-bucket" - key = "state" - } -} -resource "aws_vpc" "example" { - cidr_block = "10.0.0.0/16" - tags = { - Name = "BitOps Test Network" - } -} diff --git a/docs/examples/bitops-deploy-heyemoji/README.md b/docs/examples/bitops-deploy-heyemoji/README.md deleted file mode 100644 index 36a2f413..00000000 --- a/docs/examples/bitops-deploy-heyemoji/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Bitops Operations Repo - -Welcome to Bitops! This serves as a starting point for deploying your application to the cloud. - -This repo can be run as is with -``` -docker run \ --e ENVIRONMENT="test" \ --e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \ --e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \ --e AWS_DEFAULT_REGION="us-east-2" \ --v $(pwd):/opt/bitops_deployment \ -bitovi/bitops:latest -``` - -For more information, check out official BitOps docs https://bitovi.github.io/bitops/ \ No newline at end of file diff --git a/docs/examples/bitops-deploy-heyemoji/test/ansible/ansible.cfg b/docs/examples/bitops-deploy-heyemoji/test/ansible/ansible.cfg deleted file mode 100644 index 95bf2401..00000000 --- a/docs/examples/bitops-deploy-heyemoji/test/ansible/ansible.cfg +++ /dev/null @@ -1,7 +0,0 @@ -[defaults] -inventory=../terraform/inventory.yaml -host_key_checking = False -transport = ssh - -[ssh_connection] -ssh_args = -o ForwardAgent=yes \ No newline at end of file diff --git a/docs/examples/bitops-deploy-heyemoji/test/ansible/bitops.config.yaml b/docs/examples/bitops-deploy-heyemoji/test/ansible/bitops.config.yaml deleted file mode 100644 index b719d8dc..00000000 --- a/docs/examples/bitops-deploy-heyemoji/test/ansible/bitops.config.yaml +++ /dev/null @@ -1,3 +0,0 @@ -ansible: - cli: {} - options: {} \ No newline at end of file diff --git a/docs/examples/bitops-deploy-heyemoji/test/ansible/playbook.yaml b/docs/examples/bitops-deploy-heyemoji/test/ansible/playbook.yaml deleted file mode 100644 index a829f315..00000000 --- a/docs/examples/bitops-deploy-heyemoji/test/ansible/playbook.yaml +++ /dev/null @@ -1,15 +0,0 @@ -- hosts: heyemoji_blog_servers - become: true - vars_files: - - vars/default.yml - tasks: - - name: Include install - include_tasks: tasks/install.yml - - name: Include fetch - include_tasks: tasks/fetch.yml - - name: Include build - include_tasks: tasks/build.yml - - name: Include start - include_tasks: tasks/start.yml - - debug: - msg: "Hello from Ansible!" \ No newline at end of file diff --git a/docs/examples/bitops-deploy-heyemoji/test/ansible/tasks/build.yml b/docs/examples/bitops-deploy-heyemoji/test/ansible/tasks/build.yml deleted file mode 100644 index f3272e71..00000000 --- a/docs/examples/bitops-deploy-heyemoji/test/ansible/tasks/build.yml +++ /dev/null @@ -1,7 +0,0 @@ -- name: build container image - docker_image: - name: "{{ default_container_image }}" - build: - path: "{{ heyemoji_path }}" - source: build - state: present \ No newline at end of file diff --git a/docs/examples/bitops-deploy-heyemoji/test/ansible/tasks/fetch.yml b/docs/examples/bitops-deploy-heyemoji/test/ansible/tasks/fetch.yml deleted file mode 100644 index 8cfa0a04..00000000 --- a/docs/examples/bitops-deploy-heyemoji/test/ansible/tasks/fetch.yml +++ /dev/null @@ -1,5 +0,0 @@ -- name: git clone heyemoji - git: - repo: "{{ heyemoji_repo }}" - dest: "{{ heyemoji_path }}" - become: no \ No newline at end of file diff --git a/docs/examples/bitops-deploy-heyemoji/test/ansible/tasks/install.yml b/docs/examples/bitops-deploy-heyemoji/test/ansible/tasks/install.yml deleted file mode 100644 index 4c8c70c7..00000000 --- a/docs/examples/bitops-deploy-heyemoji/test/ansible/tasks/install.yml +++ /dev/null @@ -1,24 +0,0 @@ -# install docker -- name: Install aptitude using apt - apt: name=aptitude state=latest update_cache=yes force_apt_get=yes - -- name: Install required system packages - apt: name={{ item }} state=latest update_cache=yes - loop: [ 'apt-transport-https', 'ca-certificates', 'curl', 'software-properties-common', 'python3-pip', 'virtualenv', 'python3-setuptools'] - -- name: Add Docker GPG apt Key - apt_key: - url: https://download.docker.com/linux/ubuntu/gpg - state: present - -- name: Add Docker Repository - apt_repository: - repo: deb https://download.docker.com/linux/ubuntu bionic stable - state: present - -- name: Update apt and install docker-ce - apt: update_cache=yes name=docker-ce state=latest - -- name: Install Docker Module for Python - pip: - name: docker \ No newline at end of file diff --git a/docs/examples/bitops-deploy-heyemoji/test/ansible/tasks/start.yml b/docs/examples/bitops-deploy-heyemoji/test/ansible/tasks/start.yml deleted file mode 100644 index efc07ec3..00000000 --- a/docs/examples/bitops-deploy-heyemoji/test/ansible/tasks/start.yml +++ /dev/null @@ -1,20 +0,0 @@ -- name: Create default containers - docker_container: - name: "{{ default_container_name }}{{ item }}" - image: "{{ default_container_image }}" - command: "{{ default_container_command }}" - exposed_ports: "{{ heyemoji_websocket_port }}" - env: - HEY_BOT_NAME: "{{ heyemoji_bot_name }}" - HEY_DATABASE_PATH: "{{ heyemoji_database_path }}" - HEY_SLACK_TOKEN: "{{ heyemoji_slack_api_token }}" - HEY_SLACK_EMOJI: "{{ heyemoji_slack_emoji }}" - HEY_SLACK_DAILY_CAP: "{{ heyemoji_slack_daily_cap }}" - HEY_WEBSOCKET_PORT: "{{ heyemoji_websocket_port }}" - # restart a container - # state: started - register: command_start_result - loop: "{{ range(0, create_containers, 1)|list }}" - -- debug: - var: command_start_result.0.stdout_lines diff --git a/docs/examples/bitops-deploy-heyemoji/test/ansible/vars/default.yml b/docs/examples/bitops-deploy-heyemoji/test/ansible/vars/default.yml deleted file mode 100644 index baa2a841..00000000 --- a/docs/examples/bitops-deploy-heyemoji/test/ansible/vars/default.yml +++ /dev/null @@ -1,15 +0,0 @@ -heyemoji_repo: "https://github.com/mmcdole/heyemoji.git" -heyemoji_path: /home/ubuntu/heyemoji - -heyemoji_bot_name: heyemoji-dev -heyemoji_database_path: ./data/ -heyemoji_slack_api_token: "{{ lookup('env', 'HEYEMOJI_SLACK_API_TOKEN') }}" -heyemoji_slack_emoji: star:1 -heyemoji_slack_daily_cap: "5" -heyemoji_websocket_port: "3334" - -create_containers: 1 -default_container_image: heyemoji:latest -default_container_name: heyemoji -default_container_image: ubuntu -default_container_command: /heyemoji \ No newline at end of file diff --git a/docs/examples/bitops-deploy-heyemoji/test/terraform/ami.tf b/docs/examples/bitops-deploy-heyemoji/test/terraform/ami.tf deleted file mode 100644 index e61db11d..00000000 --- a/docs/examples/bitops-deploy-heyemoji/test/terraform/ami.tf +++ /dev/null @@ -1,16 +0,0 @@ -data "aws_ami" "ubuntu" { - most_recent = true - owners = ["099720109477"] - filter { - name = "name" - values = ["ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*"] - } - filter { - name = "virtualization-type" - values = ["hvm"] - } - - tags = { - Name = "HeyEmoji-Blog" - } -} \ No newline at end of file diff --git a/docs/examples/bitops-deploy-heyemoji/test/terraform/bitops.after-deploy.d/my-after-script.sh b/docs/examples/bitops-deploy-heyemoji/test/terraform/bitops.after-deploy.d/my-after-script.sh deleted file mode 100755 index dabc6d25..00000000 --- a/docs/examples/bitops-deploy-heyemoji/test/terraform/bitops.after-deploy.d/my-after-script.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -echo "I am an after terraform lifecycle script!" \ No newline at end of file diff --git a/docs/examples/bitops-deploy-heyemoji/test/terraform/bitops.before-deploy.d/my-before-script.sh b/docs/examples/bitops-deploy-heyemoji/test/terraform/bitops.before-deploy.d/my-before-script.sh deleted file mode 100755 index 38adcf21..00000000 --- a/docs/examples/bitops-deploy-heyemoji/test/terraform/bitops.before-deploy.d/my-before-script.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -aws s3api create-bucket --bucket heyemoji-blog --region $AWS_DEFAULT_REGION --create-bucket-configuration LocationConstraint=$AWS_DEFAULT_REGION || true \ No newline at end of file diff --git a/docs/examples/bitops-deploy-heyemoji/test/terraform/bitops.config.yaml b/docs/examples/bitops-deploy-heyemoji/test/terraform/bitops.config.yaml deleted file mode 100644 index 8ab52e5b..00000000 --- a/docs/examples/bitops-deploy-heyemoji/test/terraform/bitops.config.yaml +++ /dev/null @@ -1,6 +0,0 @@ -terraform: - cli: {} - options: - command: apply - version: "0.13.2" - fetch-kubeconfig: false \ No newline at end of file diff --git a/docs/examples/bitops-deploy-heyemoji/test/terraform/instance.tf b/docs/examples/bitops-deploy-heyemoji/test/terraform/instance.tf deleted file mode 100644 index 501f4607..00000000 --- a/docs/examples/bitops-deploy-heyemoji/test/terraform/instance.tf +++ /dev/null @@ -1,23 +0,0 @@ -resource "tls_private_key" "key" { - algorithm = "RSA" - rsa_bits = 4096 -} - -resource "aws_key_pair" "aws_key" { - key_name = "heyemoji-blog-ssh-key" - public_key = tls_private_key.key.public_key_openssh -} - -resource "aws_instance" "server" { - ami = data.aws_ami.ubuntu.id - instance_type = "t3.micro" - key_name = aws_key_pair.aws_key.key_name - associate_public_ip_address = true - subnet_id = aws_subnet.main.id - vpc_security_group_ids = [aws_security_group.allow_traffic.id] - monitoring = true - - tags = { - Name = "HeyEmoji-blog" - } -} \ No newline at end of file diff --git a/docs/examples/bitops-deploy-heyemoji/test/terraform/inventory.tmpl b/docs/examples/bitops-deploy-heyemoji/test/terraform/inventory.tmpl deleted file mode 100644 index d487beac..00000000 --- a/docs/examples/bitops-deploy-heyemoji/test/terraform/inventory.tmpl +++ /dev/null @@ -1,6 +0,0 @@ -heyemoji_blog_servers: - hosts: - ${ip} - vars: - ansible_ssh_user: ubuntu - ansible_ssh_private_key_file: ${ssh_keyfile} \ No newline at end of file diff --git a/docs/examples/bitops-deploy-heyemoji/test/terraform/locals.tf b/docs/examples/bitops-deploy-heyemoji/test/terraform/locals.tf deleted file mode 100644 index f141b9aa..00000000 --- a/docs/examples/bitops-deploy-heyemoji/test/terraform/locals.tf +++ /dev/null @@ -1,14 +0,0 @@ -resource "local_file" "private_key" { - # This creates a keyfile pair that allows ansible to connect to the ec2 container - sensitive_content = tls_private_key.key.private_key_pem - filename = format("%s/%s/%s", abspath(path.root), ".ssh", "heyemoji-blog-ssh-key.pem") - file_permission = "0600" -} - -resource "local_file" "ansible_inventory" { - content = templatefile("inventory.tmpl", { - ip = aws_instance.server.public_ip, - ssh_keyfile = local_file.private_key.filename - }) - filename = format("%s/%s", abspath(path.root), "inventory.yaml") -} \ No newline at end of file diff --git a/docs/examples/bitops-deploy-heyemoji/test/terraform/providers.tf b/docs/examples/bitops-deploy-heyemoji/test/terraform/providers.tf deleted file mode 100644 index 0be2ea03..00000000 --- a/docs/examples/bitops-deploy-heyemoji/test/terraform/providers.tf +++ /dev/null @@ -1,24 +0,0 @@ -terraform { - required_version = ">= 0.12" - backend "s3" { - bucket = "heyemoji-blog" - key = "state" - } -} - -provider "local" { - version = "~> 1.2" -} - -provider "null" { - version = "~> 2.1" -} - -provider "template" { - version = "~> 2.1" -} - -provider "aws" { - version = ">= 2.28.1" - region = "us-east-2" -} \ No newline at end of file diff --git a/docs/examples/bitops-deploy-heyemoji/test/terraform/security-groups.tf b/docs/examples/bitops-deploy-heyemoji/test/terraform/security-groups.tf deleted file mode 100644 index ef10ea61..00000000 --- a/docs/examples/bitops-deploy-heyemoji/test/terraform/security-groups.tf +++ /dev/null @@ -1,46 +0,0 @@ -/* local vars */ -locals { - aws_tags = { - RepoName = " mmcdole/heyemoji" - OpsRepoEnvironment = "blog-test" - OpsRepoApp = "heyemoji-blog" - } -} - - -resource "aws_security_group" "allow_traffic" { - name = "allow_traffic" - description = "Allow traffic" - vpc_id = aws_vpc.main.id - ingress = [{ - description = "SSH" - from_port = 22 - to_port = 22 - protocol = "tcp" - cidr_blocks = ["0.0.0.0/0"] - ipv6_cidr_blocks = null - prefix_list_ids = null - security_groups = null - self = null - - },{ - description = "WEBSOCKET" - from_port = 3334 - to_port = 3334 - protocol = "tcp" - cidr_blocks = ["0.0.0.0/0"] - ipv6_cidr_blocks = null - prefix_list_ids = null - security_groups = null - self = null - }] - egress { - from_port = 0 - to_port = 0 - protocol = "-1" - cidr_blocks = ["0.0.0.0/0"] - } - tags = merge(local.aws_tags,{ - Name = "heyemoji-blog-sg" - }) -} \ No newline at end of file diff --git a/docs/examples/bitops-deploy-heyemoji/test/terraform/vars.tf b/docs/examples/bitops-deploy-heyemoji/test/terraform/vars.tf deleted file mode 100644 index 267af318..00000000 --- a/docs/examples/bitops-deploy-heyemoji/test/terraform/vars.tf +++ /dev/null @@ -1,10 +0,0 @@ -/* set up env variables */ -variable "AWS_DEFAULT_REGION" { - type = string - description = "AWS region" -} -variable "TF_STATE_BUCKET" { - type = string - description = "Terraform state bucket" -} - diff --git a/docs/examples/bitops-deploy-heyemoji/test/terraform/vpc.tf b/docs/examples/bitops-deploy-heyemoji/test/terraform/vpc.tf deleted file mode 100644 index 8438e7b3..00000000 --- a/docs/examples/bitops-deploy-heyemoji/test/terraform/vpc.tf +++ /dev/null @@ -1,35 +0,0 @@ -/* get region from AWS_DEFAULT_REGION */ -data "aws_region" "current" {} - -resource "aws_vpc" "main" { - cidr_block = "10.0.0.0/16" - tags = merge(local.aws_tags,{ - Name = "heyemoji-blog-vpc" - }) -} - -resource "aws_internet_gateway" "gw" { - vpc_id = aws_vpc.main.id - tags = local.aws_tags -} - -resource "aws_subnet" "main" { - vpc_id = aws_vpc.main.id - cidr_block = aws_vpc.main.cidr_block - availability_zone = "${data.aws_region.current.name}a" - tags = local.aws_tags -} - -resource "aws_route_table" "rt" { - vpc_id = aws_vpc.main.id - route { - cidr_block = "0.0.0.0/0" - gateway_id = aws_internet_gateway.gw.id - } - tags = local.aws_tags -} - -resource "aws_route_table_association" "mfi_route_table_association" { - subnet_id = aws_subnet.main.id - route_table_id = aws_route_table.rt.id -} \ No newline at end of file diff --git a/docs/examples/bitops2-terraform-blog/README.md b/docs/examples/bitops2-terraform-blog/README.md deleted file mode 100644 index 0cf0d89d..00000000 --- a/docs/examples/bitops2-terraform-blog/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# Bitops Operations Repo - -This example shows a minimal Terraform configuration that creates an EKS cluster in `test` environment with a shared `_default` dir as an introduction to BitOps v2.0. - - - -See our blog post [Getting started with BitOps v2.0 - Terraform](https://www.bitovi.com/blog/getting-started-with-bitops-v2-terraform) on how this is used - -``` -docker run --rm \ --e BITOPS_ENVIRONMENT="test" \ --e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \ --e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \ --e AWS_DEFAULT_REGION="us-east-2" \ --v $(pwd):/opt/bitops_deployment \ ---pull always \ -bitovi/bitops:2.0.0 -``` - -For more information, check out official BitOps docs https://bitovi.github.io/bitops/ \ No newline at end of file diff --git a/docs/examples/bitops2-terraform-blog/_default/_tf_modules/eks/createcluster.tf b/docs/examples/bitops2-terraform-blog/_default/_tf_modules/eks/createcluster.tf deleted file mode 100644 index c63ddcd6..00000000 --- a/docs/examples/bitops2-terraform-blog/_default/_tf_modules/eks/createcluster.tf +++ /dev/null @@ -1,48 +0,0 @@ -module "vpc" { - # https://registry.terraform.io/modules/terraform-aws-modules/vpc/aws/latest - source = "terraform-aws-modules/vpc/aws" - version = "3.12.0" - - name = var.cluster_name - cidr = "10.0.0.0/16" - - azs = ["us-east-2a", "us-east-2b", "us-east-2c"] - private_subnets = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"] - public_subnets = ["10.0.101.0/24", "10.0.102.0/24", "10.0.103.0/24"] - - enable_nat_gateway = true - single_nat_gateway = true - one_nat_gateway_per_az = false - - private_subnet_tags = { - "kubernetes.io/cluster/${var.cluster_name}" = "owned" - } -} - -module "eks" { - # https://registry.terraform.io/modules/terraform-aws-modules/eks/aws/latest - source = "terraform-aws-modules/eks/aws" - version = "18.26.6" - - cluster_name = var.cluster_name - cluster_version = var.cluster_version - - vpc_id = module.vpc.vpc_id - subnet_ids = module.vpc.private_subnets - - eks_managed_node_groups = { - initial = { - instance_types = var.instance_types - create_security_group = false - attach_cluster_primary_security_group = true - - min_size = var.node_min - max_size = var.node_max - desired_size = var.node_desired - } - } - - tags = { - "CreatedBy" = "BitOps" - } -} diff --git a/docs/examples/bitops2-terraform-blog/_default/_tf_modules/eks/variables.tf b/docs/examples/bitops2-terraform-blog/_default/_tf_modules/eks/variables.tf deleted file mode 100644 index 717522d1..00000000 --- a/docs/examples/bitops2-terraform-blog/_default/_tf_modules/eks/variables.tf +++ /dev/null @@ -1,7 +0,0 @@ -variable "cluster_version" {} -variable "cluster_name" {} -variable "instance_types" {} -variable "node_min" {} -variable "node_max" {} -variable "node_desired" {} -variable "region" {} diff --git a/docs/examples/bitops2-terraform-blog/test/terraform/bitops.config.yaml b/docs/examples/bitops2-terraform-blog/test/terraform/bitops.config.yaml deleted file mode 100644 index c949a5d7..00000000 --- a/docs/examples/bitops2-terraform-blog/test/terraform/bitops.config.yaml +++ /dev/null @@ -1 +0,0 @@ -terraform: {} diff --git a/docs/examples/bitops2-terraform-blog/test/terraform/main.tf b/docs/examples/bitops2-terraform-blog/test/terraform/main.tf deleted file mode 100644 index 3b211ebd..00000000 --- a/docs/examples/bitops2-terraform-blog/test/terraform/main.tf +++ /dev/null @@ -1,31 +0,0 @@ -terraform { - required_version = ">= 1.1.2" - required_providers { - aws = { - source = "hashicorp/aws" - version = ">=3.63.0" - } - } - backend "s3" { - region = "us-east-2" - bucket = "bitovi-terraform-remote-state" - encrypt = true - # dynamodb_table = "terraform-remote-state-lock" - key = "test.bitops.create-cluster" - } -} -provider "aws" { - region = "us-east-2" -} - -module "eks-cluster" { - source = "../../default/terraform" - cluster_version = var.cluster_version - cluster_name = var.cluster_name - - instance_types = var.instance_types - node_min = var.node_min - node_max = var.node_max - node_desired = var.node_desired - region = var.region -} diff --git a/docs/examples/bitops2-terraform-blog/test/terraform/test-vars.auto.tfvars.json b/docs/examples/bitops2-terraform-blog/test/terraform/test-vars.auto.tfvars.json deleted file mode 100644 index 8342ea14..00000000 --- a/docs/examples/bitops2-terraform-blog/test/terraform/test-vars.auto.tfvars.json +++ /dev/null @@ -1,11 +0,0 @@ - { - "region": "us-east-2", - - "cluster_name": "bitops_test", - "cluster_version": "1.22", - - "instance_types": ["t3.small"], - "node_min": "1", - "node_max": "3", - "node_desired": "2" -} diff --git a/docs/examples/bitops2-terraform-blog/test/terraform/variables.tf b/docs/examples/bitops2-terraform-blog/test/terraform/variables.tf deleted file mode 100644 index 717522d1..00000000 --- a/docs/examples/bitops2-terraform-blog/test/terraform/variables.tf +++ /dev/null @@ -1,7 +0,0 @@ -variable "cluster_version" {} -variable "cluster_name" {} -variable "instance_types" {} -variable "node_min" {} -variable "node_max" {} -variable "node_desired" {} -variable "region" {} diff --git a/docs/examples/cloudformation-combine-parms/test/cloudformation/bitops.after-deploy.d/my-after-script.sh b/docs/examples/cloudformation-combine-parms/test/cloudformation/bitops.after-deploy.d/my-after-script.sh deleted file mode 100755 index 510a131f..00000000 --- a/docs/examples/cloudformation-combine-parms/test/cloudformation/bitops.after-deploy.d/my-after-script.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -echo "I am an after cloudformation lifecycle script!" \ No newline at end of file diff --git a/docs/examples/cloudformation-combine-parms/test/cloudformation/bitops.before-deploy.d/my-before-script.sh b/docs/examples/cloudformation-combine-parms/test/cloudformation/bitops.before-deploy.d/my-before-script.sh deleted file mode 100755 index 9d4789ea..00000000 --- a/docs/examples/cloudformation-combine-parms/test/cloudformation/bitops.before-deploy.d/my-before-script.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -echo "I am a before cloudformation lifecycle script!" \ No newline at end of file diff --git a/docs/examples/cloudformation-combine-parms/test/cloudformation/bitops.config.yaml b/docs/examples/cloudformation-combine-parms/test/cloudformation/bitops.config.yaml deleted file mode 100644 index 48cbeb9b..00000000 --- a/docs/examples/cloudformation-combine-parms/test/cloudformation/bitops.config.yaml +++ /dev/null @@ -1,14 +0,0 @@ -cloudformation: - cli: - validate-cfn: true - cfn-stack-action: deploy - options: - cfn-stack-name: bitops-stack-test - cfn-files: - template-file: template.yaml - parameters: - enabled: true - template-param-file: parameters.json - cfn-merge-parameters: - parameters: - enabled: true \ No newline at end of file diff --git a/docs/examples/cloudformation-combine-parms/test/cloudformation/parameters.json b/docs/examples/cloudformation-combine-parms/test/cloudformation/parameters.json deleted file mode 100644 index 4a7f4a9c..00000000 --- a/docs/examples/cloudformation-combine-parms/test/cloudformation/parameters.json +++ /dev/null @@ -1,7 +0,0 @@ -[ - { - "ParameterKey": "BucketName", - "ParameterValue": "bitops-s3-bucket", - "UsePreviousValue": false - } -] \ No newline at end of file diff --git a/docs/examples/cloudformation-combine-parms/test/cloudformation/parameters/secrets.json b/docs/examples/cloudformation-combine-parms/test/cloudformation/parameters/secrets.json deleted file mode 100644 index 2750c352..00000000 --- a/docs/examples/cloudformation-combine-parms/test/cloudformation/parameters/secrets.json +++ /dev/null @@ -1,4 +0,0 @@ -[{ - "key": "apple", - "value": "banana" -}] \ No newline at end of file diff --git a/docs/examples/cloudformation-combine-parms/test/cloudformation/parameters/version.json b/docs/examples/cloudformation-combine-parms/test/cloudformation/parameters/version.json deleted file mode 100644 index b710e26e..00000000 --- a/docs/examples/cloudformation-combine-parms/test/cloudformation/parameters/version.json +++ /dev/null @@ -1,6 +0,0 @@ -[ - { - "key": "foo", - "value": "bar" - } -] \ No newline at end of file diff --git a/docs/examples/cloudformation-combine-parms/test/cloudformation/template.yaml b/docs/examples/cloudformation-combine-parms/test/cloudformation/template.yaml deleted file mode 100644 index 41babba5..00000000 --- a/docs/examples/cloudformation-combine-parms/test/cloudformation/template.yaml +++ /dev/null @@ -1,26 +0,0 @@ ---- -AWSTemplateFormatVersion: '2010-09-09' -Description: Simple S3 Bucket -Parameters: - BucketName: - Type: String - Description: The name of the S3 Bucket to create -Metadata: - AWS::CloudFormation::Interface: - ParameterLabels: - BucketName: - default: S3 Bucket Name -Resources: - S3Bucket: - Type: AWS::S3::Bucket - Properties: - BucketName: !Ref BucketName - PublicAccessBlockConfiguration: - BlockPublicAcls: true - BlockPublicPolicy: true - IgnorePublicAcls: true - RestrictPublicBuckets: true -Outputs: - S3Bucket: - Value: !Ref S3Bucket - Description: S3 Bucket for object storage \ No newline at end of file diff --git a/docs/examples/helm-default-environment/README.md b/docs/examples/helm-default-environment/README.md deleted file mode 100644 index cf9cac2a..00000000 --- a/docs/examples/helm-default-environment/README.md +++ /dev/null @@ -1,10 +0,0 @@ -To run this example, open a terminal in this directory and run -``` -docker run \ --e ENVIRONMENT="test" \ --e AWS_ACCESS_KEY_ID=skip \ --e AWS_SECRET_ACCESS_KEY=skip \ --e AWS_DEFAULT_REGION="us-east-1" \ --v $(pwd):/opt/bitops_deployment \ -bitovi/bitops:latest -``` diff --git a/docs/examples/helm-default-environment/default/helm/my-first-chart/values-files/my-first-chart-default-values.yaml b/docs/examples/helm-default-environment/default/helm/my-first-chart/values-files/my-first-chart-default-values.yaml deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/examples/helm-default-environment/default/helm/my-first-chart/values-versions.yaml b/docs/examples/helm-default-environment/default/helm/my-first-chart/values-versions.yaml deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/examples/helm-default-environment/default/helm/my-first-chart/values.yaml b/docs/examples/helm-default-environment/default/helm/my-first-chart/values.yaml deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/examples/helm-default-environment/test/helm/bitops.config.yaml b/docs/examples/helm-default-environment/test/helm/bitops.config.yaml deleted file mode 100644 index 280f67b8..00000000 --- a/docs/examples/helm-default-environment/test/helm/bitops.config.yaml +++ /dev/null @@ -1,3 +0,0 @@ -helm: - cli: {} - options: {} \ No newline at end of file diff --git a/docs/examples/helm-default-environment/test/helm/my-first-chart/values-files/my-first-chart-values.yaml b/docs/examples/helm-default-environment/test/helm/my-first-chart/values-files/my-first-chart-values.yaml deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/examples/helm-default-environment/test/helm/my-first-chart/values-versions.yaml b/docs/examples/helm-default-environment/test/helm/my-first-chart/values-versions.yaml deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/examples/helm-default-environment/test/helm/my-first-chart/values.yaml b/docs/examples/helm-default-environment/test/helm/my-first-chart/values.yaml deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/examples/operations-repo-empty/production-serviceA/ansible/bitops.config.yml b/docs/examples/operations-repo-empty/production-serviceA/ansible/bitops.config.yml deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/examples/operations-repo-empty/production-serviceA/cloudformation/bitops.config.yml b/docs/examples/operations-repo-empty/production-serviceA/cloudformation/bitops.config.yml deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/examples/operations-repo-empty/production-serviceA/helm/bitops.config.yml b/docs/examples/operations-repo-empty/production-serviceA/helm/bitops.config.yml deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/examples/operations-repo-empty/production-serviceA/helm/chartA/bitops.config.yml b/docs/examples/operations-repo-empty/production-serviceA/helm/chartA/bitops.config.yml deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/examples/operations-repo-empty/production-serviceA/helm/chartB/bitops.config.yml b/docs/examples/operations-repo-empty/production-serviceA/helm/chartB/bitops.config.yml deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/examples/operations-repo-empty/production-serviceA/terraform/bitops.config.yml b/docs/examples/operations-repo-empty/production-serviceA/terraform/bitops.config.yml deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/examples/operations-repo-empty/test-serviceA/ansible/bitops.config.yml b/docs/examples/operations-repo-empty/test-serviceA/ansible/bitops.config.yml deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/examples/operations-repo-empty/test-serviceA/cloudformation/bitops.config.yml b/docs/examples/operations-repo-empty/test-serviceA/cloudformation/bitops.config.yml deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/examples/operations-repo-empty/test-serviceA/helm/bitops.config.yml b/docs/examples/operations-repo-empty/test-serviceA/helm/bitops.config.yml deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/examples/operations-repo-empty/test-serviceA/helm/chartA/bitops.config.yml b/docs/examples/operations-repo-empty/test-serviceA/helm/chartA/bitops.config.yml deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/examples/operations-repo-empty/test-serviceA/helm/chartB/bitops.config.yml b/docs/examples/operations-repo-empty/test-serviceA/helm/chartB/bitops.config.yml deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/examples/operations-repo-empty/test-serviceA/terraform/bitops.config.yml b/docs/examples/operations-repo-empty/test-serviceA/terraform/bitops.config.yml deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/examples/terraform-and-ansible/README.md b/docs/examples/terraform-and-ansible/README.md deleted file mode 100644 index 6ff0c896..00000000 --- a/docs/examples/terraform-and-ansible/README.md +++ /dev/null @@ -1,64 +0,0 @@ -This example shows how terraform could be used to provision infrastructure and then passed on to ansible for configuration. - -To run this example, open a terminal in this directory and run -``` -docker run \ --e ENVIRONMENT="test" \ --e AWS_ACCESS_KEY_ID=skip \ --e AWS_SECRET_ACCESS_KEY=skip \ --e AWS_DEFAULT_REGION="us-east-1" \ --v $(pwd):/opt/bitops_deployment \ -bitovi/bitops:latest -``` - -In the logs you will see: - -Creation of `hosts.yaml` -``` -Terraform will perform the following actions: - - # local_file.ansible_inventory will be created - + resource "local_file" "ansible_inventory" { - + content = <<~EOT - my-servers: - hosts: - localhost - vars: - ansible_connection: local - EOT - + directory_permission = "0777" - + file_permission = "0777" - + filename = "/tmp/tmp.hxYnhz1NCU/test/terraform/hosts.yaml" - + id = (known after apply) - } - - # null_resource.test_resource will be created - + resource "null_resource" "test_resource" { - + id = (known after apply) - } - -Plan: 2 to add, 0 to change, 0 to destroy. -``` - -A terraform post hook showing the contents of `hosts.yaml` -``` -+ cat hosts.yaml -my-servers: - hosts: - localhost - vars: - ansible_connection: local -``` - -The ansible playbook running using `hosts.yaml` as its input -``` -ok: [localhost] - -TASK [debug] ******************************************************************* -ok: [localhost] => { - "msg": "ansible debug" -} - -PLAY RECAP ********************************************************************* -localhost : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 -``` \ No newline at end of file diff --git a/docs/examples/terraform-and-ansible/test/ansible/ansible.cfg b/docs/examples/terraform-and-ansible/test/ansible/ansible.cfg deleted file mode 100644 index 306cca4c..00000000 --- a/docs/examples/terraform-and-ansible/test/ansible/ansible.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[defaults] -inventory=../terraform/hosts.yaml \ No newline at end of file diff --git a/docs/examples/terraform-and-ansible/test/ansible/bitops.config.yaml b/docs/examples/terraform-and-ansible/test/ansible/bitops.config.yaml deleted file mode 100644 index b719d8dc..00000000 --- a/docs/examples/terraform-and-ansible/test/ansible/bitops.config.yaml +++ /dev/null @@ -1,3 +0,0 @@ -ansible: - cli: {} - options: {} \ No newline at end of file diff --git a/docs/examples/terraform-and-ansible/test/ansible/playbook.yaml b/docs/examples/terraform-and-ansible/test/ansible/playbook.yaml deleted file mode 100644 index 2997bb15..00000000 --- a/docs/examples/terraform-and-ansible/test/ansible/playbook.yaml +++ /dev/null @@ -1,4 +0,0 @@ -- hosts: my-servers - tasks: - - debug: - msg: "ansible debug" \ No newline at end of file diff --git a/docs/examples/terraform-and-ansible/test/terraform/bitops.after-deploy.d/debug-ansible-inventory.sh b/docs/examples/terraform-and-ansible/test/terraform/bitops.after-deploy.d/debug-ansible-inventory.sh deleted file mode 100755 index 68f5ca33..00000000 --- a/docs/examples/terraform-and-ansible/test/terraform/bitops.after-deploy.d/debug-ansible-inventory.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -cat hosts.yaml \ No newline at end of file diff --git a/docs/examples/terraform-and-ansible/test/terraform/bitops.config.yaml b/docs/examples/terraform-and-ansible/test/terraform/bitops.config.yaml deleted file mode 100644 index 8ab52e5b..00000000 --- a/docs/examples/terraform-and-ansible/test/terraform/bitops.config.yaml +++ /dev/null @@ -1,6 +0,0 @@ -terraform: - cli: {} - options: - command: apply - version: "0.13.2" - fetch-kubeconfig: false \ No newline at end of file diff --git a/docs/examples/terraform-and-ansible/test/terraform/hosts.tmpl b/docs/examples/terraform-and-ansible/test/terraform/hosts.tmpl deleted file mode 100644 index 09426005..00000000 --- a/docs/examples/terraform-and-ansible/test/terraform/hosts.tmpl +++ /dev/null @@ -1,5 +0,0 @@ -my-servers: - hosts: - ${ip} - vars: - ansible_connection: local \ No newline at end of file diff --git a/docs/examples/terraform-and-ansible/test/terraform/main.tf b/docs/examples/terraform-and-ansible/test/terraform/main.tf deleted file mode 100644 index 6d08d487..00000000 --- a/docs/examples/terraform-and-ansible/test/terraform/main.tf +++ /dev/null @@ -1,12 +0,0 @@ -resource "null_resource" "test_resource" { - provisioner "local-exec" { - command = "echo I am a test terraform resource" - } -} - -resource "local_file" "ansible_inventory" { - content = templatefile("hosts.tmpl", { - ip = "localhost" - }) - filename = format("%s/%s", abspath(path.root), "hosts.yaml") -} \ No newline at end of file diff --git a/docs/examples/terraform-and-azure/bitops.config.yaml b/docs/examples/terraform-and-azure/bitops.config.yaml deleted file mode 100644 index 9ccd450d..00000000 --- a/docs/examples/terraform-and-azure/bitops.config.yaml +++ /dev/null @@ -1,7 +0,0 @@ -terraform: - cli: - var-file: my-vars.tfvars - options: - command: apply #destroy - version: "0.13.2" - workspace: test2 diff --git a/docs/examples/terraform-and-azure/bitops.schema.yaml b/docs/examples/terraform-and-azure/bitops.schema.yaml deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/examples/terraform-and-azure/terraform/bitops.config.yaml b/docs/examples/terraform-and-azure/terraform/bitops.config.yaml deleted file mode 100644 index 4668a3dd..00000000 --- a/docs/examples/terraform-and-azure/terraform/bitops.config.yaml +++ /dev/null @@ -1,6 +0,0 @@ -terraform: - cli: {} - options: - command: destroy - version: "0.13.2" - fetch-kubeconfig: false diff --git a/docs/examples/terraform-and-azure/terraform/linux_vm.tf b/docs/examples/terraform-and-azure/terraform/linux_vm.tf deleted file mode 100644 index 7060f47a..00000000 --- a/docs/examples/terraform-and-azure/terraform/linux_vm.tf +++ /dev/null @@ -1,153 +0,0 @@ - - -# Create a resource group if it doesn't exist -resource "azurerm_resource_group" "myterraformgroup" { - name = "Demo-rg" - location = "francecentral" - - tags = { - environment = "Terraform Demo" - } -} - -# Create virtual network -resource "azurerm_virtual_network" "myterraformnetwork" { - name = "myVnet" - address_space = ["10.0.0.0/16"] - location = "francecentral" - resource_group_name = azurerm_resource_group.myterraformgroup.name - - tags = { - environment = "Terraform Demo" - } -} - -# Create subnet -resource "azurerm_subnet" "myterraformsubnet" { - name = "mySubnet" - resource_group_name = azurerm_resource_group.myterraformgroup.name - virtual_network_name = azurerm_virtual_network.myterraformnetwork.name - address_prefixes = ["10.0.1.0/24"] -} - -# Create public IPs -resource "azurerm_public_ip" "myterraformpublicip" { - name = "myPublicIP" - location = "francecentral" - resource_group_name = azurerm_resource_group.myterraformgroup.name - allocation_method = "Dynamic" - - tags = { - environment = "Terraform Demo" - } -} - -# Create Network Security Group and rule -resource "azurerm_network_security_group" "myterraformnsg" { - name = "myNetworkSecurityGroup" - location = "francecentral" - resource_group_name = azurerm_resource_group.myterraformgroup.name - - security_rule { - name = "SSH" - priority = 1001 - direction = "Inbound" - access = "Allow" - protocol = "Tcp" - source_port_range = "*" - destination_port_range = "22" - source_address_prefix = "*" - destination_address_prefix = "*" - } - - tags = { - environment = "Terraform Demo" - } -} - -# Create network interface -resource "azurerm_network_interface" "myterraformnic" { - name = "myNIC" - location = "francecentral" - resource_group_name = azurerm_resource_group.myterraformgroup.name - - ip_configuration { - name = "myNicConfiguration" - subnet_id = azurerm_subnet.myterraformsubnet.id - private_ip_address_allocation = "Dynamic" - public_ip_address_id = azurerm_public_ip.myterraformpublicip.id - } - - tags = { - environment = "Terraform Demo" - } -} - -# Connect the security group to the network interface -resource "azurerm_network_interface_security_group_association" "example" { - network_interface_id = azurerm_network_interface.myterraformnic.id - network_security_group_id = azurerm_network_security_group.myterraformnsg.id -} - -# Generate random text for a unique storage account name -resource "random_id" "randomId" { - keepers = { - # Generate a new ID only when a new resource group is defined - resource_group = azurerm_resource_group.myterraformgroup.name - } - - byte_length = 8 -} - -# Create storage account for boot diagnostics -resource "azurerm_storage_account" "mystorageaccount" { - name = "diag${random_id.randomId.hex}" - resource_group_name = azurerm_resource_group.myterraformgroup.name - location = "francecentral" - account_tier = "Standard" - account_replication_type = "LRS" - - tags = { - environment = "Terraform Demo" - } -} - - - - -# Create virtual machine -resource "azurerm_linux_virtual_machine" "myterraformvm" { - name = "myVM" - location = "francecentral" - resource_group_name = azurerm_resource_group.myterraformgroup.name - network_interface_ids = [azurerm_network_interface.myterraformnic.id] - size = "Standard_DS1_v2" - - os_disk { - name = "myOsDisk" - caching = "ReadWrite" - storage_account_type = "Premium_LRS" - } - - source_image_reference { - publisher = "Canonical" - offer = "UbuntuServer" - sku = "16.04.0-LTS" - version = "latest" - } - - computer_name = "myvm" - admin_username = "azureuser" - admin_password = "Password1234!" - disable_password_authentication = false - - - - boot_diagnostics { - storage_account_uri = azurerm_storage_account.mystorageaccount.primary_blob_endpoint - } - - tags = { - environment = "Terraform Demo" - } -} \ No newline at end of file diff --git a/docs/examples/terraform-and-azure/terraform/resource.tf b/docs/examples/terraform-and-azure/terraform/resource.tf deleted file mode 100644 index 2154a9b6..00000000 --- a/docs/examples/terraform-and-azure/terraform/resource.tf +++ /dev/null @@ -1,8 +0,0 @@ -# Configure the Microsoft Azure Provider -provider "azurerm" { - features {} -} -resource "azurerm_resource_group" "rg" { - name = "Demo-rg" - location = "centralus" -} diff --git a/docs/examples/terraform-and-gcp/bitops.config.yaml b/docs/examples/terraform-and-gcp/bitops.config.yaml deleted file mode 100644 index ee8169c4..00000000 --- a/docs/examples/terraform-and-gcp/bitops.config.yaml +++ /dev/null @@ -1,7 +0,0 @@ -terraform: - cli: - var-file: my-vars.tfvars - options: - command: apply #destroy - version: "0.13.2" - workspace: gcp_tform diff --git a/docs/examples/terraform-and-gcp/bitops.schema.yaml b/docs/examples/terraform-and-gcp/bitops.schema.yaml deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/examples/terraform-and-gcp/terraform/bitops.config.yaml b/docs/examples/terraform-and-gcp/terraform/bitops.config.yaml deleted file mode 100644 index 759cf616..00000000 --- a/docs/examples/terraform-and-gcp/terraform/bitops.config.yaml +++ /dev/null @@ -1,6 +0,0 @@ -terraform: - cli: {} - options: - command: apply - version: "0.13.2" - fetch-kubeconfig: false diff --git a/docs/examples/terraform-and-gcp/terraform/main.tf b/docs/examples/terraform-and-gcp/terraform/main.tf deleted file mode 100644 index ef189668..00000000 --- a/docs/examples/terraform-and-gcp/terraform/main.tf +++ /dev/null @@ -1,82 +0,0 @@ -# create VPC -resource "google_compute_network" "vpc" { - name = "${var.app_name}-vpc" - auto_create_subnetworks = "false" - routing_mode = "GLOBAL" -} - -# create public subnet -resource "google_compute_subnetwork" "public_subnet_1" { - name = "${var.app_name}-public-subnet-1" - ip_cidr_range = var.public_subnet_cidr_1 - network = google_compute_network.vpc.name - region = var.gcp_region_1 -} - -# allow http traffic -resource "google_compute_firewall" "allow-http" { - name = "${var.app_name}-fw-allow-http" - network = "${google_compute_network.vpc.name}" - allow { - protocol = "tcp" - ports = ["80"] - } - target_tags = ["http"] -} -# allow https traffic -resource "google_compute_firewall" "allow-https" { - name = "${var.app_name}-fw-allow-https" - network = "${google_compute_network.vpc.name}" - allow { - protocol = "tcp" - ports = ["443"] - } - target_tags = ["https"] -} -# allow ssh traffic -resource "google_compute_firewall" "allow-ssh" { - name = "${var.app_name}-fw-allow-ssh" - network = "${google_compute_network.vpc.name}" - allow { - protocol = "tcp" - ports = ["22"] - } - target_tags = ["ssh"] -} -# allow rdp traffic -resource "google_compute_firewall" "allow-rdp" { - name = "${var.app_name}-fw-allow-rdp" - network = "${google_compute_network.vpc.name}" - allow { - protocol = "tcp" - ports = ["3389"] - } - target_tags = ["rdp"] -} - -# Terraform plugin for creating random ids -resource "random_id" "instance_id" { - byte_length = 4 -} -# Create VM #1 -resource "google_compute_instance" "vm_instance_public" { - name = "${var.app_name}-vm-${random_id.instance_id.hex}" - machine_type = "f1-micro" - zone = var.gcp_zone_1 - hostname = "${var.app_name}vm-${random_id.instance_id.hex}.${var.app_domain}" - tags = ["ssh","http"] - - boot_disk { - initialize_params { - image = "ubuntu-os-cloud/ubuntu-1804-lts" - } - } - metadata_startup_script = "sudo apt-get update; - sudo apt-get install -yq build-essential apache2" - network_interface { - network = google_compute_network.vpc.name - subnetwork = google_compute_subnetwork.public_subnet_1.name - - access_config { } - } -} \ No newline at end of file diff --git a/docs/examples/terraform-and-gcp/terraform/output.tf b/docs/examples/terraform-and-gcp/terraform/output.tf deleted file mode 100644 index d7cdda04..00000000 --- a/docs/examples/terraform-and-gcp/terraform/output.tf +++ /dev/null @@ -1,9 +0,0 @@ -output "vm-name" { - value = google_compute_instance.vm_instance_public.name -} -output "vm-external-ip" { - value = google_compute_instance.vm_instance_public.network_interface.0.access_config.0.nat_ip -} -output "vm-internal-ip" { - value = google_compute_instance.vm_instance_public.network_interface.0.network_ip -} \ No newline at end of file diff --git a/docs/examples/terraform-and-gcp/terraform/provider.tf b/docs/examples/terraform-and-gcp/terraform/provider.tf deleted file mode 100644 index ec4338e1..00000000 --- a/docs/examples/terraform-and-gcp/terraform/provider.tf +++ /dev/null @@ -1,9 +0,0 @@ -terraform { - required_version = ">= 0.12" -} -provider "google" { - project = "my-gcp-project" - credentials = file("GCP_Keys.json") - region = "europe-west1" - zone = "europe-west1-b" -} diff --git a/docs/examples/terraform-and-gcp/terraform/terraform.tfvars b/docs/examples/terraform-and-gcp/terraform/terraform.tfvars deleted file mode 100644 index 5cd5f4ad..00000000 --- a/docs/examples/terraform-and-gcp/terraform/terraform.tfvars +++ /dev/null @@ -1,6 +0,0 @@ -# GCP Settings -gcp_region_1 = "europe-west1" -gcp_zone_1 = "europe-west1-b" -gcp_auth_file = "../auth/kopicloud-tfadmin.json" -# GCP Netwok -public_subnet_cidr_1 = "10.10.1.0/24" \ No newline at end of file diff --git a/docs/examples/terraform-and-gcp/terraform/variables.tf b/docs/examples/terraform-and-gcp/terraform/variables.tf deleted file mode 100644 index 01cca571..00000000 --- a/docs/examples/terraform-and-gcp/terraform/variables.tf +++ /dev/null @@ -1,26 +0,0 @@ -# define the GCP authentication file -variable "gcp_auth_file" { - type = string - description = "GCP authentication file" -} -# define GCP project name -variable "app_project" { - type = string - description = "GCP project name" -} -# define GCP region -variable "gcp_region_1" { - type = string - description = "GCP region" - default = "us-central1-c" -} -# define GCP zone -variable "gcp_zone_1" { - type = string - description = "GCP zone" -} -# define Public subnet -variable "public_subnet_cidr_1" { - type = string - description = "Public subnet CIDR 1" -} \ No newline at end of file diff --git a/docs/examples/terraform-default-environment/README.md b/docs/examples/terraform-default-environment/README.md deleted file mode 100644 index 6e935ecf..00000000 --- a/docs/examples/terraform-default-environment/README.md +++ /dev/null @@ -1,18 +0,0 @@ -To run this example, open a terminal in this directory and run -``` -docker run \ --e ENVIRONMENT="test" \ --e AWS_ACCESS_KEY_ID=skip \ --e AWS_SECRET_ACCESS_KEY=skip \ --e AWS_DEFAULT_REGION="us-east-1" \ --v $(pwd):/opt/bitops_deployment \ -bitovi/bitops:latest -``` -This should prodcue the terraform logs: -``` -null_resource.test_resource: Creating... -null_resource.test_resource: Provisioning with 'local-exec'... -null_resource.test_resource (local-exec): Executing: ["/bin/sh" "-c" "echo I am a test terraform resource"] -null_resource.test_resource (local-exec): I am a test terraform resource -null_resource.test_resource: Creation complete after 0s [id=1053230725969363428] -``` \ No newline at end of file diff --git a/docs/examples/terraform-default-environment/default/terraform/bitops.config.yaml b/docs/examples/terraform-default-environment/default/terraform/bitops.config.yaml deleted file mode 100644 index 8ab52e5b..00000000 --- a/docs/examples/terraform-default-environment/default/terraform/bitops.config.yaml +++ /dev/null @@ -1,6 +0,0 @@ -terraform: - cli: {} - options: - command: apply - version: "0.13.2" - fetch-kubeconfig: false \ No newline at end of file diff --git a/docs/examples/terraform-default-environment/default/terraform/main.tf b/docs/examples/terraform-default-environment/default/terraform/main.tf deleted file mode 100644 index 18fdc54b..00000000 --- a/docs/examples/terraform-default-environment/default/terraform/main.tf +++ /dev/null @@ -1,5 +0,0 @@ -resource "null_resource" "default_resource" { - provisioner "local-exec" { - command = "echo I am a default terraform resource" - } -} \ No newline at end of file diff --git a/docs/examples/terraform-default-environment/production/terraform/bitops.config.yaml b/docs/examples/terraform-default-environment/production/terraform/bitops.config.yaml deleted file mode 100644 index 8ab52e5b..00000000 --- a/docs/examples/terraform-default-environment/production/terraform/bitops.config.yaml +++ /dev/null @@ -1,6 +0,0 @@ -terraform: - cli: {} - options: - command: apply - version: "0.13.2" - fetch-kubeconfig: false \ No newline at end of file diff --git a/docs/examples/terraform-default-environment/production/terraform/main.tf b/docs/examples/terraform-default-environment/production/terraform/main.tf deleted file mode 100644 index b8843404..00000000 --- a/docs/examples/terraform-default-environment/production/terraform/main.tf +++ /dev/null @@ -1,5 +0,0 @@ -resource "null_resource" "production_resource" { - provisioner "local-exec" { - command = "echo I am a production terraform resource" - } -} \ No newline at end of file diff --git a/docs/examples/terraform-default-environment/test/terraform/bitops.config.yaml b/docs/examples/terraform-default-environment/test/terraform/bitops.config.yaml deleted file mode 100644 index 8ab52e5b..00000000 --- a/docs/examples/terraform-default-environment/test/terraform/bitops.config.yaml +++ /dev/null @@ -1,6 +0,0 @@ -terraform: - cli: {} - options: - command: apply - version: "0.13.2" - fetch-kubeconfig: false \ No newline at end of file diff --git a/docs/examples/terraform-default-environment/test/terraform/main.tf b/docs/examples/terraform-default-environment/test/terraform/main.tf deleted file mode 100644 index 13d50617..00000000 --- a/docs/examples/terraform-default-environment/test/terraform/main.tf +++ /dev/null @@ -1,5 +0,0 @@ -resource "null_resource" "test_resource" { - provisioner "local-exec" { - command = "echo I am a test terraform resource" - } -} \ No newline at end of file diff --git a/docs/examples/terraform-lifecycle-hooks/README.md b/docs/examples/terraform-lifecycle-hooks/README.md deleted file mode 100644 index c889047e..00000000 --- a/docs/examples/terraform-lifecycle-hooks/README.md +++ /dev/null @@ -1,29 +0,0 @@ -To run this example, open a terminal in this directory and run -``` -docker run \ --e ENVIRONMENT="test" \ --e AWS_ACCESS_KEY_ID=skip \ --e AWS_SECRET_ACCESS_KEY=skip \ --e AWS_DEFAULT_REGION="us-east-1" \ --v $(pwd):/opt/bitops_deployment \ -bitovi/bitops:latest -``` - -We should see logs showing the before and after scripts running -``` -+ /bin/bash -x /tmp/tmp.4jcNkVb3sN/test/terraform/bitops.before-deploy.d/my-before-script.sh -I am a before terraform lifecycle script! -+ set -x -+ echo 'I am a before terraform lifecycle script!' -... -null_resource.test_resource: Creating... -null_resource.test_resource: Provisioning with 'local-exec'... -null_resource.test_resource (local-exec): Executing: ["/bin/sh" "-c" "echo I am a test terraform resource"] -null_resource.test_resource (local-exec): I am a test terraform resource -null_resource.test_resource: Creation complete after 0s [id=8496749575343682584] -... -+ /bin/bash -x /tmp/tmp.4jcNkVb3sN/test/terraform/bitops.after-deploy.d/my-after-script.sh -+ set -x -+ echo 'I am a after terraform lifecycle script!' -I am a after terraform lifecycle script! -``` \ No newline at end of file diff --git a/docs/examples/terraform-lifecycle-hooks/test/terraform/bitops.after-deploy.d/my-after-script.sh b/docs/examples/terraform-lifecycle-hooks/test/terraform/bitops.after-deploy.d/my-after-script.sh deleted file mode 100755 index 5711c101..00000000 --- a/docs/examples/terraform-lifecycle-hooks/test/terraform/bitops.after-deploy.d/my-after-script.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -set -x -echo "I am a after terraform lifecycle script!" \ No newline at end of file diff --git a/docs/examples/terraform-lifecycle-hooks/test/terraform/bitops.before-deploy.d/my-before-script.sh b/docs/examples/terraform-lifecycle-hooks/test/terraform/bitops.before-deploy.d/my-before-script.sh deleted file mode 100755 index 51b713b0..00000000 --- a/docs/examples/terraform-lifecycle-hooks/test/terraform/bitops.before-deploy.d/my-before-script.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -set -x -echo "I am a before terraform lifecycle script!" \ No newline at end of file diff --git a/docs/examples/terraform-lifecycle-hooks/test/terraform/bitops.config.yaml b/docs/examples/terraform-lifecycle-hooks/test/terraform/bitops.config.yaml deleted file mode 100644 index 8ab52e5b..00000000 --- a/docs/examples/terraform-lifecycle-hooks/test/terraform/bitops.config.yaml +++ /dev/null @@ -1,6 +0,0 @@ -terraform: - cli: {} - options: - command: apply - version: "0.13.2" - fetch-kubeconfig: false \ No newline at end of file diff --git a/docs/examples/terraform-lifecycle-hooks/test/terraform/main.tf b/docs/examples/terraform-lifecycle-hooks/test/terraform/main.tf deleted file mode 100644 index 13d50617..00000000 --- a/docs/examples/terraform-lifecycle-hooks/test/terraform/main.tf +++ /dev/null @@ -1,5 +0,0 @@ -resource "null_resource" "test_resource" { - provisioner "local-exec" { - command = "echo I am a test terraform resource" - } -} \ No newline at end of file