From 0ecc6c6b4d2d91193c7ee23e553429b06c2b1b34 Mon Sep 17 00:00:00 2001 From: JamesBauman Date: Thu, 14 Apr 2022 14:17:14 -0400 Subject: [PATCH 1/3] new m1 article. Rally: US811759 Signed-off-by: JamesBauman --- docs/user-guide/cli-db2-install-m1.md | 38 +++++++++++++++++++++++++++ docs/user-guide/cli-db2plugin.md | 14 ++++++---- sidebars.js | 9 ++++++- 3 files changed, 55 insertions(+), 6 deletions(-) create mode 100644 docs/user-guide/cli-db2-install-m1.md diff --git a/docs/user-guide/cli-db2-install-m1.md b/docs/user-guide/cli-db2-install-m1.md new file mode 100644 index 0000000000..9126b4463e --- /dev/null +++ b/docs/user-guide/cli-db2-install-m1.md @@ -0,0 +1,38 @@ +# MacOS M1 processor installation + +The IBM ODBC DB2 driver functions only on MacOS x86_64 architecture. + +To let you store your DB2 plug-in credentials securely in the credential manager of your MacOS operating system, configure the MacOS M1 processor to behave as MacOS x86_64 architecture. Use the following steps to perform the configuration. + +1. Install Rosetta. Open a terminal window and issue the following command: + + ``` + softwareupdate --install-rosetta --agree-to-license + ``` +2. Modify `~/.zshrc` to contain the following syntax: + + ``` + alias arm="env /usr/bin/arch -arm64 /bin/zsh --login" + alias intel="env /usr/bin/arch -x86_64 /bin/zsh --login" + ``` + +3. Source the new file by issuing the following command: + + ``` + ~/.zshrc + ``` + +4. Switch to the x86_64 architecture by issuing the following command: + + ``` + intel + ``` + +5. Reinstall Zowe CLI. +6. After you complete these steps, do one of the following: + + - If you are installing the plug-in from an online registry, continue with Step 2 in [Install from an online registry](.//cli-db2plugin.md#installing-from-an-online-registry). + + - If you are installing the plug-in from a local package, continue with Step 2 in [Installing from a local package](../user-guide/cli-db2plugin.md#installing-from-a-local-package). + +**Important!** You must issue the `intel` command to help ensure that Zowe CLI, Secure Credential Storage and the DB2 plug-in function properly on x86_64 architecture. \ No newline at end of file diff --git a/docs/user-guide/cli-db2plugin.md b/docs/user-guide/cli-db2plugin.md index 1501a082b1..b6168b61ea 100644 --- a/docs/user-guide/cli-db2plugin.md +++ b/docs/user-guide/cli-db2plugin.md @@ -34,9 +34,11 @@ Use one of the following methods to install the the Zowe CLI Plug-in for IBM Db2 ### Installing from an online registry -If you installed Zowe CLI from **online registry**, complete the following steps: +Complete the following steps if you installed Zowe CLI from **online registry**: -1. Open a command line window and issue the following command: +1. If you are installing the plug-in on an Apple computer that contains a MacOS M1 processor, complete the steps in [MacOS M1 processor installation](../user-guide/cli-db2-install-m1.md). If not, continue to Step 2. + +2. Open a command line window and issue the following command: ``` zowe plugins install @zowe/db2-for-zowe-cli@zowe-v2-lts @@ -54,11 +56,13 @@ Download the ODBC driver before you install the Db2 plug-in. **Follow these steps:** -1. [Download the ODBC CLI Driver](https://github.com/ibmdb/node-ibm_db#-download-clidriver-based-on-your-platform--architecture-from-the-below-ibm-hosted-url). Use the table within the download URL to select the correct CLI Driver for your platform and architecture. +1. If you are installing the plug-in on a Apple computer that contains a MacOS M1 processor, complete the steps in [MacOS M1 processor installation](../user-guide/cli-db2-install-m1.md). If not, continue to Step 2. + +2. [Download the ODBC CLI Driver](https://github.com/ibmdb/node-ibm_db#-download-clidriver-based-on-your-platform--architecture-from-the-below-ibm-hosted-url) (Darwin x64). Use the table within the download URL to select the correct CLI Driver for your platform and architecture. -2. Create a new directory named `odbc_cli` on your computer. Remember the path to the new directory. You will need to provide the full path to this directory immediately before you install the Db2 plug-in. +3. Create a new directory named `odbc_cli` on your computer. Remember the path to the new directory. You will need to provide the full path to this directory immediately before you install the Db2 plug-in. -3. Place the ODBC driver in the `odbc_cli` folder. **Do not extract the ODBC driver**. +4. Place the ODBC driver in the `odbc_cli` folder. **Do not extract the ODBC driver**. You downloaded and prepared to use the ODBC driver successfully. Proceed to install the plug-in to Zowe CLI. diff --git a/sidebars.js b/sidebars.js index 55a5f2cf42..eecfc38b40 100644 --- a/sidebars.js +++ b/sidebars.js @@ -250,7 +250,14 @@ module.exports = { "user-guide/cli-swreqplugins", "user-guide/cli-installplugins", "user-guide/cli-cicsplugin", - "user-guide/cli-db2plugin", + { + type: "category", + label: "IBM® Db2® Database Plug-in for Zowe CLI", + items: [ + "user-guide/cli-db2plugin", + "user-guide/cli-db2-install-m1", + ], + }, "user-guide/cli-ftpplugin", "user-guide/cli-imsplugin", "user-guide/cli-mqplugin", From 760fc77927c292120697130dca13f01f4da0b653 Mon Sep 17 00:00:00 2001 From: JamesBauman Date: Fri, 15 Apr 2022 13:38:01 -0400 Subject: [PATCH 2/3] applied review comments from Andrew... Signed-off-by: JamesBauman --- docs/user-guide/cli-db2-install-m1.md | 8 ++++---- docs/user-guide/cli-db2plugin.md | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/user-guide/cli-db2-install-m1.md b/docs/user-guide/cli-db2-install-m1.md index 9126b4463e..9dc060b1f5 100644 --- a/docs/user-guide/cli-db2-install-m1.md +++ b/docs/user-guide/cli-db2-install-m1.md @@ -1,8 +1,8 @@ -# MacOS M1 processor installation +# M1 processor installation -The IBM ODBC DB2 driver functions only on MacOS x86_64 architecture. +The IBM ODBC DB2 driver functions only on MacOS x86_64 architecture. -To let you store your DB2 plug-in credentials securely in the credential manager of your MacOS operating system, configure the MacOS M1 processor to behave as MacOS x86_64 architecture. Use the following steps to perform the configuration. +Use the following steps to configure an M1 (or later architecture) processor to behave as MacOS x86_64 architecture so that it can communicate with the IBM ODBC DB2 driver. 1. Install Rosetta. Open a terminal window and issue the following command: @@ -35,4 +35,4 @@ To let you store your DB2 plug-in credentials securely in the credential manager - If you are installing the plug-in from a local package, continue with Step 2 in [Installing from a local package](../user-guide/cli-db2plugin.md#installing-from-a-local-package). -**Important!** You must issue the `intel` command to help ensure that Zowe CLI, Secure Credential Storage and the DB2 plug-in function properly on x86_64 architecture. \ No newline at end of file +**Important!** You must issue the `intel` command **every time** that you open a new terminal window to help ensure that Zowe CLI, Secure Credential Storage and the DB2 plug-in function properly on x86_64 architecture. Also, issue the command **before** you issue Zowe CLI commands. \ No newline at end of file diff --git a/docs/user-guide/cli-db2plugin.md b/docs/user-guide/cli-db2plugin.md index b6168b61ea..bf395316c8 100644 --- a/docs/user-guide/cli-db2plugin.md +++ b/docs/user-guide/cli-db2plugin.md @@ -36,7 +36,7 @@ Use one of the following methods to install the the Zowe CLI Plug-in for IBM Db2 Complete the following steps if you installed Zowe CLI from **online registry**: -1. If you are installing the plug-in on an Apple computer that contains a MacOS M1 processor, complete the steps in [MacOS M1 processor installation](../user-guide/cli-db2-install-m1.md). If not, continue to Step 2. +1. If you are installing the plug-in on an Apple computer that contains an M1 (or later architecture) processor, complete the steps in [M1 processor installation](../user-guide/cli-db2-install-m1.md). If not, continue to Step 2. 2. Open a command line window and issue the following command: From 32ba494fc9dfbca36ce89c4b73648b23934bebc6 Mon Sep 17 00:00:00 2001 From: JamesBauman Date: Fri, 15 Apr 2022 15:25:08 -0400 Subject: [PATCH 3/3] a few tweaks.... added 'or later architecture' to package install. changed link text to the article that was renamed to "M1 processor installation". added v2 profiles context for creating a db2 team config profile Signed-off-by: JamesBauman --- docs/user-guide/cli-db2plugin.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/user-guide/cli-db2plugin.md b/docs/user-guide/cli-db2plugin.md index bf395316c8..e8a7acfe45 100644 --- a/docs/user-guide/cli-db2plugin.md +++ b/docs/user-guide/cli-db2plugin.md @@ -56,7 +56,7 @@ Download the ODBC driver before you install the Db2 plug-in. **Follow these steps:** -1. If you are installing the plug-in on a Apple computer that contains a MacOS M1 processor, complete the steps in [MacOS M1 processor installation](../user-guide/cli-db2-install-m1.md). If not, continue to Step 2. +1. If you are installing the plug-in on a Apple computer that contains an M1 (or later architecture) processor, complete the steps in [M1 processor installation](../user-guide/cli-db2-install-m1.md). If not, continue to Step 2. 2. [Download the ODBC CLI Driver](https://github.com/ibmdb/node-ibm_db#-download-clidriver-based-on-your-platform--architecture-from-the-below-ibm-hosted-url) (Darwin x64). Use the table within the download URL to select the correct CLI Driver for your platform and architecture. @@ -183,14 +183,18 @@ In addition to the host, port and database you'll need - If your Db2 systems use a secure connection, you can also provide an SSL/TSL certificate file. -To create a db2 profile in Zowe CLI, issue the following command with your connection details for the Db2 instance: +To create a db2 team profile in Zowe CLI, open the `zowe.config.json` file and specify the properties for the `port` and `database`: ``` -zowe profiles create db2 -H -P -d -u --pw +"db2": { + "type": "db2", + "properties": { + "port": 0, + "database": "" + }, + "secure": [] +} ``` - -**Note** For more information, issue the command `zowe profiles create db2-profile --help` - ### SQL0805N: Database BIND To be able to run remote SQL commands against a Db2 database, you must invoke a `BIND` command against it. If the `BIND` command is not run, you will see an error that contains `SQL0805N` similar to the log below: