Add --pull option to the tool/build.py
Now the tool/build.py can build images locally and push images to the repository.
This new option will allow the build tool to pull images from a Docker
registry. This allows user to pull images before running ansible deployment.
For example
./tool/build.py --pull Pull image from the default kollaglue in Docker hub
./tool/build.py --pull -n 192.168.10.101:5000
./tool/build.py --pull -n 192.168.10.101:5000 haproxy
Whiteboard
Agreed with Sam that build.py is not a right place to pull image. - Hui Kang
Ansible itself has the modules to do this. I would think a new 'pull.yml' playbook that sits beside site.yml would be more appropriate. I don't agree with adding --pull to the build.py since that is a single node dev tool. --SamYaple
Hi, Sam. Since image name for each container is defined in each role, it kind of tedious to put them all in the new pull.yml file (ie.g., include from each default/main.yml). Another option is to add a pull.yml for each role and the pull.yml is only executed if "--tags pull" is provided in the command line. What do you think. -- Hui
I am ok with a pull.yml, its actually what I have in the Yaodu project I did. I am working on a way to reuse the same roles in different playbooks a bit cleaner than just tags since those are... limited at best. --SamYaple