Added Dockerfile to create docker image.
Docker image will be created using this Dockerfile. For initial doc please refer https://review.openstack.org/#/c/257130/ TODO: 1) project-config will be change to add docker image creation support each time changes will be merged to master branch. 2) Add info to doc about download docker image and how to use this image. Docker image will be uploaded to following loaction. https://tarballs.openstack.org/mistral/images/mistral-docker.tar Change-Id: I808b3ffc8ae4091c03d33a3aca9f1236f1a18fdc Partially-implements: blueprint mistral-docker-image
This commit is contained in:
parent
6fd87d8f05
commit
382cc8063b
36
Dockerfile
Normal file
36
Dockerfile
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
FROM ubuntu:14.04
|
||||||
|
MAINTAINER hardik.parekh@nectechnologies.in
|
||||||
|
|
||||||
|
#Set Up RabbitMQ.
|
||||||
|
RUN sudo apt-get update && apt-get install -y rabbitmq-server
|
||||||
|
|
||||||
|
#Mistral Installation.
|
||||||
|
RUN sudo apt-get update && apt-get install -y python-dev python-setuptools libffi-dev libxslt1-dev libxml2-dev libyaml-dev libssl-dev git python-pip
|
||||||
|
RUN sudo pip install tox==1.6.1
|
||||||
|
RUN mkdir -p /opt/stack/mistral
|
||||||
|
ADD . /opt/stack/mistral
|
||||||
|
WORKDIR /opt/stack/mistral
|
||||||
|
RUN pip install .
|
||||||
|
RUN mkdir /etc/mistral
|
||||||
|
RUN oslo-config-generator --config-file tools/config/config-generator.mistral.conf --output-file /etc/mistral/mistral.conf
|
||||||
|
RUN python tools/sync_db.py --config-file /etc/mistral/mistral.conf
|
||||||
|
|
||||||
|
#python-mistralclient Installation.
|
||||||
|
RUN pip install python-mistralclient
|
||||||
|
|
||||||
|
#Configure Mistral.
|
||||||
|
RUN sed -ri '/\[oslo_messaging_rabbit\]\//rabbit_userid/a rabbit_userid = $RABBIT_USERID' /etc/mistral/mistral.conf
|
||||||
|
RUN sed -ri '/\[oslo_messaging_rabbit\]\//rabbit_password/a rabbit_password = $RABBIT_PASSWORD' /etc/mistral/mistral.conf
|
||||||
|
RUN sed -ri '$a\auth_enable = false' /etc/mistral/mistral.conf
|
||||||
|
VOLUME ["/home/mistral"]
|
||||||
|
WORKDIR /home/mistral
|
||||||
|
|
||||||
|
#Configure post launch script.
|
||||||
|
RUN sudo apt-get install -y screen
|
||||||
|
RUN echo "#!/bin/bash" > /root/postlaunch.sh
|
||||||
|
RUN echo "sudo cp -n /etc/mistral/mistral.conf /home/mistral/" >> /root/postlaunch.sh
|
||||||
|
RUN echo "sudo service rabbitmq-server start" >> /root/postlaunch.sh
|
||||||
|
RUN echo "screen -d -m mistral-server --server all --config-file /home/mistral/mistral.conf" >> /root/postlaunch.sh
|
||||||
|
RUN chmod 755 /root/postlaunch.sh
|
||||||
|
RUN echo "/root/postlaunch.sh" >>~/.bashrc
|
||||||
|
ENTRYPOINT /bin/bash
|
Loading…
Reference in New Issue
Block a user