diff --git a/molecule/omero-training-server/Dockerfile.j2 b/molecule/omero-training-server/Dockerfile.j2 deleted file mode 100644 index 00b7fd61..00000000 --- a/molecule/omero-training-server/Dockerfile.j2 +++ /dev/null @@ -1,22 +0,0 @@ -# Molecule managed - -{% if item.registry is defined %} -FROM {{ item.registry.url }}/{{ item.image }} -{% else %} -FROM {{ item.image }} -{% endif %} - -{% if item.env is defined %} -{% for var, value in item.env.items() %} -{% if value %} -ENV {{ var }} {{ value }} -{% endif %} -{% endfor %} -{% endif %} - -RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates iproute2 && apt-get clean; \ - elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash iproute && dnf clean all; \ - elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash iproute ca-certificates && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \ - elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml iproute2 && zypper clean -a; \ - elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \ - elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates iproute2 && xbps-remove -O; fi diff --git a/molecule/omero-training-server/molecule.yml b/molecule/omero-training-server/molecule.yml deleted file mode 100644 index af145c55..00000000 --- a/molecule/omero-training-server/molecule.yml +++ /dev/null @@ -1,59 +0,0 @@ ---- -dependency: - name: galaxy - options: - role-file: requirements.yml -driver: - name: docker -lint: | - yamllint . - ansible-lint - flake8 -platforms: - - name: ome-outreach - image: centos/systemd - command: /sbin/init - privileged: true - groups: - - docker-hosts - - omero-server - - omero-web - - monitored -provisioner: - name: ansible - inventory: - group_vars: - all: - molecule_test: true - postgresql_version: "13" - docker-hosts: - # This should allow docker-in-docker to work - docker_storage_driver: vfs - # Latest version 17.12.1.ce-1.el7.centos has a bug that prevents - # testing on travis: https://github.com/docker/for-linux/issues/219 - docker_version: 17.09.1.ce-1.el7.centos - # firewalld isn't installed, don't attempt to disable - iptables_raw_disable_firewalld: false - playbooks: - prepare: ../resources/prepare-iproute.yml - converge: ../../site.yml - lint: - name: ansible-lint -scenario: - name: omero-training-server - test_sequence: - - destroy - # dependency must come first so that ansible-lint will see a custom module - # This might be fixed by https://github.com/ansible/molecule/pull/1739 - - dependency - - lint - - syntax - - create - - prepare - - converge - # FIXME: Some tasks are not idempotent - # - idempotence - - verify - - destroy -verifier: - name: testinfra diff --git a/molecule/omero-training-server/tests/test_default.py b/molecule/omero-training-server/tests/test_default.py deleted file mode 100644 index 1660aff8..00000000 --- a/molecule/omero-training-server/tests/test_default.py +++ /dev/null @@ -1,63 +0,0 @@ -import os -import pytest -import testinfra.utils.ansible_runner - -testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( - os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') - -OMERO = '/opt/omero/server/OMERO.server/bin/omero' -OMERO_LOGIN = '-C -s localhost -u root -w omero' - - -@pytest.mark.parametrize("name", [ - 'nginx', - 'omero-server', - 'omero-web', - 'postgresql-13', - 'prometheus-node-exporter', - 'prometheus-omero-exporter', - 'prometheus-postgres-exporter', -]) -def test_service_running_and_enabled(host, name): - service = host.service(name) - assert service.is_running - assert service.is_enabled - - -def test_omero_login(host): - with host.sudo('importer1'): - host.check_output( - '/opt/omero/server/OMERO.server/bin/omero ' - 'login -C -s localhost -u root -w omero') - - -@pytest.mark.parametrize("curl", [ - 'localhost:9449/metrics', - '-u monitoring:monitoring -k https://localhost/metrics/9449', -]) -def test_omero_metrics(host, curl): - out = host.check_output('curl -f %s' % curl) - assert 'omero_sessions_active' in out - - -def test_omero_metrics_auth_fail(host): - out = host.run( - 'curl -f -u monitoring:incorrect -k https://localhost/metrics/9449') - assert out.rc == 22 - assert '401' in out.stderr - - -def test_omero_nginx_ssl(host): - out = host.check_output('curl -fkI https://localhost/') - assert 'Location: /webclient/' in out - - -def test_local_ldap(host): - initialised = host.check_output( - '/home/ldap/ldapmanager get dc=openmicroscopy,dc=org') - if len(initialised.strip()) == 0: - host.check_output('/home/ldap/ldapmanager init') - - out = host.check_output( - '/home/ldap/ldapmanager get dc=openmicroscopy,dc=org') - assert 'dn: dc=openmicroscopy,dc=org' in out diff --git a/molecule/resources/prepare-iproute.yml b/molecule/resources/prepare-iproute.yml deleted file mode 100644 index 1730ad08..00000000 --- a/molecule/resources/prepare-iproute.yml +++ /dev/null @@ -1,15 +0,0 @@ -# Install iproute for ansible network vars -- name: Prepare iproute in resources - hosts: all - tasks: - - name: Install iproute - become: true - ansible.builtin.yum: - name: iproute - state: present - - - name: Install cron - become: true - ansible.builtin.yum: - name: cronie - state: present diff --git a/molecule/web-proxy/molecule.yml b/molecule/web-proxy/molecule.yml deleted file mode 100644 index 8bdf86d9..00000000 --- a/molecule/web-proxy/molecule.yml +++ /dev/null @@ -1,30 +0,0 @@ ---- -dependency: - name: galaxy - options: - role-file: requirements.yml -driver: - name: docker -lint: | - yamllint . - ansible-lint - flake8 -platforms: - - name: web-proxy - image: centos:7 - groups: - - web-proxies -provisioner: - name: ansible - playbooks: - converge: ../../web-proxy/playbook.yml - lint: - name: ansible-lint -scenario: - name: web-proxy - test_sequence: - - lint - - dependency - - syntax -verifier: - name: testinfra diff --git a/molecule/www/Dockerfile.j2 b/molecule/www/Dockerfile.j2 deleted file mode 120000 index 0e9184b4..00000000 --- a/molecule/www/Dockerfile.j2 +++ /dev/null @@ -1 +0,0 @@ -../resources/Dockerfile.j2 \ No newline at end of file diff --git a/molecule/www/molecule.yml b/molecule/www/molecule.yml deleted file mode 100644 index e6b232df..00000000 --- a/molecule/www/molecule.yml +++ /dev/null @@ -1,27 +0,0 @@ ---- -dependency: - name: galaxy - options: - role-file: requirements.yml -driver: - name: docker -lint: | - yamllint . - ansible-lint - flake8 -platforms: - - name: www - image: centos/systemd - image_version: latest - command: /sbin/init - privileged: true -provisioner: - name: ansible - playbooks: - converge: ../../www/www-deploy.yml - lint: - name: ansible-lint -scenario: - name: www -verifier: - name: testinfra diff --git a/molecule/www/tests/test_default.py b/molecule/www/tests/test_default.py deleted file mode 100644 index d61e82f1..00000000 --- a/molecule/www/tests/test_default.py +++ /dev/null @@ -1,25 +0,0 @@ -import os -import pytest -import testinfra.utils.ansible_runner - -testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( - os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') - - -@pytest.mark.skip(reason="Causes Travis CI to exceed 10min timeout") -@pytest.mark.parametrize("address", [ - "http://localhost/", - "https://localhost/", -]) -def test_web(host, address): - out = host.check_output('curl -k %s' % address) - assert '