two questions about Dockerizing #108
Replies: 4 comments 28 replies
-
Hey @paulkaefer , not yet.. however v1.5.0 will include support for pulling the config information from environment variables or a For syncers, we have a secondary install process (so we don't eagerly install all dependencies when building the initial environment). Snowflake's got some issues with SQLAlchemy 2.0 support that I had to monkeypatch in the 1.5.0 series as well. It might make sense for us to get on a call to resolve these issues for you, but I'd probably also recommend trying to install from 1.5.0 beta instead of working on 1.4.x series, since it'll just be more complicated to get working 😅 WDYT ? |
Beta Was this translation helpful? Give feedback.
-
@paulkaefer with 1.5.0 released , I think we can more meaningfully talk about Dockerizing or serverless approaches to CS Tools. I'll offer an example for GitHub Actions (that I'm currently still tinkering with...) to get us started. Maybe you can share a (public friendly) Dockerfile and we can work through it together? It's been close to 5 years since I touched dockerfiles directly... I'm a Portainer snob 😄 https://github.com/thoughtspot/cs_tools/blob/master/.github/workflows/fetch-bi-data.yaml 👉 click to show .yamlname:
Extract data with CS Tools.
on:
workflow_dispatch:
schedule:
# Runs every day at 5:15 AM UTC
- cron: "15 5 * * *"
jobs:
extract_data_from_thoughtspot:
# Configure Environment Variables for CS Tools configuration
env:
CS_TOOLS_THOUGHTSPOT__URL: ${{ secrets.THOUGHTSPOT_URL }}
CS_TOOLS_THOUGHTSPOT__USERNAME: ${{ secrets.THOUGHTSPOT_USERNAME }}
CS_TOOLS_THOUGHTSPOT__SECRET_KEY: ${{ secrets.THOUGHTSPOT_SECRET_KEY }}
# CS_TOOLS_TEMP_DIR: ...
runs-on: ubuntu-latest
steps:
- name: Get 7 days ago
run: echo "days_ago_7=$(date -d "-7 days" +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Get 1 days ago
run: echo "days_ago_1=$(date -d "-1 days" +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Check out the repository main branch
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Install a specific version of CS Tools
run: python -m pip install -e .[cli]
# --config ENV: tells CS Tools to pull the information from environment variables.
- name: Grab N-7 to N-1 days of BI Server Data
run: "cs_tools tools searchable bi-server --from-date $days_ago_7 --to-date $days_ago_1 --syncer ${{ secrets.SYNCER_DECLARATIVE_STRING }} --config ENV:" The idea behind this is the mandatory properties on a configuration file are really just the authentication details.. so url, username, and secret.
in addition to specifying the You'll also see that I've hid the Syncer config in an environment variable as well. This is primarily so I don't need to have a second file to mess around with... but with Docker you can connect volumes and reference files from them instead of a pure serverless environment like Github Actions. |
Beta Was this translation helpful? Give feedback.
-
@boonhapus I'm getting an error when trying to install the
|
Beta Was this translation helpful? Give feedback.
-
@boonhapus ok, it seems like the click to see full error message
|
Beta Was this translation helpful? Give feedback.
-
cs_tools config create
that will bypass the two prompts? I tried--silent
but that doesn't seem to do it.cs_tools tools searchable
within the container, I get the below message. If I manually installplatformdirs==3.11.0
it gets farther. Is this a bug?Beta Was this translation helpful? Give feedback.
All reactions