From a27c6daea6ebaa85b7ad38a48175b8d0ebf9e096 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 1 Nov 2023 11:32:18 +0800 Subject: [PATCH] Update the installation documentation Add configurable policy files. Change-Id: Ib4395b58dccf94aa18a88b66c9ee3e1e33df9787 --- README-zh_CN.rst | 8 ++++++++ README.rst | 4 ++++ doc/source/configuration/settings.rst | 5 +++++ doc/source/install/docker-install-ubuntu.rst | 16 ++++++++++++++++ doc/source/install/source-install-ubuntu.rst | 11 +++++++++++ etc/skyline.yaml.sample | 2 ++ 6 files changed, 46 insertions(+) diff --git a/README-zh_CN.rst b/README-zh_CN.rst index 832a788..fce8cf9 100644 --- a/README-zh_CN.rst +++ b/README-zh_CN.rst @@ -104,6 +104,10 @@ Skyline 像九色鹿一样,轻巧、优雅,而又能力强大,为 OpenStac ``LISTEN_ADDRESS`` 默认为 ``0.0.0.0:9999`` + 如果需要修改某个 service 的 policy 规则,则在以下命令中添加 ``-v /etc/skyline/policy:/etc/skyline/policy`` + + 将对应的 policy yaml 文件重命名为 ``_policy.yaml``, 并放其在 ``/etc/skyline/policy`` 文件夹下 + .. 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 @@ -177,6 +181,10 @@ Skyline 像九色鹿一样,轻巧、优雅,而又能力强大,为 OpenStac ``LISTEN_ADDRESS`` 默认为 ``0.0.0.0:9999`` + 如果需要修改某个 service 的 policy 规则,则在以下命令中添加 ``-v /etc/skyline/policy:/etc/skyline/policy`` + + 将对应的 policy yaml 文件重命名为 ``_policy.yaml``, 并放其在 ``/etc/skyline/policy`` 文件夹下 + .. code:: bash docker run -d --name skyline --restart=always -v /etc/skyline/skyline.yaml:/etc/skyline/skyline.yaml --net=host 99cloud/skyline:latest diff --git a/README.rst b/README.rst index 7d71889..ef802e9 100644 --- a/README.rst +++ b/README.rst @@ -103,6 +103,10 @@ Deployment with Sqlite ``LISTEN_ADDRESS`` defaults to ``0.0.0.0:9999`` + If you need to modify the policy rules of a service, add ``-v /etc/skyline/policy:/etc/skyline/policy`` in the following command + + Rename the service policy yaml file to ``_policy.yaml``, and place it in ``/etc/skyline/policy`` folder + .. code:: bash docker run -d --name skyline --restart=always -v /var/log/skyline:/var/log/skyline -v /etc/skyline/skyline.yaml:/etc/skyline/skyline.yaml -v /tmp/skyline:/tmp --net=host 99cloud/skyline:latest diff --git a/doc/source/configuration/settings.rst b/doc/source/configuration/settings.rst index 15f46d6..c50fbc0 100644 --- a/doc/source/configuration/settings.rst +++ b/doc/source/configuration/settings.rst @@ -12,11 +12,14 @@ file ``skyline.yaml.sample`` in ``etc`` directory. default: access_token_expire: 3600 access_token_renew: 1800 + cafile: '' cors_allow_origins: [] database_url: sqlite:////tmp/skyline.db debug: false log_dir: ./log log_file: skyline.log + policy_file_path: /etc/skyline/policy + policy_file_suffix: policy.yaml prometheus_basic_auth_password: '' prometheus_basic_auth_user: '' prometheus_enable_basic_auth: false @@ -44,8 +47,10 @@ file ``skyline.yaml.sample`` in ``etc`` directory. container: zun container-infra: magnum database: trove + dns: designate identity: keystone image: glance + instance-ha: masakari key-manager: barbican load-balancer: octavia network: neutron diff --git a/doc/source/install/docker-install-ubuntu.rst b/doc/source/install/docker-install-ubuntu.rst index da606d9..6d5e818 100644 --- a/doc/source/install/docker-install-ubuntu.rst +++ b/doc/source/install/docker-install-ubuntu.rst @@ -102,6 +102,17 @@ We will install the Skyline APIServer service from docker image. $ sudo mkdir -p /etc/skyline /var/log/skyline /var/lib/skyline /var/log/nginx + .. note:: + + Modify policy rules of services + + .. code-block:: console + + $ sudo mkdir -p /etc/skyline/policy + + Rename the service policy yaml file to ``_policy.yaml``, + and place it in ``/etc/skyline/policy`` folder. + #. Set all value from :ref:`configuration-settings` into the configuration file ``/etc/skyline/skyline.yaml`` @@ -186,6 +197,11 @@ Finalize installation If you want to enable ssl, add ``-e SSL_CERTFILE= -e SSL_KEYFILE=`` in run command. Default does not enable ssl. + .. note:: + + If you need to modify the policy rules of services, + add ``-v /etc/skyline/policy:/etc/skyline/policy`` in run command. + API Doc --------- diff --git a/doc/source/install/source-install-ubuntu.rst b/doc/source/install/source-install-ubuntu.rst index bcc5d48..7806a9b 100644 --- a/doc/source/install/source-install-ubuntu.rst +++ b/doc/source/install/source-install-ubuntu.rst @@ -114,6 +114,17 @@ We will install the Skyline APIServer service from source code. $ sudo mkdir -p /etc/skyline /var/log/skyline + .. note:: + + Modify policy rules of services + + .. code-block:: console + + $ sudo mkdir -p /etc/skyline/policy + + Rename the service policy yaml file to ``_policy.yaml``, + and place it in ``/etc/skyline/policy`` folder. + #. Copy the configuration file to the configuration folder ``/etc/skyline`` .. code-block:: console diff --git a/etc/skyline.yaml.sample b/etc/skyline.yaml.sample index 1098ca2..b932929 100644 --- a/etc/skyline.yaml.sample +++ b/etc/skyline.yaml.sample @@ -7,6 +7,8 @@ default: debug: false log_dir: ./log log_file: skyline.log + policy_file_path: /etc/skyline/policy + policy_file_suffix: policy.yaml prometheus_basic_auth_password: '' prometheus_basic_auth_user: '' prometheus_enable_basic_auth: false