OpenStack Antelope : Configure Skyline2023/03/30 |
Install OpenStack Dashboard Service (Skyline).
This example is based on the environment like follows.
------------+--------------------------+--------------------------+------------ | | | eth0|10.0.0.30 eth0|10.0.0.50 eth0|10.0.0.51 +-----------+-----------+ +-----------+-----------+ +-----------+-----------+ | [ dlp.srv.world ] | | [ network.srv.world ] | | [ node01.srv.world ] | | (Control Node) | | (Network Node) | | (Compute Node) | | | | | | | | MariaDB RabbitMQ | | Open vSwitch | | Libvirt | | Memcached Nginx | | Neutron Server | | Nova Compute | | Keystone httpd | | OVN-Northd | | Open vSwitch | | Glance Nova API | | Nginx iSCSI Target | | OVN Metadata Agent | | Cinder API | | Cinder Volume | | OVN-Controller | | Skyline API/Console | | Heat API/Engine | | | +-----------------------+ +-----------------------+ +-----------------------+ |
[1] | Add users for Skyline in Keystone. |
# create [skyline] user in [service] project root@dlp ~(keystone)# openstack user create --domain default --project service --password servicepassword skyline +---------------------+----------------------------------+ | Field | Value | +---------------------+----------------------------------+ | default_project_id | d3dd87fb1a034f7883539a6a4f83781f | | domain_id | default | | enabled | True | | id | 7ff47d496710451da563f7f09c08927c | | name | skyline | | options | {} | | password_expires_at | None | +---------------------+----------------------------------+ # add [skyline] user in [admin] role root@dlp ~(keystone)# openstack role add --project service --user skyline admin
|
[2] | Add a User and Database on MariaDB for Skyline. |
root@dlp ~(keystone)# mysql Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 113 Server version: 10.6.12-MariaDB-0ubuntu0.22.04.1 Ubuntu 22.04 Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> create database skyline; Query OK, 1 row affected (0.00 sec) MariaDB [(none)]> grant all privileges on skyline.* to skyline@'localhost' identified by 'password'; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> grant all privileges on skyline.* to skyline@'%' identified by 'password'; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> flush privileges; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> exit Bye |
[3] | Configure Skyline API. |
root@dlp ~(keystone)#
groupadd -g 64080 skyline root@dlp ~(keystone)# useradd -u 64080 -g skyline -d /var/lib/skyline -s /sbin/nologin skyline root@dlp ~(keystone)# mkdir -p /etc/skyline /var/lib/skyline /var/log/skyline root@dlp ~(keystone)# chmod 750 /etc/skyline /var/lib/skyline /var/log/skyline
root@dlp ~(keystone)#
pip3 install skyline-apiserver root@dlp ~(keystone)# git clone https://opendev.org/openstack/skyline-apiserver.git root@dlp ~(keystone)# cp ./skyline-apiserver/etc/gunicorn.py /etc/skyline/gunicorn.py root@dlp ~(keystone)# cp ./skyline-apiserver/etc/skyline.yaml.sample /etc/skyline/skyline.yaml
root@dlp ~(keystone)#
vi /etc/skyline/gunicorn.py # line 17 : change bind = " 127.0.0.1:28000 "
root@dlp ~(keystone)#
vi /etc/skyline/skyline.yaml # line 5 : MariaDB connection info database_url: mysql://skyline:password@dlp.srv.world/skyline # line 7 : change log_dir: /var/log/skyline # line 27 : Keystone connection info keystone_url: https://dlp.srv.world:5000 # line 59 : Slyline user password system_user_domain: Default system_user_name: skyline system_user_password: 'servicepassword'root@dlp ~(keystone)# cd ./skyline-apiserver root@dlp skyline-apiserver(keystone)# make db_sync alembic -c skyline_apiserver/db/alembic/alembic.ini upgrade head 2023-03-30 10:48:07.135 | INFO | alembic.runtime.migration:__init__:204 - Context impl MySQLImpl. 2023-03-30 10:48:07.135 | INFO | alembic.runtime.migration:__init__:207 - Will assume non-transactional DDL. 2023-03-30 10:48:07.154 | INFO | alembic.runtime.migration:run_migrations:618 - Running upgrade -> 000, initroot@dlp skyline-apiserver(keystone)# root@dlp ~(keystone)# chown -R skyline. /etc/skyline /var/lib/skyline /var/log/skyline
root@dlp ~(keystone)#
vi /etc/systemd/system/skyline-apiserver.service # create new [Unit] Description=OpenStack Skyline APIServer [Service] User=skyline Group=skyline Type=simple ExecStart=/usr/local/bin/gunicorn -c /etc/skyline/gunicorn.py skyline_apiserver.main:app LimitNOFILE=32768 Restart=on-failure TimeoutStopSec=15 [Install] WantedBy=multi-user.target systemctl daemon-reload root@dlp ~(keystone)# systemctl enable --now skyline-apiserver |
[4] | Configure Skyline Console. |
root@dlp ~(keystone)#
root@dlp ~(keystone)# apt -y install npm python-is-python3 root@dlp ~(keystone)# npm install -g yarn
git clone https://opendev.org/openstack/skyline-console.git root@dlp ~(keystone)# cd ./skyline-console root@dlp skyline-console(keystone)# make package root@dlp skyline-console(keystone)# pip3 install --force-reinstall ./dist/skyline_console-*.whl root@dlp skyline-console(keystone)#
root@dlp ~(keystone)#
vi /etc/nginx/conf.d/skyline.conf # create new upstream skyline { server 127.0.0.1:28000 fail_timeout=0; } server { listen 9999 ssl http2 default_server; server_name dlp.srv.world; root /usr/local/lib/python3.10/dist-packages/skyline_console/static; index index.html; # replace to your certificate ssl_certificate "/etc/letsencrypt/live/dlp.srv.world/fullchain.pem"; ssl_certificate_key "/etc/letsencrypt/live/dlp.srv.world/privkey.pem"; ssl_session_cache shared:SSL:1m; ssl_session_timeout 10m; error_page 497 https://$http_host$request_uri; location / { try_files $uri $uri/ /index.html; expires 1d; add_header Cache-Control "public"; } location /api/openstack/skyline/ { proxy_pass http://skyline/; proxy_redirect off; proxy_buffering off; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Host $host; proxy_set_header Host $http_host; } # replace to your Nova Endpoint location /api/openstack/regionone/nova/ { proxy_pass https://dlp.srv.world:8774/; proxy_redirect https://dlp.srv.world:8774/ /api/openstack/regionone/nova/; proxy_buffering off; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Host $host; proxy_set_header Host $http_host; } # replace to your Keystone Endpoint location /api/openstack/regionone/keystone/ { proxy_pass https://dlp.srv.world:5000/; proxy_redirect https://dlp.srv.world:5000/ /api/openstack/regionone/keystone/; proxy_buffering off; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Host $host; proxy_set_header Host $http_host; } # replace to your Glance Endpoint location /api/openstack/regionone/glance/ { proxy_pass https://dlp.srv.world:9292/; proxy_redirect https://dlp.srv.world:9292/ /api/openstack/regionone/glance/; proxy_buffering off; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Host $host; proxy_set_header Host $http_host; } # replace to your Neutron Endpoint location /api/openstack/regionone/neutron/ { proxy_pass https://network.srv.world:9696/; proxy_redirect https://network.srv.world:9696/ /api/openstack/regionone/neutron/; proxy_buffering off; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Host $host; proxy_set_header Host $http_host; } # replace to your Heat Endpoint location /api/openstack/regionone/heat/ { proxy_pass https://network.srv.world:8004/; proxy_redirect https://network.srv.world:8004/ /api/openstack/regionone/heat/; proxy_buffering off; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Host $host; proxy_set_header Host $http_host; } # replace to your Placement Endpoint location /api/openstack/regionone/placement/ { proxy_pass https://dlp.srv.world:8778/; proxy_redirect https://dlp.srv.world:8778/ /api/openstack/regionone/placement/; proxy_buffering off; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Host $host; proxy_set_header Host $http_host; } # replace to your Cinder Endpoint location /api/openstack/regionone/cinder/ { proxy_pass https://dlp.srv.world:8776/; proxy_redirect https://dlp.srv.world:8776/ /api/openstack/regionone/cinder/; proxy_buffering off; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Host $host; proxy_set_header Host $http_host; } } systemctl restart nginx |
[5] |
Access to the URL below with any web browser.
After accessing, following Skyline login form is displayed, you can login with any user in Keystone.
⇒ https://(Dashboard server's hostname - the same name registered in certificate):9999/ |
[6] | After login successfully, Skyline Dashboard is displayed. |
[7] | Try to create an instance to verify settings. Select [Instances] on the left pane and click [Create Instance] button on the right pane. |
[8] | Configure image and disk for instance. |
[9] | Configure network and security group for instance. |
[10] | Configure instance name and key-pair for instance. |
[11] | Confirm settings and click [Confirm] button. |
[12] | That's OK if instance has been created successfully and the [Status] turns to [Active]. |
Sponsored Link |