diff --git a/tools/docker/Dockerfile_script.sh b/tools/docker/Dockerfile_script.sh index 60ac4a39d..4c6eee0bd 100755 --- a/tools/docker/Dockerfile_script.sh +++ b/tools/docker/Dockerfile_script.sh @@ -27,9 +27,17 @@ oslo-config-generator --config-file /opt/stack/mistral/tools/config/config-gener python /opt/stack/mistral/tools/sync_db.py --config-file /home/mistral/mistral.conf #Configure Mistral. -sed -i 's/\[database\]/\[database\]\nconnection = sqlite:\/\/\/\/home\/mistral\/mistral.sqlite/' /home/mistral/mistral.conf -sed -i 's/\[oslo_messaging_rabbit\]/\[oslo_messaging_rabbit\]\nrabbit_host = rabbitmq/' /home/mistral/mistral.conf -sed -i 's/\[pecan\]/\[pecan\]\nauth_enable = false/' /home/mistral/mistral.conf +python -c " +import ConfigParser +c = ConfigParser.ConfigParser() +c.read('/home/mistral/mistral.conf') +c.set('database','connection','sqlite:////home/mistral/mistral.sqlite') +c.set('DEFAULT', 'transport_url', 'rabbit://guest:guest@rabbitmq:5672/') +c.set('oslo_policy', 'policy_file', '/opt/stack/mistral/etc/policy.json') +c.set('pecan', 'auth_enable', 'false') +with open('/home/mistral/mistral.conf', 'w') as f: + c.write(f) +" # install pyv8 to be able to run javscript actions (note that this breaks # portability because of architecture dependent binaries) diff --git a/tools/docker/start_mistral_rabbit_mysql.sh b/tools/docker/start_mistral_rabbit_mysql.sh index 6c40f2db0..284f7f5a9 100755 --- a/tools/docker/start_mistral_rabbit_mysql.sh +++ b/tools/docker/start_mistral_rabbit_mysql.sh @@ -4,6 +4,7 @@ docker rm -f mistral-mysql mistral-rabbitmq mistral | true docker run -d --name mistral-mysql -e MYSQL_ROOT_PASSWORD=strangehat mysql docker run -d --name mistral-rabbitmq rabbitmq + docker run -d --link mistral-mysql:mysql --link mistral-rabbitmq:rabbitmq --name mistral mistral-all sleep 10 @@ -17,8 +18,8 @@ docker exec mistral python -c " import ConfigParser c = ConfigParser.ConfigParser() c.read('/home/mistral/mistral.conf') +c.set('DEFAULT', 'transport_url', 'rabbit://guest:guest@rabbitmq:5672/') c.set('database','connection','mysql://root:strangehat@mysql:3306/mistral') -c.set('oslo_messaging_rabbit', 'rabbit_host', 'rabbitmq') c.set('pecan', 'auth_enable', 'false') with open('/home/mistral/mistral.conf', 'w') as f: c.write(f) @@ -35,4 +36,4 @@ Enter the container: List workflows docker exec mistral mistral workflow-list -" \ No newline at end of file +"