kolla---openstack(Xena)----skyline部署体验

kolla 部署openstack(Xena)之Skyline模块体验

P0.基础环境

双节点(controller+ node)
kolla 部署
openstack Xena版本
(venv) root@controller:~# docker ps -a
CONTAINER ID   IMAGE                                                                  COMMAND                  CREATED         STATUS                    PORTS     NAMES
640e9d7dc654   quay.io/openstack.kolla/ubuntu-source-horizon:xena                     "dumb-init --single-…"   2 hours ago     Up 36 minutes (healthy)             horizon
f945f55e8dd9   quay.io/openstack.kolla/ubuntu-source-heat-engine:xena                 "dumb-init --single-…"   2 hours ago     Up 2 hours (healthy)                heat_engine
8d6687bca546   quay.io/openstack.kolla/ubuntu-source-heat-api-cfn:xena                "dumb-init --single-…"   2 hours ago     Up 2 hours (healthy)                heat_api_cfn
f408c65ac86a   quay.io/openstack.kolla/ubuntu-source-heat-api:xena                    "dumb-init --single-…"   2 hours ago     Up 2 hours (healthy)                heat_api
142480bf953f   quay.io/openstack.kolla/ubuntu-source-neutron-metadata-agent:xena      "dumb-init --single-…"   2 hours ago     Up 2 hours (healthy)                neutron_metadata_agent
6b59b18361b1   quay.io/openstack.kolla/ubuntu-source-neutron-l3-agent:xena            "dumb-init --single-…"   2 hours ago     Up 2 hours (healthy)                neutron_l3_agent
924f3c8a99a1   quay.io/openstack.kolla/ubuntu-source-neutron-dhcp-agent:xena          "dumb-init --single-…"   2 hours ago     Up 2 hours (healthy)                neutron_dhcp_agent
84b6d089631a   quay.io/openstack.kolla/ubuntu-source-neutron-openvswitch-agent:xena   "dumb-init --single-…"   2 hours ago     Up 2 hours (healthy)                neutron_openvswitch_agent
f8654167cf90   quay.io/openstack.kolla/ubuntu-source-neutron-server:xena              "dumb-init --single-…"   2 hours ago     Up 2 hours (healthy)                neutron_server
a9911a20a01d   quay.io/openstack.kolla/ubuntu-source-openvswitch-vswitchd:xena        "dumb-init --single-…"   3 hours ago     Up 3 hours (healthy)                openvswitch_vswitchd
f62c417faf94   quay.io/openstack.kolla/ubuntu-source-openvswitch-db-server:xena       "dumb-init --single-…"   3 hours ago     Up 3 hours (healthy)                openvswitch_db
2cf0e5014674   quay.io/openstack.kolla/ubuntu-source-nova-novncproxy:xena             "dumb-init --single-…"   3 hours ago     Up 3 hours (healthy)                nova_novncproxy
91f7df2363e5   quay.io/openstack.kolla/ubuntu-source-nova-conductor:xena              "dumb-init --single-…"   3 hours ago     Up 3 hours (healthy)                nova_conductor
98140ffba737   quay.io/openstack.kolla/ubuntu-source-nova-api:xena                    "dumb-init --single-…"   3 hours ago     Up 3 hours (healthy)                nova_api
aa766656e0ab   quay.io/openstack.kolla/ubuntu-source-nova-scheduler:xena              "dumb-init --single-…"   3 hours ago     Up 3 hours (healthy)                nova_scheduler
94bd6808f3b6   quay.io/openstack.kolla/ubuntu-source-placement-api:xena               "dumb-init --single-…"   3 hours ago     Up 49 minutes (healthy)             placement_api
564a47cf1e21   quay.io/openstack.kolla/ubuntu-source-cinder-backup:xena               "dumb-init --single-…"   3 hours ago     Up 3 hours (healthy)                cinder_backup
b76cc836d2ce   quay.io/openstack.kolla/ubuntu-source-cinder-volume:xena               "dumb-init --single-…"   3 hours ago     Up 3 hours (healthy)                cinder_volume
fbe47b3a3074   quay.io/openstack.kolla/ubuntu-source-cinder-scheduler:xena            "dumb-init --single-…"   3 hours ago     Up 3 hours (healthy)                cinder_scheduler
941b35ca502b   quay.io/openstack.kolla/ubuntu-source-cinder-api:xena                  "dumb-init --single-…"   3 hours ago     Up 3 hours (healthy)                cinder_api
549fc0fdf80d   quay.io/openstack.kolla/ubuntu-source-glance-api:xena                  "dumb-init --single-…"   3 hours ago     Up 3 hours (healthy)                glance_api
009af88cbc16   quay.io/openstack.kolla/ubuntu-source-keystone:xena                    "dumb-init --single-…"   3 hours ago     Up 4 minutes (healthy)              keystone
f0e6261a077e   quay.io/openstack.kolla/ubuntu-source-keystone-fernet:xena             "dumb-init --single-…"   3 hours ago     Up 3 hours (healthy)                keystone_fernet
0381b98fcff9   quay.io/openstack.kolla/ubuntu-source-keystone-ssh:xena                "dumb-init --single-…"   3 hours ago     Up 3 hours (healthy)                keystone_ssh
2b56010a8427   quay.io/openstack.kolla/ubuntu-source-rabbitmq:xena                    "dumb-init --single-…"   3 hours ago     Up 3 hours (healthy)                rabbitmq
ae9bae7e4d17   quay.io/openstack.kolla/ubuntu-source-tgtd:xena                        "dumb-init --single-…"   3 hours ago     Up 3 hours                          tgtd
fdbec0616844   quay.io/openstack.kolla/ubuntu-source-iscsid:xena                      "dumb-init --single-…"   3 hours ago     Up 3 hours                          iscsid
8acc15cbc0f5   quay.io/openstack.kolla/ubuntu-source-memcached:xena                   "dumb-init --single-…"   3 hours ago     Up 3 hours (healthy)                memcached
910f565915b1   quay.io/openstack.kolla/ubuntu-source-mariadb-server:xena              "dumb-init -- kolla_…"   3 hours ago     Up 55 seconds                       mariadb
007250787efa   quay.io/openstack.kolla/ubuntu-source-cron:xena                        "dumb-init --single-…"   3 hours ago     Up 3 hours                          cron
c4283b94784c   quay.io/openstack.kolla/ubuntu-source-kolla-toolbox:xena               "dumb-init --single-…"   3 hours ago     Up 3 hours                          kolla_toolbox
9a33f65ea828   quay.io/openstack.kolla/ubuntu-source-fluentd:xena                     "dumb-init --single-…"   3 hours ago     Up 3 hours                          fluentd

