Example Mistral docker container broke due to oslo.policy update
The Mistral docker example does not work at the moment. The oslo.policy library now requires the policy file to be set in the configuration. Closes Bug: #1593286 Signed-off-by: Andras Kovi <akovi@nokia.com> Change-Id: I7877f2a7acac5efca869e3f00b9e76cf8b3f5d66
This commit is contained in:
parent
b03f1f1f87
commit
16c5ca29ec
@ -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)
|
||||
|
@ -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
|
||||
|
||||
"
|
||||
"
|
||||
|
Loading…
Reference in New Issue
Block a user