Setup a server able to run Selenium tests and notify via email&phone in case of failure.
Control machine = the machine Ansible will run on (your local dev machine)
Client machine = the machine that Selenium will be setup on
This was tested with Client machines running Ubuntu 16.04.3. Other releases should work. Other distributions were not tested.
Some deprecation warnings (caused by upstream code) might be thrown. They can be ignored.
One of the Ansible tasks ("Register systemd service status") will fail. Can be ignored.
- A Sendgrid account and it's API credentials (Full Access)
- A Twilio account and it's API crendetials and phone number
- A fresh server that you are able to SSH to (the Client machine)
a. On Ubuntu, run:
sudo easy_install pip
sudo pip install ansible
Other OSs, check http://docs.ansible.com/ansible/latest/intro_installation.html
b. Confirm Ansible works ok by running:
ansible --version
c. Ensure all Ansible roles are available on the Control machine by running the following command on your Control machine, in the root of this repo:
ansible-galaxy install -r requirements.yml
a. Add the IP(s) of the client machine(s) to the hosts
file (in the root directory of this repo), under [test_runners]
. Each IP on a new line.
b. Change the client_user
in vars/main.yml
to the username you created on the Client machine
c. Add the credentials for Sendgrid and Twilio (get them from https://www.twilio.com/console/sms/dashboard) to vars/main.yml
d. Add the emails that will be notified to send_email_notifications_to
in vars/main.yml
, comma separated
e. Add the phone numbers that will be notified to send_sms_notifications_to
in vars/main.yml
, comma separated
Start the Client machine setup by running the following command on your Control machine, in the root of this repo:
ansible-playbook provision.yml
ansible-playbook create_test_suite.yml
To upload new tests to the test server, run:
ansible-playbook upload_tests.yml