-
Notifications
You must be signed in to change notification settings - Fork 143
using environment var setting in ZE doc #4760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: anaxceron <[email protected]>
|
😺 Thank you for creating this PR! To publish your content to Zowe Docs, follow these steps.
|
| :::warning | ||
| Follow these naming guidelines to prevent unexpected behavior. | ||
|
|
||
| - Do not use the prefix `ZOWE_OPT` for these environment variable names. `ZOWE_OPT` is used to [format environment variables in Zowe CLI](./cli-using-formatting-environment-variables.md) and the prefix does not work in Zowe Explorer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the Override With Environment Variables checkbox is checked, Zowe Explorer will use the values in $ZOWE_OPT_USER and $ZOWE_OPT_PASSWORD for user ID and password (regardless of what is in your config).
So, some ZOWE_OPT environment variables can be used by Zowe Explorer.
I might rephrase to something like: "If you need to connect to multiple LPARs using different credentials, do not use the ZOWE_OPT prefix for these environment variables. ZOWE_OPT is used by Zowe CLI to identify command options defined in environment variables."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, the rephrasing might be more confusing.
If you only need one set of credentials, you can use the $ZOWE_OPT_USER and $ZOWE_OPT_PASSWORD environment variables, check the Override With Environment Variables setting, and be ready to connect to the mainframe.
If you need multiple sets of credentials, you should be sure to un-check the Override With Environment Variables setting, create your own non-ZOWE_OPT environment variables, add the environment variables to your config, and then be ready to connect to the mainframe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, it's a bit confusing either way. I like how you explained it here 🙏
If you only need one set of credentials, you can use the $ZOWE_OPT_USER and $ZOWE_OPT_PASSWORD environment variables, check the Override With Environment Variables setting, and be ready to connect to the mainframe.
If you need multiple sets of credentials, you should be sure to un-check the Override With Environment Variables setting, create your own non-ZOWE_OPT environment variables, add the environment variables to your config, and then be ready to connect to the mainframe.
Not sure how to condense all of that into the notes though 😋
| :::warning | ||
| Follow these naming guidelines to prevent unexpected behavior. | ||
|
|
||
| - Do not use the prefix `ZOWE_OPT` for these environment variable names. `ZOWE_OPT` is used to [format environment variables in Zowe CLI](./cli-using-formatting-environment-variables.md) and the prefix does not work in Zowe Explorer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, it's a bit confusing either way. I like how you explained it here 🙏
If you only need one set of credentials, you can use the $ZOWE_OPT_USER and $ZOWE_OPT_PASSWORD environment variables, check the Override With Environment Variables setting, and be ready to connect to the mainframe.
If you need multiple sets of credentials, you should be sure to un-check the Override With Environment Variables setting, create your own non-ZOWE_OPT environment variables, add the environment variables to your config, and then be ready to connect to the mainframe.
Not sure how to condense all of that into the notes though 😋
Signed-off-by: anaxceron <[email protected]>
|
|
||
| **In the nested structure**, the `zosmf` and `apiml` service profiles are nested within the `lpar` profile. | ||
| - This avoids repeating the `host` and `rejectUnauthorized` properties in both service profiles. | ||
| - Environment variables are used for [multiple credentials](#multiple-sets-of-credentials) in Lines 14-15 and Line 24. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adam-wolfe @zFernand0: Should we include a config example for ZOWE_OPT_USER and ZOWE_OPT_PASSWORD?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could, but I'm not sure about how it would with the API ML. I guess we could do something like:
{
"$schema": "./zowe.schema.json",
"profiles": {
"lpar": {
"properties": {
"host": "my.company.com",
"rejectUnauthorized": false
},
"profiles": {
"zosmf": {
"type": "zosmf",
"properties": {
"port": 443
}
}
}
}
},
"defaults": {
"zosmf": "lpar.zosmf"
},
"autoStore": false
}| "lpar": { | ||
| "properties": { | ||
| "host": "my.company.com", | ||
| "port": 1234, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming this is meant to be the z/OSMF port, I would move it into the lpar.zosmf profile properties.
| "apiml": { | ||
| "type": "zosmf", | ||
| "properties": { | ||
| "port": 7554, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would put the API ML connection info (port, tokenType, tokenValue, and authOrder) in the lpar profile. Like we do it here: https://docs.zowe.org/stable/user-guide/cli-using-creating-profiles#accessing-services-through-multiple-api-ml-gateways
Describe your pull request here: Addressing Issue 4682 to document how to use environment variables in a config file for ZE
List the file(s) included in this PR: docs\user-guide\ze-using-using-environment-variables.md, docs\user-guide\ze-install-configuring-ze.md
After creating the PR, follow the instructions in the comments.