首页 > 社交 > 科普中国

Openstack

常驻编辑 科普中国 2022-11-11 区段   节点   实例   证书   浏览器   链接   数据库   内容   设备   信息


pOs拜客生活常识网

四:同步Nova数据库并启动其服务pOs拜客生活常识网

[email protected]:~(keystone)# su -s /bin/bash placement -c "placement-manage db sync"

[email protected]:~(keystone)# su -s /bin/bash nova -c "nova-manage api_db sync"

[email protected]:~(keystone)# su -s /bin/bash nova -c "nova-manage cell_v2 map_cell0"

[email protected]:~(keystone)# su -s /bin/bash nova -c "nova-manage db sync"
[email protected]:~(keystone)# su -s /bin/bash nova -c "nova-manage cell_v2 create_cell --name cell1"

[email protected]:~(keystone)# systemctl restart nova-api nova-conductor nova-scheduler nova-novncproxy
[email protected]:~(keystone)# systemctl enable nova-api nova-conductor nova-scheduler nova-novncproxy

[email protected]:~(keystone)# systemctl restart apache2 nginx

[email protected]:~(keystone)# openstack compute service list
+-----------------+----------------+------------------+----------+---------+-------+----------------------------+
| ID              | Binary         | Host             | Zone     | Status  | State | Updated At                 |
+-----------------+----------------+------------------+----------+---------+-------+----------------------------+
| b491bb4d-...... | nova-conductor | srv1.1000y.cloud | internal | enabled | up    | 2022-10-24T09:16:32.000000 |
| ea5192b7-...... | nova-scheduler | srv1.1000y.cloud | internal | enabled | up    | 2022-10-24T09:16:29.000000 |
+-----------------+----------------+------------------+----------+---------+-------+----------------------------+


pOs拜客生活常识网

五:实现Nova-computepOs拜客生活常识网

1) 安装Nova-Compute
[email protected]:~(keystone)# apt install qemu-kvm libvirt-daemon-system libvirt-daemon virtinst bridge-utils libosinfo-bin nova-compute nova-compute-kvm -y

2) 配置VNC(便于后续直接通过浏览器控制实例)
[email protected]:~(keystone)# vim /etc/nova/nova.conf
......
......
......
......
......
......

# 找到 [VNC] 区段,添加如下内容
[vnc]
enabled = True
server_listen = srv1.1000y.cloud
server_proxyclient_address = srv1.1000y.cloud
novncproxy_host = 127.0.0.1
novncproxy_port = 6080
novncproxy_base_url = https://srv1.1000y.cloud:6080/vnc_auto.html

......
......
......
......
......
......

[email protected]:~(keystone)# systemctl restart nova-compute

[email protected]:~(keystone)# su -s /bin/bash nova -c "nova-manage cell_v2 discover_hosts"

[email protected]:~(keystone)# openstack compute service list
+-----------------+----------------+------------------+----------+---------+-------+----------------------------+
| ID              | Binary         | Host             | Zone     | Status  | State | Updated At                 |
+-----------------+----------------+------------------+----------+---------+-------+----------------------------+
| b491bb4d-...... | nova-conductor | srv1.1000y.cloud | internal | enabled | up    | 2022-10-24T09:21:22.000000 |
| ea5192b7-...... | nova-scheduler | srv1.1000y.cloud | internal | enabled | up    | 2022-10-24T09:21:19.000000 |
| 943af590-...... | nova-compute   | srv1.1000y.cloud | nova     | enabled | up    | 2022-10-24T09:21:23.000000 |
+-----------------+----------------+------------------+----------+---------+-------+----------------------------+


pOs拜客生活常识网

六:扩展NovaCompute节点pOs拜客生活常识网

1) 准备第2台节点: 8G 4core

2) 在扩展的计算节点上安装KVM并启动
[email protected]:~# apt install qemu-kvm libvirt-daemon-system libvirt-daemon virtinst 
bridge-utils libosinfo-bin -y

[email protected]:~# lsmod | grep kvm
kvm_intel             372736  0
kvm                  1028096  1 kvm_intel

