From 6f732de463f3fad416592a2a1802c4ddc850387e Mon Sep 17 00:00:00 2001 From: Lubos Kosco Date: Mon, 7 Aug 2023 09:48:31 +0200 Subject: [PATCH 1/4] scylla-node: remove ignore_errors, make node exporter from 2022 work 2022 node exporter now works for clean install and upgrades fix detection of node-exporter services make sure the name of node exporter service matches the check --- ansible-scylla-node/tasks/common.yml | 31 +++++++++++++++++++++------- ansible-scylla-node/tasks/main.yml | 2 +- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/ansible-scylla-node/tasks/common.yml b/ansible-scylla-node/tasks/common.yml index c4f4caf3..ccca4702 100644 --- a/ansible-scylla-node/tasks/common.yml +++ b/ansible-scylla-node/tasks/common.yml @@ -114,23 +114,38 @@ become: true when: skip_ntp is defined and skip_ntp|bool == false -- name: node exporter setup +- name: check for node_exporter_install + stat: + path: /usr/sbin/node_exporter_install + register: node_exporter_install + +- name: setup legacy node exporter shell: | node_exporter_install --force - when: install_type == 'online' + when: (install_type == 'online') and (node_exporter_install.stat.exists) become: true notify: - node_exporter start - ignore_errors: true - #TODO: stop ignoring errors when the node_exporter_install script fix is available in all actual versions, resp. use only for < 5.0 / 2022 -- name: node exporter setup from 5.0/2022 - service: +- name: check for node_exporter + stat: + path: /opt/scylladb/node_exporter/node_exporter + register: node_exporter + +- name: setup bundled node exporter + block: + - name: Enforce disabling of old node exporter + service: + name: node-exporter + state: stopped + when: ansible_facts.services['node-exporter.service'] is defined and (ansible_facts.services['node-exporter.service']["status"] != "not-found") + - name: Start bundled node exporter + service: name: scylla-node-exporter state: started + when: ansible_facts.services['scylla-node-exporter.service'] is defined and (ansible_facts.services['scylla-node-exporter.service']["status"] != "not-found") become: true - ignore_errors: true - #TODO: stop ignoring errors when a version check is added + when: node_exporter.stat.exists - name: configure Scylla shell: | diff --git a/ansible-scylla-node/tasks/main.yml b/ansible-scylla-node/tasks/main.yml index a082e26e..7804a1b6 100644 --- a/ansible-scylla-node/tasks/main.yml +++ b/ansible-scylla-node/tasks/main.yml @@ -2,7 +2,7 @@ # Facts gathering - name: Populate service facts - service_facts: + ansible.builtin.service_facts: - name: Populate package facts package_facts: From 02d27fd8f51919b794e928636da61bf294690242 Mon Sep 17 00:00:00 2001 From: Lubos Kosco Date: Thu, 3 Aug 2023 10:13:38 +0200 Subject: [PATCH 2/4] scylla-node: be more clear why there is no match for scylla version --- ansible-scylla-node/tasks/Debian_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible-scylla-node/tasks/Debian_install.yml b/ansible-scylla-node/tasks/Debian_install.yml index b3da4dd9..1865d985 100644 --- a/ansible-scylla-node/tasks/Debian_install.yml +++ b/ansible-scylla-node/tasks/Debian_install.yml @@ -57,7 +57,7 @@ - name: "Validate scylla version correctness" ansible.builtin.fail: - msg: "Too many/few choices for a requested version '{{ scylla_version_to_install }}': {{ aptversions.stdout_lines }}. Bailing out!" + msg: "Too many/few choices for a requested version '{{ scylla_version_to_install }}': {{ aptversions.stdout_lines }}. Fix your Scylla scylla_version or scylla_deb_repos/scylla_repo_keys!" when: aptversions.stdout_lines | length != 1 - name: Fetch version parts of Scylla package From ddafedcf45da792a629b019d675771c48bad1eb5 Mon Sep 17 00:00:00 2001 From: Lubos Kosco Date: Thu, 3 Aug 2023 10:13:02 +0200 Subject: [PATCH 3/4] scylla-node: support new machine image and its tuning --- ansible-scylla-node/tasks/Debian_install.yml | 57 +++++++++++--------- ansible-scylla-node/tasks/RedHat.yml | 32 ++++++----- ansible-scylla-node/tasks/common.yml | 19 +++++++ ansible-scylla-node/tasks/main.yml | 10 ++++ 4 files changed, 80 insertions(+), 38 deletions(-) diff --git a/ansible-scylla-node/tasks/Debian_install.yml b/ansible-scylla-node/tasks/Debian_install.yml index 1865d985..079c2f55 100644 --- a/ansible-scylla-node/tasks/Debian_install.yml +++ b/ansible-scylla-node/tasks/Debian_install.yml @@ -2,45 +2,30 @@ # Requires a 'scylla_version_to_install' fact to be set to a version string we want to install - name: Install Scylla block: - - name: Install 'latest' Scylla + + - name: Install 'latest' {{ scylla_edition }} Scylla block: - block: - - name: Nuke an OSS pin file if exists + - name: Nuke an {{ scylla_edition }} pin file if exists file: state: absent - path: /etc/apt/preferences.d/99-scylla + path: "/etc/apt/preferences.d/99-{{ scylla_package_prefix }}" - - name: Install latest OSS Scylla + - name: Install latest {{ scylla_edition }} Scylla apt: - name: scylla + name: "{{ scylla_package_prefix }}" state: latest - when: scylla_edition == 'oss' - - - block: - - name: Nuke an Enterprise pin file if exists - file: - state: absent - path: /etc/apt/preferences.d/99-scylla-enterprise - - name: Install latest Enterprise Scylla + - name: Install latest {{ scylla_edition }} Scylla machine image apt: - name: scylla-enterprise + name: "{{ scylla_package_prefix }}-machine-image" state: latest - when: scylla_edition == 'enterprise' + when: scylla_version_to_install == 'latest' ### Handle non-latest version installation - name: Install explicitly specified Scylla version block: - - name: Set Scylla package prefix as OSS - set_fact: - scylla_package_prefix: "scylla" - when: scylla_edition == 'oss' - - - name: Set Scylla package prefix as Enterprise - set_fact: - scylla_package_prefix: "scylla-enterprise" - when: scylla_edition == 'enterprise' - name: Get versions of {{ scylla_edition }} package # 'apt list -a' output has a package version as a second column and an arch as a third one. @@ -75,10 +60,32 @@ group: root mode: '0644' - - name: "Install {{ aptversions.stdout }}" + - name: "Install {{ aptversions.stdout }} {{ scylla_edition }}" apt: name: "{{ scylla_package_prefix }}={{ aptversions.stdout }}" state: present allow_downgrade: yes + + - name: Get versions of {{ scylla_edition }} machine image package + # 'apt list -a' output has a package version as a second column and an arch as a third one. + # Let's filter by the arch first and then cut the version column. + # Then we will filter out all rows that start with a requested version string followed by a digit to filter out version like 2021.1.11 when 2021.1.1 was requested. + # And finally, we are going to get rid of duplications. + shell: apt list -a {{ scylla_package_prefix }}-machine-image 2>/dev/null | awk '{split($0,a," "); print a[2]}' | egrep "^{{ stripped_scylla_machine_image_version_escaped }}" | sort | uniq + register: aptversions_machine_image + vars: + stripped_scylla_machine_image_version_escaped: "{{ scylla_version_split[0][0] | regex_escape }}\\-" + + - name: "Validate scylla-machine image version correctness" + ansible.builtin.fail: + msg: "Too many/few choices for a requested version '{{ stripped_scylla_machine_image_version_escaped }}': {{ aptversions_machine_image.stdout_lines }}. Fix your Scylla scylla_version or scylla_deb_repos/scylla_repo_keys!" + when: aptversions_machine_image.stdout_lines | length != 1 + + - name: "Install {{ aptversions_machine_image.stdout }} {{ scylla_edition }} machine image" + apt: + name: "{{ scylla_package_prefix }}-machine-image={{ aptversions_machine_image.stdout }}*" + state: present + allow_downgrade: yes + when: scylla_version_to_install != 'latest' become: true \ No newline at end of file diff --git a/ansible-scylla-node/tasks/RedHat.yml b/ansible-scylla-node/tasks/RedHat.yml index 9137360c..a2c5e0cb 100644 --- a/ansible-scylla-node/tasks/RedHat.yml +++ b/ansible-scylla-node/tasks/RedHat.yml @@ -82,34 +82,40 @@ when: item.split(".")[-1] == "repo" become: true -- name: Install Scylla +- name: Install {{ scylla_edition }} block: - - name: Install latest OSS Scylla + - name: Install latest {{ scylla_edition }} Scylla yum: - name: scylla + name: "{{ scylla_package_prefix }}" state: latest lock_timeout: 60 - when: scylla_version == 'latest' and scylla_edition == 'oss' + when: scylla_version == 'latest' - - name: Install latest Enterprise Scylla + - name: Install latest {{ scylla_edition }} Scylla machine image yum: - name: scylla-enterprise + name: "{{ scylla_package_prefix }}-machine-image" state: latest - when: scylla_version == 'latest' and scylla_edition == 'enterprise' + lock_timeout: 60 + when: scylla_version == 'latest' - - name: Install specified OSS Scylla + - name: Install specified {{ scylla_edition }} Scylla yum: - name: "scylla-{{ scylla_version }}" + name: "{{ scylla_package_prefix }}-{{ scylla_version }}" state: present lock_timeout: 60 - when: scylla_version != 'latest' and scylla_edition == 'oss' + when: scylla_version != 'latest' + + - name: Split Scylla version by '-' + set_fact: + scylla_version_split: "{{ scylla_version.split('-')[0] }}" - - name: Install specified Enterprise Scylla + - name: Install specified {{ scylla_edition }} Scylla machine image yum: - name: "scylla-enterprise-{{ scylla_version }}" + name: "{{ scylla_package_prefix }}-machine-image-{{ scylla_version_split }}" state: present lock_timeout: 60 - when: scylla_version != 'latest' and scylla_edition == 'enterprise' + when: scylla_version != 'latest' + become: true - name: Configure SELinux diff --git a/ansible-scylla-node/tasks/common.yml b/ansible-scylla-node/tasks/common.yml index ccca4702..588a53d3 100644 --- a/ansible-scylla-node/tasks/common.yml +++ b/ansible-scylla-node/tasks/common.yml @@ -42,6 +42,25 @@ - name: Collect IO settings for the first node of every DC block: + - name: check for existing io_properties for cloud run + stat: + path: /etc/scylla.d/io_properties.yaml + register: io_prop_cloud_stat + + - name: check for scylla_cloud_io_setup + stat: + path: /opt/scylladb/scylla-machine-image/scylla_cloud_io_setup + register: io_cloud_setup + + - name: Run IO setup in case this is pre-configured environment + shell: | + /opt/scylladb/scylla-machine-image/scylla_cloud_io_setup + become: true +# if above is not found leverage /opt/scylladb/python3/bin/python3 /opt/scylladb/scylla-machine-image/lib/scylla_cloud_io_setup.py ? +# or provide our own role runner for pre 2022.2.1 ? + when: (io_cloud_setup.stat.exists) and (io_prop_cloud_stat.stat.exists|bool == False) and (present_scylla_disks.stdout|int > 0) +# we should maybe add a better way how to detect if this is cloud and run it, otherwise fallback to below (though above should fall back to it too, but it was broken in early 2022.1 and 2022.2.0) + - name: check for existing io_properties stat: path: /etc/scylla.d/io_properties.yaml diff --git a/ansible-scylla-node/tasks/main.yml b/ansible-scylla-node/tasks/main.yml index 7804a1b6..3fb5fc7c 100644 --- a/ansible-scylla-node/tasks/main.yml +++ b/ansible-scylla-node/tasks/main.yml @@ -8,6 +8,16 @@ package_facts: manager: auto +- name: Set Scylla package prefix as OSS + set_fact: + scylla_package_prefix: "scylla" + when: scylla_edition == 'oss' + +- name: Set Scylla package prefix as Enterprise + set_fact: + scylla_package_prefix: "scylla-enterprise" + when: scylla_edition == 'enterprise' + # Upgrade - name: Upgrade Scylla include_tasks: upgrade/main.yml From 7e403d2acd8f037bcd67764fe68979ca95574ee9 Mon Sep 17 00:00:00 2001 From: Lubos Kosco Date: Fri, 4 Aug 2023 09:43:25 +0200 Subject: [PATCH 4/4] 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..6de10489 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-3 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