加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

安装mistral

发布时间:2020-12-16 01:55:47 所属栏目:安全 来源:网络整理
导读: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

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 mistralG

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

#密码是:[email?protected]

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:[email?protected]

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:[email?protected]/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 [email?protected]

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:[email?protected]

openstack-config --set /etc/mistral/mistral.conf database connection mysql+pymysql://mistral:[email?protected]/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 [email?protected]

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

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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读