1. 先决条件

1.已存在一个opentack核心组件的平台环境
2.有docker 或者podman

PS:kolla-ansible部署满足

2. 配置skyline.yaml

在controller节点 上编辑 /etc/skyline/skyline.yaml 文件 (没有就创建)
并根据实际的环境修改以下参数
database_url                   
keystone_url                   
default_region
interface_type
system_project_domain
system_project
system_user_domain
system_user_name
system_user_password

PS:mariadb的root密码在/etc/kolla/passwd , localhost 改成controller节点ip
        其他参考admin-openrc.sh

skyline.yaml

default:
  access_token_expire: 3600
  access_token_renew: 1800
  cors_allow_origins: []
  database_url: 'mysql://root:[email protected]:3306/skyline'
  # 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
    aas: neutron_
  interface_type: public
  keystone_url: 'http://192.168.50.3:35357/v3'
  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: 'Default'
  system_user_name: 'skyline'
  system_user_password: 'skyline'
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


3.数据库使用mariadb

连接 OpenStack 环境的数据库, 并创建 skyline 数据库;
   docker exec -it  mariadb  bash  去操作
MariaDB [(none)]> CREATE DATABASE IF NOT EXISTS skyline DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON skyline.* TO 'skyline'@'localhost' IDENTIFIED BY 'SKYLINE_DBPASS';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON skyline.* TO 'skyline'@'%'  IDENTIFIED BY 'SKYLINE_DBPASS';

4.部署服务

1.创建 skyline 服务凭证(在控制节点上);
 source  /etc/kolla/admin-openrc.sh
  openstack user create --domain default --password-prompt skyline
User Password:
Repeat User Password:
+---------------------+----------------------------------+
| Field               | Value                            |
+---------------------+----------------------------------+
| domain_id           | default                          |
| enabled             | True                             |
| id                  | 1827eeb69da04237b69ef4c5c7c8bc9c |
| name                | skyline                          |
| options             | {}                               |
| password_expires_at | None                             |
+---------------------+----------------------------------+



openstack role add --project service --user skyline admin




2.运行 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


3.初始化引导完成后运行 skyline 服务
docker rm -f skyline_bootstrap

docker run -d --name skyline --restart=always -v /etc/skyline/skyline.yaml:/etc/skyline/skyline.yaml --net=host 99cloud/skyline:latest


4.查看服务
root@controller:/etc/skyline# netstat -tnlp |grep 9999
tcp        0      0 0.0.0.0:9999            0.0.0.0:*               LISTEN      453702/nginx: maste


5.体验

kolla---openstack(Xena)----skyline部署体验_第1张图片
kolla---openstack(Xena)----skyline部署体验_第2张图片

后面体验了再补充吧

参考链接

官方资料,写得也很详细,照着来就行

https://docs.openstack.org/kolla-ansible/xena/user/quickstart.html

https://opendev.org/openstack/skyline-apiserver/src/branch/master/README-zh_CN.md

你可能感兴趣的:(kolla,openstack,ubuntu,linux,运维)