Add --pull option to the tool/build.py

Registered by Hui Kang

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
                         Pull all the kolla images from docker registry on
                         192.168.10.101:5000

./tool/build.py --pull -n 192.168.10.101:5000 haproxy
                         Pull only the haproxy images from docker registry on
                         192.168.10.101:5000

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
Hui Kang
Direction:
Needs approval
Assignee:
Hui Kang
Definition:
Discussion
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

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

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.