ansible-playbook install-docker.yml -i ../env-configuration/qanova/hosts.ini --diff --vault-id @prompt --limit=rdfagent
1. After you've done making your changes to the code, commit and push your changes. The jenkins will build your artifact and push to our registery.errigal.com docker registry. You can access docker.errigal.com to view other available versions.
2. Ensure that the servers containing the agent are in appropriate groups in the Ansible inventory file, like so:
[rdfagent] qanovaoat1 qanovaoat2
Any properties used by rdfagent can be specified via the rdf_agent_env_vars map. Here is an example for airscan rdfagents:
[airscan:vars] [rdf_agent_env_vars] TASK_WORKERS=1 MODEM_MANAGER_URL=http://host.docker.internal:5000 NODE_EXPORTER_URL=http://host.docker.internal:10000/metrics PROM2JSON_PATH=/bin/prom2json
The defaults are quite sane, so this shouldn't be necessary in 99% of cases.
3. Ensure that each server/or a group if using the same agent have the correct token specified as the rdf_access_token variable:
scooat1 ansible_host=10.91.201.96 ansible_ssh_user=scotty ansible_ssh_pass={{ssh_oat1_pass}} ansible_become_pass={{ssh_oat1_pass}} rdf_access_token="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJXXXXiOiJyZGYiLCJleHAiOjQ4MTQ0MTcwMTIsInVzZXJJZCI6NDIsInVzZXJuYW1lIjoic2NvX2FnZW50XzEifQ.sQZ8gkIslfUcsxw15Gg5IxXXXwzfrh9x07h9m-XXXc"
4. Run the ansible command with the desired version to deploy your agent:
ansible-playbook rdf-agent-docker-deploy.yml -i ../env-configuration/qanova/hosts.ini -e version="REL-4.17.0.1" --vault-id @prompt --diff
5. To view the running container do:
docker ps
If it's not running, you can do
docker ps -a
To view logs:
docker logs <containerID/name>
To view env variables etc do:
docker inspect <containerID/name>