iyth888 发表于 2017-6-26 17:24:36

手动安装OpenStack Mistral

Prepare packages:



$ sudo apt-get install python-dev python-setuptools python-pip libffi-dev libxslt1-dev libxml2-dev libyaml-dev libssl-dev
$ cd ~
$ git clone https://github.com/openstack/mistral.git

$ git clone https://github.com/gryf/mistral-evacuate.git

$ cd mistral
$ git checkout –b stable/mitaka origin/stable/mitaka
$ cp ~/mistral-evacuate/filter_vm_action.py ./
$ cp ~/mistral-evacuate/evacuate_vm_action.py ./
$ tox -egenconfig


append
lines in mistral/setup.cfg if you have some customed actions for mistral:




mistral.actions =

custom.filter_vm = filter_vm_action:FilterVmAction
custom.evacuate = evacuate_vm_action:EvacuateVmAction


generate
mistral.conf



$ cd ~/mistral
$ oslo-config-generator --config-file tools/config/config-generator.mistral.conf --output-file etc/mistral.conf
add following lines in mistral.conf:




logfile = /opt/stack/logs/mistral.log
rpc_backend = rabbit


connection = mysql+pymysql://root:<password>@controller:3306/mistral


auth_uri = http://controller:5000/v3

identity_uri = http://controller:35357/

auth_version = v3
admin_user = admin
admin_password = <password>
admin_tenant_name = admin


rabbit_userid = stackrabbit
rabbit_password = <password>
rabbit_host = controller

register mistral service and endpoints on keystone:



$ . admin-openrc
$ MISTRAL_URL = “http://172.16.13.40:8989/v2”

$ openstack service create workflow --name mistral --description 'OpenStack Workflow service'
$ openstack endpoint create workflow --region RegionOne --publicurl $MISTRAL_URL --adminurl $MISTRAL_URL --internalurl $MISTRAL_URL
create mysql database mistral:



mysql -u root -p

CREATE DATABASE mistral;
USE mistral
GRANT ALL ON mistral.* TO ‘root’@’%’;


Local
installation and prepare database:



$ cd ~/mistral
$ sudo pip install –e .
$ mistral-db-manage --config-file etc/mistral.conf upgrade head
$ mistral-db-manage --config-file etc/mistral.conf populate


start
mistral service:



# python mistral/cmd/launch.py --server all --config-file etc/mistral.conf
页: [1]
查看完整版本: 手动安装OpenStack Mistral