Add dockerfile to build container
Split the main vagrant to remove items we cant do during docker build. Rename openstack -> kolla.yml since thats what it works with.
This commit is contained in:
parent
cea745189d
commit
951eac1fcb
17
Dockerfile
Normal file
17
Dockerfile
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
FROM debian:jessie
|
||||||
|
MAINTAINER Andrew Woodward awoodward@mirantis.com
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get -y install --fix-missing \
|
||||||
|
curl \
|
||||||
|
ssh \
|
||||||
|
ansible \
|
||||||
|
python-pip
|
||||||
|
|
||||||
|
ADD . /vagrant/
|
||||||
|
WORKDIR /vagrant
|
||||||
|
|
||||||
|
RUN ansible-playbook -i "localhost," -c local main.yml
|
||||||
|
|
||||||
|
VOLUME /vagrant
|
2
Vagrantfile
vendored
2
Vagrantfile
vendored
@ -8,7 +8,7 @@ init_script = <<SCRIPT
|
|||||||
apt-get update
|
apt-get update
|
||||||
apt-get -y install python-pip python-dev
|
apt-get -y install python-pip python-dev
|
||||||
pip install ansible
|
pip install ansible
|
||||||
ansible-playbook -i "localhost," -c local /vagrant/main.yml
|
ansible-playbook -i "localhost," -c local /vagrant/main.yml /vagrant/docker.yml
|
||||||
SCRIPT
|
SCRIPT
|
||||||
|
|
||||||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
|
9
docker.yml
Normal file
9
docker.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
- hosts: all
|
||||||
|
sudo: yes
|
||||||
|
tasks:
|
||||||
|
- shell: docker --version
|
||||||
|
ignore_errors: true
|
||||||
|
register: docker_version
|
||||||
|
- shell: curl -sSL https://get.docker.com/ | sudo sh
|
||||||
|
when: docker_version | failed
|
||||||
|
- shell: docker pull debian:jessie
|
@ -2,7 +2,8 @@
|
|||||||
- hosts: all
|
- hosts: all
|
||||||
sudo: yes
|
sudo: yes
|
||||||
tasks:
|
tasks:
|
||||||
- shell: sh /vagrant/kolla/tools/genenv
|
- git: repo=https://github.com/stackforge/kolla.git
|
||||||
|
- shell: sh kolla/tools/genenv
|
||||||
- shell: docker pull {{item}}
|
- shell: docker pull {{item}}
|
||||||
with_items:
|
with_items:
|
||||||
- kollaglue/centos-rdo-glance-registry
|
- kollaglue/centos-rdo-glance-registry
|
6
main.yml
6
main.yml
@ -3,12 +3,6 @@
|
|||||||
- hosts: all
|
- hosts: all
|
||||||
sudo: yes
|
sudo: yes
|
||||||
tasks:
|
tasks:
|
||||||
- shell: docker --version
|
|
||||||
ignore_errors: true
|
|
||||||
register: docker_version
|
|
||||||
- shell: curl -sSL https://get.docker.com/ | sudo sh
|
|
||||||
when: docker_version | failed
|
|
||||||
- shell: docker pull debian:jessie
|
|
||||||
# Setup additional development tools
|
# Setup additional development tools
|
||||||
- apt: name=vim state=present
|
- apt: name=vim state=present
|
||||||
- apt: name=tmux state=present
|
- apt: name=tmux state=present
|
||||||
|
Loading…
Reference in New Issue
Block a user