diff --git a/README-zh_CN.md b/README-zh_CN.md index a2cedea..e71732c 100644 --- a/README-zh_CN.md +++ b/README-zh_CN.md @@ -140,14 +140,17 @@ Skyline 的吉祥物是九色鹿。九色鹿源自于敦煌壁画《九色鹿本 - make >= 3.82 - python >= 3.8 - poetry >= 1.1.0 ([安装指南](https://python-poetry.org/docs/#installation)) -- node >= 10.22.0 -- yarn >= 1.22.4 +- node >= 10.22.0 (可选,只开发 API 就用不到) +- yarn >= 1.22.4 (可选,只开发 API 就用不到) ### 安装和运行 1. 安装依赖包 ```bash + # 如果只开发 apiserver,可以通过 export IGNORE_JS=True 来跳过安装 skyline-console + export IGNORE_JS=True + make install ``` diff --git a/README.md b/README.md index e0dc369..39a8fd7 100644 --- a/README.md +++ b/README.md @@ -140,14 +140,17 @@ You can now access the dashboard: `https://:8080` - make >= 3.82 - python >= 3.8 - poetry >= 1.1.0 ([Installation Guide](https://python-poetry.org/docs/#installation)) -- node >= 10.22.0 -- yarn >= 1.22.4 +- 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 ```bash + # You can export IGNORE_JS=True to skip skyline-console if only develop with apiserver + export IGNORE_JS=True + make install ``` diff --git a/etc/skyline.yaml.sample b/etc/skyline.yaml.sample index 5a51f40..6064477 100644 --- a/etc/skyline.yaml.sample +++ b/etc/skyline.yaml.sample @@ -2,9 +2,9 @@ default: access_token_expire: 3600 access_token_renew: 1800 cors_allow_origins: [] - database_url: mysql://root:root@localhost:3306/skyline + database_url: sqlite:////tmp/skyline.db debug: false - log_dir: ./log + log_dir: /tmp secret_key: aCtmgbcUqYUy_HNVg5BDXCaeJgJQzHJXwqbXr0Nmb2o session_name: session developer: @@ -61,7 +61,7 @@ openstack: extension_mapping: fwaas_v2: neutron_firewall vpnaas: neutron_vpn - interface_type: internal + interface_type: public keystone_url: http://localhost:5000/v3/ nginx_prefix: /api/openstack reclaim_instance_interval: 604800 diff --git a/libs/skyline-apiserver/skyline_apiserver/api/v1/login.py b/libs/skyline-apiserver/skyline_apiserver/api/v1/login.py index 041e710..47120c5 100644 --- a/libs/skyline-apiserver/skyline_apiserver/api/v1/login.py +++ b/libs/skyline-apiserver/skyline_apiserver/api/v1/login.py @@ -94,7 +94,7 @@ async def login( reauthenticate=False, ) session = Session(auth=unscope_auth, verify=False, timeout=constants.DEFAULT_TIMEOUT) - unscope_client = KeystoneClient(session=session, endpoint=auth_url) + unscope_client = KeystoneClient(session=session, endpoint=auth_url, interface=CONF.openstack.interface_type) project_scope = unscope_client.auth.projects() # we must get the project_scope with enabled project project_scope = [scope for scope in project_scope if scope.enabled] diff --git a/libs/skyline-apiserver/skyline_apiserver/client/utils.py b/libs/skyline-apiserver/skyline_apiserver/client/utils.py index 61e9a06..bda5f97 100644 --- a/libs/skyline-apiserver/skyline_apiserver/client/utils.py +++ b/libs/skyline-apiserver/skyline_apiserver/client/utils.py @@ -102,6 +102,7 @@ async def keystone_client( session=session, endpoint=endpoint, global_request_id=global_request_id, + interface=CONF.openstack.interface_type, ) return client diff --git a/libs/skyline-policy-manager/Makefile b/libs/skyline-policy-manager/Makefile index 442315f..96f8423 100644 --- a/libs/skyline-policy-manager/Makefile +++ b/libs/skyline-policy-manager/Makefile @@ -13,6 +13,7 @@ venv: .PHONY: install install: venv poetry run pip install -U pip setuptools + poetry run pip install tempita==0.5.2 poetry install -vvv tools/post_install.sh