diff --git a/OdtkContainerization/linux/README.md b/OdtkContainerization/linux/README.md index 7f4d90f..4dfb0f4 100644 --- a/OdtkContainerization/linux/README.md +++ b/OdtkContainerization/linux/README.md @@ -18,6 +18,10 @@ Further information can be found in the [ODTK Help](https://help.agi.com/odtk/#o > [!IMPORTANT] > If you are building these images on Windows, you need to ensure the git config setting [`core.autocrlf=input`](https://docs.github.com/en/get-started/git-basics/configuring-git-to-handle-line-endings) when cloning this repository. Since the base image is a Linux distribution, shell scripts in your workspace need to have Linux line endings when they are copied into the docker image. +## Security + +ODTK Runtime can be started with various authentication modes including Unix domain socket ("uds"), Mutual Transport Layer Security ("mtls"), and "insecure". For demonstration purposes only, these code examples use the "insecure" mode. In a production environment, make sure that the connection is properly secured by using an appropriate authentication method. + ## [Custom Environment](custom-environment) Provides the environment required to communicate with the Yum and Pip package managers in your organization. This is optional if you are directly connected to the internet. It is required if you are using a proxy/firewall or isolated network requiring different certificates, settings, or both. diff --git a/OdtkContainerization/linux/configuration/licensing.env b/OdtkContainerization/linux/configuration/licensing.env index 71d0c64..48a2e16 100644 --- a/OdtkContainerization/linux/configuration/licensing.env +++ b/OdtkContainerization/linux/configuration/licensing.env @@ -1 +1 @@ -ANSYSLMD_LICENSE_FILE=<>@<> \ No newline at end of file +ANSYSLMD_LICENSE_FILE=<>@<> diff --git a/OdtkContainerization/linux/custom-environment/Dockerfile b/OdtkContainerization/linux/custom-environment/Dockerfile index 780b33d..89a8454 100644 --- a/OdtkContainerization/linux/custom-environment/Dockerfile +++ b/OdtkContainerization/linux/custom-environment/Dockerfile @@ -27,4 +27,4 @@ ENV PIP_CERT=/etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt # Directs python pip installs to pull packages from a specified repository. # Delete the following two lines if you do not need to override the default pip repository URL. ARG pipIndexUrl='' -ENV PIP_INDEX_URL=${pipIndexUrl} \ No newline at end of file +ENV PIP_INDEX_URL=${pipIndexUrl} diff --git a/OdtkContainerization/linux/custom-environment/README.md b/OdtkContainerization/linux/custom-environment/README.md index 86ca9f1..c218603 100644 --- a/OdtkContainerization/linux/custom-environment/README.md +++ b/OdtkContainerization/linux/custom-environment/README.md @@ -56,4 +56,4 @@ If you don't need to override the default `pip` repository URL to download Pytho docker compose build ``` - This will produce an image on top of the `redhat/ubi8:latest` baseline image that is needed to build the code samples using `yum` or `pip`. \ No newline at end of file + This will produce an image on top of the `redhat/ubi8:latest` baseline image that is needed to build the code samples using `yum` or `pip`. diff --git a/OdtkContainerization/linux/custom-environment/docker-compose.yml b/OdtkContainerization/linux/custom-environment/docker-compose.yml index 2b417a0..dea2918 100644 --- a/OdtkContainerization/linux/custom-environment/docker-compose.yml +++ b/OdtkContainerization/linux/custom-environment/docker-compose.yml @@ -7,4 +7,4 @@ services: # Uncomment the line below if you want to use the UBI image from ironbank # baseImage: registry1.dso.mil/ironbank/redhat/ubi/ubi8:latest baseImage: redhat/ubi8:latest - pipIndexUrl: '' # Edit this value to be the index URL of your internal pip repository if you have one. \ No newline at end of file + pipIndexUrl: '' # Edit this value to be the index URL of your internal pip repository if you have one. diff --git a/OdtkContainerization/linux/custom-environment/trusted-certificates/README.md b/OdtkContainerization/linux/custom-environment/trusted-certificates/README.md index 194d713..4477589 100644 --- a/OdtkContainerization/linux/custom-environment/trusted-certificates/README.md +++ b/OdtkContainerization/linux/custom-environment/trusted-certificates/README.md @@ -1 +1 @@ -If your network requires special CA certificates to download packages, copy your CA certificate (`*.crt`) files to this folder. \ No newline at end of file +If your network requires special CA certificates to download packages, copy your CA certificate (`*.crt`) files to this folder. diff --git a/OdtkContainerization/linux/custom-environment/yum-repositories/README.md b/OdtkContainerization/linux/custom-environment/yum-repositories/README.md index bef426d..4b86964 100644 --- a/OdtkContainerization/linux/custom-environment/yum-repositories/README.md +++ b/OdtkContainerization/linux/custom-environment/yum-repositories/README.md @@ -1 +1 @@ -If you need to override the default `yum` repository configuration to download RPM packages, copy your repository configuration (`*.repo`) files to this folder. \ No newline at end of file +If you need to override the default `yum` repository configuration to download RPM packages, copy your repository configuration (`*.repo`) files to this folder. diff --git a/OdtkContainerization/linux/odtk-jupyter/Dockerfile b/OdtkContainerization/linux/odtk-jupyter/Dockerfile index 6c63034..f4c9561 100644 --- a/OdtkContainerization/linux/odtk-jupyter/Dockerfile +++ b/OdtkContainerization/linux/odtk-jupyter/Dockerfile @@ -1,4 +1,4 @@ -ARG baseImage=ansys/odtk/odtk-python:13.0.0-ubi8 +ARG baseImage=ansys/odtk/odtk-python:13.0.1-ubi8 FROM ${baseImage} LABEL JUPYTER_LAB_TOKEN='The token used to initially authenticate with the jupyter lab application. Required.' diff --git a/OdtkContainerization/linux/odtk-jupyter/README.md b/OdtkContainerization/linux/odtk-jupyter/README.md index e6c8aae..e0e5706 100644 --- a/OdtkContainerization/linux/odtk-jupyter/README.md +++ b/OdtkContainerization/linux/odtk-jupyter/README.md @@ -17,7 +17,7 @@ This Docker image code sample demonstrates how to run ODTK Runtime for Linux usi 1. Run the following in a command line from this directory: ``` - docker build -t ansys/odtk/odtk-jupyter:13.0.0-ubi8 . + docker build -t ansys/odtk/odtk-jupyter:13.0.1-ubi8 . ``` ### Run the Container @@ -27,7 +27,7 @@ The entrypoint of this container starts the Jupyter Lab server in the foreground 1. Run the following in a command line from this directory: ``` - docker run -d -e JUPYTER_LAB_TOKEN=ansys-odtk -p 8888:8888 -v /notebooks:/home/odtk/notebooks -v /data:/home/odtk/data --env-file ../configuration/licensing.env --init --name odtk-jupyter --rm ansys/odtk/odtk-jupyter:13.0.0-ubi8 + docker run -d -e JUPYTER_LAB_TOKEN=ansys-odtk -p 8888:8888 -v /notebooks:/home/odtk/notebooks -v /data:/home/odtk/data --env-file ../configuration/licensing.env --init --name odtk-jupyter --rm ansys/odtk/odtk-jupyter:13.0.1-ubi8 ``` * If port `8888` is already in use on your machine, map a different port (e.g. `1234:8888`). @@ -74,4 +74,4 @@ If you changed the host port mapping in the `docker-compose.yml`, use that port ``` docker compose down - ``` \ No newline at end of file + ``` diff --git a/OdtkContainerization/linux/odtk-jupyter/docker-compose.yml b/OdtkContainerization/linux/odtk-jupyter/docker-compose.yml index 322ddf7..f4f4f54 100644 --- a/OdtkContainerization/linux/odtk-jupyter/docker-compose.yml +++ b/OdtkContainerization/linux/odtk-jupyter/docker-compose.yml @@ -1,10 +1,10 @@ services: odtk-jupyter: - image: ansys/odtk/odtk-jupyter:13.0.0-ubi8 + image: ansys/odtk/odtk-jupyter:13.0.1-ubi8 build: context: . args: - baseImage: ansys/odtk/odtk-python:13.0.0-ubi8 + baseImage: ansys/odtk/odtk-python:13.0.1-ubi8 ports: - 8888:8888 init: true # This enables the "tini" init tool for the entrypoint as recommended by Jupyter Lab @@ -13,4 +13,4 @@ services: - ./data:/home/odtk/data env_file: ../configuration/licensing.env environment: - JUPYTER_LAB_TOKEN: ansys-odtk \ No newline at end of file + JUPYTER_LAB_TOKEN: ansys-odtk diff --git a/OdtkContainerization/linux/odtk-jupyter/notebooks/example.ipynb b/OdtkContainerization/linux/odtk-jupyter/notebooks/example.ipynb index c6b098e..1b0e069 100644 --- a/OdtkContainerization/linux/odtk-jupyter/notebooks/example.ipynb +++ b/OdtkContainerization/linux/odtk-jupyter/notebooks/example.ipynb @@ -10,13 +10,13 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "id": "45f7eb84-fb95-4b12-9520-b04672dde303", "metadata": {}, "outputs": [], "source": [ "import subprocess\n", - "odtkProcess = subprocess.Popen(['odtkruntime'], stderr=subprocess.PIPE)\n", + "odtkProcess = subprocess.Popen(['odtkruntime', '--auth-mode=insecure'], stderr=subprocess.PIPE)\n", "while True:\n", " if b'ODTK initialized' in odtkProcess.stderr.readline():\n", " break" @@ -32,13 +32,24 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "id": "0b2d3697-fb11-492a-9bf1-e9e613d020a0", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "'13.0.1'" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "from odtk import Client\n", - "client = Client()\n", + "client = Client.create_insecure_client()\n", "odtk = client.get_root()\n", "odtk.application.appVersion.eval()" ] @@ -53,7 +64,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "id": "7a5745cd-7035-4f72-b8fb-1c34174e3f79", "metadata": {}, "outputs": [], @@ -74,10 +85,21 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "id": "29194b49-4df5-44f6-bdc7-359d0899d3ca", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "simulator = odtk.application.createObj(scenario, 'Simulator', 'TestSimulator')\n", "simulator.Go()" @@ -93,10 +115,21 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 6, "id": "a6d39a62-8cbd-43a4-a405-345589450dd7", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "filter = odtk.application.createObj(scenario, 'Filter', 'TestFilter')\n", "filter.Go()" @@ -112,7 +145,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 7, "id": "80a6eecc-86a3-4108-a1d3-2bee20004c97", "metadata": {}, "outputs": [], @@ -201,7 +234,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.9" + "version": "3.13.5" } }, "nbformat": 4, diff --git a/OdtkContainerization/linux/odtk-python/Dockerfile b/OdtkContainerization/linux/odtk-python/Dockerfile index 3c0377e..0f770e7 100644 --- a/OdtkContainerization/linux/odtk-python/Dockerfile +++ b/OdtkContainerization/linux/odtk-python/Dockerfile @@ -1,5 +1,5 @@ # Builder stage -ARG baseImage=ansys/odtk/odtk-runtime:13.0.0-ubi8 +ARG baseImage=ansys/odtk/odtk-runtime:13.0.1-ubi8 FROM ${baseImage} AS builder # Add the ODTK Code Samples package to the builder stage @@ -24,4 +24,4 @@ ENV PATH="${ODTK_USER_HOME}/.local/bin:${PATH}" \ COPY --chown=odtk docker-entrypoint.sh "${ODTK_USER_HOME}/bin/docker-entrypoint.sh" COPY --chown=odtk start-odtk.sh "${ODTK_USER_HOME}/bin/start-odtk.sh" RUN chmod +x "${ODTK_USER_HOME}/bin/docker-entrypoint.sh" -ENTRYPOINT [ "docker-entrypoint.sh" ] \ No newline at end of file +ENTRYPOINT [ "docker-entrypoint.sh" ] diff --git a/OdtkContainerization/linux/odtk-python/README.md b/OdtkContainerization/linux/odtk-python/README.md index 9cb7718..57c26fa 100644 --- a/OdtkContainerization/linux/odtk-python/README.md +++ b/OdtkContainerization/linux/odtk-python/README.md @@ -15,12 +15,12 @@ This Docker image code sample demonstrates how to install the ODTK Runtime Pytho ### Build the Image 1. Download version 13.0.0 or later of ODTK for Linux from [AGI Downloads](https://support.agi.com/downloads). -1. Unzip this file and copy the `odtk_codesamples_v13.0.0.tgz` into the [`distributions`](./distributions) folder at +1. Unzip this file and copy the `odtk_codesamples_v13.0.1.tgz` into the [`distributions`](./distributions) folder at the same level as this file. 1. Run the following in a command line from this directory: ``` - docker build -t ansys/odtk/odtk-python:13.0.0-ubi8 . + docker build -t ansys/odtk/odtk-python:13.0.1-ubi8 . ``` @@ -31,14 +31,14 @@ This image starts the `python` interpreter when starting the container. You can 1. Run the following in a command line from this directory: ``` - docker run -it --env-file ../configuration/licensing.env --name odtk-python --rm ansys/odtk/odtk-python:13.0.0-ubi8 + docker run -it --env-file ../configuration/licensing.env --name odtk-python --rm ansys/odtk/odtk-python:13.0.1-ubi8 ``` 1. Execute the following Python commands and verify it returns a valid response: ```python from odtk import Client - client = Client() + client = Client.create_insecure_client() root = client.get_root() print(root.application.appVersion.eval()) ``` @@ -50,7 +50,7 @@ This image starts the `python` interpreter when starting the container. You can ### Build the Image 1. Download version 13.0.0 or later of ODTK for Linux from [AGI Downloads](https://support.agi.com/downloads). -1. Unzip this file and copy the `odtk_codesamples_v13.0.0.tgz` into the [`distributions`](./distributions) folder at the same level as this file. +1. Unzip this file and copy the `odtk_codesamples_v13.0.1.tgz` into the [`distributions`](./distributions) folder at the same level as this file. 1. Run the following in a command line from this directory: ``` @@ -71,9 +71,9 @@ This image starts the `python` interpreter when starting the container. You can ```python from odtk import Client - client = Client() + client = Client.create_insecure_client() root = client.get_root() print(root.application.appVersion.eval()) ``` -1. Quit the Python interpreter and the container by executing the command `quit()` \ No newline at end of file +1. Quit the Python interpreter and the container by executing the command `quit()` diff --git a/OdtkContainerization/linux/odtk-python/distributions/README.md b/OdtkContainerization/linux/odtk-python/distributions/README.md index 87e1613..df0b215 100644 --- a/OdtkContainerization/linux/odtk-python/distributions/README.md +++ b/OdtkContainerization/linux/odtk-python/distributions/README.md @@ -1 +1 @@ -Copy the file `odtk_codesamples_v13.0.0.tgz` into this folder. \ No newline at end of file +Copy the file `odtk_codesamples_v13.0.1.tgz` into this folder. diff --git a/OdtkContainerization/linux/odtk-python/docker-compose.yml b/OdtkContainerization/linux/odtk-python/docker-compose.yml index 6ec8fd4..3afad35 100644 --- a/OdtkContainerization/linux/odtk-python/docker-compose.yml +++ b/OdtkContainerization/linux/odtk-python/docker-compose.yml @@ -1,8 +1,8 @@ services: odtk-python: - image: ansys/odtk/odtk-python:13.0.0-ubi8 + image: ansys/odtk/odtk-python:13.0.1-ubi8 build: context: . args: - baseImage: ansys/odtk/odtk-runtime:13.0.0-ubi8 - env_file: ../configuration/licensing.env \ No newline at end of file + baseImage: ansys/odtk/odtk-runtime:13.0.1-ubi8 + env_file: ../configuration/licensing.env diff --git a/OdtkContainerization/linux/odtk-python/start-odtk.sh b/OdtkContainerization/linux/odtk-python/start-odtk.sh index b72b7b7..75e2083 100644 --- a/OdtkContainerization/linux/odtk-python/start-odtk.sh +++ b/OdtkContainerization/linux/odtk-python/start-odtk.sh @@ -12,12 +12,12 @@ create_log_file() { start_odtk() { echo "Initializing ODTK..." - odtkruntime > "${STARTUP_LOG}" 2>&1 & + odtkruntime --auth-mode=insecure > "${STARTUP_LOG}" 2>&1 & } wait_for_startup_complete() { while true; do - if grep -q 'App running' "${STARTUP_LOG}"; then + if grep -q 'ODTK initialized' "${STARTUP_LOG}"; then break fi diff --git a/OdtkContainerization/linux/odtk-runtime/Dockerfile b/OdtkContainerization/linux/odtk-runtime/Dockerfile index 4c24e5a..4179e76 100644 --- a/OdtkContainerization/linux/odtk-runtime/Dockerfile +++ b/OdtkContainerization/linux/odtk-runtime/Dockerfile @@ -92,4 +92,4 @@ WORKDIR "${ODTK_USER_HOME}" # Expose port for ODTK EXPOSE 9393/tcp -ENTRYPOINT odtkruntime --address=0.0.0.0 \ No newline at end of file +ENTRYPOINT odtkruntime --auth-mode=insecure --allow-remote-hosts --address=0.0.0.0 diff --git a/OdtkContainerization/linux/odtk-runtime/README.md b/OdtkContainerization/linux/odtk-runtime/README.md index 524c13b..8d13939 100644 --- a/OdtkContainerization/linux/odtk-runtime/README.md +++ b/OdtkContainerization/linux/odtk-runtime/README.md @@ -9,7 +9,7 @@ This Docker image code sample demonstrates how to install ODTK Runtime for Linux * Docker must be installed and running on your system. * By default, this sample uses the `redhat/ubi8:latest` Docker image as its baseline. If you are not able to pull images directly from Dockerhub on your system, you must load the baseline OS image on your system before building this image. * Access to an Ansys Licensing Server with a valid ODTK license. Edit the [`licensing.env`](../configuration/licensing.env) file to ensure the `ANSYSLMD_LICENSE_FILE` environment variable has your Ansys License Server information. -* Download version 13.0.0 or later of ODTK for Linux from [AGI Downloads](https://support.agi.com/downloads). Unzip this file and copy the `odtk_binaries_v13.0.0.tgz` and `odtk_data_v13.0.0.tgz` into the [`distributions`](./distributions) folder at the same level as this file. +* Download version 13.0.1 or later of ODTK for Linux from [AGI Downloads](https://support.agi.com/downloads). Unzip this file and copy the `odtk_binaries_v13.0.1.tgz` and `odtk_data_v13.0.1.tgz` into the [`distributions`](./distributions) folder at the same level as this file. * Download Python source code from https://www.python.org/ftp/python/3.13.5/Python-3.13.5.tgz and copy the file into the [`distributions`](./distributions) folder at the same level as this file. > [!NOTE] > ODTK requires Python version 3.9 or later to run properly. We recommend using a 3.13.X version, since we test with 3.13.5. Follow instructions on downloading the Python source code below. If you do not want to use the default version, you can do one of the following: @@ -28,13 +28,13 @@ This image is built using the `yum` and `pip` tools to install package dependenc 1. If you did not build the `custom-environment` image described above, run the following in a command line from this directory: ``` - docker build -t ansys/odtk/odtk-runtime:13.0.0-ubi8 . + docker build -t ansys/odtk/odtk-runtime:13.0.1-ubi8 . ``` 1. If you did build the `custom-environment` image described above, run the following in a command line from this directory: ``` - docker build -t ansys/odtk/odtk-runtime:13.0.0-ubi8 --build-arg baseImage=ansys/odtk/custom/redhat/ubi8:latest . + docker build -t ansys/odtk/odtk-runtime:13.0.1-ubi8 --build-arg baseImage=ansys/odtk/custom/redhat/ubi8:latest . ``` @@ -45,7 +45,7 @@ This image starts the ODTK runtime application listening for connections on port 1. Run the following in a command line from this directory: ``` - docker run -d -it -p 9393:9393 --env-file ../configuration/licensing.env --name odtk-runtime --rm ansys/odtk/odtk-runtime:13.0.0-ubi8 + docker run -d -it -p 9393:9393 --env-file ../configuration/licensing.env --name odtk-runtime --rm ansys/odtk/odtk-runtime:13.0.1-ubi8 ``` * If port `9393` is already in use on your machine, map a different port (e.g. `1234:9393`). @@ -86,4 +86,4 @@ This image starts the ODTK runtime application listening for connections on port ``` docker compose down - ``` \ No newline at end of file + ``` diff --git a/OdtkContainerization/linux/odtk-runtime/distributions/README.md b/OdtkContainerization/linux/odtk-runtime/distributions/README.md index b5b032b..fb30266 100644 --- a/OdtkContainerization/linux/odtk-runtime/distributions/README.md +++ b/OdtkContainerization/linux/odtk-runtime/distributions/README.md @@ -1,2 +1,2 @@ -Copy the files `odtk_binaries_v13.0.0.tgz` and `odtk_data_v13.0.0.tgz` into this folder. -Download the Python source files from https://www.python.org/ftp/python/3.10.9/Python-3.10.9.tgz into this folder. \ No newline at end of file +Copy the files `odtk_binaries_v13.0.1.tgz` and `odtk_data_v13.0.1.tgz` into this folder. +Download the Python source files from https://www.python.org/ftp/python/3.10.9/Python-3.10.9.tgz into this folder. diff --git a/OdtkContainerization/linux/odtk-runtime/docker-compose.yml b/OdtkContainerization/linux/odtk-runtime/docker-compose.yml index e0e2589..6f02c62 100644 --- a/OdtkContainerization/linux/odtk-runtime/docker-compose.yml +++ b/OdtkContainerization/linux/odtk-runtime/docker-compose.yml @@ -1,6 +1,6 @@ services: odtk-runtime: - image: ansys/odtk/odtk-runtime:13.0.0-ubi8 + image: ansys/odtk/odtk-runtime:13.0.1-ubi8 build: context: . args: @@ -11,4 +11,4 @@ services: baseImage: redhat/ubi8:latest ports: - 9393:9393 - env_file: ../configuration/licensing.env \ No newline at end of file + env_file: ../configuration/licensing.env diff --git a/OdtkContainerization/linux/odtk-webservice/Dockerfile b/OdtkContainerization/linux/odtk-webservice/Dockerfile index baabe23..0b94993 100644 --- a/OdtkContainerization/linux/odtk-webservice/Dockerfile +++ b/OdtkContainerization/linux/odtk-webservice/Dockerfile @@ -1,4 +1,4 @@ -ARG baseImage=ansys/odtk/odtk-python:13.0.0-ubi8 +ARG baseImage=ansys/odtk/odtk-python:13.0.1-ubi8 FROM ${baseImage} # Install Flask @@ -17,4 +17,4 @@ ENV FLASK_APP=odtk-webservice.py \ EXPOSE 5000/tcp # Run Flask application -ENTRYPOINT flask run --host=0.0.0.0 \ No newline at end of file +ENTRYPOINT flask run --host=0.0.0.0 diff --git a/OdtkContainerization/linux/odtk-webservice/README.md b/OdtkContainerization/linux/odtk-webservice/README.md index 1894c9c..c3bac2e 100644 --- a/OdtkContainerization/linux/odtk-webservice/README.md +++ b/OdtkContainerization/linux/odtk-webservice/README.md @@ -16,7 +16,7 @@ This Docker image code sample demonstrates how to run ODTK Runtime for Linux thr ### Build the Image -1. Run `docker build -t ansys/odtk/odtk-webservice:13.0.0-ubi8 .` on the command line in this directory. +1. Run `docker build -t ansys/odtk/odtk-webservice:13.0.1-ubi8 .` on the command line in this directory. ### Run the Container @@ -25,7 +25,7 @@ The entrypoint of this container starts the Flask development server in the fore 1. Run the following in a command line from this directory: ``` - docker run -d -p 5000:5000 --env-file ../configuration/licensing.env --name odtk-webservice --rm ansys/odtk/odtk-webservice:13.0.0-ubi8 + docker run -d -p 5000:5000 --env-file ../configuration/licensing.env --name odtk-webservice --rm ansys/odtk/odtk-webservice:13.0.1-ubi8 ``` * If port `5000` is already in use on your machine, map a different port (e.g. `1234:5000`). @@ -70,4 +70,4 @@ The entrypoint of this container starts the Flask development server in the fore ``` docker compose down - ``` \ No newline at end of file + ``` diff --git a/OdtkContainerization/linux/odtk-webservice/docker-compose.yml b/OdtkContainerization/linux/odtk-webservice/docker-compose.yml index 9c70b6b..338bfed 100644 --- a/OdtkContainerization/linux/odtk-webservice/docker-compose.yml +++ b/OdtkContainerization/linux/odtk-webservice/docker-compose.yml @@ -1,10 +1,10 @@ services: odtk-webservice: - image: ansys/odtk/odtk-webservice:13.0.0-ubi8 + image: ansys/odtk/odtk-webservice:13.0.1-ubi8 build: context: . args: - baseImage: ansys/odtk/odtk-python:13.0.0-ubi8 + baseImage: ansys/odtk/odtk-python:13.0.1-ubi8 env_file: ../configuration/licensing.env ports: - - 5000:5000 \ No newline at end of file + - 5000:5000 diff --git a/OdtkContainerization/linux/odtk-webservice/odtk-webservice.py b/OdtkContainerization/linux/odtk-webservice/odtk-webservice.py index e34d4ab..7c6173e 100644 --- a/OdtkContainerization/linux/odtk-webservice/odtk-webservice.py +++ b/OdtkContainerization/linux/odtk-webservice/odtk-webservice.py @@ -6,12 +6,12 @@ app = Flask(__name__) -odtkProcess = subprocess.Popen(['odtkruntime'], stderr=subprocess.PIPE) +odtkProcess = subprocess.Popen(['odtkruntime', '--auth-mode=insecure'], stderr=subprocess.PIPE) while True: if b'ODTK initialized' in odtkProcess.stderr.readline(): break -client = Client() +client = Client.create_insecure_client() root = client.get_root() root.LoadObject('', '/home/odtk/scenario/Baseline.sco') @@ -19,13 +19,13 @@ @app.route('/version') def version_service(): - client = Client() + client = Client.create_insecure_client() root = client.get_root() return root.application.appVersion.eval() @app.route('/satellites//process') def process_simulated_obs(satName): - client = Client() + client = Client.create_insecure_client() root = client.get_root() filter = root.scenario[0].filter['Filter'] filter.SatelliteList.clear()