快速部署OpenStack全新UI管理Skyline Dashboard

前置说明

系统:Ubuntu 22.04.3,
VMware虚拟机环境注意开启CPU虚拟化
配置:内存4GB,硬盘空间96GB,根目录92GB

OpenStack版本:yoga
已完成最小化组件的部署:Minimal deployment for Yoga

1个控制节点,2个计算节点

参考链接
Docker安装及使用
OpenStack新版UI管理skyline
openstack快速安装 Skyline 组件安装,支持极简化配置
官方项目
skyline官方文档
官方 skyline-apiserver
github skyline-apiserver

先决条件
一个至少运行核心组件的 OpenStack 环境, 并能通过 Keystone endpoint 访问 OpenStack 组件
一个安装有容器引擎的 (docker 或 podman) 的 Linux 服务器

docker安装

Ubuntu 22.04 安装docker

curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
docker version

skyline部署

1.获取skyline.yaml文件

rm -rf /tmp/skyline && mkdir /tmp/skyline
mkdir /etc/skyline

wget https://opendev.org/openstack/skyline-apiserver/src/branch/master/etc/skyline.yaml.sample -O /etc/skyline/skyline.yaml

2.修改配置文件

vim data/skyline.yaml
default:
  database_url: mysql://skyline:111111@controller:3306/skyline
  prometheus_endpoint: http://10.0.0.11:9091

openstack:
  keystone_url: http://10.0.0.11:35357/v3
  default_region: RegionOne
  interface_type: internal
  system_user_name: skyline
  system_user_password: 111111

或这直接修改下面内容后,生成

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:
  keystone_url: http://172.16.102.200:35357/v3
  default_region: RegionOne
  interface_type: internal
  system_user_name: skyline
  system_user_password: SKYLINE_PASS
  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
    aas: neutron_
  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

3.创建数据库

创建skyline数据库,创建skyline数据库用户,并设置密码为111111

mysql -u root -proot -e "CREATE DATABASE skyline"
mysql -u root -proot -e "GRANT ALL PRIVILEGES ON skyline.* TO 'skyline'@'localhost' IDENTIFIED BY '111111'"
mysql -u root -proot -e "GRANT ALL PRIVILEGES ON skyline.* TO 'skyline'@'%' IDENTIFIED BY '111111'"

mysql -u root -proot -e "flush privileges;"
mysql -u root -proot -e "show databases;"
mysql -u root -proot -e "select user,host from mysql.user;"

4.创建服务凭证

cd
source admin-openrc.sh

openstack user create --domain default --password 111111 skyline
openstack role add --project service --user skyline admin

openstack user list
openstack service list

5.skyline_bootstrap 容器进行初始化引导

进行初始化,检查日志输出结尾是否是"exit 0"

docker run -d --name skyline_bootstrap -e KOLLA_BOOTSTRAP="" -v /etc/skyline/skyline.yaml:/etc/skyline/skyline.yaml --net=host 99cloud/skyline:latest

docker logs skyline_bootstrap
6.运行 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

访问skyline Web界面

如果无法访问9999端口,用命令 docker logs skyline 查看容器日志

容器监听宿主机9999端口:http://10.0.0.11:9999

你可能感兴趣的:(OpenStack,openstack,ui)