skyline-apiserver/README.md
zhu.boxiang c1bb509391 fix: Add sample yaml config file
Under etc dictory, add sample yaml config file
named skyline-apiserver.yaml.sample
Updated the README.md and README-zh_CN.md file
to make quick start more clearly.

Closes-Bug: #1931673
Change-Id: I023cfbeac33543d2989f5017c878cd17160f8c76
2021-06-16 06:22:14 +00:00

1.3 KiB

Skyline API

English | 简体中文

Quick Start

Dependent tools

Development mode

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

  • Installing dependency packages

    make install
    
  • Set skyline-apiserver.yaml config file

    Maybe you should change the params with your real environment as followed:

    - database_url  (you can set sqlite:////tmp/skyline.db to use sqlite)
    - default_region
    - keystone_url
    - system_project
    - system_project_domain
    - system_user_domain
    - system_user_name
    - system_user_password
    
    cp etc/skyline-apiserver.yaml.sample etc/skyline-apiserver.yaml
    export OS_CONFIG_DIR=$(pwd)/etc
    
  • Init skyline database

    make db_sync
    
  • Run server

    $ poetry run uvicorn --reload --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