docs: replace "deployment with mariadb" chapter with links

1. formating indents
2. remove redundant "deployment with mariadb" chapter

Change-Id: I4f2f830c83bcb996da90b89b0e927eceb7940d83
This commit is contained in:
Wu Wenxiang 2022-08-27 11:04:11 +08:00
parent 3f8106a07b
commit 2b2f4f9974
2 changed files with 24 additions and 105 deletions

View File

@ -95,12 +95,9 @@ Skyline 像九色鹿一样,轻巧、优雅,而又能力强大,为 OpenStac
docker rm -f skyline_bootstrap
..
如果需要修改 skyline 端口号,则在以下命令中添加 ``-e LISTEN_ADDRESS=<ip:port>``
如果需要修改 skyline 端口号,则在以下命令中添加
``-e LISTEN_ADDRESS=<ip:port>``
``LISTEN_ADDRESS`` 默认为 ``0.0.0.0:9999``
``LISTEN_ADDRESS`` 默认为 ``0.0.0.0:9999``
.. code:: bash
@ -109,6 +106,8 @@ Skyline 像九色鹿一样,轻巧、优雅,而又能力强大,为 OpenStac
部署 - 数据库使用 MariaDB
~~~~~~~~~~~~~~~~~~~~~~~~~
参考:<https://docs.openstack.org/skyline-apiserver/latest/install/docker-install-ubuntu.html>
1. 连接 OpenStack 环境的数据库, 并创建 ``skyline`` 数据库
.. code:: bash
@ -169,12 +168,9 @@ Skyline 像九色鹿一样,轻巧、优雅,而又能力强大,为 OpenStac
docker rm -f skyline_bootstrap
..
如果需要修改 skyline 端口号,则在以下命令中添加 ``-e LISTEN_ADDRESS=<ip:port>``
如果需要修改 skyline 端口号,则在以下命令中添加
``-e LISTEN_ADDRESS=<ip:port>``
``LISTEN_ADDRESS`` 默认为 ``0.0.0.0:9999``
``LISTEN_ADDRESS`` 默认为 ``0.0.0.0:9999``
.. code:: bash
@ -193,9 +189,9 @@ Skyline 像九色鹿一样,轻巧、优雅,而又能力强大,为 OpenStac
依赖工具
~~~~~~~~
python 使用了 3.7 版本的新特性 Context Variables 以及 uvloop (0.15.0+
需要 python3.7+),考虑大部分系统不支持 python3.7 ,所以选择支持
python3.8 及以上版本
python 使用了 3.7 版本的新特性 Context Variables 以及 uvloop (0.15.0+
需要 python 3.7+),考虑大部分系统不支持 python 3.7 ,所以选择支持
python 3.8 及以上版本
- make >= 3.82
- python >= 3.8
@ -232,12 +228,10 @@ Skyline 像九色鹿一样,轻巧、优雅,而又能力强大,为 OpenStac
- system_user_name
- system_user_password
..
如果你为 ``database_url`` 设置了类似 ``sqlite:////tmp/skyline.db``
,只需要执行以下操作。 如果你为 ``database_url`` 设置了类似
``mysql://root:root@localhost:3306/skyline`` ,你应该先参考
``部署 - 数据库使用 MariaDB`` 一章中的 ``1````2`` 步骤。
如果你为 ``database_url`` 设置了类似 ``sqlite:////tmp/skyline.db``
,只需要执行以下操作。 如果你为 ``database_url`` 设置了类似
``mysql://root:root@localhost:3306/skyline`` ,你应该先参考
``部署 - 数据库使用 MariaDB`` 一章中的 ``1````2`` 步骤。
3. 初始化 skyline 数据库

View File

@ -99,12 +99,9 @@ Deployment with Sqlite
docker rm -f skyline_bootstrap
..
If you need to modify skyline port, add ``-e LISTEN_ADDRESS=<ip:port>`` in the following command
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``
``LISTEN_ADDRESS`` defaults to ``0.0.0.0:9999``
.. code:: bash
@ -113,77 +110,7 @@ Deployment with Sqlite
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
<https://docs.openstack.org/skyline-apiserver/latest/install/docker-install-ubuntu.html>
Test Access
~~~~~~~~~~~
@ -198,9 +125,9 @@ Develop Skyline-apiserver
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.
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
@ -238,13 +165,11 @@ Install & Run
- 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.
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