クラウドコンピューティングインフラストラクチャプラットフォームのIaaS(OpenStackの)超詳細な建物(XIV)熱のインストールサービス

注意:アクセスをし、ブログの内容を更新し
、インストールプロセス全体があまりにも面倒OpenStackのオープンソースであるため、コマンドが複雑すぎる、長すぎるので、全体のインストールシェルスクリプトコマンドが書かれました。

コンテンツのスクリプトの量も、自己押されたgithubののケアセンターのソースを。
これは、あるスクリプトBenpian内容githubのリポジトリ位置
制御ノード
スクリプト概要

#!/bin/bash
source /etc/xiandian/openrc.sh
source /etc/keystone/admin-openrc.sh
mysql -uroot -p$DB_PASS -e "create database IF NOT EXISTS heat ;"
mysql -uroot -p$DB_PASS -e "GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'localhost' IDENTIFIED BY '$HEAT_DBPASS' ;"
mysql -uroot -p$DB_PASS -e "GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'%' IDENTIFIED BY '$HEAT_DBPASS' ;"
yum install openstack-heat-api openstack-heat-api-cfn openstack-heat-engine -y
openstack user create --domain $DOMAIN_NAME --password $HEAT_PASS heat
openstack role add --project service --user heat admin
openstack service create --name heat --description "Orchestration" orchestration
openstack service create --name heat-cfn --description "Orchestration"  cloudformation
openstack endpoint create --region RegionOne orchestration public http://$HOST_NAME:8004/v1/%\(tenant_id\)s
openstack endpoint create --region RegionOne orchestration internal http://$HOST_NAME:8004/v1/%\(tenant_id\)s
openstack endpoint create --region RegionOne orchestration admin http://$HOST_NAME:8004/v1/%\(tenant_id\)s
openstack endpoint create --region RegionOne cloudformation public http://$HOST_NAME:8000/v1
openstack endpoint create --region RegionOne cloudformation internal http://$HOST_NAME:8000/v1
openstack endpoint create --region RegionOne cloudformation admin http://$HOST_NAME:8000/v1
openstack domain create --description "Stack projects and users" heat
openstack user create --domain heat  --password $HEAT_PASS heat_domain_admin
openstack role add --domain heat --user-domain heat --user heat_domain_admin admin
openstack role create heat_stack_owner
openstack role add --project demo --user demo heat_stack_owner
openstack role create heat_stack_user
crudini --set /etc/heat/heat.conf database connection mysql+pymysql://heat:$HEAT_DBPASS@$HOST_NAME/heat
crudini --set /etc/heat/heat.conf DEFAULT rpc_backend rabbit
crudini --set /etc/heat/heat.conf oslo_messaging_rabbit rabbit_host $HOST_NAME
crudini --set /etc/heat/heat.conf oslo_messaging_rabbit rabbit_userid $RABBIT_USER
crudini --set /etc/heat/heat.conf oslo_messaging_rabbit rabbit_password  $RABBIT_PASS
crudini --set /etc/heat/heat.conf DEFAULT auth_strategy keystone
crudini --set /etc/heat/heat.conf keystone_authtoken auth_uri  http://$HOST_NAME:5000
crudini --set /etc/heat/heat.conf keystone_authtoken auth_url  http://$HOST_NAME:35357
crudini --set /etc/heat/heat.conf keystone_authtoken memcached_servers  $HOST_NAME:11211
crudini --set /etc/heat/heat.conf keystone_authtoken auth_type  password
crudini --set /etc/heat/heat.conf keystone_authtoken project_domain_name  $DOMAIN_NAME
crudini --set /etc/heat/heat.conf keystone_authtoken user_domain_name $DOMAIN_NAME
crudini --set /etc/heat/heat.conf keystone_authtoken project_name  service
crudini --set /etc/heat/heat.conf keystone_authtoken username  heat
crudini --set /etc/heat/heat.conf keystone_authtoken password  $HEAT_PASS

ここでは、操作コマンドの詳細は、(スクリプトがすでに記事のすべての操作コマンドが含まれていますが、全体の処理スクリプトに精通した後、提案はまだ再び実行されている)のこの部分であります

10インストール熱割当てサービス
#Controllerノード

10.1通过脚本安装heat服务
10.2-10.8编配服务的操作命令已经编写成shell脚本,通过脚本进行一键安装。如下:
#Controller节点
执行脚本iaas-install-heat.sh进行安装


熱配分サービスパッケージをインストール10.2

# yum install openstack-heat-api openstack-heat-api-cfn openstack-heat-engine –y

10.3データベースの作成

# mysql -u root -p
mysql> CREATE DATABASE heat;
mysql> GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'localhost' IDENTIFIED BY '000000';     mysql> GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'%' IDENTIFIED BY  '000000';

