OpenStack部署(四)

news2024/11/29 9:46:50

OpenStack部署

    • 8. Dashboard
      • 8.1 安装并配置
      • 8.2 重启web服务器以及会话存储服务
      • 8.3 浏览器访问配置
    • 9. Designate
      • 9.1 创建Designate数据库并授权
      • 9.2 获得admin凭证
      • 9.3 创建designate用户并设置密码
      • 9.4 添加admin角色到designate用户
      • 9.5 创建designate服务实体
      • 9.6 创建designate服务的API端点
      • 9.7 安装组件
      • 9.8 创建RNDC密钥
      • 9.9 配置named.conf文件
      • 9.10 启动DNS服务并添加自启动
      • 9.11 配置designate.conf文件
      • 9.12 同步数据库
      • 9.13 启动指定的中心和API服务并添加自启动
      • 9.14 创建pools.yaml文件
      • 9.15 更新池
      • 9.16 启动指定和 mDNS 服务
      • 9.17 配置neutron使用designate服务
      • 9.18 配置neutron使用ml2模块
      • 9.19 重启neutron服务
      • 9.20 验证操作
      • 9.21 创建一个zone
    • 10. Heat
      • 10.1 创建Heat数据库并授权
      • 10.2 获得admin凭证
      • 10.3 创建heat用户并设置密码
      • 10.4 添加admin角色到heat用户
      • 10.5 创建heat服务实体
      • 10.6 创建Orchestration服务的API端点
      • 10.7 为栈创建heat包含项目和用户的域
      • 10.8 在heat域中创建管理项目和用户的heat_domain_admin用户并设置密码
      • 10.9 添加admin角色到heat域 中的heat_domain_admin用户,启用heat_domain_admin用户管理栈的管理权限
      • 10.10 创建 heat_stack_owner 角色
      • 10.11 添加heat_stack_owner角色到demo项目和用户,启用demo用户管理栈
      • 10.12 创建 heat_stack_user 角色
      • 10.13 安装并配置组件
      • 10.14 同步数据库
      • 10.15 启动Orchestration服务并将其设置为随系统启动
      • 10.16 重启Http web服务使其horizon上显示并管理Heat
      • 10.17 验证操作

在这里插入图片描述

8. Dashboard

Horizon 为 Openstack 提供一个 WEB 前端的管理界面 (UI 服务 )通过 Horizon 所提供的 DashBoard 服务 , 管理员可以使用通过 WEB UI 对 Openstack 整体云环境进行管理 , 并可直观看到各种操作结果与运行状态。

8.1 安装并配置

安装

yum install -y openstack-dashboard

修改配置文件/etc/openstack-dashboard/local_settings

OPENSTACK_HOST = "node-251"
ALLOWED_HOSTS = ['*', ]
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'

CACHES = {
    'default': {
         'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
         'LOCATION': 'controller:11211',
    }
}

OPENSTACK_KEYSTONE_URL = "http://%s:5000/v3" % OPENSTACK_HOST

OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True

OPENSTACK_API_VERSIONS = {
    "identity": 3,
    "image": 2,
    "volume": 2,
}

OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = "default"
OPENSTACK_KEYSTONE_DEFAULT_ROLE = "user"


OPENSTACK_NEUTRON_NETWORK = {
    ...
    'enable_router': False,
    'enable_quotas': False,
    'enable_distributed_router': False,
    'enable_ha_router': False,
    'enable_lb': False,
    'enable_firewall': False,
    'enable_vpn': False,
    'enable_fip_topology_check': False,
}

TIME_ZONE = "Asia/Shanghai"

8.2 重启web服务器以及会话存储服务

[root@openstack ~]# systemctl restart httpd.service memcached.service

8.3 浏览器访问配置

浏览器访问url:http://192.168.31.4/dashboard/
默认管理账号密码: admin/123456(keystone上注册创建的admin用户名密码)

web界面
在这里插入图片描述
由于是在虚拟机部署的环境,前面几次都刷不出页面,后来笔者又加内存了。

9. Designate

Designate 是一个开源 DNS 即服务实施,是用于运行云的 OpenStack 服务生态系统的一部分。
Designate 是 OpenStack 的多租户 DNSaaS 服务。它提供了一个带有集成 Keystone 身份验证的 REST API。它可以配置为根据 Nova 和 Neutron 操作自动生成记录。Designate 支持多种 DNS 服务器,包括 Bind9 和 PowerDNS 4。

详细参考 【openstack】Designate组件,入门级安装(快速)

9.1 创建Designate数据库并授权

[root@openstack ~]# mysql -u root -p
CREATE DATABASE designate CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER designate@'%' IDENTIFIED BY 'Admin@123';
Grant all privileges on designate.* to 'designate'@'%';
flush privileges;

9.2 获得admin凭证

[root@openstack ~]# source admin-openrc

9.3 创建designate用户并设置密码

