Skip to content

Commit

Permalink
📚 Update development and testing details
Browse files Browse the repository at this point in the history
Signed-off-by: Harshad Reddy Nalla <[email protected]>
  • Loading branch information
harshad16 committed Sep 19, 2022
1 parent 96d170b commit a108fcb
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .env.template
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
THOTH_CEPH_BUCKET=
THOTH_CEPH_BUCKET_PREFIX=
# source ceph
THOTH_DEPLOYMENT_NAME="ocp-test"

THOTH_S3_ENDPOINT_URL="https://s3.upshift.redhat.com/
THOTH_CEPH_BUCKET="thoth"
THOTH_CEPH_BUCKET_PREFIX="data"
THOTH_CEPH_KEY_ID=
THOTH_CEPH_SECRET_KEY=
THOTH_DEPLOYMENT_NAME=
THOTH_S3_ENDPOINT_URL=

# dest ceph
THOTH_DOCUMENT_SYNC_DST="s3://thoth/test"
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
30 changes: 30 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,33 @@ CLI to copy data to the deployment which serves data. Thus the later deployment
is configured via the standard `AWS CLI configuration file
<https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html>`__
that should be present in ``~/.aws/config``.


Development and Testing
-----------------------

The ``.env.template`` has environment variables that are required for document-sync-job execution. |br|
Create ``.env`` file out of the ``.env.template`` with adjusted environment variable values.

.. code-block:: console
cp .env.template .env
vim .env
As stated above the job accepts source s3 details as env vars and destination s3 details
as aws cli conf or env vars.

The s3 credentials can be accessed via cluster. |br|
Check the additional documentation on `thoth-application <https://github.com/thoth-station/thoth-application/blob/master/docs/environments.md>`_. |br|
Assign the credentials value to the env variable in the ``.env`` file.

If using s3 cluster different than s3.amazonaws.com. |br|
set the ``--endpoint https://<s3-url>`` in the list, at this `line <https://github.com/thoth-station/document-sync-job/blob/master/app.py#L102>`_.

For testing purpose,
Developers can use PSI test instance as source and Operate-first smaug instance as destination. |br|
There is old data available on ``prefix``: ``ocp-test``.

.. |br| raw:: html

<br>

0 comments on commit a108fcb

Please sign in to comment.