10.4ユーザーの作成

openstack user create --domain default --password 000000 heat
openstack role add --project service --user heat admin
openstack domain create --description "Stack projects and users" heat
openstack user create --domain heat  --password 000000  heat_domain_admin
openstack role add --domain heat --user-domain heat --user heat_domain_admin admin
openstack role create heat_stack_owner
openstack role add --project demo --user demo heat_stack_owner
openstack role create heat_stack_user

10.5作成およびエンドポイントのAPIエンドポイント

openstack service create --name heat --description "Orchestration" orchestration
openstack service create --name heat-cfn --description "Orchestration"  cloudformation 
openstack endpoint create --region RegionOne orchestration public http://controller:8004/v1/%\(tenant_id\)s
openstack endpoint create --region RegionOne orchestration internal http://controller:8004/v1/%\(tenant_id\)s
openstack endpoint create --region RegionOne orchestration admin http://controller:8004/v1/%\(tenant_id\)s
openstack endpoint create --region RegionOne cloudformation public http://controller:8000/v1
openstack endpoint create --region RegionOne cloudformation internal http://controller:8000/v1
openstack endpoint create --region RegionOne cloudformation admin http://controller:8000/v1

10.6設定のヒートサービス

openstack-config --set /etc/heat/heat.conf database connection mysql+pymysql://heat:000000@controller/heat
openstack-config --set /etc/heat/heat.conf DEFAULT rpc_backend rabbit
openstack-config --set /etc/heat/heat.conf oslo_messaging_rabbit rabbit_host controller
openstack-config --set /etc/heat/heat.conf oslo_messaging_rabbit rabbit_userid openstack
openstack-config --set /etc/heat/heat.conf oslo_messaging_rabbit rabbit_password  000000
openstack-config --set /etc/heat/heat.conf DEFAULT auth_strategy keystone
openstack-config --set /etc/heat/heat.conf keystone_authtoken auth_uri  http://controller:5000
openstack-config --set /etc/heat/heat.conf keystone_authtoken auth_url  http://controller:35357
openstack-config --set /etc/heat/heat.conf keystone_authtoken memcached_servers  controller:11211
openstack-config --set /etc/heat/heat.conf keystone_authtoken auth_type  password
openstack-config --set /etc/heat/heat.conf keystone_authtoken project_domain_name  default
openstack-config --set /etc/heat/heat.conf keystone_authtoken user_domain_name default
openstack-config --set /etc/heat/heat.conf keystone_authtoken project_name  service
openstack-config --set /etc/heat/heat.conf keystone_authtoken username  heat
openstack-config --set /etc/heat/heat.conf keystone_authtoken password  000000
openstack-config --set /etc/heat/heat.conf trustee auth_plugin password
openstack-config --set /etc/heat/heat.conf trustee auth_url http://controller:35357
openstack-config --set /etc/heat/heat.conf trustee username heat
openstack-config --set /etc/heat/heat.conf trustee password 000000
openstack-config --set /etc/heat/heat.conf trustee user_domain_name default
openstack-config --set /etc/heat/heat.conf clients_keystone auth_uri http://controller:35357
openstack-config --set /etc/heat/heat.conf trustee ec2authtoken auth_uri http://controller:5000
openstack-config --set /etc/heat/heat.conf DEFAULT heat_metadata_server_url http://controller:8000
openstack-config --set /etc/heat/heat.conf DEFAULT heat_waitcondition_server_url http://controller:8000/v1/waitcondition
openstack-config --set /etc/heat/heat.conf DEFAULT stack_domain_admin heat_domain_admin
openstack-config --set /etc/heat/heat.conf DEFAULT stack_domain_admin_password 000000
openstack-config --set /etc/heat/heat.conf DEFAULT stack_user_domain_name heat

10.7データベースの作成

su -s /bin/sh -c "heat-manage db_sync" heat

10.8スタートサービス

systemctl enable openstack-heat-api.service openstack-heat-api-cfn.service openstack-heat-engine.service
systemctl restart openstack-heat-api.service openstack-heat-api-cfn.service openstack-heat-engine.service


10.9 nginxのテンプレート

nginx模板文件存放在/etc/xiandian/目录下,在使用模板之前需成功安装,ceilometer监控服务以及alarm监控服务。
[root@controller xiandian]# ls
lb-server.yaml  nginx_flat.yaml  nginx.yaml  openrc.sh
[root@controller xiandian]# 


构建一台http服务器,将lb-server.yaml模板文件上传至http服务器中。
(其实我们之前已经构建好了httpd的服务了。所以我们只需要把这几个文件放到httpd服务的指定目录即可。)

[root@controller xiandian]# cd /var/www/html/

おすすめ

転載: blog.csdn.net/qq_28513801/article/details/90170677