From 9ca33dcda1b2c639408711bfab241dc7814a2ff2 Mon Sep 17 00:00:00 2001 From: Sean Mooney Date: Mon, 9 May 2022 11:35:01 +0100 Subject: [PATCH] add simple 2 node ubuntu master senario --- molecule/multinode-master/INSTALL.rst | 23 +++++++++++ molecule/multinode-master/converge.yml | 3 ++ molecule/multinode-master/molecule.yml | 53 ++++++++++++++++++++++++++ molecule/multinode-master/verify.yml | 10 +++++ 4 files changed, 89 insertions(+) create mode 100644 molecule/multinode-master/INSTALL.rst create mode 100644 molecule/multinode-master/converge.yml create mode 100644 molecule/multinode-master/molecule.yml create mode 100644 molecule/multinode-master/verify.yml diff --git a/molecule/multinode-master/INSTALL.rst b/molecule/multinode-master/INSTALL.rst new file mode 100644 index 0000000..0c4bf5c --- /dev/null +++ b/molecule/multinode-master/INSTALL.rst @@ -0,0 +1,23 @@ +********************************* +Vagrant driver installation guide +********************************* + +Requirements +============ + +* Vagrant +* Virtualbox, Parallels, VMware Fusion, VMware Workstation or VMware Desktop + +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_vagrant' diff --git a/molecule/multinode-master/converge.yml b/molecule/multinode-master/converge.yml new file mode 100644 index 0000000..d72f59b --- /dev/null +++ b/molecule/multinode-master/converge.yml @@ -0,0 +1,3 @@ +--- +- name: "execute deploy multi-node devstack" + import_playbook: ../../ansible/deploy_multinode_devstack.yaml diff --git a/molecule/multinode-master/molecule.yml b/molecule/multinode-master/molecule.yml new file mode 100644 index 0000000..f971369 --- /dev/null +++ b/molecule/multinode-master/molecule.yml @@ -0,0 +1,53 @@ +--- +dependency: + name: galaxy +verifier: + name: ansible +driver: + name: vagrant + provider: + name: libvirt + # Run vagrant up with --provision. + # Defaults to --no-provision) + provision: no + # vagrant-cachier configuration + # Defaults to 'machine' + # Any value different from 'machine' or 'box' will disable it + cachier: machine + # If set to false, set VAGRANT_NO_PARALLEL to '1' + # Defaults to true + parallel: true + # vagrant box to use by default + # Defaults to 'generic/alpine310' + default_box: 'generic/ubuntu2004' +platforms: + - name: controller + memory: 8192 + cpus: 8 + provider_options: + cpu_mode: 'host-passthrough' + nested: true + provider_raw_config_args: + - cputopology :sockets => '1', :cores => '4', :threads => '2' + - random :model => 'random' + groups: + - controller + - switch + - name: compute1 + memory: 8192 + cpus: 8 + provider_options: + cpu_mode: 'host-passthrough' + nested: true + provider_raw_config_args: + - cputopology :sockets => '1', :cores => '4', :threads => '2' + - random :model => 'random' + groups: + - compute + - peers + - subnode +provisioner: + name: ansible + env: + ANSIBLE_STDOUT_CALLBACK: yaml + ANSIBLE_ROLES_PATH: "${ANSIBLE_ROLES_PATH}:../../submodules/zuul-jobs/roles:../../submodules/devstack/roles:../../submodules/openstack-zuul-jobs/roles" diff --git a/molecule/multinode-master/verify.yml b/molecule/multinode-master/verify.yml new file mode 100644 index 0000000..79044cd --- /dev/null +++ b/molecule/multinode-master/verify.yml @@ -0,0 +1,10 @@ +--- +# This is an example playbook to execute Ansible tests. + +- name: Verify + hosts: all + gather_facts: false + tasks: + - name: Example assertion + assert: + that: true