[root@node-251 openstack]# openstack user create --domain default --password-prompt designate
User Password:
Repeat User Password:
+---------------------+----------------------------------+
| Field               | Value                            |
+---------------------+----------------------------------+
| domain_id           | f4e5187c3aef4288b6b2d97c292a69a2 |
| enabled             | True                             |
| id                  | d70e149dc03648dc9d3fcfc58f772190 |
| name                | designate                        |
| options             | {}                               |
| password_expires_at | None                             |
+---------------------+----------------------------------+

密码:123456

9.4 添加admin角色到designate用户

[root@node-251 openstack]# openstack role add --project service --user designate admin

9.5 创建designate服务实体

[root@node-251 openstack]# openstack service create --name designate --description "DNS" dns
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | DNS                              |
| enabled     | True                             |
| id          | 0b2fc994b62949cbb53bb198c604efbe |
| name        | designate                        |
| type        | dns                              |
+-------------+----------------------------------+

9.6 创建designate服务的API端点

[root@node-251 openstack]# openstack endpoint create --region RegionOne dns public http://openstack.if010.com:9001/
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | 5d67ea77b3f1422bb5a050e42d030267 |
| interface    | public                           |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 0b2fc994b62949cbb53bb198c604efbe |
| service_name | designate                        |
| service_type | dns                              |
| url          | http://openstack.if010.com:9001/ |
+--------------+----------------------------------+

9.7 安装组件

yum install -y openstack-designate\* bind bind-utils

9.8 创建RNDC密钥

RNDC是BIND安装包提供的一种控制域名服务运行的工具,它可以运行在其他计算机上,通过网络与DNS服务器进行连接,然后根据管理员的指令对named进程(配置文件为/etc/named.conf)进行远程控制,此时,管理员不需要DNS服务器的根用户权限。使用rndc可以在不停止DNS服务器工作的情况进行数据的更新,使修改后的配置文件生效。

rndc-confgen -a -k designate -c /etc/designate/rndc.key -r /dev/urandom

9.9 配置named.conf文件

[root@openstack ~]# cat /etc/named.conf 
include "/etc/designate/rndc.key";

