From c48325fbea13cd8a11a1c300d616f724b1ed259e Mon Sep 17 00:00:00 2001 From: Shawn Sorichetti Date: Tue, 30 Jan 2024 20:46:50 -0500 Subject: [PATCH] Remove tests for unused playbooks These playbooks are no longer in use for deploying to any of the clusters. Removing the tests so as not to block real work. --- .github/workflows/check-ubuntu-host.yml | 40 ------------------------- inventories/ansible_test/hosts | 15 ---------- tests/deploy_docker_mgmt.yml | 36 ---------------------- tests/deploy_github-meets-cpan.yml | 20 ------------- tests/deploy_grep_metacpan.yml | 33 -------------------- tests/deploy_hound_metacpan.yml | 33 -------------------- tests/deploy_web_metacpan.yml | 24 --------------- 7 files changed, 201 deletions(-) delete mode 100644 tests/deploy_docker_mgmt.yml delete mode 100644 tests/deploy_github-meets-cpan.yml delete mode 100644 tests/deploy_grep_metacpan.yml delete mode 100644 tests/deploy_hound_metacpan.yml delete mode 100644 tests/deploy_web_metacpan.yml diff --git a/.github/workflows/check-ubuntu-host.yml b/.github/workflows/check-ubuntu-host.yml index 3eeb6e8..7e8950b 100644 --- a/.github/workflows/check-ubuntu-host.yml +++ b/.github/workflows/check-ubuntu-host.yml @@ -39,43 +39,3 @@ jobs: idempotence=$(mktemp) sudo ansible-playbook -i inventories/ansible_test tests/deploy_packages.yml | tee -a ${idempotence} tail ${idempotence} | grep -q 'changed=0.*failed=0' && (echo 'Idempotence test: pass' && exit 0) || (echo 'Idempotence test: fail' && exit 1) - - - name: playbooks/deploy_docker_mgmt.yml - run: | - ansible-playbook -i inventories/ansible_test playbooks/deploy_docker_mgmt.yml --syntax-check - ansible-playbook -vvvv -i inventories/ansible_test tests/deploy_docker_mgmt.yml - idempotence=$(mktemp) - sudo ansible-playbook -i inventories/ansible_test tests/deploy_docker_mgmt.yml | tee -a ${idempotence} - tail ${idempotence} | grep -q 'changed=2.*failed=0' && (echo 'Idempotence test: pass' && exit 0) || (echo 'Idempotence test: fail' && exit 1) - - - name: playbooks/deploy_github-meets-cpan.yml - run: | - ansible-playbook -i inventories/ansible_test tests/deploy_github-meets-cpan.yml --syntax-check - ansible-playbook -vvvv -i inventories/ansible_test tests/deploy_github-meets-cpan.yml - idempotence=$(mktemp) - sudo ansible-playbook -i inventories/ansible_test tests/deploy_github-meets-cpan.yml | tee -a ${idempotence} - tail ${idempotence} | grep -q 'changed=1.*failed=0' && (echo 'Idempotence test: pass' && exit 0) || (echo 'Idempotence test: fail' && exit 1) - - - name: playbooks/deploy_grep_metacpan.yml - run: | - ansible-playbook -i inventories/ansible_test tests/deploy_grep_metacpan.yml --syntax-check - ansible-playbook -vvvv -i inventories/ansible_test tests/deploy_grep_metacpan.yml - idempotence=$(mktemp) - sudo ansible-playbook -i inventories/ansible_test tests/deploy_grep_metacpan.yml | tee -a ${idempotence} - tail ${idempotence} | grep -q 'changed=1.*failed=0' && (echo 'Idempotence test: pass' && exit 0) || (echo 'Idempotence test: fail' && exit 1) - - - name: playbooks/deploy_hound_metacpan.yml - run: | - ansible-playbook -i inventories/ansible_test tests/deploy_hound_metacpan.yml --syntax-check - ansible-playbook -vvvv -i inventories/ansible_test tests/deploy_hound_metacpan.yml - idempotence=$(mktemp) - sudo ansible-playbook -i inventories/ansible_test tests/deploy_hound_metacpan.yml | tee -a ${idempotence} - tail ${idempotence} | grep -q 'changed=1.*failed=0' && (echo 'Idempotence test: pass' && exit 0) || (echo 'Idempotence test: fail' && exit 1) - - - name: playbooks/deploy_web_metacpan.yml - run: | - ansible-playbook -i inventories/ansible_test tests/deploy_web_metacpan.yml --syntax-check - ansible-playbook -vvvv -i inventories/ansible_test tests/deploy_web_metacpan.yml - idempotence=$(mktemp) - sudo ansible-playbook -i inventories/ansible_test tests/deploy_web_metacpan.yml | tee -a ${idempotence} - tail ${idempotence} | grep -q 'changed=0.*failed=0' && (echo 'Idempotence test: pass' && exit 0) || (echo 'Idempotence test: fail' && exit 1) diff --git a/inventories/ansible_test/hosts b/inventories/ansible_test/hosts index 2d709c7..1518e0d 100644 --- a/inventories/ansible_test/hosts +++ b/inventories/ansible_test/hosts @@ -1,18 +1,3 @@ # required for creating local docker containers based on inventory [docker-hosts] localhost ansible_connection=local ansible_python_interpreter="/usr/bin/env python3" - -[container_hosts] -localhost - -[github-meets-cpan] -localhost - -[grep_metacpan] -localhost - -[hound_metacpan] -localhost - -[web_metacpan] -localhost diff --git a/tests/deploy_docker_mgmt.yml b/tests/deploy_docker_mgmt.yml deleted file mode 100644 index e85835a..0000000 --- a/tests/deploy_docker_mgmt.yml +++ /dev/null @@ -1,36 +0,0 @@ ---- - -- hosts: container_hosts - become: True - become_user: root - vars: - pip_install_packages: - - name: docker - roles: - - geerlingguy.pip - -- hosts: container_hosts - roles: - - deploy_docker_mgmt - tasks: - - name: Load logging variables - include_vars: - file: vars/logging.yml - name: logging - - - name: Set logging environment - include_role: - name: env_files - vars: - container: logging - env: "{{ logging.environment }}" - - - name: Deploy docker management | define volumes - docker_volume: - name: metacpan_git_shared - driver_options: - type: none - device: "{{ grep_repo }}" - o: bind - become: True - become_user: root diff --git a/tests/deploy_github-meets-cpan.yml b/tests/deploy_github-meets-cpan.yml deleted file mode 100644 index 59f3b7c..0000000 --- a/tests/deploy_github-meets-cpan.yml +++ /dev/null @@ -1,20 +0,0 @@ -# vim: set filetype=ansible.yaml: ---- - -- hosts: github-meets-cpan - vars: - site: github-meets-cpan - roles: - - deploy_site - -- hosts: github-meets-cpan - tasks: - - name: Create cron entries for github-meets-cpan - cron: - name: update data - cron_file: github-meets-cpan - user: "{{ metacpan_user | default(docker_mgmt.git.user) }}" - special_time: hourly - job: "cd {{ docker_mgmt['directory'] }} && /usr/local/bin/docker-compose start github-meets-cpan-cron" - become: yes - become_user: root diff --git a/tests/deploy_grep_metacpan.yml b/tests/deploy_grep_metacpan.yml deleted file mode 100644 index 9ca11e8..0000000 --- a/tests/deploy_grep_metacpan.yml +++ /dev/null @@ -1,33 +0,0 @@ -# vim: set filetype=ansible.yaml: ---- - -- hosts: grep_metacpan - environment: - MC_CONF_PRIVATE_DIR: "{{ grep_repo }}" - vars: - site: grep - vars_files: - - vars/settings.yml - tasks: - - name: Deploy grep site | checkout grep git repository - git: - clone: True - repo: "{{ github_repo }}" - version: master - dest: "{{ grep_repo }}" - become: True - become_user: metacpan - - - name: Deploy grep site | define volume for git repository - docker_volume: - name: metacpan_git_shared - driver_options: - type: none - device: "{{ grep_repo }}" - o: bind - become: True - become_user: root - - - name: Deploy grep site | deploy site - include_role: - name: deploy_site diff --git a/tests/deploy_hound_metacpan.yml b/tests/deploy_hound_metacpan.yml deleted file mode 100644 index 291b704..0000000 --- a/tests/deploy_hound_metacpan.yml +++ /dev/null @@ -1,33 +0,0 @@ -# vim: set filetype=ansible.yaml: ---- - -- hosts: hound_metacpan - environment: - MC_CONF_PRIVATE_DIR: "{{ grep_repo }}" - vars: - site: hound - vars_files: - - vars/settings.yml - tasks: - - name: Deploy hound site | checkout grep git repository - git: - clone: True - repo: "{{ github_repo }}" - version: master - dest: "{{ grep_repo }}" - become: True - become_user: metacpan - - - name: Deploy hound site | define volume for git repository - docker_volume: - name: metacpan_git_shared - driver_options: - type: none - device: "{{ grep_repo }}" - o: bind - become: True - become_user: root - - - name: Deploy hound site | deploy site - include_role: - name: deploy_site diff --git a/tests/deploy_web_metacpan.yml b/tests/deploy_web_metacpan.yml deleted file mode 100644 index 74ed0b7..0000000 --- a/tests/deploy_web_metacpan.yml +++ /dev/null @@ -1,24 +0,0 @@ -# vim: set filetype=ansible.yaml: ---- - -- hosts: web_metacpan - vars: - site: web - site_scale: "{{ metacpan_web_scale | default(1) }}" - site_config_type: template - site_config_file: /home/metacpan/docker-production/configs/metacpan-web/metacpan_web_local.conf - site_config_template: ../templates/web/config.j2 - vars_files: - - vars/settings.yml - become: yes - become_user: root - tasks: - - name: Create configuration directory - file: - dest: /metacpan-web - state: directory - mode: 0755 - - - name: Deploy web site | deploy site - include_role: - name: deploy_site