appside
appside copied to clipboard
CI
We want to be able to test latest AppFlow code based on Continuous Integration via Jenkins.
The basic idea is to run Jenkins inside a Docker container or a FreeBSD Jail and trigger the build/test process on each git commit to master or a specific testing branch via pipeline.
The stages of the pipeline process (thanks to @sneaker for suggestions on this), should run in parallel and perform this specific tasks:
- create test LXC containers on Proxmox or new test VMs on FreeNAS Corral via bhyve.
- provision those "nodes" with AppFlow, via
ssh, against the latestmrrobotexample configs. - report build success/failures on slack.
We should trigger the LXC/VM creation via API, like pvesh on Proxmox and vm on FreeNAS Corral, we also could use curl REST API calls.
For proxmox we can also consider using proxmoxer but we would need to write some Python code in that case.
this allows self-provisioning agains mrrobot using local connection:
root@ubuntu:/tmp/appflow# ansible-playbook -e conf_env=development --skip-tags hosts --limit local -i examples/appflow-mrrobot/development/inventory playbooks/generic.yml -- works inside a Docker container.
This also works in case we want to simulate atlantis:
echo "127.0.0.1 atlantis" > /etc/hosts
root@ubuntu-14:/tmp/appflow# ansible-playbook -e ansible_connection=local --skip-tags hosts --limit atlantis -i examples/appflow-mrrobot/development/inventory playbooks/generic.yml
In case we don't have ansible on the Jenkins node we could trigger remote self-provisioning directly on the Docker container, LXC or VM.