Ubuntu 24.04
Sponsored Link

OpenStack Dalmatian : Nova कॉन्फ़िगर करें #22024/10/04

 

OpenStack कंप्यूट सर्विस (Nova) स्थापित और कॉन्फ़िगर करें।

यह उदाहरण निम्न प्रकार से पर्यावरण पर आधारित है।

        eth0|10.0.0.30 
+-----------+-----------+
|   [ dlp.srv.world ]   |
|     (Control Node)    |
|                       |
|  MariaDB    RabbitMQ  |
|  Memcached  Nginx     |
|  Keystone   httpd     |
|  Glance     Nova API  |
+-----------------------+

[1] Nova स्थापित करें।
root@dlp ~(keystone)#
apt -y install nova-api nova-conductor nova-scheduler nova-novncproxy placement-api python3-novaclient
[2] Nova कॉन्फ़िगर करें।
root@dlp ~(keystone)#
mv /etc/nova/nova.conf /etc/nova/nova.conf.org

root@dlp ~(keystone)#
vi /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:password@dlp.srv.world:5672

[api]
auth_strategy = keystone

[vnc]
enabled = True
novncproxy_host = 127.0.0.1
novncproxy_port = 6080
novncproxy_base_url = https://dlp.srv.world:6080/vnc_auto.html

# Glance कनेक्शन जानकारी
[glance]
api_servers = https://dlp.srv.world:9292

[oslo_concurrency]
lock_path = $state_path/tmp

# MariaDB कनेक्शन जानकारी
[api_database]
connection = mysql+pymysql://nova:password@dlp.srv.world:3306/nova_api

[database]
connection = mysql+pymysql://nova:password@dlp.srv.world:3306/nova

# Keystone प्रामाणिक जानकारी
[keystone_authtoken]
www_authenticate_uri = https://dlp.srv.world:5000
auth_url = https://dlp.srv.world:5000
memcached_servers = dlp.srv.world:11211
auth_type = password
project_domain_name = Default
user_domain_name = Default
project_name = service
username = nova
password = servicepassword
# यदि Apache2 Keystone पर स्व-हस्ताक्षरित प्रमाणपत्र का उपयोग कर रहे हैं, तो [true] पर जाएँ
insecure = false

[placement]
auth_url = https://dlp.srv.world:5000
os_region_name = RegionOne
auth_type = password
project_domain_name = Default
user_domain_name = Default
project_name = service
username = placement
password = servicepassword
# यदि Apache2 Keystone पर स्व-हस्ताक्षरित प्रमाणपत्र का उपयोग कर रहे हैं, तो [true] पर जाएँ
insecure = false

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

[oslo_policy]
enforce_new_defaults = true

root@dlp ~(keystone)#
chmod 640 /etc/nova/nova.conf

root@dlp ~(keystone)#
chgrp nova /etc/nova/nova.conf
root@dlp ~(keystone)#
mv /etc/placement/placement.conf /etc/placement/placement.conf.org

root@dlp ~(keystone)#
vi /etc/placement/placement.conf
# नया निर्माण
[DEFAULT]
debug = false

[api]
auth_strategy = keystone

[keystone_authtoken]
www_authenticate_uri = https://dlp.srv.world:5000
auth_url = https://dlp.srv.world:5000
memcached_servers = dlp.srv.world:11211
auth_type = password
project_domain_name = Default
user_domain_name = Default
project_name = service
username = placement
password = servicepassword
# यदि Apache2 Keystone पर स्व-हस्ताक्षरित प्रमाणपत्र का उपयोग कर रहे हैं, तो [true] पर जाएँ
insecure = false

[placement_database]
connection = mysql+pymysql://placement:password@dlp.srv.world:3306/placement

root@dlp ~(keystone)#
vi /etc/apache2/sites-enabled/placement-api.conf
# पंक्ति 1 : परिवर्तन

Listen
127.0.0.1:8778
root@dlp ~(keystone)#
chmod 640 /etc/placement/placement.conf

root@dlp ~(keystone)#
chgrp placement /etc/placement/placement.conf

[3] प्रॉक्सी सेटिंग्स के लिए Nginx कॉन्फ़िगर करें।
root@dlp ~(keystone)#
vi /etc/nginx/nginx.conf
# [stream] अनुभाग में जोड़ें

stream {
    upstream glance-api {
        server 127.0.0.1:9292;
    }
    server {
        listen 10.0.0.30:9292 ssl;
        proxy_pass glance-api;
    }
    upstream nova-api {
        server 127.0.0.1:8774;
    }
    server {
        listen 10.0.0.30:8774 ssl;
        proxy_pass nova-api;
    }
    upstream nova-metadata-api {
        server 127.0.0.1:8775;
    }
    server {
        listen 10.0.0.30:8775 ssl;
        proxy_pass nova-metadata-api;
    }
    upstream placement-api {
        server 127.0.0.1:8778;
    }
    server {
        listen 10.0.0.30:8778 ssl;
        proxy_pass placement-api;
    }
    upstream novncproxy {
        server 127.0.0.1:6080;
    }
    server {
        listen 10.0.0.30:6080 ssl;
        proxy_pass novncproxy;
    }
    ssl_certificate "/etc/letsencrypt/live/dlp.srv.world/fullchain.pem";
    ssl_certificate_key "/etc/letsencrypt/live/dlp.srv.world/privkey.pem";
}
[4] डेटाबेस में डेटा जोड़ें और Nova सेवाएँ प्रारंभ करें।
root@dlp ~(keystone)#
su -s /bin/bash placement -c "placement-manage db sync"
root@dlp ~(keystone)#
su -s /bin/bash nova -c "nova-manage api_db sync"
root@dlp ~(keystone)#
su -s /bin/bash nova -c "nova-manage cell_v2 map_cell0"
root@dlp ~(keystone)#
su -s /bin/bash nova -c "nova-manage db sync"
root@dlp ~(keystone)#
su -s /bin/bash nova -c "nova-manage cell_v2 create_cell --name cell1"
root@dlp ~(keystone)#
systemctl restart nova-api nova-conductor nova-scheduler nova-novncproxy

root@dlp ~(keystone)#
systemctl enable nova-api nova-conductor nova-scheduler nova-novncproxy

root@dlp ~(keystone)#
systemctl restart apache2 nginx
# स्थिति दिखाओ

root@dlp ~(keystone)#
openstack compute service list

+-----------+-----------+-----------+----------+---------+-------+-------------+
| ID        | Binary    | Host      | Zone     | Status  | State | Updated At  |
+-----------+-----------+-----------+----------+---------+-------+-------------+
| a09abbba- | nova-     | dlp.srv.w | internal | enabled | up    | 2024-10-    |
| 18a6-     | conductor | orld      |          |         |       | 04T01:17:06 |
| 4ec1-     |           |           |          |         |       | .000000     |
| 814b-     |           |           |          |         |       |             |
| dd60f9588 |           |           |          |         |       |             |
| dad       |           |           |          |         |       |             |
| e1b7fc76- | nova-     | dlp.srv.w | internal | enabled | up    | 2024-10-    |
| 40cf-     | scheduler | orld      |          |         |       | 04T01:17:07 |
| 409c-     |           |           |          |         |       | .000000     |
| 85c7-     |           |           |          |         |       |             |
| c6044afc0 |           |           |          |         |       |             |
| b87       |           |           |          |         |       |             |
+-----------+-----------+-----------+----------+---------+-------+-------------+
मिलान सामग्री