-
Notifications
You must be signed in to change notification settings - Fork 42
Configuration overriding
The app server and zss read by default from a JSON file, usually named server.json and usually located within $INSTANCE_DIR/workspace/app-server/serverConfig/server.json
Where $INSTANCE_DIR may be ~/.zowe when not specified.
The format and attributes of the file is described in the Configuration wiki
However, there are ways to override the content of this file. The app-server's log file always shows overrides and the resulting configuration on startup so that there is not confusion, but overrides are done in two ways:
ZWED_node_https_port=123
ZWED_node_https_ipAddresses=127.0.0.1,192.168.55.28
becomes
node:{
https: {
port: 123,
ips: ["127.0.0.1","192.168.55.28"]
}
}
In other words, every env var must be prefixed with ZWED_ and '.' is transformed into '_' and treated as a hierarchy of JSON objects. Env _ will be mapped to . Env __ will be mapped to _ Env ___ will be mapped to - When present in a Zowe install, $INSTANCE_DIR/instance.env is a file that holds environment variables, so these can be placed within there to take effect automatically.
When running the server directly (such as, not through zowe-start or run-zowe), app-server.sh or app-server.bat should be used. When used, arguments can be specified in the following format:
app-server.sh -Dnode.https.port=123 -Dnode.https.ipAddresses=127.0.0.1,192.168.55.28
becomes
node:{
https: {
port: 123,
ips: ["127.0.0.1","192.168.55.28"]
}
}
The server will take the value of the lower number if found:
- Command line argument
- environment variable
- config JSON content
- built-in defaults