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 development and testing details #41

Merged
merged 1 commit into from
Oct 18, 2022
Merged
Show file tree
Hide file tree
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
18 changes: 14 additions & 4 deletions .env.template
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
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=
Comment on lines 7 to 8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we need credentials with this ? from python or aws-cli I get the same error -> Unable to locate credentials.

Copy link
Member Author

@harshad16 harshad16 Sep 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes we do, you can get the credential from the cluster.
source: https://console-openshift-console.apps.ocp4.prod.psi.redhat.com/k8s/ns/thoth-test-core/secrets/ceph
dest: https://console-openshift-console.apps.smaug.na.operate-first.cloud/k8s/ns/thoth-frontend-prod/secrets/ceph

I would like to include these detail in thoth-application docs,
so I have included the link to this in this document.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, this ought to be in a more general place than here 👍

THOTH_DEPLOYMENT_NAME=
THOTH_S3_ENDPOINT_URL=

# dest ceph
THOTH_DOCUMENT_SYNC_DST="s3://thoth/test"
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
harshad16 marked this conversation as resolved.
Show resolved Hide resolved

# Job specifics
THOTH_DOCUMENT_SYNC_CONFIGURED_SOLVERS="solver-rhel-8-py36 solver-rhel-8-py38"
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>