From 2b2f4f9974c221e213f56204053e983530842bb7 Mon Sep 17 00:00:00 2001 From: Wu Wenxiang Date: Sat, 27 Aug 2022 11:04:11 +0800 Subject: [PATCH] docs: replace "deployment with mariadb" chapter with links 1. formating indents 2. remove redundant "deployment with mariadb" chapter Change-Id: I4f2f830c83bcb996da90b89b0e927eceb7940d83 --- README-zh_CN.rst | 32 +++++++--------- README.rst | 97 ++++++------------------------------------------ 2 files changed, 24 insertions(+), 105 deletions(-) diff --git a/README-zh_CN.rst b/README-zh_CN.rst index 09bb886..8061a01 100644 --- a/README-zh_CN.rst +++ b/README-zh_CN.rst @@ -95,12 +95,9 @@ Skyline 像九色鹿一样,轻巧、优雅,而又能力强大,为 OpenStac docker rm -f skyline_bootstrap - .. + 如果需要修改 skyline 端口号,则在以下命令中添加 ``-e LISTEN_ADDRESS=`` - 如果需要修改 skyline 端口号,则在以下命令中添加 - ``-e LISTEN_ADDRESS=`` - - ``LISTEN_ADDRESS`` 默认为 ``0.0.0.0:9999`` + ``LISTEN_ADDRESS`` 默认为 ``0.0.0.0:9999`` .. code:: bash @@ -109,6 +106,8 @@ Skyline 像九色鹿一样,轻巧、优雅,而又能力强大,为 OpenStac 部署 - 数据库使用 MariaDB ~~~~~~~~~~~~~~~~~~~~~~~~~ +参考: + 1. 连接 OpenStack 环境的数据库, 并创建 ``skyline`` 数据库 .. code:: bash @@ -169,12 +168,9 @@ Skyline 像九色鹿一样,轻巧、优雅,而又能力强大,为 OpenStac docker rm -f skyline_bootstrap - .. + 如果需要修改 skyline 端口号,则在以下命令中添加 ``-e LISTEN_ADDRESS=`` - 如果需要修改 skyline 端口号,则在以下命令中添加 - ``-e LISTEN_ADDRESS=`` - - ``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 数据库 diff --git a/README.rst b/README.rst index 10744ef..a57a713 100644 --- a/README.rst +++ b/README.rst @@ -99,12 +99,9 @@ Deployment with Sqlite docker rm -f skyline_bootstrap - .. + If you need to modify skyline port, add ``-e LISTEN_ADDRESS=`` in the following command - If you need to modify skyline port, add - ``-e LISTEN_ADDRESS=`` 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=`` 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 ~~~~~~~~~~~ @@ -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