Hack all problem images and put resolv.conf there

This commit is contained in:
Aleksandr Didenko 2016-06-30 16:12:26 +02:00
parent 6be93a3b87
commit bb3a57a719
2 changed files with 8 additions and 6 deletions

View file

@ -51,13 +51,15 @@ build_images() {
mcp-microservices --config-file /root/mcp.conf build &> /var/log/mcp-build.log
}
hack_base_image() {
cp /root/resolv.conf ccp/microservices-repos/ms-debian-base/docker/base/
sed '/COPY requirements.txt/a COPY resolv.conf /etc/resolv.conf' -i ccp/microservices-repos/ms-debian-base/docker/base/Dockerfile.j2
hack_images() {
for dir in ~/microservices-repos/ms-{nova,neutron}*/docker/* ; do
cp /root/resolv.conf $dir/
sed '/MAINTAINER/a COPY resolv.conf /etc/resolv.conf' -i $dir/Dockerfile.j2
done
}
create_mcp_conf
create_registry
create_resolvconf
hack_base_image
hack_images
build_images

View file

@ -1,10 +1,10 @@
- hosts: kube-master
pre_tasks:
- name: Rsync CCP repos
synchronize: src=/root/ccp/microservices-repos/ dest=/root/microservices-repos/
synchronize: src=../ccp/microservices-repos/ dest=/root/microservices-repos/
- name: Rsync MCP scripts and repo
synchronize:
src: /root/ccp/
src: ../ccp/
dest: /root/ccp/
rsync_opts:
- "--exclude=/microservices-repos"