CB‐Spider Server Configuration - cloud-barista/cb-spider GitHub Wiki
How to Configure the CB-Spider Server
CB-Spider uses environment variables to configure the server’s operation root path and operation method.
-
Configuration File: ./setup.env
-
Configuration Information
| Environment Variables |
Descriptions |
Default |
| CBSPIDER_ROOT |
Set the root path of the installed CB-Spider package |
Automatically set to the location of the setup.env file |
| SERVER_ADDRESS |
since v0.4.4 cf) CB-Spider Service Address Configuration |
Not set |
| SERVICE_ADDRESS |
since v0.4.4 cf) CB-Spider Service Address Configuration |
Not set |
| PLUGIN_SW |
Option for dynamically adding and linking cloud infrastructure drivers. When set to ON, dynamically registers and manages drivers built as shared libraries. |
PLUGIN_SW=OFF |
| ID_TRANSFORM_MODE |
Option to set whether to perform ID transformation when creating resources. When set to OFF, requests the ID entered by the user to the CSP without converting it to UUID format (When set to OFF, the user must consider CSP-specific naming restrictions). cf) ID Transform ON/OFF Guide |
ID_TRANSFORM_MODE=ON |
| CBLOG_ROOT |
Set the root path of cb-log for log output; used by cb-log to locate configuration files, etc. |
CBSTORE_ROOT=$CBSPIDER_ROOT |
| ADMINWEB |
Option to enable or disable the AdminWeb UI and Swagger UI. When set to OFF, both AdminWeb and Swagger UI are disabled. cf) [AdminWeb ON/OFF Guide] |
ADMINWEB=ON |
| API_USERNAME API_PASSWORD |
Set ID/PW for REST API authentication |
Not set |
-
Configuration Example (default)
$ vi ./setup.env
#!/bin/bash
# root path of cb-spider
SCRIPT_DIR=`dirname ${BASH_SOURCE[0]-$0}`
export CBSPIDER_ROOT=`cd $SCRIPT_DIR && pwd`
### Set Spider server Address of Service Address
# cf) https://github.com/cloud-barista/cb-spider/wiki/CB-Spider-Service-Address-Configuration
# default: unset SERVER_ADDRESS and unset SERVICE_ADDRESS
# examples for other service port
#export SERVER_ADDRESS=":3000"
# examples for K8S env
#export SERVER_ADDRESS=":1024"
#export SERVICE_ADDRESS="1.2.3.4:31024"
### Set the library type of Cloud Driver pkg.
# ON is a shared library type.
# default: OFF
export PLUGIN_SW=OFF
## If the value is OFF, Spider does not perform ID transformation.
# default: ON
export ID_TRANSFORM_MODE=ON
# root path of cb-log
export CBLOG_ROOT=$CBSPIDER_ROOT
# AdminWeb ON/OFF setting
# ON: Enable AdminWeb, OFF: Disable AdminWeb
# default: ON
export ADMINWEB=ON
# If the value is empty, REST Auth disabed.
export API_USERNAME=
export API_PASSWORD=
-
If you modify the setup.env file, you must restart the server for the changes to take effect.