==================
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
---------
- `Developer Docs <https://docs.openstack.org/skyline-apiserver/latest/>`__
- `Release notes <https://docs.openstack.org/releasenotes/skyline-apiserver/>`__
- `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 && mkdir /var/log/skyline
docker run -d --name skyline_bootstrap -e KOLLA_BOOTSTRAP="" -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
# 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``
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 ``<service_name>_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
Deployment with MariaDB
~~~~~~~~~~~~~~~~~~~~~~~
https://docs.openstack.org/skyline-apiserver/latest/install/docker-install-ubuntu.html
API Doc
~~~~~~~~~
You can visit the API doc ``https://<ip_address>:9999/api/openstack/skyline/docs``
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:: doc/source/images/logo/OpenStack_Project_Skyline_horizontal.png
.. |image1| image:: doc/source/images/logo/nine-color-deer-64.png
FAQ
---
1. Policy
Q: Why common user could login, but could list the nova servers?
`Bug #2049807 <https://bugs.launchpad.net/skyline-apiserver/+bug/2049807>`_
::
Symptom:
-----------------------------------
1. Login Horizon with common user A, list servers OK.
2. Login Skyline with same common user A, could list the nova servers, F12 show no http requests sent from network, however webpage show 401, do not allow to list servers
Root Cause Analysis:
-----------------------------------
1. Horizon don't know whether a user could do an action at a resource or not. It simply pass request to recording service, & service (Nova) do the check by its policy file. So it works.
2. Skyline check the action by itself, with /policy API. If you do not configure it, the default value follows community, like: https://docs.openstack.org/nova/2023.2/configuration/sample-policy.html
How to fix:
-----------------------------------
1. By default, list servers need "project_reader_api": "role:reader and project_id:%(project_id)s"
2. You should config your customized role, for example: member, _member_, projectAdmin, etc, create implied reader role. "openstack implied role create --implied-role member projectAdmin", or "openstack implied role create --implied-role reader _member_"
# openstack implied role list
+----------------------------------+-----------------+----------------------------------+-------------------+
| Prior Role ID | Prior Role Name | Implied Role ID | Implied Role Name |
+----------------------------------+-----------------+----------------------------------+-------------------+
| fe21c5a0d17149c2a7b02bf39154d110 | admin | 4376fc38ba6a44e794671af0a9c60ef5 | member |
| 4376fc38ba6a44e794671af0a9c60ef5 | member | e081e01b7a4345bc85f8d3210b95362d | reader |
| bee8fa36149e434ebb69b61d12113031 | projectAdmin | 4376fc38ba6a44e794671af0a9c60ef5 | member |
| 77cec9fc7e764bd4bf60581869c048de | _member_ | e081e01b7a4345bc85f8d3210b95362d | reader |
+----------------------------------+-----------------+----------------------------------+-------------------+
Raw data
{
"_id": null,
"home_page": "https://docs.openstack.org/skyline-apiserver/latest/",
"name": "skyline-apiserver",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": null,
"author": "OpenStack",
"author_email": "openstack-discuss@lists.openstack.org",
"download_url": "https://files.pythonhosted.org/packages/f4/dc/3516867d7d108aedac2625626536a30aa0d0eba0f32df8b5cb491a3165ee/skyline-apiserver-5.0.0.tar.gz",
"platform": null,
"description": "==================\nSkyline API Server\n==================\n\nEnglish \\| `\u7b80\u4f53\u4e2d\u6587 <./README-zh_CN.rst>`__\n\nSkyline is an OpenStack dashboard optimized by UI and UE, support\nOpenStack Train+. It has a modern technology stack and ecology, is\neasier for developers to maintain and operate by users, and has higher\nconcurrency performance.\n\nSkyline's mascot is the nine-color deer. The nine-color deer comes from\nDunhuang mural \u201cthe nine-color king deer\u201d, whose moral is Buddhist\ncause-effect and gratefulness, which is consistent with 99cloud's\nphilosophy of embracing and feedback community since its inception. We\nalso hope Skyline can keep light, elegant and powerful as the nine-color\ndeer, to provide a better dashboard for the openstack community and\nusers.\n\n|image0|\n\n**Table of contents**\n\n- `Skyline API Server <#skyline-api-server>`__\n\n - `Resources <#resources>`__\n - `Quick Start <#quick-start>`__\n\n - `Prerequisites <#prerequisites>`__\n - `Configure <#configure>`__\n - `Deployment with Sqlite <#deployment-with-sqlite>`__\n - `Deployment with MariaDB <#deployment-with-mariadb>`__\n - `Test Access <#test-access>`__\n\n - `Develop Skyline-apiserver <#develop-skyline-apiserver>`__\n\n - `Dependent tools <#dependent-tools>`__\n - `Install & Run <#install--run>`__\n\n - `Devstack Integration <#devstack-integration>`__\n - `Kolla Ansible Deployment <#kolla-ansible-deployment>`__\n\nResources\n---------\n\n- `Developer Docs <https://docs.openstack.org/skyline-apiserver/latest/>`__\n- `Release notes <https://docs.openstack.org/releasenotes/skyline-apiserver/>`__\n- `Wiki <https://wiki.openstack.org/wiki/Skyline>`__\n- `Bug Tracker <https://launchpad.net/skyline-apiserver>`__\n\nQuick Start\n-----------\n\nPrerequisites\n~~~~~~~~~~~~~\n\n- An OpenStack environment that runs at least core components and can\n access OpenStack components through Keystone endpoints\n- A Linux server with container engine\n (`docker <https://docs.docker.com/engine/install/>`__ or\n `podman <https://podman.io/getting-started/installation>`__)\n installed\n\nConfigure\n~~~~~~~~~\n\n1. Edit the ``/etc/skyline/skyline.yaml`` file in linux server\n\n You can refer to the `sample file <etc/skyline.yaml.sample>`__, and\n modify the following parameters according to the actual environment\n\n - database_url\n - keystone_url\n - default_region\n - interface_type\n - system_project_domain\n - system_project\n - system_user_domain\n - system_user_name\n - system_user_password\n\nDeployment with Sqlite\n~~~~~~~~~~~~~~~~~~~~~~\n\n1. Run the skyline_bootstrap container to bootstrap\n\n .. code:: bash\n\n rm -rf /tmp/skyline && mkdir /tmp/skyline && mkdir /var/log/skyline\n\n docker run -d --name skyline_bootstrap -e KOLLA_BOOTSTRAP=\"\" -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\n\n # Check bootstrap is normal `exit 0`\n docker logs skyline_bootstrap\n\n2. Run the skyline service after bootstrap is complete\n\n .. code:: bash\n\n docker rm -f skyline_bootstrap\n\n If you need to modify skyline port, add ``-e LISTEN_ADDRESS=<ip:port>`` in the following command\n\n ``LISTEN_ADDRESS`` defaults to ``0.0.0.0:9999``\n\n If you need to modify the policy rules of a service, add ``-v /etc/skyline/policy:/etc/skyline/policy`` in the following command\n\n Rename the service policy yaml file to ``<service_name>_policy.yaml``, and place it in ``/etc/skyline/policy`` folder\n\n .. code:: bash\n\n 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\n\nDeployment with MariaDB\n~~~~~~~~~~~~~~~~~~~~~~~\n\nhttps://docs.openstack.org/skyline-apiserver/latest/install/docker-install-ubuntu.html\n\nAPI Doc\n~~~~~~~~~\n\nYou can visit the API doc ``https://<ip_address>:9999/api/openstack/skyline/docs``\n\nTest Access\n~~~~~~~~~~~\n\nYou can now access the dashboard: ``https://<ip_address>:9999``\n\nDevelop Skyline-apiserver\n-------------------------\n\n**Support Linux & Mac OS (Recommend Linux OS) (Because uvloop & cython)**\n\nDependent tools\n~~~~~~~~~~~~~~~\n\nUse the new feature Context Variables of python37 & uvloop(0.15.0+\nrequires python37). Considering that most systems do not support\npython37, we choose to support python38 at least.\n\n- make >= 3.82\n- python >= 3.8\n- node >= 10.22.0 (Optional if you only develop with apiserver)\n- yarn >= 1.22.4 (Optional if you only develop with apiserver)\n\nInstall & Run\n~~~~~~~~~~~~~\n\n1. Installing dependency packages\n\n .. code:: bash\n\n tox -e venv\n\n2. Set skyline.yaml config file\n\n .. code:: bash\n\n cp etc/skyline.yaml.sample etc/skyline.yaml\n export OS_CONFIG_DIR=$(pwd)/etc\n\n Maybe you should change the params with your real environment as\n followed:\n\n .. code:: yaml\n\n - database_url\n - keystone_url\n - default_region\n - interface_type\n - system_project_domain\n - system_project\n - system_user_domain\n - system_user_name\n - system_user_password\n\n If you set such as ``sqlite:////tmp/skyline.db`` for\n ``database_url`` , just do as followed. If you set such as\n ``mysql://root:root@localhost:3306/skyline`` for ``database_url``\n , you should refer to steps ``1`` and ``2`` of the chapter\n ``Deployment with MariaDB`` at first.\n\n3. Init skyline database\n\n .. code:: bash\n\n source .tox/venv/bin/activate\n make db_sync\n deactivate\n\n4. Run skyline-apiserver\n\n .. code:: console\n\n $ source .tox/venv/bin/activate\n $ uvicorn --reload --reload-dir skyline_apiserver --port 28000 --log-level debug skyline_apiserver.main:app\n\n INFO: Uvicorn running on http://127.0.0.1:28000 (Press CTRL+C to quit)\n INFO: Started reloader process [154033] using statreload\n INFO: Started server process [154037]\n INFO: Waiting for application startup.\n INFO: Application startup complete.\n\n You can now access the online API documentation:\n ``http://127.0.0.1:28000/docs``.\n\n Or, you can launch debugger with ``.vscode/lauch.json`` with vscode.\n\n5. Build Image\n\n .. code:: bash\n\n make build\n\nDevstack Integration\n--------------------\n\n`Fast integration with Devstack to build an\nenvironment. <./devstack/README.rst>`__\n\nKolla Ansible Deployment\n------------------------\n\n`Kolla Ansible to build an environment. <./kolla/README.md>`__\n\n|image1|\n\n.. |image0| image:: doc/source/images/logo/OpenStack_Project_Skyline_horizontal.png\n.. |image1| image:: doc/source/images/logo/nine-color-deer-64.png\n\nFAQ\n---\n\n1. Policy\n\n Q: Why common user could login, but could list the nova servers?\n `Bug #2049807 <https://bugs.launchpad.net/skyline-apiserver/+bug/2049807>`_\n\n ::\n\n Symptom:\n -----------------------------------\n 1. Login Horizon with common user A, list servers OK.\n 2. Login Skyline with same common user A, could list the nova servers, F12 show no http requests sent from network, however webpage show 401, do not allow to list servers\n\n Root Cause Analysis:\n -----------------------------------\n 1. Horizon don't know whether a user could do an action at a resource or not. It simply pass request to recording service, & service (Nova) do the check by its policy file. So it works.\n 2. Skyline check the action by itself, with /policy API. If you do not configure it, the default value follows community, like: https://docs.openstack.org/nova/2023.2/configuration/sample-policy.html\n\n How to fix:\n -----------------------------------\n 1. By default, list servers need \"project_reader_api\": \"role:reader and project_id:%(project_id)s\"\n 2. You should config your customized role, for example: member, _member_, projectAdmin, etc, create implied reader role. \"openstack implied role create --implied-role member projectAdmin\", or \"openstack implied role create --implied-role reader _member_\"\n\n # openstack implied role list\n +----------------------------------+-----------------+----------------------------------+-------------------+\n | Prior Role ID | Prior Role Name | Implied Role ID | Implied Role Name |\n +----------------------------------+-----------------+----------------------------------+-------------------+\n | fe21c5a0d17149c2a7b02bf39154d110 | admin | 4376fc38ba6a44e794671af0a9c60ef5 | member |\n | 4376fc38ba6a44e794671af0a9c60ef5 | member | e081e01b7a4345bc85f8d3210b95362d | reader |\n | bee8fa36149e434ebb69b61d12113031 | projectAdmin | 4376fc38ba6a44e794671af0a9c60ef5 | member |\n | 77cec9fc7e764bd4bf60581869c048de | _member_ | e081e01b7a4345bc85f8d3210b95362d | reader |\n +----------------------------------+-----------------+----------------------------------+-------------------+\n\n\n\n",
"bugtrack_url": null,
"license": null,
"summary": "OpenStack Skyline APIServer",
"version": "5.0.0",
"project_urls": {
"Homepage": "https://docs.openstack.org/skyline-apiserver/latest/",
"Source": "https://opendev.org/openstack/skyline-apiserver",
"Tracker": "https://bugs.launchpad.net/skyline-apiserver"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "05c56e5ba4dc83faf4351179cd00064e36af4aec65a04e57a02458da1933a4e8",
"md5": "c8eb57cf2bbc64d716b1a311edaf80f2",
"sha256": "8d0ccffae686a436a3b052b61e8bfa2082d1ccc500f5290ad04329feb091c552"
},
"downloads": -1,
"filename": "skyline_apiserver-5.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c8eb57cf2bbc64d716b1a311edaf80f2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 158840,
"upload_time": "2024-10-02T11:11:44",
"upload_time_iso_8601": "2024-10-02T11:11:44.897151Z",
"url": "https://files.pythonhosted.org/packages/05/c5/6e5ba4dc83faf4351179cd00064e36af4aec65a04e57a02458da1933a4e8/skyline_apiserver-5.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f4dc3516867d7d108aedac2625626536a30aa0d0eba0f32df8b5cb491a3165ee",
"md5": "07daa3b569bc78be67d8fe5bc3a899c9",
"sha256": "c686bd8aa9370561256b2524c9a0342c74824b76674724b32a0cd26d696eda2b"
},
"downloads": -1,
"filename": "skyline-apiserver-5.0.0.tar.gz",
"has_sig": false,
"md5_digest": "07daa3b569bc78be67d8fe5bc3a899c9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 9061704,
"upload_time": "2024-10-02T11:11:46",
"upload_time_iso_8601": "2024-10-02T11:11:46.529171Z",
"url": "https://files.pythonhosted.org/packages/f4/dc/3516867d7d108aedac2625626536a30aa0d0eba0f32df8b5cb491a3165ee/skyline-apiserver-5.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-02 11:11:46",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "skyline-apiserver"
}