Skip to content
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

Update wording and add extra install directions for ODBC #14781

Merged
merged 2 commits into from
Jun 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions ibm_db2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,23 +170,33 @@ See [service_checks.json][11] for a list of service checks provided by this inte

### Installing `ibm_db` client library offline

If you're in an air gapped environment, or on a restricted network where it's not possible to run `pip install ibm_db==3.0.1`, you can install `ibm_db` using the following method:
If you're in an air gapped environment, or on a restricted network where it's not possible to run `pip install ibm_db==<version>`, you can install `ibm_db` using the following method:

**Note**: The following example assumes an Ubuntu machine, but the steps should also be similar on most operating systems.

1. On a machine with network access, download [the source tarball][14].
1. On a machine with network access, download the source tarballs for [the `ibm_db` library][14] and [the ODBC and CLI][16]. The ODBC and CLI are required to be downloaded separately because the `ibm_db` library requires them, but it cannot download them via `pip`. The following script installs the archive file for ibm_db==3.1.0:

```
curl -Lo ibm_db.tar.gz https://github.com/ibmdb/python-ibmdb/archive/refs/tags/v3.1.0.tar.gz
vivek-datadog marked this conversation as resolved.
Show resolved Hide resolved

curl -Lo linuxx64_odbc_cli.tar.gz https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/linuxx64_odbc_cli.tar.gz
```

1. Transport the file over to the restricted host, and then extract the archive:
1. Transport the two files over to the restricted host, and then extract the archive.

```
tar xvf ibm_db.tar.gz

tar xvf linuxx64_odbc_cli.tar.gz
```

1. Set the `IBM_DB_HOME` environment variable to the location of where `/clidriver` was extracted from `linuxx64_odbc_cli.tar.gz`. This will prevent the `ibm_db` library from installing a new version of the ODBC and CLI and failing.

```
export IBM_DB_HOME=/path/to/clidriver
```

1. Using the embedded [`pip`][15] on the Agent, run the following command:
1. Using the embedded [`pip`][15] on the Agent, run the following command to install the library locally.

```
/opt/datadog-agent/embedded/bin/pip install --no-index --no-deps --no-build-isolation python-ibmdb-
Expand Down Expand Up @@ -241,3 +251,4 @@ Additional helpful documentation, links, and articles:
[13]: https://www.datadoghq.com/blog/monitor-db2-with-datadog
[14]: https://pypi.org/project/ibm-db/#files
[15]: https://docs.datadoghq.com/developers/guide/custom-python-package/?tab=linux
[16]: https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/