Ubuntu 14.04一步一步安装Openstack Kilo版本-13(heat)
2015-06-09 14:37
549 查看
13.1. 创建数据库
mysql -u root -pcreate database heat;
grant all privileges on heat.* to'heat'@'kilo' identified by 'heat_dbpass';
grant all privileges on heat.* to'heat'@'localhost' identified by 'heat_dbpass';
grant all privileges on heat.* to'heat'@'%' identified by 'heat_dbpass';
exit
13.2. 生成认证和API endpoint
source admin-openrc.shopenstack user create --password-promptheat
User Password:
Repeat User Password:
+----------+----------------------------------+
| Field | Value |
+----------+----------------------------------+
| email | None |
| enabled | True |
| id | e28d0f506ecd461bbaa2715cbb163983 |
| name | heat |
| username |heat |
+----------+----------------------------------+
openstack role add --project service --userheat admin
+-------+----------------------------------+
| Field |Value |
+-------+----------------------------------+
| id | 14b826a870464c67900a963d675cc8cb |
| name | admin |
+-------+----------------------------------+
openstack role create heat_stack_owner
+-------+----------------------------------+
| Field |Value |
+-------+----------------------------------+
| id | bdec914be5be4075b1e8d6f399a0eb4d |
| name | heat_stack_owner |
+-------+----------------------------------+
openstack role add --project demo --userdemo heat_stack_owner
+-------+----------------------------------+
| Field |Value |
+-------+----------------------------------+
| id | bdec914be5be4075b1e8d6f399a0eb4d |
| name | heat_stack_owner |
+-------+----------------------------------+
openstack role create heat_stack_user
+-------+----------------------------------+
| Field |Value |
+-------+----------------------------------+
| id | 249b37e83e2340c9b3f39b3206732fda |
| name | heat_stack_user |
+-------+----------------------------------+
openstack service create --name heat--description "Orchestration" orchestration
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description |Orchestration |
| enabled | True |
| id | d15519626c2c454c85fd60700aa0bd8f |
| name | heat |
| type | orchestration |
+-------------+----------------------------------+
openstack service create --name heat-cfn--description "Orchestration" cloudformation
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description |Orchestration |
| enabled | True |
| id | 30dd934f2ad94b92b98b869559745d28 |
| name | heat-cfn |
| type | cloudformation |
+-------------+----------------------------------+
openstack endpoint create --publicurlhttp://kilo:8004/v1/%\(tenant_id\)s --internalurlhttp://kilo:8004/v1/%\(tenant_id\)s --adminurlhttp://kilo:8004/v1/%\(tenant_id\)s --region RegionOne orchestration
+--------------+-----------------------------------+
| Field | Value |
+--------------+-----------------------------------+
| adminurl |http://kilo:8004/v1/%(tenant_id)s |
| id |35477b227e1f4c75ac053b8232bd5b34 |
|internalurl |http://kilo:8004/v1/%(tenant_id)s |
| publicurl | http://kilo:8004/v1/%(tenant_id)s |
| region | RegionOne |
| service_id | d15519626c2c454c85fd60700aa0bd8f |
| service_name |heat |
| service_type |orchestration |
+--------------+-----------------------------------+
openstack endpoint create --publicurlhttp://kilo:8000/v1/%\(tenant_id\)s --internalurlhttp://kilo:8000/v1/%\(tenant_id\)s --adminurlhttp://kilo:8000/v1/%\(tenant_id\)s --region RegionOne cloudformation
+--------------+-----------------------------------+
| Field | Value |
+--------------+-----------------------------------+
| adminurl | http://kilo:8000/v1/%(tenant_id)s |
| id |c7de144bd98f48afa4ae04f09650e25d |
|internalurl |http://kilo:8000/v1/%(tenant_id)s |
| publicurl | http://kilo:8000/v1/%(tenant_id)s |
| region | RegionOne |
| service_id | 30dd934f2ad94b92b98b869559745d28 |
| service_name |heat-cfn |
| service_type |cloudformation |
+--------------+-----------------------------------+
13.3. 安装heat
sudo apt-get install heat-api heat-api-cfnheat-engine python-heatclient13.4. 配置heat
vim /etc/heat/heat.conf[DEFAULT]
verbose = True
heat_metadata_server_url = http://kilo:8000
heat_waitcondition_server_url =http://kilo:8000/v1/waitcondition
stack_domain_admin = heat_domain_admin
stack_domain_admin_password =heat_domain_pass
stack_user_domain_name = heat_user_domain
rpc_backend = rabbit
[oslo_messaging_rabbit]
rabbit_host = kilo
rabbit_userid = openstack_rabbit_user
rabbit_password = openstack_rabbit_password
[database]
connection =mysql://heat:heat_dbpass@kilo/heat
[keystone_authtoken]
auth_uri = http://kilo:5000/v2.0
identity_uri = http://kilo:35357
admin_tenant_name = service
admin_user = heat
admin_password = heat_pass
13.5. heat-keystone-setup-domain
https://github.com/openstack/heat/blob/stable/kilo/bin/heat-keystone-setup-domainchmod +x heat-keystone-setup-domain
mv heat-keystone-setup-domain /usr/bin/
source admin-openrc.sh
heat-keystone-setup-domain--stack-user-domain-name heat_user_domain --stack-domain-adminheat_domain_admin --stack-domain-admin-password heat_domain_pass
Please updateyour heat.conf with the following in [DEFAULT]
stack_user_domain_id=c94bbc19a1824ea096ccd899cea4cf5b
stack_domain_admin=heat_domain_admin
stack_domain_admin_password=heat_domain_pass
13.6. 生成heat数据库
sudo bash -c "heat-managedb_sync" heat13.7. 重启服务
rm -f /var/lib/heat/heat.sqlitesudo service heat-api restart
sudo serivce heat-api-cfn restart
sudo service heat-engine restart
13.8. 验证安装
source admin-openrc.shvim test-stack.yml
heat_template_version:2014-10-16
description: Asimple server.
parameters:
ImageID:
type: string
description: Image use to boot a server
NetID:
type: string
description: Network ID for the server
resources:
server:
type: OS::Nova::Server
properties:
image: { get_param: ImageID }
flavor: m1.tiny
networks:
- network: { get_param: NetID }
outputs:
private_ip:
description: IP address of the server inthe private network
value: { get_attr: [ server, first_address] }
NET_ID=$(nova net-list | awk '/ demo-net /{ print $2 }')
heat stack-create -f test-stack.yml -P"ImageID=cirros-0.3.3-x86_64;NetID=$NET_ID" testStack
+--------------------------------------+------------+--------------------+----------------------+
| id | stack_name| stack_status | creation_time |
+--------------------------------------+------------+--------------------+----------------------+
|19ff0a49-2c7b-4238-9c58-00e5c3060340 | testStack | CREATE_IN_PROGRESS | 2015-05-27T08:57:02Z |
+--------------------------------------+------------+--------------------+----------------------+
heat stack-list
+--------------------------------------+------------+-----------------+----------------------+
| id | stack_name| stack_status | creation_time |
+--------------------------------------+------------+-----------------+----------------------+
|19ff0a49-2c7b-4238-9c58-00e5c3060340 | testStack | CREATE_COMPLETE | 2015-05-27T08:57:02Z |
+--------------------------------------+------------+-----------------+----------------------+
相关文章推荐
- linux运行run文件显示cannot execute binary file
- 利用ubuntu 14.04+apache+modsecurity实现云WAF
- Linux命令find -perm使用方法
- Squid configuration for rsync proxy --- rsync 代理设置及squid代理服务器相关配置
- 资源共享——《嵌入式Linux应用开发完全手册》韦东山 PDF电子档下载
- Tomcat启动的时候报 validateJarFile(xxxx) jar not loaded
- CentOS 6.5安全加固及性能优化(推荐)
- linux 查看文件命令
- 创建尽可能小的 Docker 容器
- 逆战网站推广,你抓住体验优化了吗?
- linux加程序是否当掉检测脚本
- Centos命令参数自动补全
- linux vi的命令
- 120个PHOTOSHOP技巧帮你加速设计
- tomcat详解
- (1)LinuxI2C驱动--概述
- CentOS 6.4x64编译安装DRBD及备节点同步后容量变小的处理
- 一个安卓开源项目网站
- Google Developing for Android系列文章翻译
- nginx rewrite不支持if 嵌套也不支持逻辑或和逻辑并