docs: Change md file to rst file
1. change md file to rst file for readme 2. add README.rst to description_file in setup.cfg Change-Id: I3ece3849798d708a780c76453a49a2627126b316
This commit is contained in:
parent
0c5446f937
commit
ce4d5bcc01
240
README-zh_CN.md
240
README-zh_CN.md
@ -1,240 +0,0 @@
|
||||
# Skyline API Server
|
||||
|
||||
[English](./README.md) | 简体中文
|
||||
|
||||
Skyline 是一个经过 UI 和 UE 优化过的 OpenStack 仪表盘,支持 OpenStack Train 及以上版本。Skyline 拥有现代化的技术栈和生态,更易于开发者维护和使用者操作,以及更高的并发性能。
|
||||
|
||||
Skyline 的吉祥物是九色鹿。九色鹿源自于敦煌壁画《九色鹿本生》,其寓意是佛理因果和知恩图报,这与九州云自创办以来秉持的拥抱和反馈社区理念一致。我们也希望 Skyline 像九色鹿一样,轻巧、优雅,而又能力强大,为 OpenStack 社区和用户提供更优质的 Dashboard。
|
||||
|
||||
![](docs/images/OpenStack_Project_Skyline_horizontal.png)
|
||||
|
||||
**目录**
|
||||
|
||||
- [Skyline API Server](#skyline-api-server)
|
||||
- [资源](#资源)
|
||||
- [快速开始](#快速开始)
|
||||
- [先决条件](#先决条件)
|
||||
- [配置](#配置)
|
||||
- [部署 - 数据库使用 Sqlite](#部署---数据库使用-sqlite)
|
||||
- [部署 - 数据库使用 MariaDB](#部署---数据库使用-mariadb)
|
||||
- [访问测试](#访问测试)
|
||||
- [开发 Skyline-apiserver](#开发-skyline-apiserver)
|
||||
- [依赖工具](#依赖工具)
|
||||
- [安装和运行](#安装和运行)
|
||||
- [Devstack 集成](#devstack-集成)
|
||||
- [Kolla Ansible 部署](#kolla-ansible-部署)
|
||||
|
||||
## 资源
|
||||
|
||||
- [Wiki](https://wiki.openstack.org/wiki/Skyline)
|
||||
- [Bug 跟踪器](https://launchpad.net/skyline-apiserver)
|
||||
|
||||
## 快速开始
|
||||
|
||||
### 先决条件
|
||||
|
||||
- 一个至少运行核心组件的 OpenStack 环境, 并能通过 Keystone endpoint 访问 OpenStack 组件
|
||||
- 一个安装有容器引擎的 ([docker](https://docs.docker.com/engine/install/) 或 [podman](https://podman.io/getting-started/installation)) 的 Linux 服务器
|
||||
|
||||
### 配置
|
||||
|
||||
1. 在 Linux 服务器中编辑 `/etc/skyline/skyline.yaml` 文件
|
||||
|
||||
可以参考 [sample file](etc/skyline.yaml.sample), 并根据实际的环境修改以下参数
|
||||
|
||||
- database_url
|
||||
- keystone_url
|
||||
- default_region
|
||||
- interface_type
|
||||
- system_project_domain
|
||||
- system_project
|
||||
- system_user_domain
|
||||
- system_user_name
|
||||
- system_user_password
|
||||
|
||||
### 部署 - 数据库使用 Sqlite
|
||||
|
||||
1. 运行 skyline_bootstrap 容器进行初始化引导
|
||||
|
||||
```bash
|
||||
rm -rf /tmp/skyline && mkdir /tmp/skyline
|
||||
|
||||
docker run -d --name skyline_bootstrap -e KOLLA_BOOTSTRAP="" -v /etc/skyline/skyline.yaml:/etc/skyline/skyline.yaml -v /tmp/skyline:/tmp --net=host 99cloud/skyline:latest
|
||||
|
||||
# Check bootstrap is normal `exit 0`
|
||||
docker logs skyline_bootstrap
|
||||
```
|
||||
|
||||
2. 初始化引导完成后运行 skyline 服务
|
||||
|
||||
```bash
|
||||
docker rm -f skyline_bootstrap
|
||||
```
|
||||
|
||||
> 如果需要修改 skyline 端口号,则在以下命令中添加 `-e LISTEN_ADDRESS=<ip:port>`
|
||||
>
|
||||
> `LISTEN_ADDRESS` 默认为 `0.0.0.0:9999`
|
||||
|
||||
```bash
|
||||
docker run -d --name skyline --restart=always -v /etc/skyline/skyline.yaml:/etc/skyline/skyline.yaml -v /tmp/skyline:/tmp --net=host 99cloud/skyline:latest
|
||||
```
|
||||
|
||||
### 部署 - 数据库使用 MariaDB
|
||||
|
||||
1. 连接 OpenStack 环境的数据库, 并创建 `skyline` 数据库
|
||||
|
||||
```bash
|
||||
$ mysql -u root -p
|
||||
MariaDB [(none)]> CREATE DATABASE IF NOT EXISTS skyline DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
|
||||
Query OK, 1 row affected (0.001 sec)
|
||||
```
|
||||
|
||||
2. 授予对数据库的适当访问权限
|
||||
|
||||
用合适的密码替换 `SKYLINE_DBPASS`
|
||||
|
||||
```bash
|
||||
MariaDB [(none)]> GRANT ALL PRIVILEGES ON skyline.* TO 'skyline'@'localhost' IDENTIFIED BY 'SKYLINE_DBPASS';
|
||||
Query OK, 0 rows affected (0.001 sec)
|
||||
|
||||
MariaDB [(none)]> GRANT ALL PRIVILEGES ON skyline.* TO 'skyline'@'%' IDENTIFIED BY 'SKYLINE_DBPASS';
|
||||
Query OK, 0 rows affected (0.001 sec)
|
||||
```
|
||||
|
||||
3. 创建 skyline 服务凭证
|
||||
|
||||
```bash
|
||||
# Source the admin credentials
|
||||
$ source admin-openrc
|
||||
|
||||
# Create the skyline user
|
||||
$ openstack user create --domain default --password-prompt skyline
|
||||
User Password:
|
||||
Repeat User Password:
|
||||
+---------------------+----------------------------------+
|
||||
| Field | Value |
|
||||
+---------------------+----------------------------------+
|
||||
| domain_id | default |
|
||||
| enabled | True |
|
||||
| id | 1qaz2wsx3edc4rfv5tgb6yhn7ujm8ikl |
|
||||
| name | skyline |
|
||||
| options | {} |
|
||||
| password_expires_at | 2020-08-08T08:08:08.123456 |
|
||||
+---------------------+----------------------------------+
|
||||
|
||||
# Add the admin role to the skyline user:
|
||||
$ openstack role add --project service --user skyline admin
|
||||
```
|
||||
|
||||
4. 运行 skyline_bootstrap 容器进行初始化引导
|
||||
|
||||
```bash
|
||||
docker run -d --name skyline_bootstrap -e KOLLA_BOOTSTRAP="" -v /etc/skyline/skyline.yaml:/etc/skyline/skyline.yaml --net=host 99cloud/skyline:latest
|
||||
|
||||
# Check bootstrap is normal `exit 0`
|
||||
docker logs skyline_bootstrap
|
||||
```
|
||||
|
||||
5. 初始化引导完成后运行 skyline 服务
|
||||
|
||||
```bash
|
||||
docker rm -f skyline_bootstrap
|
||||
```
|
||||
|
||||
> 如果需要修改 skyline 端口号,则在以下命令中添加 `-e LISTEN_ADDRESS=<ip:port>`
|
||||
>
|
||||
> `LISTEN_ADDRESS` 默认为 `0.0.0.0:9999`
|
||||
|
||||
```bash
|
||||
docker run -d --name skyline --restart=always -v /etc/skyline/skyline.yaml:/etc/skyline/skyline.yaml --net=host 99cloud/skyline:latest
|
||||
```
|
||||
|
||||
### 访问测试
|
||||
|
||||
现在你可以访问仪表盘: `https://<ip_address>:9999`
|
||||
|
||||
## 开发 Skyline-apiserver
|
||||
|
||||
**支持 Linux 和 Mac 操作系统 (推荐 Linux 操作系统) (由于 uvloop 和 cython 库)**
|
||||
|
||||
### 依赖工具
|
||||
|
||||
> python 使用了 3.7 版本的新特性 Context Variables 以及 uvloop(0.15.0+ 需要 python3.7+),考虑大部分系统不支持 python3.7,所以选择支持 python3.8 及以上版本
|
||||
|
||||
- make >= 3.82
|
||||
- python >= 3.8
|
||||
- node >= 10.22.0 (可选,只开发 API 就用不到)
|
||||
- yarn >= 1.22.4 (可选,只开发 API 就用不到)
|
||||
|
||||
### 安装和运行
|
||||
|
||||
1. 安装依赖包
|
||||
|
||||
```bash
|
||||
tox -e venv
|
||||
```
|
||||
|
||||
2. 配置 `skyline.yaml` 文件
|
||||
|
||||
```bash
|
||||
cp etc/skyline.yaml.sample etc/skyline.yaml
|
||||
export OS_CONFIG_DIR=$(pwd)/etc
|
||||
```
|
||||
|
||||
可能你需要根据实际的环境修改以下参数:
|
||||
|
||||
```yaml
|
||||
- database_url
|
||||
- keystone_url
|
||||
- default_region
|
||||
- interface_type
|
||||
- system_project_domain
|
||||
- system_project
|
||||
- system_user_domain
|
||||
- system_user_name
|
||||
- system_user_password
|
||||
```
|
||||
|
||||
> 如果你为 `database_url` 设置了类似 `sqlite:////tmp/skyline.db` ,只需要执行以下操作。
|
||||
> 如果你为 `database_url` 设置了类似 `mysql://root:root@localhost:3306/skyline` ,你应该先参考 `部署 - 数据库使用 MariaDB` 一章中的 `1` 和 `2` 步骤。
|
||||
|
||||
3. 初始化 skyline 数据库
|
||||
|
||||
```bash
|
||||
source .tox/venv/bin/activate
|
||||
make db_sync
|
||||
deactivate
|
||||
```
|
||||
|
||||
4. 运行 skyline-apiserver
|
||||
|
||||
```console
|
||||
$ source .tox/venv/bin/activate
|
||||
$ uvicorn --reload --reload-dir skyline_apiserver --port 28000 --log-level debug skyline_apiserver.main:app
|
||||
|
||||
INFO: Uvicorn running on http://127.0.0.1:28000 (Press CTRL+C to quit)
|
||||
INFO: Started reloader process [154033] using statreload
|
||||
INFO: Started server process [154037]
|
||||
INFO: Waiting for application startup.
|
||||
INFO: Application startup complete.
|
||||
```
|
||||
|
||||
此时你可访问在线 API 文档:`http://127.0.0.1:28000/docs`。
|
||||
|
||||
如果用 vscode 调试的话,可以通过 `.vscode/launch.json` 启动调试器。
|
||||
|
||||
5. 构建镜像
|
||||
|
||||
```bash
|
||||
make build
|
||||
```
|
||||
|
||||
## Devstack 集成
|
||||
|
||||
[与 Devstack 快速集成,搭建环境。](./devstack/README.rst)
|
||||
|
||||
## Kolla Ansible 部署
|
||||
|
||||
[使用 Kolla Ansible 部署环境。](./kolla/README-zh_CN.md)
|
||||
|
||||
![](docs/images/nine-color-deer-64.png)
|
284
README-zh_CN.rst
Normal file
284
README-zh_CN.rst
Normal file
@ -0,0 +1,284 @@
|
||||
==================
|
||||
Skyline API Server
|
||||
==================
|
||||
|
||||
`English <./README.rst>`__ \| 简体中文
|
||||
|
||||
Skyline 是一个经过 UI 和 UE 优化过的 OpenStack 仪表盘,支持 OpenStack
|
||||
Train 及以上版本。Skyline 拥有现代化的技术栈和生态,更易于开发者维护和
|
||||
使用者操作,以及更高的并发性能。
|
||||
|
||||
Skyline 的吉祥物是九色鹿。九色鹿源自于敦煌壁画《九色鹿本生》,其寓意是佛理
|
||||
因果和知恩图报,这与九州云自创办以来秉持的拥抱和反馈社区理念一致。我们也希望
|
||||
Skyline 像九色鹿一样,轻巧、优雅,而又能力强大,为 OpenStack 社区和用户
|
||||
提供更优质的 Dashboard。
|
||||
|
||||
|image0|
|
||||
|
||||
**目录**
|
||||
|
||||
- `Skyline API Server <#skyline-api-server>`__
|
||||
|
||||
- `资源 <#资源>`__
|
||||
- `快速开始 <#快速开始>`__
|
||||
|
||||
- `先决条件 <#先决条件>`__
|
||||
- `配置 <#配置>`__
|
||||
- `部署 - 数据库使用 Sqlite <#部署---数据库使用-sqlite>`__
|
||||
- `部署 - 数据库使用 MariaDB <#部署---数据库使用-mariadb>`__
|
||||
- `访问测试 <#访问测试>`__
|
||||
|
||||
- `开发 Skyline-apiserver <#开发-skyline-apiserver>`__
|
||||
|
||||
- `依赖工具 <#依赖工具>`__
|
||||
- `安装和运行 <#安装和运行>`__
|
||||
|
||||
- `Devstack 集成 <#devstack-集成>`__
|
||||
- `Kolla Ansible 部署 <#kolla-ansible-部署>`__
|
||||
|
||||
资源
|
||||
----
|
||||
|
||||
- `Wiki <https://wiki.openstack.org/wiki/Skyline>`__
|
||||
- `Bug 跟踪器 <https://launchpad.net/skyline-apiserver>`__
|
||||
|
||||
快速开始
|
||||
--------
|
||||
|
||||
先决条件
|
||||
~~~~~~~~
|
||||
|
||||
- 一个至少运行核心组件的 OpenStack 环境, 并能通过 Keystone endpoint
|
||||
访问 OpenStack 组件
|
||||
- 一个安装有容器引擎的
|
||||
(`docker <https://docs.docker.com/engine/install/>`__ 或
|
||||
`podman <https://podman.io/getting-started/installation>`__) 的 Linux
|
||||
服务器
|
||||
|
||||
配置
|
||||
~~~~
|
||||
|
||||
1. 在 Linux 服务器中编辑 ``/etc/skyline/skyline.yaml`` 文件
|
||||
|
||||
可以参考 `sample file <etc/skyline.yaml.sample>`__,
|
||||
并根据实际的环境修改以下参数
|
||||
|
||||
- database_url
|
||||
- keystone_url
|
||||
- default_region
|
||||
- interface_type
|
||||
- system_project_domain
|
||||
- system_project
|
||||
- system_user_domain
|
||||
- system_user_name
|
||||
- system_user_password
|
||||
|
||||
部署 - 数据库使用 Sqlite
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
1. 运行 skyline_bootstrap 容器进行初始化引导
|
||||
|
||||
.. code:: bash
|
||||
|
||||
rm -rf /tmp/skyline && mkdir /tmp/skyline
|
||||
|
||||
docker run -d --name skyline_bootstrap -e KOLLA_BOOTSTRAP="" -v /etc/skyline/skyline.yaml:/etc/skyline/skyline.yaml -v /tmp/skyline:/tmp --net=host 99cloud/skyline:latest
|
||||
|
||||
# Check bootstrap is normal `exit 0`
|
||||
docker logs skyline_bootstrap
|
||||
|
||||
2. 初始化引导完成后运行 skyline 服务
|
||||
|
||||
.. code:: bash
|
||||
|
||||
docker rm -f skyline_bootstrap
|
||||
|
||||
..
|
||||
|
||||
如果需要修改 skyline 端口号,则在以下命令中添加
|
||||
``-e LISTEN_ADDRESS=<ip:port>``
|
||||
|
||||
``LISTEN_ADDRESS`` 默认为 ``0.0.0.0:9999``
|
||||
|
||||
.. code:: bash
|
||||
|
||||
docker run -d --name skyline --restart=always -v /etc/skyline/skyline.yaml:/etc/skyline/skyline.yaml -v /tmp/skyline:/tmp --net=host 99cloud/skyline:latest
|
||||
|
||||
部署 - 数据库使用 MariaDB
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
1. 连接 OpenStack 环境的数据库, 并创建 ``skyline`` 数据库
|
||||
|
||||
.. code:: bash
|
||||
|
||||
$ mysql -u root -p
|
||||
MariaDB [(none)]> CREATE DATABASE IF NOT EXISTS skyline DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
|
||||
Query OK, 1 row affected (0.001 sec)
|
||||
|
||||
2. 授予对数据库的适当访问权限
|
||||
|
||||
用合适的密码替换 ``SKYLINE_DBPASS``
|
||||
|
||||
.. code:: bash
|
||||
|
||||
MariaDB [(none)]> GRANT ALL PRIVILEGES ON skyline.* TO 'skyline'@'localhost' IDENTIFIED BY 'SKYLINE_DBPASS';
|
||||
Query OK, 0 rows affected (0.001 sec)
|
||||
|
||||
MariaDB [(none)]> GRANT ALL PRIVILEGES ON skyline.* TO 'skyline'@'%' IDENTIFIED BY 'SKYLINE_DBPASS';
|
||||
Query OK, 0 rows affected (0.001 sec)
|
||||
|
||||
3. 创建 skyline 服务凭证
|
||||
|
||||
.. code:: bash
|
||||
|
||||
# Source the admin credentials
|
||||
$ source admin-openrc
|
||||
|
||||
# Create the skyline user
|
||||
$ openstack user create --domain default --password-prompt skyline
|
||||
User Password:
|
||||
Repeat User Password:
|
||||
+---------------------+----------------------------------+
|
||||
| Field | Value |
|
||||
+---------------------+----------------------------------+
|
||||
| domain_id | default |
|
||||
| enabled | True |
|
||||
| id | 1qaz2wsx3edc4rfv5tgb6yhn7ujm8ikl |
|
||||
| name | skyline |
|
||||
| options | {} |
|
||||
| password_expires_at | 2020-08-08T08:08:08.123456 |
|
||||
+---------------------+----------------------------------+
|
||||
|
||||
# Add the admin role to the skyline user:
|
||||
$ openstack role add --project service --user skyline admin
|
||||
|
||||
4. 运行 skyline_bootstrap 容器进行初始化引导
|
||||
|
||||
.. code:: bash
|
||||
|
||||
docker run -d --name skyline_bootstrap -e KOLLA_BOOTSTRAP="" -v /etc/skyline/skyline.yaml:/etc/skyline/skyline.yaml --net=host 99cloud/skyline:latest
|
||||
|
||||
# Check bootstrap is normal `exit 0`
|
||||
docker logs skyline_bootstrap
|
||||
|
||||
5. 初始化引导完成后运行 skyline 服务
|
||||
|
||||
.. code:: bash
|
||||
|
||||
docker rm -f skyline_bootstrap
|
||||
|
||||
..
|
||||
|
||||
如果需要修改 skyline 端口号,则在以下命令中添加
|
||||
``-e LISTEN_ADDRESS=<ip:port>``
|
||||
|
||||
``LISTEN_ADDRESS`` 默认为 ``0.0.0.0:9999``
|
||||
|
||||
.. code:: bash
|
||||
|
||||
docker run -d --name skyline --restart=always -v /etc/skyline/skyline.yaml:/etc/skyline/skyline.yaml --net=host 99cloud/skyline:latest
|
||||
|
||||
访问测试
|
||||
~~~~~~~~
|
||||
|
||||
现在你可以访问仪表盘: ``https://<ip_address>:9999``
|
||||
|
||||
开发 Skyline-apiserver
|
||||
----------------------
|
||||
|
||||
**支持 Linux 和 Mac 操作系统 (推荐 Linux 操作系统) (由于 uvloop 和 cython 库)**
|
||||
|
||||
依赖工具
|
||||
~~~~~~~~
|
||||
|
||||
python 使用了 3.7 版本的新特性 Context Variables 以及 uvloop (0.15.0+
|
||||
需要 python3.7+),考虑大部分系统不支持 python3.7 ,所以选择支持
|
||||
python3.8 及以上版本
|
||||
|
||||
- make >= 3.82
|
||||
- python >= 3.8
|
||||
- node >= 10.22.0 (可选,只开发 API 就用不到)
|
||||
- yarn >= 1.22.4 (可选,只开发 API 就用不到)
|
||||
|
||||
安装和运行
|
||||
~~~~~~~~~~
|
||||
|
||||
1. 安装依赖包
|
||||
|
||||
.. code:: bash
|
||||
|
||||
tox -e venv
|
||||
|
||||
2. 配置 ``skyline.yaml`` 文件
|
||||
|
||||
.. code:: bash
|
||||
|
||||
cp etc/skyline.yaml.sample etc/skyline.yaml
|
||||
export OS_CONFIG_DIR=$(pwd)/etc
|
||||
|
||||
可能你需要根据实际的环境修改以下参数:
|
||||
|
||||
.. code:: yaml
|
||||
|
||||
- database_url
|
||||
- keystone_url
|
||||
- default_region
|
||||
- interface_type
|
||||
- system_project_domain
|
||||
- system_project
|
||||
- system_user_domain
|
||||
- system_user_name
|
||||
- system_user_password
|
||||
|
||||
..
|
||||
|
||||
如果你为 ``database_url`` 设置了类似 ``sqlite:////tmp/skyline.db``
|
||||
,只需要执行以下操作。 如果你为 ``database_url`` 设置了类似
|
||||
``mysql://root:root@localhost:3306/skyline`` ,你应该先参考
|
||||
``部署 - 数据库使用 MariaDB`` 一章中的 ``1`` 和 ``2`` 步骤。
|
||||
|
||||
3. 初始化 skyline 数据库
|
||||
|
||||
.. code:: bash
|
||||
|
||||
source .tox/venv/bin/activate
|
||||
make db_sync
|
||||
deactivate
|
||||
|
||||
4. 运行 skyline-apiserver
|
||||
|
||||
.. code:: console
|
||||
|
||||
$ source .tox/venv/bin/activate
|
||||
$ uvicorn --reload --reload-dir skyline_apiserver --port 28000 --log-level debug skyline_apiserver.main:app
|
||||
|
||||
INFO: Uvicorn running on http://127.0.0.1:28000 (Press CTRL+C to quit)
|
||||
INFO: Started reloader process [154033] using statreload
|
||||
INFO: Started server process [154037]
|
||||
INFO: Waiting for application startup.
|
||||
INFO: Application startup complete.
|
||||
|
||||
此时你可访问在线 API 文档:\ ``http://127.0.0.1:28000/docs``\ 。
|
||||
|
||||
如果用 vscode 调试的话,可以通过 ``.vscode/launch.json`` 启动调试器。
|
||||
|
||||
5. 构建镜像
|
||||
|
||||
.. code:: bash
|
||||
|
||||
make build
|
||||
|
||||
Devstack 集成
|
||||
-------------
|
||||
|
||||
`与 Devstack 快速集成,搭建环境。 <./devstack/README.rst>`__
|
||||
|
||||
Kolla Ansible 部署
|
||||
------------------
|
||||
|
||||
`使用 Kolla Ansible 部署环境。 <./kolla/README-zh_CN.md>`__
|
||||
|
||||
|image1|
|
||||
|
||||
.. |image0| image:: docs/images/OpenStack_Project_Skyline_horizontal.png
|
||||
.. |image1| image:: docs/images/nine-color-deer-64.png
|
240
README.md
240
README.md
@ -1,240 +0,0 @@
|
||||
# Skyline API Server
|
||||
|
||||
English | [简体中文](./README-zh_CN.md)
|
||||
|
||||
Skyline is an OpenStack dashboard optimized by UI and UE, support OpenStack Train+. It has a modern technology stack and ecology, is easier for developers to maintain and operate by users, and has higher concurrency performance.
|
||||
|
||||
Skyline's mascot is the nine-color deer. The nine-color deer comes from Dunhuang mural "the nine-color king deer", whose moral is Buddhist cause-effect and gratefulness, which is consistent with 99cloud's philosophy of embracing and feedback community since its inception. We also hope Skyline can keep light, elegant and powerful as the nine-color deer, to provide a better dashboard for the openstack community and users.
|
||||
|
||||
![](docs/images/OpenStack_Project_Skyline_horizontal.png)
|
||||
|
||||
**Table of contents**
|
||||
|
||||
- [Skyline API Server](#skyline-api-server)
|
||||
- [Resources](#resources)
|
||||
- [Quick Start](#quick-start)
|
||||
- [Prerequisites](#prerequisites)
|
||||
- [Configure](#configure)
|
||||
- [Deployment with Sqlite](#deployment-with-sqlite)
|
||||
- [Deployment with MariaDB](#deployment-with-mariadb)
|
||||
- [Test Access](#test-access)
|
||||
- [Develop Skyline-apiserver](#develop-skyline-apiserver)
|
||||
- [Dependent tools](#dependent-tools)
|
||||
- [Install & Run](#install--run)
|
||||
- [Devstack Integration](#devstack-integration)
|
||||
- [Kolla Ansible Deployment](#kolla-ansible-deployment)
|
||||
|
||||
## Resources
|
||||
|
||||
- [Wiki](https://wiki.openstack.org/wiki/Skyline)
|
||||
- [Bug Tracker](https://launchpad.net/skyline-apiserver)
|
||||
|
||||
## Quick Start
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- An OpenStack environment that runs at least core components and can access OpenStack components through Keystone endpoints
|
||||
- A Linux server with container engine ([docker](https://docs.docker.com/engine/install/) or [podman](https://podman.io/getting-started/installation)) installed
|
||||
|
||||
### Configure
|
||||
|
||||
1. Edit the `/etc/skyline/skyline.yaml` file in linux server
|
||||
|
||||
You can refer to the [sample file](etc/skyline.yaml.sample), and modify the following parameters according to the actual environment
|
||||
|
||||
- database_url
|
||||
- keystone_url
|
||||
- default_region
|
||||
- interface_type
|
||||
- system_project_domain
|
||||
- system_project
|
||||
- system_user_domain
|
||||
- system_user_name
|
||||
- system_user_password
|
||||
|
||||
### Deployment with Sqlite
|
||||
|
||||
1. Run the skyline_bootstrap container to bootstrap
|
||||
|
||||
```bash
|
||||
rm -rf /tmp/skyline && mkdir /tmp/skyline
|
||||
|
||||
docker run -d --name skyline_bootstrap -e KOLLA_BOOTSTRAP="" -v /etc/skyline/skyline.yaml:/etc/skyline/skyline.yaml -v /tmp/skyline:/tmp --net=host 99cloud/skyline:latest
|
||||
|
||||
# Check bootstrap is normal `exit 0`
|
||||
docker logs skyline_bootstrap
|
||||
```
|
||||
|
||||
2. Run the skyline service after bootstrap is complete
|
||||
|
||||
```bash
|
||||
docker rm -f skyline_bootstrap
|
||||
```
|
||||
|
||||
> If you need to modify skyline port, add `-e LISTEN_ADDRESS=<ip:port>` in the following command
|
||||
>
|
||||
> `LISTEN_ADDRESS` defaults to `0.0.0.0:9999`
|
||||
|
||||
```bash
|
||||
docker run -d --name skyline --restart=always -v /etc/skyline/skyline.yaml:/etc/skyline/skyline.yaml -v /tmp/skyline:/tmp --net=host 99cloud/skyline:latest
|
||||
```
|
||||
|
||||
### Deployment with MariaDB
|
||||
|
||||
1. Connect to database of the OpenStack environment and create the `skyline` database
|
||||
|
||||
```bash
|
||||
$ mysql -u root -p
|
||||
MariaDB [(none)]> CREATE DATABASE IF NOT EXISTS skyline DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
|
||||
Query OK, 1 row affected (0.001 sec)
|
||||
```
|
||||
|
||||
2. Grant proper access to the databases
|
||||
|
||||
Replace `SKYLINE_DBPASS` with a suitable password.
|
||||
|
||||
```bash
|
||||
MariaDB [(none)]> GRANT ALL PRIVILEGES ON skyline.* TO 'skyline'@'localhost' IDENTIFIED BY 'SKYLINE_DBPASS';
|
||||
Query OK, 0 rows affected (0.001 sec)
|
||||
|
||||
MariaDB [(none)]> GRANT ALL PRIVILEGES ON skyline.* TO 'skyline'@'%' IDENTIFIED BY 'SKYLINE_DBPASS';
|
||||
Query OK, 0 rows affected (0.001 sec)
|
||||
```
|
||||
|
||||
3. Create skyline service credentials
|
||||
|
||||
```bash
|
||||
# Source the admin credentials
|
||||
$ source admin-openrc
|
||||
|
||||
# Create the skyline user
|
||||
$ openstack user create --domain default --password-prompt skyline
|
||||
User Password:
|
||||
Repeat User Password:
|
||||
+---------------------+----------------------------------+
|
||||
| Field | Value |
|
||||
+---------------------+----------------------------------+
|
||||
| domain_id | default |
|
||||
| enabled | True |
|
||||
| id | 1qaz2wsx3edc4rfv5tgb6yhn7ujm8ikl |
|
||||
| name | skyline |
|
||||
| options | {} |
|
||||
| password_expires_at | 2020-08-08T08:08:08.123456 |
|
||||
+---------------------+----------------------------------+
|
||||
|
||||
# Add the admin role to the skyline user:
|
||||
$ openstack role add --project service --user skyline admin
|
||||
```
|
||||
|
||||
4. Run the skyline_bootstrap container to bootstrap
|
||||
|
||||
```bash
|
||||
docker run -d --name skyline_bootstrap -e KOLLA_BOOTSTRAP="" -v /etc/skyline/skyline.yaml:/etc/skyline/skyline.yaml --net=host 99cloud/skyline:latest
|
||||
|
||||
# Check bootstrap is normal `exit 0`
|
||||
docker logs skyline_bootstrap
|
||||
```
|
||||
|
||||
5. Run the skyline service after bootstrap is complete
|
||||
|
||||
```bash
|
||||
docker rm -f skyline_bootstrap
|
||||
```
|
||||
|
||||
> If you need to modify skyline port, add `-e LISTEN_ADDRESS=<ip:port>` in the following command
|
||||
>
|
||||
> `LISTEN_ADDRESS` defaults to `0.0.0.0:9999`
|
||||
|
||||
```bash
|
||||
docker run -d --name skyline --restart=always -v /etc/skyline/skyline.yaml:/etc/skyline/skyline.yaml --net=host 99cloud/skyline:latest
|
||||
```
|
||||
|
||||
### Test Access
|
||||
|
||||
You can now access the dashboard: `https://<ip_address>:9999`
|
||||
|
||||
## Develop Skyline-apiserver
|
||||
|
||||
**Support Linux & Mac OS (Recommend Linux OS) (Because uvloop & cython)**
|
||||
|
||||
### Dependent tools
|
||||
|
||||
> Use the new feature Context Variables of python37 & uvloop(0.15.0+ requires python37). Considering that most systems do not support python37, we choose to support python38 at least.
|
||||
|
||||
- make >= 3.82
|
||||
- python >= 3.8
|
||||
- node >= 10.22.0 (Optional if you only develop with apiserver)
|
||||
- yarn >= 1.22.4 (Optional if you only develop with apiserver)
|
||||
|
||||
### Install & Run
|
||||
|
||||
1. Installing dependency packages
|
||||
|
||||
```bash
|
||||
tox -e venv
|
||||
```
|
||||
|
||||
2. Set skyline.yaml config file
|
||||
|
||||
```bash
|
||||
cp etc/skyline.yaml.sample etc/skyline.yaml
|
||||
export OS_CONFIG_DIR=$(pwd)/etc
|
||||
```
|
||||
|
||||
Maybe you should change the params with your real environment as followed:
|
||||
|
||||
```yaml
|
||||
- database_url
|
||||
- keystone_url
|
||||
- default_region
|
||||
- interface_type
|
||||
- system_project_domain
|
||||
- system_project
|
||||
- system_user_domain
|
||||
- system_user_name
|
||||
- system_user_password
|
||||
```
|
||||
|
||||
> If you set such as `sqlite:////tmp/skyline.db` for `database_url` , just do as followed.
|
||||
> If you set such as `mysql://root:root@localhost:3306/skyline` for `database_url` , you should refer to steps `1` and `2` of the chapter `Deployment with MariaDB` at first.
|
||||
|
||||
3. Init skyline database
|
||||
|
||||
```bash
|
||||
source .tox/venv/bin/activate
|
||||
make db_sync
|
||||
deactivate
|
||||
```
|
||||
|
||||
4. Run skyline-apiserver
|
||||
|
||||
```console
|
||||
$ source .tox/venv/bin/activate
|
||||
$ uvicorn --reload --reload-dir skyline_apiserver --port 28000 --log-level debug skyline_apiserver.main:app
|
||||
|
||||
INFO: Uvicorn running on http://127.0.0.1:28000 (Press CTRL+C to quit)
|
||||
INFO: Started reloader process [154033] using statreload
|
||||
INFO: Started server process [154037]
|
||||
INFO: Waiting for application startup.
|
||||
INFO: Application startup complete.
|
||||
```
|
||||
|
||||
You can now access the online API documentation: `http://127.0.0.1:28000/docs`.
|
||||
|
||||
Or, you can launch debugger with `.vscode/lauch.json` with vscode.
|
||||
|
||||
5. Build Image
|
||||
|
||||
```bash
|
||||
make build
|
||||
```
|
||||
|
||||
## Devstack Integration
|
||||
|
||||
[Fast integration with Devstack to build an environment.](./devstack/README.rst)
|
||||
|
||||
## Kolla Ansible Deployment
|
||||
|
||||
[Kolla Ansible to build an environment.](./kolla/README.md)
|
||||
|
||||
![](docs/images/nine-color-deer-64.png)
|
293
README.rst
Normal file
293
README.rst
Normal file
@ -0,0 +1,293 @@
|
||||
==================
|
||||
Skyline API Server
|
||||
==================
|
||||
|
||||
English \| `简体中文 <./README-zh_CN.rst>`__
|
||||
|
||||
Skyline is an OpenStack dashboard optimized by UI and UE, support
|
||||
OpenStack Train+. It has a modern technology stack and ecology, is
|
||||
easier for developers to maintain and operate by users, and has higher
|
||||
concurrency performance.
|
||||
|
||||
Skyline's mascot is the nine-color deer. The nine-color deer comes from
|
||||
Dunhuang mural “the nine-color king deer”, whose moral is Buddhist
|
||||
cause-effect and gratefulness, which is consistent with 99cloud's
|
||||
philosophy of embracing and feedback community since its inception. We
|
||||
also hope Skyline can keep light, elegant and powerful as the nine-color
|
||||
deer, to provide a better dashboard for the openstack community and
|
||||
users.
|
||||
|
||||
|image0|
|
||||
|
||||
**Table of contents**
|
||||
|
||||
- `Skyline API Server <#skyline-api-server>`__
|
||||
|
||||
- `Resources <#resources>`__
|
||||
- `Quick Start <#quick-start>`__
|
||||
|
||||
- `Prerequisites <#prerequisites>`__
|
||||
- `Configure <#configure>`__
|
||||
- `Deployment with Sqlite <#deployment-with-sqlite>`__
|
||||
- `Deployment with MariaDB <#deployment-with-mariadb>`__
|
||||
- `Test Access <#test-access>`__
|
||||
|
||||
- `Develop Skyline-apiserver <#develop-skyline-apiserver>`__
|
||||
|
||||
- `Dependent tools <#dependent-tools>`__
|
||||
- `Install & Run <#install--run>`__
|
||||
|
||||
- `Devstack Integration <#devstack-integration>`__
|
||||
- `Kolla Ansible Deployment <#kolla-ansible-deployment>`__
|
||||
|
||||
Resources
|
||||
---------
|
||||
|
||||
- `Wiki <https://wiki.openstack.org/wiki/Skyline>`__
|
||||
- `Bug Tracker <https://launchpad.net/skyline-apiserver>`__
|
||||
|
||||
Quick Start
|
||||
-----------
|
||||
|
||||
Prerequisites
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
- An OpenStack environment that runs at least core components and can
|
||||
access OpenStack components through Keystone endpoints
|
||||
- A Linux server with container engine
|
||||
(`docker <https://docs.docker.com/engine/install/>`__ or
|
||||
`podman <https://podman.io/getting-started/installation>`__)
|
||||
installed
|
||||
|
||||
Configure
|
||||
~~~~~~~~~
|
||||
|
||||
1. Edit the ``/etc/skyline/skyline.yaml`` file in linux server
|
||||
|
||||
You can refer to the `sample file <etc/skyline.yaml.sample>`__, and
|
||||
modify the following parameters according to the actual environment
|
||||
|
||||
- database_url
|
||||
- keystone_url
|
||||
- default_region
|
||||
- interface_type
|
||||
- system_project_domain
|
||||
- system_project
|
||||
- system_user_domain
|
||||
- system_user_name
|
||||
- system_user_password
|
||||
|
||||
Deployment with Sqlite
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
1. Run the skyline_bootstrap container to bootstrap
|
||||
|
||||
.. code:: bash
|
||||
|
||||
rm -rf /tmp/skyline && mkdir /tmp/skyline
|
||||
|
||||
docker run -d --name skyline_bootstrap -e KOLLA_BOOTSTRAP="" -v /etc/skyline/skyline.yaml:/etc/skyline/skyline.yaml -v /tmp/skyline:/tmp --net=host 99cloud/skyline:latest
|
||||
|
||||
# Check bootstrap is normal `exit 0`
|
||||
docker logs skyline_bootstrap
|
||||
|
||||
2. Run the skyline service after bootstrap is complete
|
||||
|
||||
.. code:: bash
|
||||
|
||||
docker rm -f skyline_bootstrap
|
||||
|
||||
..
|
||||
|
||||
If you need to modify skyline port, add
|
||||
``-e LISTEN_ADDRESS=<ip:port>`` in the following command
|
||||
|
||||
``LISTEN_ADDRESS`` defaults to ``0.0.0.0:9999``
|
||||
|
||||
.. code:: bash
|
||||
|
||||
docker run -d --name skyline --restart=always -v /etc/skyline/skyline.yaml:/etc/skyline/skyline.yaml -v /tmp/skyline:/tmp --net=host 99cloud/skyline:latest
|
||||
|
||||
Deployment with MariaDB
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
1. Connect to database of the OpenStack environment and create the
|
||||
``skyline`` database
|
||||
|
||||
.. code:: bash
|
||||
|
||||
$ mysql -u root -p
|
||||
MariaDB [(none)]> CREATE DATABASE IF NOT EXISTS skyline DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
|
||||
Query OK, 1 row affected (0.001 sec)
|
||||
|
||||
2. Grant proper access to the databases
|
||||
|
||||
Replace ``SKYLINE_DBPASS`` with a suitable password.
|
||||
|
||||
.. code:: bash
|
||||
|
||||
MariaDB [(none)]> GRANT ALL PRIVILEGES ON skyline.* TO 'skyline'@'localhost' IDENTIFIED BY 'SKYLINE_DBPASS';
|
||||
Query OK, 0 rows affected (0.001 sec)
|
||||
|
||||
MariaDB [(none)]> GRANT ALL PRIVILEGES ON skyline.* TO 'skyline'@'%' IDENTIFIED BY 'SKYLINE_DBPASS';
|
||||
Query OK, 0 rows affected (0.001 sec)
|
||||
|
||||
3. Create skyline service credentials
|
||||
|
||||
.. code:: bash
|
||||
|
||||
# Source the admin credentials
|
||||
$ source admin-openrc
|
||||
|
||||
# Create the skyline user
|
||||
$ openstack user create --domain default --password-prompt skyline
|
||||
User Password:
|
||||
Repeat User Password:
|
||||
+---------------------+----------------------------------+
|
||||
| Field | Value |
|
||||
+---------------------+----------------------------------+
|
||||
| domain_id | default |
|
||||
| enabled | True |
|
||||
| id | 1qaz2wsx3edc4rfv5tgb6yhn7ujm8ikl |
|
||||
| name | skyline |
|
||||
| options | {} |
|
||||
| password_expires_at | 2020-08-08T08:08:08.123456 |
|
||||
+---------------------+----------------------------------+
|
||||
|
||||
# Add the admin role to the skyline user:
|
||||
$ openstack role add --project service --user skyline admin
|
||||
|
||||
4. Run the skyline_bootstrap container to bootstrap
|
||||
|
||||
.. code:: bash
|
||||
|
||||
docker run -d --name skyline_bootstrap -e KOLLA_BOOTSTRAP="" -v /etc/skyline/skyline.yaml:/etc/skyline/skyline.yaml --net=host 99cloud/skyline:latest
|
||||
|
||||
# Check bootstrap is normal `exit 0`
|
||||
docker logs skyline_bootstrap
|
||||
|
||||
5. Run the skyline service after bootstrap is complete
|
||||
|
||||
.. code:: bash
|
||||
|
||||
docker rm -f skyline_bootstrap
|
||||
|
||||
..
|
||||
|
||||
If you need to modify skyline port, add
|
||||
``-e LISTEN_ADDRESS=<ip:port>`` in the following command
|
||||
|
||||
``LISTEN_ADDRESS`` defaults to ``0.0.0.0:9999``
|
||||
|
||||
.. code:: bash
|
||||
|
||||
docker run -d --name skyline --restart=always -v /etc/skyline/skyline.yaml:/etc/skyline/skyline.yaml --net=host 99cloud/skyline:latest
|
||||
|
||||
Test Access
|
||||
~~~~~~~~~~~
|
||||
|
||||
You can now access the dashboard: ``https://<ip_address>:9999``
|
||||
|
||||
Develop Skyline-apiserver
|
||||
-------------------------
|
||||
|
||||
**Support Linux & Mac OS (Recommend Linux OS) (Because uvloop & cython)**
|
||||
|
||||
Dependent tools
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
Use the new feature Context Variables of python37 & uvloop(0.15.0+
|
||||
requires python37). Considering that most systems do not support
|
||||
python37, we choose to support python38 at least.
|
||||
|
||||
- make >= 3.82
|
||||
- python >= 3.8
|
||||
- node >= 10.22.0 (Optional if you only develop with apiserver)
|
||||
- yarn >= 1.22.4 (Optional if you only develop with apiserver)
|
||||
|
||||
Install & Run
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
1. Installing dependency packages
|
||||
|
||||
.. code:: bash
|
||||
|
||||
tox -e venv
|
||||
|
||||
2. Set skyline.yaml config file
|
||||
|
||||
.. code:: bash
|
||||
|
||||
cp etc/skyline.yaml.sample etc/skyline.yaml
|
||||
export OS_CONFIG_DIR=$(pwd)/etc
|
||||
|
||||
Maybe you should change the params with your real environment as
|
||||
followed:
|
||||
|
||||
.. code:: yaml
|
||||
|
||||
- database_url
|
||||
- keystone_url
|
||||
- default_region
|
||||
- interface_type
|
||||
- system_project_domain
|
||||
- system_project
|
||||
- system_user_domain
|
||||
- system_user_name
|
||||
- system_user_password
|
||||
|
||||
..
|
||||
|
||||
If you set such as ``sqlite:////tmp/skyline.db`` for
|
||||
``database_url`` , just do as followed. If you set such as
|
||||
``mysql://root:root@localhost:3306/skyline`` for ``database_url``
|
||||
, you should refer to steps ``1`` and ``2`` of the chapter
|
||||
``Deployment with MariaDB`` at first.
|
||||
|
||||
3. Init skyline database
|
||||
|
||||
.. code:: bash
|
||||
|
||||
source .tox/venv/bin/activate
|
||||
make db_sync
|
||||
deactivate
|
||||
|
||||
4. Run skyline-apiserver
|
||||
|
||||
.. code:: console
|
||||
|
||||
$ source .tox/venv/bin/activate
|
||||
$ uvicorn --reload --reload-dir skyline_apiserver --port 28000 --log-level debug skyline_apiserver.main:app
|
||||
|
||||
INFO: Uvicorn running on http://127.0.0.1:28000 (Press CTRL+C to quit)
|
||||
INFO: Started reloader process [154033] using statreload
|
||||
INFO: Started server process [154037]
|
||||
INFO: Waiting for application startup.
|
||||
INFO: Application startup complete.
|
||||
|
||||
You can now access the online API documentation:
|
||||
``http://127.0.0.1:28000/docs``.
|
||||
|
||||
Or, you can launch debugger with ``.vscode/lauch.json`` with vscode.
|
||||
|
||||
5. Build Image
|
||||
|
||||
.. code:: bash
|
||||
|
||||
make build
|
||||
|
||||
Devstack Integration
|
||||
--------------------
|
||||
|
||||
`Fast integration with Devstack to build an
|
||||
environment. <./devstack/README.rst>`__
|
||||
|
||||
Kolla Ansible Deployment
|
||||
------------------------
|
||||
|
||||
`Kolla Ansible to build an environment. <./kolla/README.md>`__
|
||||
|
||||
|image1|
|
||||
|
||||
.. |image0| image:: docs/images/OpenStack_Project_Skyline_horizontal.png
|
||||
.. |image1| image:: docs/images/nine-color-deer-64.png
|
Loading…
Reference in New Issue
Block a user