This repository contains testing material for HomeBox.
The files in this repository are used by the HomeBox continuous integration server at jenkins.homebox.space.
The folder configs/generic contains generic configurations that can be used on any hardware or cloud provider, witout any specificity.
For any question or suggestion, you can write an email to [email protected].
This folder contains some of the code to control the testing environment on Vultr, and will be completed as an ongoing process. The servers are controlled through Jenkins on https://jenkins.homebox.space, but this can also be done from the command line, with an API key, like the examples below.
This is a huge “work-in-progress”, but it is enough for now to drive the tests of two flavours of homebox instances. The playbooks is called by Jenkins, to run the continuous integration tests.
For the tests to run correctly, a docker-compose is used that provides a staging Acme server, a DNS server and a package proxy cache. There is a repository to build the Jenkins continuous integration stack with a specific domain, hosted on GitHub.
This local repository does the following:
- Start (optionally after reinstall) the virtual machine(s) needed for the tests
- Activate the private IP address of the virtual machine
- Attach the private IP address to the docker network of the continuous integration server
The Jenkins CI server is responsible of starting the installation and the integration tests.
The following command example will create the Buster servers if they don't exists, and start them:
export VULTR_API_KEY='RAR56637DKULV27RML4ACCFFKQSR2TOV6FR8'
ansible-playbook -vv -i ../config/hosts-local.yml -e env=vultr -e testing=buster playbooks/environment-start.yml
export VULTR_API_KEY='RAR56637DKULV27RML4ACCFFKQSR2TOV6FR8'
ansible-playbook -vv -i ../config/hosts-local.yml -e env=vultr -e testing=buster playbooks/environment-stop.yml
The servers are automatically turned off after the tests.
This will be used for the weekly tests, when the stack is installed from scratch.
export VULTR_API_KEY='RAR56637DKULV27RML4ACCFFKQSR2TOV6FR8'
ansible-playbook -vv -i ../config/hosts-local.yml -e env=vultr -e testing=buster playbooks/environment-reisntall.yml
Note:
The repository is organised in a way that makes possible to create new cloud providers easily. Copy the vultr folder, with another provider name, create the code to start, stop and reinstall the virtual machines, and voila. The only requirement is the virtual machines should able to reach the docker IP address of the continuous integration server.