安裝mistral

1.安裝mistral安裝包

yum -y install openstack-mistral-api.noarch openstack-mistral-engine.noarch openstack-mistral-executor.noarch openstack-mistral-ui.noarch

2.創建mistral數據庫

mysql -uroot -p

CREATE DATABASE mistral;

GRANT ALL PRIVILEGES ON mistral.* TO 'mistral'@'localhost' IDENTIFIED BY 'P1ssw0rd';

GRANT ALL PRIVILEGES ON mistral.* TO 'mistral'@'%' IDENTIFIED BY 'P1ssw0rd';

#覈實:

select * from information_schema.SCHEMATA where SCHEMA_NAME="mistral";

show grants for mistral\G

select user,host from mysql.user where user="mistral";

3.創建用戶,並將用戶加入到service項目中,並賦予admin權限

openstack user create --domain default --password-prompt mistral

openstack role add --project service --user mistral admin

#密碼是:P@ssw0rd

4.創建 mistral 服務實體.

openstack service create --name mistral --description 'OpenStack Workflow service' workflowv2

openstack endpoint create --region RegionOne workflowv2 public http://controller:8989/v2

openstack endpoint create --region RegionOne workflowv2 internal http://controller:8989/v2

openstack endpoint create --region RegionOne workflowv2 admin http://controller:8989/v2

5.編輯mistral配置文件

openstack-config --set /etc/mistral/mistral.conf DEFAULT transport_url rabbit://openstack:openstack@controller

openstack-config --set /etc/mistral/mistral.conf DEFAULT auth_type keystone

openstack-config --set /etc/mistral/mistral.conf DEFAULT rpc_backend rabbit

openstack-config --set /etc/mistral/mistral.conf database connection mysql+pymysql://mistral:P1ssw0rd@controller/mistral

openstack-config --set /etc/mistral/mistral.conf keystone_authtoken auth_uri http://controller:5000

openstack-config --set /etc/mistral/mistral.conf keystone_authtoken auth_url http://controller:35357/v3

openstack-config --set /etc/mistral/mistral.conf keystone_authtoken memcached_servers controller:11211

openstack-config --set /etc/mistral/mistral.conf keystone_authtoken auth_type password

openstack-config --set /etc/mistral/mistral.conf keystone_authtoken auth_version 3

openstack-config --set /etc/mistral/mistral.conf keystone_authtoken project_domain_name Default

openstack-config --set /etc/mistral/mistral.conf keystone_authtoken user_domain_name Default

openstack-config --set /etc/mistral/mistral.conf keystone_authtoken project_name service

openstack-config --set /etc/mistral/mistral.conf keystone_authtoken username mistral

openstack-config --set /etc/mistral/mistral.conf keystone_authtoken password P@ssw0rd

openstack-config --set /etc/mistral/mistral.conf pecan auth_enable false

或者下面這樣,參考:https://blog.csdn.net/timego/article/details/92796561

openstack-config --set /etc/mistral/mistral.conf DEFAULT transport_url rabbit://openstack:openstack@controller

openstack-config --set /etc/mistral/mistral.conf database connection mysql+pymysql://mistral:P1ssw0rd@controller/mistral

openstack-config --set /etc/mistral/mistral.conf keystone_authtoken auth_uri http://controller:5000/v3

openstack-config --set /etc/mistral/mistral.conf keystone_authtoken auth_url http://controller:35357

openstack-config --set /etc/mistral/mistral.conf keystone_authtoken memcached_servers controller:11211

openstack-config --set /etc/mistral/mistral.conf keystone_authtoken auth_version v3

openstack-config --set /etc/mistral/mistral.conf keystone_authtoken admin_tenant_name service

openstack-config --set /etc/mistral/mistral.conf keystone_authtoken admin_user admin

openstack-config --set /etc/mistral/mistral.conf keystone_authtoken admin_password P@ssw0rd

openstack-config --set /etc/mistral/mistral.conf pecan auth_enable false

6.初始化mistral的數據庫

mistral-db-manage --config-file /etc/mistral/mistral.conf upgrade head

#添加缺省的mistral actions (報錯請無視)

mistral-db-manage --config-file /etc/mistral/mistral.conf populate

clip_image001

7.啓動服務

systemctl enable openstack-mistral-api.service openstack-mistral-engine.service openstack-mistral-executor.service

systemctl start openstack-mistral-api.service openstack-mistral-engine.service openstack-mistral-executor.service

systemctl status openstack-mistral-api.service openstack-mistral-engine.service openstack-mistral-executor.service

8.測試

mistral workbook-list

mistral action-list

mistral task-list

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章