3) 安装Nova-Compute
[email protected]:~# apt install software-properties-common -y
[email protected]:~# add-apt-repository cloud-archive:zed
Repository: 'deb http://ubuntu-cloud.archive.canonical.com/ubuntu jammy-updates/zed main'
Description:
Ubuntu Cloud Archive for OpenStack Zed
More info: https://wiki.ubuntu.com/OpenStack/CloudArchive
Adding repository.
Press [ENTER] to continue or Ctrl-c to cancel.    # 回车
......
......
......
......
......
......
Reading package lists... Done

[email protected]:~# apt update && apt upgrade -y

[email protected]:~# apt install nova-compute nova-compute-kvm qemu-system-data -y

4) 配置Nova Compute
[email protected]:~# mv /etc/nova/nova.conf /etc/nova/nova.conf.bak
[email protected]:~# vim /etc/nova/nova.conf
[DEFAULT]
state_path = /var/lib/nova
enabled_apis = osapi_compute,metadata
log_dir = /var/log/nova

transport_url = rabbit://openstack:[email protected]

[api]
auth_strategy = keystone

[vnc]
enabled = True
server_listen = srv2.1000y.cloud
server_proxyclient_address = srv2.1000y.cloud
novncproxy_base_url = https://srv1.1000y.cloud:6080/vnc_auto.html 

[glance]
api_servers = https://srv1.1000y.cloud:9292
# 自定义证书需要值为 true
insecure = true

[oslo_concurrency]
lock_path = $state_path/tmp

[keystone_authtoken]
www_authenticate_uri = https://srv1.1000y.cloud:5000
auth_url = https://srv1.1000y.cloud:5000
memcached_servers = srv1.1000y.cloud:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = servicepassword
# 自定义证书需要值为 true
insecure = true

[placement]
auth_url = https://srv1.1000y.cloud:5000
os_region_name = RegionOne
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = placement
password = servicepassword
# 自定义证书需要值为 true
insecure = true

[wsgi]
api_paste_config = /etc/nova/api-paste.ini

[email protected]:~# chmod 640 /etc/nova/nova.conf
[email protected]:~# chgrp nova /etc/nova/nova.conf

5) 启动Nova Compute
[email protected]:~# systemctl restart nova-compute

6) 确认
# 于srv1节点上添加扩展计算节点
[email protected]:~(keystone)# su -s /bin/bash nova -c "nova-manage cell_v2 discover_hosts"

[email protected]:~(keystone)# openstack compute service list
+--------------------------------------+----------------+------------------+----------+---------+-------+----------------------------+
| ID                                   | Binary         | Host             | Zone     | Status  | State | Updated At                 |
+--------------------------------------+----------------+------------------+----------+---------+-------+----------------------------+
| b491bb4d-85e7-4e6e-a9b6-5aa0955ec2cb | nova-conductor | srv1.1000y.cloud | internal | enabled | up    | 2022-10-24T09:38:32.000000 |
| ea5192b7-901f-4d94-bf91-db82e5b86ea1 | nova-scheduler | srv1.1000y.cloud | internal | enabled | up    | 2022-10-24T09:38:29.000000 |
| 943af590-28ed-4db7-9bba-ce51971e8be6 | nova-compute   | srv1.1000y.cloud | nova     | enabled | up    | 2022-10-24T09:38:34.000000 |
| 98d5d4d9-d0ec-4cbd-b7f1-d5b724d94a77 | nova-compute   | srv2.1000y.cloud | nova     | enabled | up    | 2022-10-24T09:38:36.000000 |
+--------------------------------------+----------------+------------------+----------+---------+-------+----------------------------+    

相关阅读:

  • 受强降雨影响,北京南站部分列车晚点,京九线区段临时封锁
  • “梅花”中心即将离沪,上海地铁地面高架区段6点起逐步
  • 关于种植牙的常见问答
  • ssr链接怎么用(安卓手机ssr怎么添加节点)
  • ssr怎么设置(ssr加速器节点)
  • 节点是什么意思(手机怎么换节点)
  • 「数据结构之字典树Trie」C语言版本实现
  • 网宿科技股份有限公司2021年年度报告摘要300017
  • 《重生之门》热播背后:悬疑剧集寻求差异化,阿里影业自制
  • 互联网后端技术大全!建议收藏
    • 网站地图 |
    • 声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。文章内容仅供参考,不做权威认证,如若验证其真实性,请咨询相关权威专业人士。