首页 > 社交 > 科普中国

Openstack

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


pOs拜客生活常识网

二:创建Nova数据库pOs拜客生活常识网

[email protected]:~(keystone)# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or g.
Your MariaDB connection id is 43
Server version: 10.6.7-MariaDB-2ubuntu1.1 Ubuntu 22.04

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

MariaDB [(none)]> create database nova;
Query OK, 1 row affected (0.001 sec)

MariaDB [(none)]> grant all privileges on nova.* to [email protected]'localhost' identified by 'password';
Query OK, 0 rows affected (0.023 sec)

MariaDB [(none)]> grant all privileges on nova.* to [email protected]'%' identified by 'password';
Query OK, 0 rows affected (0.015 sec)

MariaDB [(none)]> create database nova_api;
Query OK, 1 row affected (0.001 sec)

MariaDB [(none)]> grant all privileges on nova_api.* to [email protected]'localhost' identified by 'password';
Query OK, 0 rows affected (0.023 sec)

MariaDB [(none)]> grant all privileges on nova_api.* to [email protected]'%' identified by 'password';
Query OK, 0 rows affected (0.021 sec)

MariaDB [(none)]> create database nova_cell0;
Query OK, 1 row affected (0.000 sec)

MariaDB [(none)]> grant all privileges on nova_cell0.* to [email protected]'localhost' identified by 'password';
Query OK, 0 rows affected (0.019 sec)

MariaDB [(none)]> grant all privileges on nova_cell0.* to [email protected]'%' identified by 'password';
Query OK, 0 rows affected (0.019 sec)

MariaDB [(none)]> create database placement;
Query OK, 1 row affected (0.001 sec)

MariaDB [(none)]> grant all privileges on placement.* to [email protected]'localhost' identified by 'password';
Query OK, 0 rows affected (0.015 sec)

MariaDB [(none)]> grant all privileges on placement.* to [email protected]'%' identified by 'password';
Query OK, 0 rows affected (0.021 sec)

MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.002 sec)

MariaDB [(none)]> exit
Bye
[email protected]:~(keystone)#


pOs拜客生活常识网

三:安装及配置NovapOs拜客生活常识网

1) 安装Nova
[email protected]:~(keystone)# apt install nova-api nova-conductor nova-scheduler nova-novncproxy placement-api python3-novaclient -y

2) 配置Nova
[email protected]:~(keystone)# mv /etc/nova/nova.conf /etc/nova/nova.conf.bak
[email protected]:~(keystone)# vim /etc/nova/nova.conf
[DEFAULT]
osapi_compute_listen = 127.0.0.1
osapi_compute_listen_port = 8774
metadata_listen = 127.0.0.1
metadata_listen_port = 8775
state_path = /var/lib/nova
enabled_apis = osapi_compute,metadata
log_dir = /var/log/nova
# 设定RabbitMQ
transport_url = rabbit://openstack:[email protected]

[api]
auth_strategy = keystone

[vnc]
enabled = True
novncproxy_host = 127.0.0.1
novncproxy_port = 6080
novncproxy_base_url = https://srv1.1000y.cloud:6080/vnc_auto.html

# 配置Glance信息
[glance]
api_servers = https://srv1.1000y.cloud:9292
# 自签名证书值为true,其他为false
insecure = true

[oslo_concurrency]
lock_path = $state_path/tmp

# 配置链接数据库的信息
[api_database]
connection = mysql+pymysql://nova:[email protected]/nova_api

[database]
connection = mysql+pymysql://nova:[email protected]/nova

# 配置Keystone验证信息
[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]:~(keystone)# chmod 640 /etc/nova/nova.conf
[email protected]:~(keystone)# chgrp nova /etc/nova/nova.conf

3) 配置placement
[email protected]:~(keystone)# mv /etc/placement/placement.conf /etc/placement/placement.conf.bak

[email protected]:~(keystone)# vim /etc/placement/placement.conf
[DEFAULT]
debug = false

[api]
auth_strategy = keystone

[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 = placement
password = servicepassword
# 自签名证书值为true,其他为false
insecure = true

[placement_database]
connection = mysql+pymysql://placement:[email protected]/placement

[email protected]:~(keystone)# vim /etc/apache2/sites-enabled/placement-api.conf
# 修改第1行
Listen 127.0.0.1:8778

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

[email protected]:~(keystone)# chmod 640 /etc/placement/placement.conf
[email protected]:~(keystone)# chgrp placement /etc/placement/placement.conf

4) 配置Nginx Proxy
[email protected]:~(keystone)# vim /etc/nginx/nginx.conf
......
......
......
......
......
......

stream {
    upstream glance-api {
        server 127.0.0.1:9292;
    }
    server {
        listen srv1.1000y.cloud:9292 ssl;
        proxy_pass glance-api;
    }
    upstream nova-api {
        server 127.0.0.1:8774;
    }
    server {
        listen srv1.1000y.cloud:8774 ssl;
        proxy_pass nova-api;
    }
    upstream nova-metadata-api {
        server 127.0.0.1:8775;
    }
    server {
        listen srv1.1000y.cloud:8775 ssl;
        proxy_pass nova-metadata-api;
    }
    upstream placement-api {
        server 127.0.0.1:8778;
    }
    server {
        listen srv1.1000y.cloud:8778 ssl;
        proxy_pass placement-api;
    }
    upstream novncproxy {
        server 127.0.0.1:6080;
    }
    server {
        listen srv1.1000y.cloud:6080 ssl;
        proxy_pass novncproxy;
    }
    ssl_certificate "/etc/ssl/private/zed.crt";
    ssl_certificate_key "/etc/ssl/private/zed.key";
}    

相关阅读:

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