Main tests catalog of superset-cluster
.
Testing consist of two modules:
- Generates
id_rsa
andid_rsa.pub
keys on the user's host undersetup/
directory and adds them to ssh agent - Adds records to
$HOME/.ssh/config
- Creates
./testsuite/group_vars/testing.yml
group variables for the testsuite - Sets up Terraform infrastructure which consist of 5 equal docker containers imitating standalone nodes, where:
<node-prefix>-0
is set as the primary management node<node-prefix>-1
is set as the secondary management node<node-prefix>-2
is set as the primary mysql node<node-prefix>-3
is set as the secondary mysql node<node-prefix>-4
is set as the secondary mysql node
Ansible playbook running testsuite against applied terraform infrastructure, that include:
- Sanity tests: Conditional checks if the requirements of generated infrastructure are meet.
- System tests:
Simulated end-to-end deployment process of
superset-cluster
against terraform generated infrastructure. - Functional tests: Verifying end-user primary use cases in pipelines of superset and management node component functions
Testing host is the ubuntu:22.04
runner with 1 core of AMD EPYC 7773X x86_64 CPU and 8GiB of RAM
with the software installed
meeting the required criteria
with the following software installed for testing:
terraform v1.0.10
python v3.10.12
with the following third party packages:ansible v9.5.1
Optionally, the following software is installed for doing style checks:
pylint v3.2.4
mypy v1.10.1 (compiled)
flake8 v7.1.0
markdownlint-cli v0.41.0
shellcheck v0.8.0
hadolint v2.12.2
ansible-lint v24.6.1
tflint v0.51.1
yamllint v1.35.1
Navigate to the setup
directory and execute the following
Terraform commands to initialize the infrastructure:
terraform init
terraform apply
Once the commands have successfully completed, switch to the testsuite directory and run the Ansible playbook to start the tests:
ansible-playbook --inventory inventory.yml deploy.yml
Terraform variables consist of singularly defined variables for a given deployed infrastructure:
Variable Name | Description | Default Value |
---|---|---|
gateway |
Network gateway for the container nodes | "172.18.0.1" |
node_prefix |
Prefix of the container nodes | "node" |
node_version |
Version of the container nodes deployed | "1.0" |
subnet |
Network subnet for the container nodes | "172.18.0.0/16" |
Ansible group variables are dynamically defined after terraform setup within a file. The following variables are used:
Variable Name | Description | Default Value |
---|---|---|
virtual_network_interface |
Network interface for the virtual network | "eth0" |
virtual_ip_address |
Virtual IP address assigned to the nodes | "172.18.0.10" |
virtual_network_mask |
Network mask for the virtual network | "255.255.0.0" |
node_prefix |
Prefix for the container nodes | "node" |