Skyline 是一个经过 UI 和 UE 优化过的 OpenStack 仪表盘,支持 OpenStack Train 及以上版本。Skyline 拥有现代化的技术栈和生态,更易于开发者维护和 使用者操作,以及更高的并发性能。
Skyline 的吉祥物是九色鹿。九色鹿源自于敦煌壁画《九色鹿本生》,其寓意是佛理 因果和知恩图报,这与九州云自创办以来秉持的拥抱和反馈社区理念一致。我们也希望 Skyline 像九色鹿一样,轻巧、优雅,而又能力强大,为 OpenStack 社区和用户 提供更优质的 Dashboard。
安装步骤
需要环境
- 一个至少运行核心组件的 OpenStack 环境, 并能通过 Keystone endpoint 访问 OpenStack 组件
- 一个安装有容器引擎的 (docker 或 podman) 的 Linux 服务器
创建数据库
# 1.连接到数据库
mysql -uroot -p数据库root用户密码
# 2.创建skyline数据库
CREATE DATABASE IF NOT EXISTS skyline DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
# 3.创建skyline数据库用户,并设置密码为 SKYLINE_DBPASS
GRANT ALL PRIVILEGES ON skyline.* TO 'skyline'@'localhost' IDENTIFIED BY 'SKYLINE_DBPASS';
GRANT ALL PRIVILEGES ON skyline.* TO 'skyline'@'%' IDENTIFIED BY 'SKYLINE_DBPASS';
注1:如果openstack环境是kolla-ansible搭建的需要用 docker exec -it mariadb bash 进入mysql容器进行添加数据库用户操作
注2:如果openstack环境是kolla-ansible搭建的需要用 cat /etc/kolla/passwords.yml |grep ^database_password 查看mysql的root密码
创建服务凭证
source /etc/kolla/admin-openrc.sh
# 创建skyline用户并设置密码为 SKYLINE_PASS
openstack user create --domain default --password SKYLINE_PASS skyline
# 将skyline设置为admin角色
openstack role add --project service --user skyline admin
注1:如果提示没有openstack命令请安装 yum install -y python-openstackclient
创建配置文件
# 请按实际填写
database_url='mysql://skyline:SKYLINE_PASS@10.47.174.99:3306/skyline'
keystone_url='http://10.47.174.99:35357/v3'
system_user_domain='Default'
system_user_name='skyline'
system_user_password='SKYLINE_DBPASS'
rm -rf /tmp/skyline && mkdir /tmp/skyline
mkdir /etc/skyline
cat > /etc/skyline/skyline.yaml <<EOF
default:
access_token_expire: 3600
access_token_renew: 1800
cors_allow_origins: []
database_url: '$database_url'
# database_url: 'sqlite:tmp/skyline.db'
debug: false
log_dir: ./log
prometheus_basic_auth_password: ''
prometheus_basic_auth_user: ''
prometheus_enable_basic_auth: false
prometheus_endpoint: http://localhost:9091
secret_key: aCtmgbcUqYUy_HNVg5BDXCaeJgJQzHJXwqbXr0Nmb2o
session_name: session
developer:
show_raw_sql: false
openstack:
base_domains:
- heat_user_domain
base_roles:
- keystone_system_admin
- keystone_system_reader
- keystone_project_admin
- keystone_project_member
- keystone_project_reader
- nova_system_admin
- nova_system_reader
- nova_project_admin
- nova_project_member
- nova_project_reader
- cinder_system_admin
- cinder_system_reader
- cinder_project_admin
- cinder_project_member
- cinder_project_reader
- glance_system_admin
- glance_system_reader
- glance_project_admin
- glance_project_member
- glance_project_reader
- neutron_system_admin
- neutron_system_reader
- neutron_project_admin
- neutron_project_member
- neutron_project_reader
- heat_system_admin
- heat_system_reader
- heat_project_admin
- heat_project_member
- heat_project_reader
- placement_system_admin
- placement_system_reader
- panko_system_admin
- panko_system_reader
- panko_project_admin
- panko_project_member
- panko_project_reader
- ironic_system_admin
- ironic_system_reader
- octavia_system_admin
- octavia_system_reader
- octavia_project_admin
- octavia_project_member
- octavia_project_reader
default_region: RegionOne
extension_mapping:
fwaas_v2: neutron_firewall
vpnaas: neutron_vpn
interface_type: public
keystone_url: '$keystone_url'
nginx_prefix: /api/openstack
reclaim_instance_interval: 604800
service_mapping:
baremetal: ironic
compute: nova
database: trove
identity: keystone
image: glance
load-balancer: octavia
network: neutron
object-store: swift
orchestration: heat
placement: placement
volumev3: cinder
system_admin_roles:
- admin
- system_admin
system_project: 'service'
system_project_domain: 'Default'
system_reader_roles:
- system_reader
system_user_domain: '$system_user_domain'
system_user_name: '$system_user_name'
system_user_password: '$system_user_password'
setting:
base_settings:
- flavor_families
- gpu_models
- usb_models
flavor_families:
- architecture: x86_architecture
categories:
- name: general_purpose
properties: []
- name: compute_optimized
properties: []
- name: memory_optimized
properties: []
- name: high_clock_speed
properties: []
- architecture: heterogeneous_computing
categories:
- name: compute_optimized_type_with_gpu
properties: []
- name: visualization_compute_optimized_type_with_gpu
properties: []
gpu_models:
- nvidia_t4
usb_models:
- usb_c
EOF
运行 skyline_bootstrap 容器进行初始化引导
# 进行初始化
docker run -d --name skyline_bootstrap -e KOLLA_BOOTSTRAP="" -v /etc/skyline/skyline.yaml:/etc/skyline/skyline.yaml --net=host 99cloud/skyline:latest
# 检查日志输出结尾是否是"exit 0"
docker logs skyline_bootstrap
运行 skyline 服务
# 删除引导容器
docker rm -f skyline_bootstrap
# 启动skyline服务容器
docker run -d --name skyline --restart=always -v /etc/skyline/skyline.yaml:/etc/skyline/skyline.yaml --net=host 99cloud/skyline:latest
注1:如果无法访问9999端口,请用 docker logs skyline 命令查看容器日志
访问web界面
容器监听宿主机9999端口:https://IP:9999
评论(0)