|
1 | 1 | ---
|
2 | 2 | title: Zowe CLI profiles
|
3 |
| -tags: [getting_started] |
4 |
| -keywords: |
5 |
| -summary: "Zowe profiles let you store configuration details so you don't have to repeat them every time you use a Zowe CLI command." |
| 3 | +tags: [getting_started, concepts] |
| 4 | +keywords: command line, zowe cli |
| 5 | +summary: "Zowe CLI profiles let you store configuration details so you don't have to repeat them every time you use a Zowe CLI command." |
6 | 6 | sidebar: cdp_sidebar
|
7 | 7 | permalink: cdp-zowe-profiles.html
|
8 | 8 | folder: cdp
|
| 9 | +toc: true |
9 | 10 | ---
|
10 | 11 |
|
11 |
| -### TBC by Clive |
| 12 | +### Using the command-line |
| 13 | +The command-line is a conventional way to run and/or compose programs, especially if you come from a Linux or macOS background. Despite its usefulness, it can become tedious when large numbers of command-line arguments have to be entered and re-entered every time a program is executed. Zowe CLI profiles eliminate a lot of this tedium by collecting sequences of rarely-changing command-line arguments into just one argument - the name of a Zowe CLI profile - which is used as proxy whenever the original longer sequence needs to be subsequently invoked. |
| 14 | + |
| 15 | +{% include note.html content="Be aware that the broader Zowe and z/OS technology stack includes some other entities commonly referred to as <i>profiles</i> that are entirely different to the profiles discussed here, which are, specifically, Zowe CLI profiles. For example, there is a ```.profile``` file in most z/OS Unix System Services (USS) user home directories - the remote z/OS shell profile - that contains session-initializing environmental configuration. A lack of precision, especially in conversation, can be confusing." %} |
| 16 | + |
| 17 | +Instead of having to type, say, six command-line arguments that describe a collection of z/OS connection details, you only need to type one, the name and type of the profile that stores the full set. |
| 18 | + |
| 19 | +### Examples of Zowe CLI profiles in action |
| 20 | +As an example, a Zowe CLI z/OSMF profile aggregates the configuration details required to establish CLI z/OSMF sessions with the mainframe - such sessions are necessary to submit the batch jobs that deploy and undeploy [CICS bundles](cdp-cics-bundles.md). You can create a Zowe CLI z/OSMF profile with a command like: |
| 21 | + |
| 22 | +``` |
| 23 | +zowe profiles create zosmf-profile myprofile --host zos124 --port 1443 --user ibmuser --password myp4ss --reject-unauthorized false |
| 24 | +``` |
| 25 | +This creates a Zowe CLI z/OSMF profile called *myprofile* that connects to port *1443* (or, in your situation, such port as your own z/OSMF server is known to run on) on host *zos124* using the credentials *ibmuser* and *myp4ss* and allowing self-signed certificates. That's six command-line arguments stored as a collection under the single profile called *myprofile*. |
| 26 | + |
| 27 | +Now you can issue further Zowe commands that reference the profile you created earlier. For example, to check the health of your connectivity to z/OSMF you might enter: |
| 28 | + |
| 29 | +``` |
| 30 | +zowe zosmf check status --zosmf-profile myprofile |
| 31 | +``` |
| 32 | +Zowe CLI profiles really come into their own when you decide to deploy your Node.js application(s) using `push bundle`. Using three profiles, you might issue: |
| 33 | +``` |
| 34 | +zowe push bundle --name EXAMPLE --targetdir /u/example/bundles --zosmf-profile testplex --cics-deploy-profile devcics --ssh-profile ssh |
| 35 | +``` |
| 36 | +This is a much more economical and concise command-line than if were it necessary to enumerate all of the individual arguments from all of the profiles. |
| 37 | + |
| 38 | +As suggested above, to deploy a Node.js application from your workstation to one or more CICS regions, you will need to set up a minimum of three Zowe CLI profiles (optionally more if you wish to, say, deploy to multiple hosts) - you can read how to do it in detail [here](cdp-Create-Zowe-CLI-profiles). |
| 39 | + |
| 40 | +{% include tip.html content="For each profile type, the first profile you create becomes the default for that type. In many cases, you don't even have to type in the name of a specific profile if you know that the default profile will serve your needs." %} |
| 41 | + |
| 42 | +Ultimately, you are not *required* to use Zowe CLI profiles - you can specify all of the required command-line arguments explicitly - but they reduce the burden of typing when you are issuing commands that require many arguments. |
| 43 | + |
| 44 | +### Where are Zowe CLI profiles stored? |
| 45 | +When you create a Zowe CLI profile, a representation is written to an operating-system-dependent text file on your local workstation. |
| 46 | +<ul id="profileTabs" class="nav nav-tabs"> |
| 47 | + <li class="active"><a href="#windows" data-toggle="tab">Windows</a></li> |
| 48 | + <li><a href="#linux" data-toggle="tab">Linux</a></li> |
| 49 | + <li><a href="#macos" data-toggle="tab">macOS</a></li> |
| 50 | +</ul> |
| 51 | + <div class="tab-content"> |
| 52 | +<div role="tabpanel" class="tab-pane active" id="windows"> |
| 53 | +<p>On Windows, Zowe CLI profiles are written by default to <tt>C:\Users\<Your user name>\.zowe\profiles</tt></p> |
| 54 | +</div> |
| 55 | + |
| 56 | +<div role="tabpanel" class="tab-pane" id="linux"> |
| 57 | + <p>On Linux, Zowe CLI profiles are written by default to <tt>~/.zowe/profiles</tt></p></div> |
| 58 | + |
| 59 | +<div role="tabpanel" class="tab-pane" id="macos"> |
| 60 | + <p>On macOS, Zowe CLI profiles are written by default to <tt>~/.zowe/profiles</tt></p> |
| 61 | +</div> |
| 62 | +</div> |
| 63 | +When you become familiar with their simple syntax, you can hand-edit these files, instead of regenerating the corresponding profiles. |
0 commit comments