From a6d955b4766d31f95621c403253da4f123323465 Mon Sep 17 00:00:00 2001 From: Lubos Kosco Date: Fri, 4 Aug 2023 09:43:25 +0200 Subject: [PATCH] scylla-node: molecule tests for 2022.1, 2022.2 --- .github/workflows/ansible-scylla-node.yml | 3 + .../molecule/ubuntu2004-2/INSTALL.rst | 22 +++++ .../molecule/ubuntu2004-2/molecule.yml | 96 +++++++++++++++++++ .../molecule/ubuntu2004-2/verify.yml | 9 ++ .../ubuntu2004-enterprise-2/INSTALL.rst | 28 ++++++ .../ubuntu2004-enterprise-2/molecule.yml | 96 +++++++++++++++++++ .../ubuntu2004-enterprise-2/verify.yml | 9 ++ .../ubuntu2004-enterprise-3/INSTALL.rst | 28 ++++++ .../ubuntu2004-enterprise-3/molecule.yml | 96 +++++++++++++++++++ .../ubuntu2004-enterprise-3/verify.yml | 9 ++ 10 files changed, 396 insertions(+) create mode 100644 ansible-scylla-node/molecule/ubuntu2004-2/INSTALL.rst create mode 100644 ansible-scylla-node/molecule/ubuntu2004-2/molecule.yml create mode 100644 ansible-scylla-node/molecule/ubuntu2004-2/verify.yml create mode 100644 ansible-scylla-node/molecule/ubuntu2004-enterprise-2/INSTALL.rst create mode 100644 ansible-scylla-node/molecule/ubuntu2004-enterprise-2/molecule.yml create mode 100644 ansible-scylla-node/molecule/ubuntu2004-enterprise-2/verify.yml create mode 100644 ansible-scylla-node/molecule/ubuntu2004-enterprise-3/INSTALL.rst create mode 100644 ansible-scylla-node/molecule/ubuntu2004-enterprise-3/molecule.yml create mode 100644 ansible-scylla-node/molecule/ubuntu2004-enterprise-3/verify.yml diff --git a/.github/workflows/ansible-scylla-node.yml b/.github/workflows/ansible-scylla-node.yml index 0602fb5e..0280436f 100644 --- a/.github/workflows/ansible-scylla-node.yml +++ b/.github/workflows/ansible-scylla-node.yml @@ -26,7 +26,10 @@ jobs: #- ubuntu1604 #- ubuntu1804 - ubuntu2004 + #- ubuntu2004-2 - ubuntu2004-enterprise + - ubuntu2004-enterprise-2 + - ubuntu2004-enterprise-2 defaults: run: working-directory: ansible-scylla-node diff --git a/ansible-scylla-node/molecule/ubuntu2004-2/INSTALL.rst b/ansible-scylla-node/molecule/ubuntu2004-2/INSTALL.rst new file mode 100644 index 00000000..6a44bde9 --- /dev/null +++ b/ansible-scylla-node/molecule/ubuntu2004-2/INSTALL.rst @@ -0,0 +1,22 @@ +******* +Docker driver installation guide +******* + +Requirements +============ + +* Docker Engine + +Install +======= + +Please refer to the `Virtual environment`_ documentation for installation best +practices. If not using a virtual environment, please consider passing the +widely recommended `'--user' flag`_ when invoking ``pip``. + +.. _Virtual environment: https://virtualenv.pypa.io/en/latest/ +.. _'--user' flag: https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site + +.. code-block:: bash + + $ pip install 'molecule[docker]' diff --git a/ansible-scylla-node/molecule/ubuntu2004-2/molecule.yml b/ansible-scylla-node/molecule/ubuntu2004-2/molecule.yml new file mode 100644 index 00000000..32ff4bfb --- /dev/null +++ b/ansible-scylla-node/molecule/ubuntu2004-2/molecule.yml @@ -0,0 +1,96 @@ +--- +dependency: + name: galaxy + enabled: false + options: + role-file: requirements.yml +driver: + name: docker +platforms: + - name: node1 + image: jrei/systemd-ubuntu:20.04 + privileged: true + command: /lib/systemd/systemd + volumes: + - /sys/fs/cgroup:/sys/fs/cgroup + groups: + - scylla + docker_networks: + - name: scylla + ipam_config: + - subnet: "10.11.0.0/16" + gateway: "10.11.0.254" + networks: + - name: "scylla" + ipv4_address: "10.11.0.2" + - name: node2 + image: jrei/systemd-ubuntu:20.04 + privileged: true + command: /lib/systemd/systemd + volumes: + - /sys/fs/cgroup:/sys/fs/cgroup + groups: + - scylla + networks: + - name: "scylla" + ipv4_address: "10.11.0.3" + - name: node3 + image: jrei/systemd-ubuntu:20.04 + privileged: true + command: /lib/systemd/systemd + volumes: + - /sys/fs/cgroup:/sys/fs/cgroup + groups: + - scylla + networks: + - name: "scylla" + ipv4_address: "10.11.0.4" +provisioner: + name: ansible + env: + ANSIBLE_LIBRARY: $PWD/../example-playbooks/async_extra/library + ANSIBLE_ACTION_PLUGINS: $PWD/../example-playbooks/async_extra/action_plugins + log: True + options: + vvv: True + inventory: + group_vars: + scylla: + scylla_deb_repos: + - "http://downloads.scylladb.com/deb/ubuntu/scylla-5.2.list" + scylla_edition: "oss" + scylla_version: "latest" + scylla_io_probe: false + io_properties: + disks: + - mountpoint: "/var/lib/scylla/data" + read_iops: 2000 + read_bandwidth: 10000000 + write_iops: 1000 + write_bandwidth: 1000000 + scylla_seeds: + - "10.11.0.2" + dc: "test_dc" + rack: "test_rack" + skip_coredump: True + skip_sysconfig: True + cpuset_command: "scylla_cpuset_setup --smp 1" + # skip_cpuset: True + # devmode: True +# skip_ntp: True + skip_swap: True + scylla_manager_deb_repo_url: "http://downloads.scylladb.com/deb/ubuntu/scylladb-manager-2.6-bionic.list" + playbooks: + converge: ../shared/converge.yml + prepare: ../shared/prepare.yml +scenario: + test_sequence: + - dependency + - lint + - syntax + - create + - prepare + - converge + - verify +verifier: + name: ansible diff --git a/ansible-scylla-node/molecule/ubuntu2004-2/verify.yml b/ansible-scylla-node/molecule/ubuntu2004-2/verify.yml new file mode 100644 index 00000000..a82dd6fd --- /dev/null +++ b/ansible-scylla-node/molecule/ubuntu2004-2/verify.yml @@ -0,0 +1,9 @@ +--- +# This is an example playbook to execute Ansible tests. + +- name: Verify + hosts: all + tasks: + - name: Example assertion + assert: + that: true diff --git a/ansible-scylla-node/molecule/ubuntu2004-enterprise-2/INSTALL.rst b/ansible-scylla-node/molecule/ubuntu2004-enterprise-2/INSTALL.rst new file mode 100644 index 00000000..b0b11402 --- /dev/null +++ b/ansible-scylla-node/molecule/ubuntu2004-enterprise-2/INSTALL.rst @@ -0,0 +1,28 @@ +******* +Docker driver installation guide +******* + +Requirements +============ + +* Docker Engine + +Install +======= + +Please refer to the `Virtual environment`_ documentation for installation best +practices. If not using a virtual environment, please consider passing the +widely recommended `'--user' flag`_ when invoking ``pip``. + +.. _Virtual environment: https://virtualenv.pypa.io/en/latest/ +.. _'--user' flag: https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site + +.. code-block:: bash + + $ pip install 'molecule[docker]' + +requirements can be regenerated using: + +pip-compile --output-file=requirements-dev.txt requirements-dev.in + +pip-compile --output-file=requirements.txt requirements.in diff --git a/ansible-scylla-node/molecule/ubuntu2004-enterprise-2/molecule.yml b/ansible-scylla-node/molecule/ubuntu2004-enterprise-2/molecule.yml new file mode 100644 index 00000000..327f82c0 --- /dev/null +++ b/ansible-scylla-node/molecule/ubuntu2004-enterprise-2/molecule.yml @@ -0,0 +1,96 @@ +--- +dependency: + name: galaxy + enabled: false + options: + role-file: requirements.yml +driver: + name: docker +platforms: + - name: node1 + image: jrei/systemd-ubuntu:20.04 + privileged: true + command: /lib/systemd/systemd + volumes: + - /sys/fs/cgroup:/sys/fs/cgroup + groups: + - scylla + docker_networks: + - name: scylla + ipam_config: + - subnet: "10.11.0.0/16" + gateway: "10.11.0.254" + networks: + - name: "scylla" + ipv4_address: "10.11.0.2" + - name: node2 + image: jrei/systemd-ubuntu:20.04 + privileged: true + command: /lib/systemd/systemd + volumes: + - /sys/fs/cgroup:/sys/fs/cgroup + groups: + - scylla + networks: + - name: "scylla" + ipv4_address: "10.11.0.3" + - name: node3 + image: jrei/systemd-ubuntu:20.04 + privileged: true + command: /lib/systemd/systemd + volumes: + - /sys/fs/cgroup:/sys/fs/cgroup + groups: + - scylla + networks: + - name: "scylla" + ipv4_address: "10.11.0.4" +provisioner: + name: ansible + env: + ANSIBLE_LIBRARY: $PWD/../example-playbooks/async_extra/library + ANSIBLE_ACTION_PLUGINS: $PWD/../example-playbooks/async_extra/action_plugins + log: True + options: + vvv: True + inventory: + group_vars: + scylla: + scylla_deb_repos: + - "http://downloads.scylladb.com/deb/ubuntu/scylla-2022.1.list" + scylla_edition: "enterprise" + scylla_version: "latest" + scylla_io_probe: false + io_properties: + disks: + - mountpoint: "/var/lib/scylla/data" + read_iops: 2000 + read_bandwidth: 10000000 + write_iops: 1000 + write_bandwidth: 1000000 + scylla_seeds: + - "10.11.0.2" + dc: "test_dc" + rack: "test_rack" + skip_coredump: True + skip_sysconfig: True + cpuset_command: "scylla_cpuset_setup --smp 1" + #skip_cpuset: True + #devmode: True +# skip_ntp: True + skip_swap: True + scylla_manager_deb_repo_url: "http://downloads.scylladb.com/deb/ubuntu/scylladb-manager-2.6-bionic.list" + playbooks: + converge: ../shared/converge.yml + prepare: ../shared/prepare.yml +scenario: + test_sequence: + - dependency + - lint + - syntax + - create + - prepare + - converge + - verify +verifier: + name: ansible diff --git a/ansible-scylla-node/molecule/ubuntu2004-enterprise-2/verify.yml b/ansible-scylla-node/molecule/ubuntu2004-enterprise-2/verify.yml new file mode 100644 index 00000000..a82dd6fd --- /dev/null +++ b/ansible-scylla-node/molecule/ubuntu2004-enterprise-2/verify.yml @@ -0,0 +1,9 @@ +--- +# This is an example playbook to execute Ansible tests. + +- name: Verify + hosts: all + tasks: + - name: Example assertion + assert: + that: true diff --git a/ansible-scylla-node/molecule/ubuntu2004-enterprise-3/INSTALL.rst b/ansible-scylla-node/molecule/ubuntu2004-enterprise-3/INSTALL.rst new file mode 100644 index 00000000..b0b11402 --- /dev/null +++ b/ansible-scylla-node/molecule/ubuntu2004-enterprise-3/INSTALL.rst @@ -0,0 +1,28 @@ +******* +Docker driver installation guide +******* + +Requirements +============ + +* Docker Engine + +Install +======= + +Please refer to the `Virtual environment`_ documentation for installation best +practices. If not using a virtual environment, please consider passing the +widely recommended `'--user' flag`_ when invoking ``pip``. + +.. _Virtual environment: https://virtualenv.pypa.io/en/latest/ +.. _'--user' flag: https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site + +.. code-block:: bash + + $ pip install 'molecule[docker]' + +requirements can be regenerated using: + +pip-compile --output-file=requirements-dev.txt requirements-dev.in + +pip-compile --output-file=requirements.txt requirements.in diff --git a/ansible-scylla-node/molecule/ubuntu2004-enterprise-3/molecule.yml b/ansible-scylla-node/molecule/ubuntu2004-enterprise-3/molecule.yml new file mode 100644 index 00000000..fbf68192 --- /dev/null +++ b/ansible-scylla-node/molecule/ubuntu2004-enterprise-3/molecule.yml @@ -0,0 +1,96 @@ +--- +dependency: + name: galaxy + enabled: false + options: + role-file: requirements.yml +driver: + name: docker +platforms: + - name: node1 + image: jrei/systemd-ubuntu:20.04 + privileged: true + command: /lib/systemd/systemd + volumes: + - /sys/fs/cgroup:/sys/fs/cgroup + groups: + - scylla + docker_networks: + - name: scylla + ipam_config: + - subnet: "10.11.0.0/16" + gateway: "10.11.0.254" + networks: + - name: "scylla" + ipv4_address: "10.11.0.2" + - name: node2 + image: jrei/systemd-ubuntu:20.04 + privileged: true + command: /lib/systemd/systemd + volumes: + - /sys/fs/cgroup:/sys/fs/cgroup + groups: + - scylla + networks: + - name: "scylla" + ipv4_address: "10.11.0.3" + - name: node3 + image: jrei/systemd-ubuntu:20.04 + privileged: true + command: /lib/systemd/systemd + volumes: + - /sys/fs/cgroup:/sys/fs/cgroup + groups: + - scylla + networks: + - name: "scylla" + ipv4_address: "10.11.0.4" +provisioner: + name: ansible + env: + ANSIBLE_LIBRARY: $PWD/../example-playbooks/async_extra/library + ANSIBLE_ACTION_PLUGINS: $PWD/../example-playbooks/async_extra/action_plugins + log: True + options: + vvv: True + inventory: + group_vars: + scylla: + scylla_deb_repos: + - "http://downloads.scylladb.com/deb/ubuntu/scylla-2022.2.list" + scylla_edition: "enterprise" + scylla_version: "latest" + scylla_io_probe: false + io_properties: + disks: + - mountpoint: "/var/lib/scylla/data" + read_iops: 2000 + read_bandwidth: 10000000 + write_iops: 1000 + write_bandwidth: 1000000 + scylla_seeds: + - "10.11.0.2" + dc: "test_dc" + rack: "test_rack" + skip_coredump: True + skip_sysconfig: True + cpuset_command: "scylla_cpuset_setup --smp 1" + #skip_cpuset: True + #devmode: True +# skip_ntp: True + skip_swap: True + scylla_manager_deb_repo_url: "http://downloads.scylladb.com/deb/ubuntu/scylladb-manager-2.6-bionic.list" + playbooks: + converge: ../shared/converge.yml + prepare: ../shared/prepare.yml +scenario: + test_sequence: + - dependency + - lint + - syntax + - create + - prepare + - converge + - verify +verifier: + name: ansible diff --git a/ansible-scylla-node/molecule/ubuntu2004-enterprise-3/verify.yml b/ansible-scylla-node/molecule/ubuntu2004-enterprise-3/verify.yml new file mode 100644 index 00000000..a82dd6fd --- /dev/null +++ b/ansible-scylla-node/molecule/ubuntu2004-enterprise-3/verify.yml @@ -0,0 +1,9 @@ +--- +# This is an example playbook to execute Ansible tests. + +- name: Verify + hosts: all + tasks: + - name: Example assertion + assert: + that: true