From 4c82216ab252bf39b9263169606660011f4ab1c4 Mon Sep 17 00:00:00 2001 From: mattwwarren Date: Mon, 13 May 2024 15:36:43 -0400 Subject: [PATCH] marketing rename (#22) Co-authored-by: Matthew Warren --- .github/workflows/ci.yaml | 2 +- .github/workflows/release.yaml | 2 +- README.md | 24 ++++++++++++------------ src/tests/test_directory_walking.py | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b7a3e6d..3b7ee47 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -36,4 +36,4 @@ jobs: uses: codecov/codecov-action@v4.0.1 with: token: ${{ secrets.CODECOV_TOKEN }} - slug: cloudtruth/dynamic-importer + slug: cloudtruth/config-catalyst diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 550cf16..b07f681 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -11,7 +11,7 @@ on: env: BUILD_TAG: ${{ github.event.release.tag_name }} - DOCKER_REPO: cloudtruth/dynamic-importer + DOCKER_REPO: cloudtruth/config-catalyst permissions: contents: read # required for actions/checkout diff --git a/README.md b/README.md index 9df4a35..3d4f1eb 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# dynamic-importer +# CloudTruth Config Catalyst Extract parameters from your existing config and import to your CloudTruth organization -![CI](https://github.com/cloudtruth/dynamic-importer/actions/workflows/ci.yaml/badge.svg) -![Codecov](https://img.shields.io/codecov/c/github/cloudtruth/dynamic-importer) -![Docker pulls](https://img.shields.io/docker/pulls/cloudtruth/dynamic-importer) -![version](https://img.shields.io/docker/v/cloudtruth/dynamic-importer) +![CI](https://github.com/cloudtruth/config-catalyst/actions/workflows/ci.yaml/badge.svg) +![Codecov](https://img.shields.io/codecov/c/github/cloudtruth/config-catalyst) +![Docker pulls](https://img.shields.io/docker/pulls/cloudtruth/config-catalyst) +![version](https://img.shields.io/docker/v/cloudtruth/config-catalyst) # Supported file types @@ -19,19 +19,19 @@ Extract parameters from your existing config and import to your CloudTruth organ * pkl # Usage -This utility is distributed as a Docker container and can be pulled from cloudtruth/dynamic-importer on Docker Hub +This utility is distributed as a Docker container and can be pulled from cloudtruth/config-catalyst on Docker Hub ## Procesing a directory tree (the easy method) You can feed a directory of files into the `walk-directories` command, which will find all files matching the supplied types and parse them into CloudTruth config formats. If you supply your CLOUDTRUTH_API_KEY via docker, the data will be uploaded to your CloudTruth account. ``` -docker run --rm -e CLOUDTRUTH_API_KEY="myverysecureS3CR3T!!" -v ${PWD}/files:/app/files cloudtruth/dynamic-importer walk-directories --config-dirs /app/samples/ -t dotenv -t json -t tf +docker run --rm -e CLOUDTRUTH_API_KEY="myverysecureS3CR3T!!" -v ${PWD}/files:/app/files cloudtruth/config-catalyst walk-directories --config-dirs /app/samples/ -t dotenv -t json -t tf ``` ## Processing a single file An example of how to process a .env file ``` -docker run --rm -v ${PWD}/files:/app/files cloudtruth/dynamic-importer process-configs -p myproj --default-values /app/samples/.env.sample --file-type dotenv --output-dir /app/files/ +docker run --rm -v ${PWD}/files:/app/files cloudtruth/config-catalyst process-configs -p myproj --default-values /app/samples/.env.sample --file-type dotenv --output-dir /app/files/ ``` This command will mount a subdir `files` from the current working directory to the container. Assuming your input file is in that dir, the processed files will be placed in that dir once processing has completed. @@ -39,7 +39,7 @@ This command will mount a subdir `files` from the current working directory to t ## Processing several files An example of how to orocess several .env files and create values for each environment ``` -docker run --rm -v ${PWD}/files:/app/files cloudtruth/dynamic-importer process-configs \ +docker run --rm -v ${PWD}/files:/app/files cloudtruth/config-catalyst process-configs \ -p myproj -t dotenv \ --default-values /app/samples/dotenvs/.env.default.sample \ --env-values development:/app/samples/dotenvs/.env.dev.sample \ @@ -52,14 +52,14 @@ docker run --rm -v ${PWD}/files:/app/files cloudtruth/dynamic-importer process-c There may be times when this utility is too aggressive or you want a variable to remain hard-coded in your CloudTruth template. In that case, you can remove the references from the generated `.ctconfig` file and re-generate the template. ``` -docker run --rm -v ${PWD}/files:/app/files cloudtruth/dynamic-importer regenerate-template --input-file /app/samples/.env.sample --file-type dotenv --data-file /app/files/.env.ctconfig --output-dir /app/files/ +docker run --rm -v ${PWD}/files:/app/files cloudtruth/config-catalyst regenerate-template --input-file /app/samples/.env.sample --file-type dotenv --data-file /app/files/.env.ctconfig --output-dir /app/files/ ``` ## Uploading data to CloudTruth Once you are comfortable with your template and associated data, you're ready to upload to CloudTruth! Be sure to provide your CloudTruth API Key as an environment variable ``` -docker run --rm -e CLOUDTRUTH_API_KEY="myverysecureS3CR3T!!" -v ${PWD}/files:/app/files cloudtruth/dynamic-importer create-data --data-file /app/files/.env.ctconfig -m /app/files/.env.cttemplate -p "Meaningful Project Name" +docker run --rm -e CLOUDTRUTH_API_KEY="myverysecureS3CR3T!!" -v ${PWD}/files:/app/files cloudtruth/config-catalyst create-data --data-file /app/files/.env.ctconfig -m /app/files/.env.cttemplate -p "Meaningful Project Name" ``` # Development @@ -74,7 +74,7 @@ To run unittests, run `pytest` from within your virtualenv. Pre-commit is installed in this repo and should be used to verify code organization and formatting. To set it up, run `pre-commit install` in your virtualenv # Contributing -Issues, pull requests, and discussions are welcomed. Please vote for any issues tagged with [needs votes](https://github.com/cloudtruth/dynamic-importer/issues?q=is%3Aissue+is%3Aopen+label%3A%22needs+votes%22) +Issues, pull requests, and discussions are welcomed. Please vote for any issues tagged with [needs votes](https://github.com/cloudtruth/config-catalyst/issues?q=is%3Aissue+is%3Aopen+label%3A%22needs+votes%22) See `dynamic_importer.processors` and the subclasses within for examples of the current design. TL;DR - if you can convert the source into a dict, `BaseProcessor._traverse_data` should handle most of the heavy lifting. diff --git a/src/tests/test_directory_walking.py b/src/tests/test_directory_walking.py index 4919380..f2472ea 100644 --- a/src/tests/test_directory_walking.py +++ b/src/tests/test_directory_walking.py @@ -29,7 +29,7 @@ by running the docker container and executing the tests there. ```shell -docker run -it --entrypoint /bin/bash --rm -v $PWD:/app cloudtruth/dynamic-importer:latest +docker run -it --entrypoint /bin/bash --rm -v $PWD:/app cloudtruth/config-catalyst:latest pip install -e .[dev] IS_GITHUB_ACTION=true pytest ```