pymysql安裝 第八章 nova元件安裝2

2021-10-11 19:34:53 字數 3498 閱讀 6089

1、在控制節點安裝nova元件

apt -y install nova-api nova-placement-api nova-conductor nova-consoleauth nova-scheduler nova-novncproxy python3-novaclient

# 配置檔案

mv /etc/nova/nova.conf /etc/nova/nova.conf.org # 備份官方的

vi /etc/nova/nova.conf

# 修改如下

# create new

[default]

# allow resize to same host

allow_resize_to_same_host = true

# block allocate time

block_device_allocate_retries = 600

block_device_allocate_retries_interval = 6

max_concurrent_live_migrations = 10

debug = true # 開啟除錯功能

use_neutron = true

linuxnet_inte***ce_driver = nova.network.linux_net.linuxbridgeinte***cedriver # linuxbridge橋接

firewall_driver = nova.virt.firewall.noopfirewalldriver

# define own ip

my_ip = 192.168.222.29 # api ip

state_path = /var/lib/nova

enabled_apis = osapi_compute,metadata

log_dir = /var/log/nova

# rabbitmq connection info

transport_url = rabbit:

[api]

auth_strategy = keystone

# glance connection info

[glance]

api_servers = # 這裡配置儲存網的ip,也可以api網

[oslo_concurrency]

lock_path = $state_path/tmp

# mariadb connection info

[api_database]

connection = mysql+pymysql:

[database]

connection = mysql+pymysql:

# keystone auth info

[keystone_authtoken]

www_authenticate_uri =

auth_url =

memcached_servers = 192.168.222.29:11211

auth_type = password

project_domain_name = default

user_domain_name = default

project_name = service

username = nova

password = servicepassword

[placement]

auth_url =

os_region_name = regionone

auth_type = password

project_domain_name = default

user_domain_name = default

project_name = service

username = placement

password = servicepassword

[placement_database]

connection = mysql+pymysql:_placement

[wsgi]

api_paste_config = /etc/nova/api-paste.ini

[neutron]

auth_url =

auth_type = password

project_domain_name = default

user_domain_name = default

region_name = regionone

project_name = service

username = neutron

password = servicepassword

service_metadata_proxy = true

metadata_proxy_shared_secret = metadata_secret

[cinder]

os_region_name = regionone

# 改變檔案的許可權

chmod 640 /etc/nova/nova.conf

chgrp nova /etc/nova/nova.conf

2、在控制節點同步資料庫

# 同步資料庫,python的orm物件關係對映,需要初始化來生成資料庫表結構

su -s /bin/bash nova -c "nova-manage api_db sync"

su -s /bin/bash nova -c "nova-manage cell_v2 map_cell0"

su -s /bin/bash nova -c "nova-manage db sync" # warning提示不用關心

su -s /bin/bash nova -c "nova-manage cell_v2 create_cell --name cell1"

systemctl restart apache2

for service in api conductor scheduler consoleauth novncproxy; do

systemctl restart nova-$service # 服務已經開機自啟動

done

# 檢視驗證

備註:如果在同步資料時有出現「deprecated ****」等資訊,不用理會

第八章 指標 第八章 指標

1 什麼是位址 include using namespace std int main 11 在堆中建立對像 我們既然可以在堆中儲存變數,那麼也就可以儲存對像,我們可以將對像儲存堆中,然後通過指標來訪問它 include using namespace std class human 14 在建構...

第八章(筆記)

能在 中進行記憶體單元的定址的暫存器只有4個,分別是bx si di bp 其中bx bp 是基址,bx對應的段位址是ds,bp對應的段位址是ss si di 是變址,單獨使用時段位址是ds,組合使用段位址是跟隨組合的基址對應的段位址 中進行記憶體單元定址彙總 si di bx bp 常量 si 常...

第八章 字典

d 空字典 d 這就是字典 d dict.fromkeys a b d dict zip keyslist,valslist d dict name bob age 22 建立字典的函式 d name 通過索引key獲取對應的value d.keys 返回d字典物件所有key,返回乙個列表 d.va...