Go to file
2021-07-29 05:15:20 +00:00
container feat: Add bootstrap support for skyline image 2021-07-26 11:01:31 -04:00
docs/api refactor: Streamline libs directory structure 2021-07-26 03:50:00 +00:00
etc feat: Add make build 2021-07-26 03:51:01 +00:00
libs chore: Add make clean to clean up project directory 2021-07-26 14:35:55 +00:00
skyline refactor: Move skyline-apiserver to libs 2021-07-26 03:48:54 +00:00
tools/git_config feat: Add initial code of skyline-apiserver 2021-06-01 23:39:57 +08:00
.dockerignore chore: Add make clean to clean up project directory 2021-07-26 14:35:55 +00:00
.flake8 feat: Add initial code of skyline-apiserver 2021-06-01 23:39:57 +08:00
.gitignore feat: Add initial code of skyline-apiserver 2021-06-01 23:39:57 +08:00
.gitmodules feat: Add skyline-console to submodule 2021-07-19 02:46:39 +00:00
.gitreview Added .gitreview 2021-05-08 17:14:30 +00:00
.zuul.yaml Add Zuul support for new repository 2021-05-10 12:47:51 +02:00
LICENSE feat: Add initial code of skyline-apiserver 2021-06-01 23:39:57 +08:00
Makefile chore: Add make clean to clean up project directory 2021-07-26 14:35:55 +00:00
mypy.ini chore: Add make clean to clean up project directory 2021-07-26 14:35:55 +00:00
poetry.lock refactor: Move skyline-apiserver to libs 2021-07-26 03:48:54 +00:00
poetry.toml feat: Add initial code of skyline-apiserver 2021-06-01 23:39:57 +08:00
pyproject.toml refactor: Move skyline-apiserver to libs 2021-07-26 03:48:54 +00:00
README-zh_CN.md docs: Add quick start docs 2021-07-27 05:09:20 +00:00
README.md docs: Add quick start docs 2021-07-27 05:09:20 +00:00

Skyline API

English | 简体中文

Skyline is an OpenStack dashboard optimized by UI and UE. It has a modern technology stack and ecology, is easier for developers to maintain and operate by users, and has higher concurrency performance.

Table of contents

Resources

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 or podman) installed

Configure and deployment

1. Connect to database of the OpenStack environment and create the skyline database

$ 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.

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

# 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. Edit the /etc/skyline/skyline.yaml file in linux server

You can refer to the sample file, 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

5. Run the skyline_bootstrap container to bootstrap

docker run -d --name skyline_bootstrap -e KOLLA_BOOTSTRAP="" -v /etc/skyline/skyline.yaml:/etc/skyline/skyline.yaml --net=host skyline:latest

# Check bootstrap is normal `exit 0`
docker logs skyline_bootstrap

5. Run the skyline service after bootstrap is complete

docker rm -f skyline_bootstrap

docker run -d --name skyline --restart=always -v /etc/skyline/skyline.yaml:/etc/skyline/skyline.yaml --net=host skyline:latest

6. finish installation

You can now access the dashboard: https://<ip_address>:8080

Develop Skyline-apiserver

Support Linux & Mac OS (Recommend Linux OS) (Because uvloop & cython)

Dependent tools

Install & Run

1. Installing dependency packages

make install

2. Set skyline.yaml config file

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:

- database_url  (you can set sqlite:////tmp/skyline.db to use sqlite)
- keystone_url
- default_region
- interface_type
- system_project_domain
- system_project
- system_user_domain
- system_user_name
- system_user_password

3. Init skyline database

pushd /skyline/libs/skyline-apiserver/
make db_sync
popd

4. Run skyline-apiserver

$ poetry run uvicorn --reload --reload-dir libs/skyline-apiserver/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