options {
        listen-on port 53 { any; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        recursing-file  "/var/named/data/named.recursing";
        secroots-file   "/var/named/data/named.secroots";
        allow-new-zones yes;
        request-ixfr no;
        recursion no;
        allow-query { 127.0.0.1; 192.168.71.251; localhost; };    
        dnssec-enable yes;
        dnssec-validation yes;  
        bindkeys-file "/etc/named.root.key";  
        managed-keys-directory "/var/named/dynamic";
        pid-file "/run/named/named.pid";
        session-keyfile "/run/named/session.key";
};

controls {
  inet 127.0.0.1 port 953
    allow { 127.0.0.1; } keys { "designate"; };
};

修改/etc/designate/rndc.key权限

[root@node-251 openstack]# chmod 755 /etc/designate/rndc.key

9.10 启动DNS服务并添加自启动

[root@openstack ~]# systemctl enable named  
[root@openstack ~]# systemctl start named

9.11 配置designate.conf文件

[root@node-251 openstack]# cat /etc/designate/designate.conf
[DEFAULT]
transport_url = rabbit://openstack:1735e32955b2ef18362e@127.0.0.1

[keystone_authtoken]
auth_type = password
username = designate
password = 123456
project_name = service
project_domain_name = default
user_domain_name = default
www_authenticate_uri = http://openstack.if010.com:5000/
auth_url = http://openstack.if010.com:5000/
memcached_servers = 127.0.0.1:11211

[service:api]
enable_host_header = true
listen = 0.0.0.0:9001
auth_strategy = keystone
enable_api_v2 = true
enable_api_admin = true
enabled_extensions_admin = quotas,reports

[service:worker]
enabled = true
notify = true

[storage:sqlalchemy]
connection = mysql+pymysql://designate:Admin@123@127.0.0.1/designate

9.12 同步数据库

su -s /bin/sh -c "designate-manage database sync" designate

9.13 启动指定的中心和API服务并添加自启动

[root@openstack ~]# systemctl enable designate-central designate-api
[root@openstack ~]# systemctl start designate-central designate-api

9.14 创建pools.yaml文件

[root@openstack ~]# vim /etc/designate/pools.yaml
- name: default
  # The name is immutable. There will be no option to change the name after
  # creation and the only way will to change it will be to delete it
  # (and all zones associated with it) and recreate it.
  description: Default Pool

  attributes: {}

  # List out the NS records for zones hosted within this pool
  # This should be a record that is created outside of designate, that
  # points to the public IP of the controller node.
  ns_records:
    - hostname: ns1-1.example.org.
      priority: 1

  # List out the nameservers for this pool. These are the actual BIND servers.
  # We use these to verify changes have propagated to all nameservers.
  nameservers:
    - host: 127.0.0.1
      port: 53

  # List out the targets for this pool. For BIND there will be one
  # entry for each BIND server, as we have to run rndc command on each server
  targets:
    - type: bind9
      description: BIND9 Server 1

      # List out the designate-mdns servers from which BIND servers should
      # request zone transfers (AXFRs) from.
      # This should be the IP of the controller node.
      # If you have multiple controllers you can add multiple masters
      # by running designate-mdns on them, and adding them here.
      masters:
        - host: 127.0.0.1
          port: 5354

      # BIND Configuration options
      options:
        host: 127.0.0.1
        port: 53
        rndc_host: 127.0.0.1
        rndc_port: 953
        rndc_key_file: /etc/designate/rndc.key

文件内容如果是从windows复制过来的,记得转成unix格式:set ff=unix

9.15 更新池

[root@node-251 openstack]# su -s /bin/sh -c "designate-manage pool update" designate
Updating Pools Configuration
****************************
2023-06-08 13:19:32.581 86875 INFO designate.manage.pool [designate-manage - - - - -] Updating existing pool: <Pool id:'794ccc2c-d751-44fe-b57f-8894c9f5c842' name:'default'>

报错:

2023-06-08 13:17:20.084 85458 ERROR oslo.messaging._drivers.impl_rabbit [designate-manage - - - - -] Unable to connect to AMQP server on 127.0.0.1:5672 after None tries: (0, 0): (403) ACCESS_REFUSED - Login was refused using authentication mechanism AMQPLAIN. For details see the broker logfile.: AccessRefused: (0, 0): (403) ACCESS_REFUSED - Login was refused using authentication mechanism AMQPLAIN. For details see the broker logfile.

因为笔者前面配置文件多加了个空格导致,删了空格就好了

[root@node-251 openstack]# cat /etc/designate/designate.conf
[DEFAULT]
transport_url = rabbit://openstack: 1735e32955b2ef18362e@127.0.0.1 #此处多了空格
...

9.16 启动指定和 mDNS 服务

[root@openstack ~]# systemctl start designate-worker designate-producer designate-mdns
[root@openstack ~]# systemctl enable designate-worker designate-producer designate-mdns

9.17 配置neutron使用designate服务

[root@openstack ~]# vim /etc/neutron/neutron.conf
[DEFAULT]
external_dns_driver = designate 
dns_domain = if010.com.

[designate]
url = http://openstack.if010.com:9001/v2
auth_type = password
auth_url = http://openstack.if010.com:5000
username = designate
password = 123456
project_name = service
project_domain_name = default
user_domain_name = default
allow_reverse_dns_lookup = True
ipv4_ptr_zone_prefix_size = 24
ipv6_ptr_zone_prefix_size = 116

9.18 配置neutron使用ml2模块

[root@openstack ~]# vim /etc/neutron/plugins/ml2/ml2_conf.ini
extension_drivers = port_security,qos,dns

这里要通过neutron ext-list命令dns-integration看是否支持扩展,而且他这个需要私有网络的换件

笔者这里不支持,所以不能修改参数extension_drivers,否则neutron-server无法启动

[root@node-251 openstack]# neutron ext-list
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
+---------------------------+----------------------------------------------------------------------------------------------+
| alias                     | name                                                                                         |
+---------------------------+----------------------------------------------------------------------------------------------+
| default-subnetpools       | Default Subnetpools                                                                          |
| network-ip-availability   | Network IP Availability                                                                      |
| network_availability_zone | Network Availability Zone                                                                    |
| net-mtu-writable          | Network MTU (writable)                                                                       |
| binding                   | Port Binding                                                                                 |
| agent                     | agent                                                                                        |
| subnet_allocation         | Subnet Allocation                                                                            |
| dhcp_agent_scheduler      | DHCP Agent Scheduler                                                                         |
| tag                       | Tag support                                                                                  |
| external-net              | Neutron external network                                                                     |
| flavors                   | Neutron Service Flavors                                                                      |
| net-mtu                   | Network MTU                                                                                  |
| availability_zone         | Availability Zone                                                                            |
| quotas                    | Quota management support                                                                     |
| standard-attr-tag         | Tag support for resources with standard attribute: trunk, policy, security_group, floatingip |
| revision-if-match         | If-Match constraints based on revision_number                                                |
| provider                  | Provider Network                                                                             |
| multi-provider            | Multi Provider Network                                                                       |
| quota_details             | Quota details management support                                                             |
| address-scope             | Address scope                                                                                |
| subnet-service-types      | Subnet service types                                                                         |
| standard-attr-timestamp   | Resource timestamps                                                                          |
| service-type              | Neutron Service Type Management                                                              |
| tag-ext                   | Tag support for resources: subnet, subnetpool, port, router                                  |
| extra_dhcp_opt            | Neutron Extra DHCP options                                                                   |
| standard-attr-revisions   | Resource revision numbers                                                                    |
| pagination                | Pagination support                                                                           |
| sorting                   | Sorting support                                                                              |
| security-group            | security-group                                                                               |
| rbac-policies             | RBAC Policies                                                                                |
| standard-attr-description | standard-attr-description                                                                    |
| ip-substring-filtering    | IP address substring filtering                                                               |
| port-security             | Port Security                                                                                |
| allowed-address-pairs     | Allowed Address Pairs                                                                        |
| project-id                | project_id field enabled                                                                     |
+---------------------------+----------------------------------------------------------------------------------------------+

9.19 重启neutron服务

[root@openstack ~]# systemctl restart neutron-* 

9.20 验证操作

[root@node-251 openstack]# ps -aux | grep designate
designa+  86712  2.1  1.3 350988 76328 ?        Ss   13:19   0:16 /usr/bin/python2 /usr/bin/designate-central --config-file /etc/designate/designate.conf --log-file /var/log/designate/central.log
designa+  86736  0.4  1.4 380692 80448 ?        Ss   13:19   0:03 /usr/bin/python2 /usr/bin/designate-api --config-file /etc/designate/designate.conf --log-file /var/log/designate/api.log
designa+  88321  0.7  1.3 348752 74128 ?        Ss   13:21   0:04 /usr/bin/python2 /usr/bin/designate-worker --config-file /etc/designate/designate.conf --log-file /var/log/designate/worker.log
designa+  88322  0.9  1.3 347516 72820 ?        Ss   13:21   0:06 /usr/bin/python2 /usr/bin/designate-producer --config-file /etc/designate/designate.conf --log-file /var/log/designate/producer.log
designa+  88323  0.7  1.2 345544 71064 ?        Ss   13:21   0:05 /usr/bin/python2 /usr/bin/designate-mdns --config-file /etc/designate/designate.conf --log-file /var/log/designate/mdns.log
root      95540  0.0  0.0 112816   980 pts/0    R+   13:32   0:00 grep --color=auto designate
[root@node-251 openstack]# openstack dns service list
+--------------------------------------+----------+--------------+--------+-------+--------------+
| id                                   | hostname | service_name | status | stats | capabilities |
+--------------------------------------+----------+--------------+--------+-------+--------------+
| cce4d924-0b54-4528-a8ac-ab495f68c9b5 | node-251 | central      | UP     | -     | -            |
| ad2ec80d-3c8e-4dd6-a2f5-9c3cde9bfc42 | node-251 | api          | UP     | -     | -            |
| ae04b0b7-d12d-45a8-b9d6-c1b76859a93c | node-251 | worker       | UP     | -     | -            |
| 44695437-1ba5-4bf5-8d1d-af7e7e28e985 | node-251 | mdns         | UP     | -     | -            |
| 63856a50-7533-4af2-bf00-e14110f324d0 | node-251 | producer     | UP     | -     | -            |
+--------------------------------------+----------+--------------+--------+-------+--------------+

9.21 创建一个zone

[root@node-251 openstack]# openstack zone create --email=admin@if010.com if010.com.
+----------------+--------------------------------------+
| Field          | Value                                |
+----------------+--------------------------------------+
| action         | CREATE                               |
| attributes     |                                      |
| created_at     | 2023-06-08T05:38:33.000000           |
| description    | None                                 |
| email          | admin@if010.com                      |
| id             | 05f3f035-621e-42eb-a800-eed644350755 |
| masters        |                                      |
| name           | if010.com.                           |
| pool_id        | 794ccc2c-d751-44fe-b57f-8894c9f5c842 |
| project_id     | 2aaf4155b00749b0a333a039c17c131c     |
| serial         | 1686202713                           |
| status         | PENDING                              |
| transferred_at | None                                 |
| ttl            | 3600                                 |
| type           | PRIMARY                              |
| updated_at     | None                                 |
| version        | 1                                    |
+----------------+--------------------------------------+

关联网络,不然的话创建了虚拟机也是不会有记录的

neutron net-update ************************************* --dns_domain if010.com.

笔者这里没有虚拟网络,可能是因为不支持参数extension_drivers的原因吧,此处略过了

[root@node-251 openstack]# neutron net-list

查看

[root@node-251 openstack]# openstack zone list
+--------------------------------------+------------+---------+------------+--------+--------+
| id                                   | name       | type    |     serial | status | action |
+--------------------------------------+------------+---------+------------+--------+--------+
| 05f3f035-621e-42eb-a800-eed644350755 | if010.com. | PRIMARY | 1686202713 | ACTIVE | NONE   |
+--------------------------------------+------------+---------+------------+--------+--------+

10. Heat

Heat 是一套业务流程平台,旨在帮助用户更轻松地配置以 OpenStack 为基础的云体系。利用Heat应用程序,开发人员能够在程序中使用模板以实现资源的自动化部署。Heat能够启动应用、创建虚拟机并自动处理整个流程。它还拥有出色的跨平台兼容性,能够与 Amazon Web Services 业务流程平台 CloudFormation 相对接——这意味着用户完全可以将 AWS 模板引入 OpenStack 环境当中。

详细参考:云计算技术学习–OpenStack之Heat

10.1 创建Heat数据库并授权

[root@openstack ~]# mysql -u root -p
CREATE DATABASE heat;
CREATE USER heat@'%' IDENTIFIED BY 'Admin@123';
Grant all privileges on heat.* to 'heat'@'%';
flush privileges;

10.2 获得admin凭证

source admin-openrc

10.3 创建heat用户并设置密码

[root@node-251 openstack]# openstack user create --domain default --password-prompt heat
User Password:
Repeat User Password:
+---------------------+----------------------------------+
| Field               | Value                            |
+---------------------+----------------------------------+
| domain_id           | f4e5187c3aef4288b6b2d97c292a69a2 |
| enabled             | True                             |
| id                  | 2ff76d54b6324f58aa0eada27fd2d6ac |
| name                | heat                             |
| options             | {}                               |
| password_expires_at | None                             |
+---------------------+----------------------------------+

密码:123456

10.4 添加admin角色到heat用户

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

10.5 创建heat服务实体

[root@node-251 openstack]# openstack service create --name heat --description "Orchestration" orchestration
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | Orchestration                    |
| enabled     | True                             |
| id          | b49ad0b8f24649469baba5a62fece3b2 |
| name        | heat                             |
| type        | orchestration                    |
+-------------+----------------------------------+
[root@node-251 openstack]# openstack service create --name heat-cfn --description "Orchestration"  cloudformation
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | Orchestration                    |
| enabled     | True                             |
| id          | a566f24ecba74d08b675f7757b67e5f2 |
| name        | heat-cfn                         |
| type        | cloudformation                   |
+-------------+----------------------------------+

10.6 创建Orchestration服务的API端点

[root@node-251 openstack]# openstack endpoint create --region RegionOne orchestration public http://openstack.if010.com:8004/v1/%\(tenant_id\)s
+--------------+--------------------------------------------------+
| Field        | Value                                            |
+--------------+--------------------------------------------------+
| enabled      | True                                             |
| id           | dbbe3f6044994c20af77e4ccabeabd7e                 |
| interface    | public                                           |
| region       | RegionOne                                        |
| region_id    | RegionOne                                        |
| service_id   | b49ad0b8f24649469baba5a62fece3b2                 |
| service_name | heat                                             |
| service_type | orchestration                                    |
| url          | http://openstack.if010.com:8004/v1/%(tenant_id)s |
+--------------+--------------------------------------------------+
[root@node-251 openstack]# openstack endpoint create --region RegionOne orchestration internal http://openstack.if010.com:8004/v1/%\(tenant_id\)s
+--------------+--------------------------------------------------+
| Field        | Value                                            |
+--------------+--------------------------------------------------+
| enabled      | True                                             |
| id           | 0df518b728754468a0b01b5f10a6ed8c                 |
| interface    | internal                                         |
| region       | RegionOne                                        |
| region_id    | RegionOne                                        |
| service_id   | b49ad0b8f24649469baba5a62fece3b2                 |
| service_name | heat                                             |
| service_type | orchestration                                    |
| url          | http://openstack.if010.com:8004/v1/%(tenant_id)s |
+--------------+--------------------------------------------------+
[root@node-251 openstack]# openstack endpoint create --region RegionOne orchestration admin http://openstack.if010.com:8004/v1/%\(tenant_id\)s
+--------------+--------------------------------------------------+
| Field        | Value                                            |
+--------------+--------------------------------------------------+
| enabled      | True                                             |
| id           | 6988272e22514edf8a30d69f0a088fa2                 |
| interface    | admin                                            |
| region       | RegionOne                                        |
| region_id    | RegionOne                                        |
| service_id   | b49ad0b8f24649469baba5a62fece3b2                 |
| service_name | heat                                             |
| service_type | orchestration                                    |
| url          | http://openstack.if010.com:8004/v1/%(tenant_id)s |
+--------------+--------------------------------------------------+
[root@node-251 openstack]# openstack endpoint create --region RegionOne cloudformation public http://openstack.if010.com:8000/v1
+--------------+------------------------------------+
| Field        | Value                              |
+--------------+------------------------------------+
| enabled      | True                               |
| id           | 8476d6c18b7e4e5e95bf90773c9ae1e6   |
| interface    | public                             |
| region       | RegionOne                          |
| region_id    | RegionOne                          |
| service_id   | a566f24ecba74d08b675f7757b67e5f2   |
| service_name | heat-cfn                           |
| service_type | cloudformation                     |
| url          | http://openstack.if010.com:8000/v1 |
+--------------+------------------------------------+
[root@node-251 openstack]# openstack endpoint create --region RegionOne cloudformation internal http://openstack.if010.com:8000/v1
+--------------+------------------------------------+
| Field        | Value                              |
+--------------+------------------------------------+
| enabled      | True                               |
| id           | 4a32ff42bd9b4eb0aae6d1f5bfe170de   |
| interface    | internal                           |
| region       | RegionOne                          |
| region_id    | RegionOne                          |
| service_id   | a566f24ecba74d08b675f7757b67e5f2   |
| service_name | heat-cfn                           |
| service_type | cloudformation                     |
| url          | http://openstack.if010.com:8000/v1 |
+--------------+------------------------------------+
[root@node-251 openstack]# openstack endpoint create --region RegionOne cloudformation admin http://openstack.if010.com:8000/v1
+--------------+------------------------------------+
| Field        | Value                              |
+--------------+------------------------------------+
| enabled      | True                               |
| id           | ddc85511645c464d8494b678f23eadff   |
| interface    | admin                              |
| region       | RegionOne                          |
| region_id    | RegionOne                          |
| service_id   | a566f24ecba74d08b675f7757b67e5f2   |
| service_name | heat-cfn                           |
| service_type | cloudformation                     |
| url          | http://openstack.if010.com:8000/v1 |
+--------------+------------------------------------+

10.7 为栈创建heat包含项目和用户的域

[root@node-251 openstack]# openstack domain create --description "Stack projects and users" heat
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | Stack projects and users         |
| enabled     | True                             |
| id          | 2998398ef9604199a0173621b1cee8ba |
| name        | heat                             |
| tags        | []                               |
+-------------+----------------------------------+

10.8 在heat域中创建管理项目和用户的heat_domain_admin用户并设置密码

[root@node-251 openstack]# openstack user create --domain heat --password-prompt heat_domain_admin
User Password:
Repeat User Password:
+---------------------+----------------------------------+
| Field               | Value                            |
+---------------------+----------------------------------+
| domain_id           | 2998398ef9604199a0173621b1cee8ba |
| enabled             | True                             |
| id                  | 0ec339a48c464a5da8ef78783b77c95e |
| name                | heat_domain_admin                |
| options             | {}                               |
| password_expires_at | None                             |
+---------------------+----------------------------------+

密码:123456

10.9 添加admin角色到heat域 中的heat_domain_admin用户,启用heat_domain_admin用户管理栈的管理权限

[root@node-251 openstack]# openstack role add --domain heat --user-domain heat --user heat_domain_admin admin

10.10 创建 heat_stack_owner 角色

[root@node-251 openstack]# openstack role create heat_stack_owner
+-----------+----------------------------------+
| Field     | Value                            |
+-----------+----------------------------------+
| domain_id | None                             |
| id        | c3e1a93192564120bc756aae5aed8dcd |
| name      | heat_stack_owner                 |
+-----------+----------------------------------+

10.11 添加heat_stack_owner角色到demo项目和用户,启用demo用户管理栈

openstack role add --project demo --user demo heat_stack_owner

10.12 创建 heat_stack_user 角色

[root@node-251 openstack]# openstack role create heat_stack_user
+-----------+----------------------------------+
| Field     | Value                            |
+-----------+----------------------------------+
| domain_id | None                             |
| id        | 55050f0c429b4e1bbda6b7bd83f763d1 |
| name      | heat_stack_user                  |
+-----------+----------------------------------+

10.13 安装并配置组件

安装

yum install openstack-heat-api openstack-heat-api-cfn openstack-heat-engine openstack-heat-ui

配置 /etc/heat/heat.conf 文件

[DEFAULT]
heat_metadata_server_url = http://openstack.if010.com:8000  #配置元数据Url
heat_waitcondition_server_url = http://openstack.if010.com:8000/v1/waitcondition  #配置等待条件Url
stack_user_domain_name = heat   #配置栈域
stack_domain_admin = heat_domain_admin  #配置栈域与管理凭据用户
stack_domain_admin_password = stack_domain_admin@If010  #配置栈域与管理凭据密码
transport_url = rabbit://openstack:1735e32955b2ef18362e@127.0.0.1    #配置RabbitMQ消息队列访问
rpc_backend = rabbit    #配置RabbitMQ消息队列访问

[clients_keystone]  #认证服务访问
auth_uri = http://openstack.if010.com:35357

[database]   #配置数据库的连接
connection = mysql+pymysql://heat:fd0bf116b91362e17446@127.0.0.1/heat

[ec2authtoken]  #认证服务访问
auth_uri = http://openstack.if010.com:5000/v2.0

[oslo_messaging_rabbit]    #配置RabbitMQ消息队列访问
rabbit_host = 127.0.0.1
rabbit_port = 5672
rabbit_userid = openstack
rabbit_password = 1735e32955b2ef18362e

[trustee] #认证服务访问
auth_plugin = password
auth_url = http://openstack.if010.com:35357
username = heat
password = heat@If010     #heat用户的密码
user_domain_name = default

[keystone_authtoken]  #配置认证服务访问
auth_uri = http://openstack.if010.com:5000
auth_url = http://openstack.if010.com:35357
memcached_servers = openstack.if010.com:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = heat
password = heat@If010     #heat用户的密码

10.14 同步数据库

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

10.15 启动Orchestration服务并将其设置为随系统启动

[root@openstack ~]# systemctl enable openstack-heat-api.service openstack-heat-api-cfn.service openstack-heat-engine.service
[root@openstack ~]# systemctl start openstack-heat-api.service openstack-heat-api-cfn.service openstack-heat-engine.service

10.16 重启Http web服务使其horizon上显示并管理Heat

[root@openstack ~]# systemctl restart openstack-heat*
[root@openstack ~]# systemctl restart httpd

10.17 验证操作

[root@node-251 openstack]# openstack orchestration service list
+----------+-------------+--------------------------------------+----------+--------+----------------------------+--------+
| Hostname | Binary      | Engine ID                            | Host     | Topic  | Updated At                 | Status |
+----------+-------------+--------------------------------------+----------+--------+----------------------------+--------+
| node-251 | heat-engine | fb27abe5-20cf-4743-b74c-790802e9fa74 | node-251 | engine | 2023-06-08T07:29:11.000000 | up     |
| node-251 | heat-engine | cd489594-7aa3-4660-80e9-ef01bb1a3d99 | node-251 | engine | 2023-06-08T07:29:11.000000 | up     |
| node-251 | heat-engine | 2d820847-b6f5-425b-aef2-c7341bf1e9ab | node-251 | engine | 2023-06-08T07:29:11.000000 | up     |
| node-251 | heat-engine | 10ca4f4f-b34d-447d-9574-656daf91b266 | node-251 | engine | 2023-06-08T07:29:11.000000 | up     |
+----------+-------------+--------------------------------------+----------+--------+----------------------------+--------+

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/626352.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

【计算机组成与体系结构Ⅰ】章节测试(1-3)

下列是计算机中几种常见的机器数编码&#xff1a; ①原码 ②反码 ③补码 零的表示唯一的是&#xff08; &#xff09; A&#xff0e;仅③ B&#xff0e;② C&#xff0e;①、② D&#xff0e;①、③ 下列采用偶校验的8位奇偶校验编码中正确的是&#xff08; &#xff09;…

【Spring】——Spring简单 读和取

前言 ❤️❤️❤️Spring专栏更新中&#xff0c;各位大佬觉得写得不错&#xff0c;支持一下&#xff0c;感谢了&#xff01;❤️❤️❤️ Spring_冷兮雪的博客-CSDN博客 上期我们讲解了Spring的创建与使用&#xff0c;发现 将Bean 注册到容器 这一步中&#xff0c;如果Bean对象…

Matter协议高速崛起,你真的了解它吗?

今天我们要聊的话题&#xff0c;和智能家居有关。 说到智能家居&#xff0c;大家应该都不会陌生。早在本世纪初&#xff0c;物联网概念刚刚诞生的时候&#xff0c;最主要的应用领域&#xff0c;就是智能家居。 这些年来&#xff0c;随着数字技术的不断发展&#xff0c;越来越多…

MINIX 已死,Linux 又将如何呢?

导读MINIX 操作系统大约的确已经死了。Minix 原来是荷兰阿姆斯特丹的 Vrije 大学计算机科学系的 Andrew S. Tanenbaum 教授所开发的一个类 Unix 操作系统&#xff0c;全部代码共约 12,000 行&#xff0c;起初是为给学生讲解操作系统的运作细节而开发。 Linus Torvalds 也曾表示…

报表生成器FastReport .Net用户指南:“Rich Text“对象

FastReport .Net是一款全功能的Windows Forms、ASP.NET和MVC报表分析解决方案&#xff0c;使用FastReport .NET可以创建独立于应用程序的.NET报表&#xff0c;同时FastReport .Net支持中文、英语等14种语言&#xff0c;可以让你的产品保证真正的国际性。 FastReport.NET官方版…

1999-2020年31省省农村人口就业和文化程度相关数据

1999-2020年31省省农村人口就业和文化程度相关数据 1、时间&#xff1a; 2、范围&#xff1a;包括全国31省 3、来源&#xff1a;整理自各省NJ、统计NJ、农村NJ 4、指标包括&#xff1a; 乡村人口和乡村就业人员&#xff1a;乡村人口&#xff08;万人&#xff09;、乡村人口&…

opencv实践项目-停车位检测

目录 1. 步骤1.1 selector选择器1.2 detector探测器 2. 代码3. 效果图 1. 步骤 1.1 selector选择器 我们可以选择摄网络摄像头提供的第一帧&#xff0c;在该图像上选择停车位。为此&#xff0c;保存并使用该图像选择停车位。使用selectROIs函数标记停车位。ROI被定义为感兴趣…

分布式限流算法及实现介绍

分布式系统架构下面对突增的高并发访问请求&#xff0c;如何实现限流以保护系统的可用性是需要关注的一个问题。分布式限流实现机制上有很多中&#xff0c;包括基于网关实现、基于中间件如Redis实现等&#xff0c;本文简要介绍限流的常用算法以及实现方案。 1、分布式限流概述 …

Windows操作系统渗透测试

Windows操作系统渗透测试 任务环境说明&#xff1a;服务器场景名&#xff1a;Server02服务器场景操作系统&#xff1a;未知&#xff08;关闭链接&#xff09; 1.通过本地PC中渗透测试平台Kali对服务器场景进行系统服务及版本扫描渗透测试&#xff0c;并将该操作显示结果中808…

可视化报表系统推荐

在当今信息时代&#xff0c;数据的处理和分析已经成为了企业管理中不可或缺的一部分。而报表则是这个过程中最常见的工具之一。手工写报表虽然简单易懂&#xff0c;但是随着数据量的增加&#xff0c;这种方式逐渐暴露出许多痛点。比如说&#xff1a; 1.时间耗费长&#xff1a;…

Linux之进程间通信——管道

文章目录 前言一、进程间通信1.概念2.目的3.进程间通信分类 二、管道1.管道介绍2.管道分类1.匿名管道pipi创建管道文件&#xff0c;打开读写端fork子进程关闭父进程的读取端&#xff0c;关闭子进程的写入端读写特征管道特征 2.命名管道mkfifo创建管道文件删除管道文件通信 三、…

【openframework】实时路径规划(RTRRTstar算法)

程序框架 视频演示 实时RRT-star算法介绍 实时RRT-star算法是一种基于采样的运动规划算法&#xff0c;它可以在有限的时间内找到一条渐进最优的路径。实时RRT-star算法是在RRT-star算法的基础上进行了改进&#xff0c;主要有两个方面&#xff1a; - 实时更新起始点。实时RRT-st…

那些漏洞挖掘高手都是怎么挖漏洞的?

前言 说到安全就不能不说漏洞&#xff0c;而说到漏洞就不可避免地会说到三座大山&#xff1a; 漏洞分析 漏洞利用 漏洞挖掘 从个人的感觉上来看&#xff0c;这三者尽管通常水乳交融、相互依赖&#xff0c;但难度是不尽相同的。本文就这三者分别谈谈自己的经验和想法。 漏洞分析…

Mac图片批处理工具

PhotoMill X是一款强大的图像处理软件&#xff0c;它可以帮助用户快速地对照片进行编辑、调整和转换。它支持在单个或批量模式下处理大量的图像文件&#xff0c;并具有直观的用户界面和易于使用的工具。 PhotoMill X具有广泛的编辑功能&#xff0c;包括裁剪、缩放、旋转、调整明…

记录基于Vue.js的Tree组件_Liquor Tree

酒树 (Liquor Tree) A Vue tree component that allows you to present hierarchically organized data in a nice and logical manner. Vue 树组件&#xff0c;可让您以美观和逻辑的方式呈现层次结构的数据。 supports mobile, and has a variety of response events. Flex…

软考A计划-电子商务设计师-模拟试题卷三

点击跳转专栏>Unity3D特效百例点击跳转专栏>案例项目实战源码点击跳转专栏>游戏脚本-辅助自动化点击跳转专栏>Android控件全解手册点击跳转专栏>Scratch编程案例 &#x1f449;关于作者 专注于Android/Unity和各种游戏开发技巧&#xff0c;以及各种资源分享&am…

springboot+websocket客服聊天

续&#xff1a;spring boot 完整后端接口案例_cc&的博客-CSDN博客 后台代码 1.在pom.xml中添加spring-boot-starter-websocket <!--WebSocket--><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter…

浅谈数明深力科隔离驱动器SLMi8235BD 车载充电器(OBC)方案

数明深力科SLMi823x系列SLMi8235BD隔离驱动技术优势&#xff1a;具有高性能、高性价比、高可靠性的产品特性&#xff0c;应用覆盖UPS、充电桩、服务器电源、通信电源、新能源汽车动力总成系统的车载 OBC 领域。通过CQC认证的。 车载充电器&#xff08;OBC&#xff09;是电动汽…

在线电子书创建:MkDocs + Github + ReadTheDocs

MkDocs是一个静态站点生成器&#xff0c;可用于构建项目文档。文档文件使用Markdown语法编写&#xff0c;本文记录如何使用MkDocs生成项目文档&#xff0c;并部署到Read the Docs上。 目录 安装mkdocs搭建文档项目创建项目启动项目编写文档Markdown语法站内链接图片 文档结构 配…

聚观早报 | 苹果收购AR头显初创公司Mira;抖音将尝试自营电商

今日要闻&#xff1a;苹果收购AR头显初创公司Mira&#xff1b;抖音将尝试自营电商&#xff1b;特斯拉股价实现九连涨&#xff1b;《黑镜》主创曾试用ChatGPT写剧本&#xff1b;携程集团发布2023Q1财报 苹果收购AR头显初创公司Mira 6 月 7 日消息&#xff0c;据 The Verge 报道…