Skip to content
Snippets Groups Projects
Commit 38368c09 authored by Sam Kagan's avatar Sam Kagan
Browse files

Fixed formatting, made dedicated Troubleshooting section

parent 08c2f29e
No related branches found
No related tags found
No related merge requests found
Pipeline #11767 passed
......@@ -22,26 +22,62 @@ Initial Setup
make clean
docker build -t ssa-containers.aoc.nrao.edu:5000/ssa-docker/workspaces/base:local -f Dockerfile.base .
docker build -t ssa-containers.aoc.nrao.edu:5000/ssa-docker/workspaces/cache:local -f Dockerfile.cache . --build-arg BASE_IMAGE_TAG=local --build-arg BASE_REGISTRY_URL="ssa-containers.aoc.nrao.edu:5000/ssa-docker/workspaces"
docker compose -f docker-compose.yml -f docker-compose.local.yml up -e TAG=local
docker compose -f docker-compose.yml -f docker-compose.local.yml build -e TAG=local
This will build your local development images and containers
This will build your local development images and containers.
Note: If you notice 'no such file or directory' errors with the docker compose command, try the following:
Then, do the following to allow worklows to execute:
1. Cancel the docker compose command
.. code-block:: sh
ssh-keygen ~/.ssh/condor_transfer
cd workspaces/lustre/aoc/cluster/pipeline/docker/workspaces/sbin/
touch curator
touch ingest
touch productfetcher
Lastly, ``cd`` back to ``workspaces/`` and bring up the local docker-compose stack with:
.. code-block:: sh
docker compose -f docker-compose.local.yml up
Now you should have Workspaces running on your local machine!
You can access the frontend from your browser at ``localhost:4444`` and the database at ``localhost:54322``.
It comes with some sample data to facilitate testing.
For instance, to run a calibration workflow from the form on http://localhost:4444/workspaces/active-requests, use the following query to find suitable ngas_fileset_id's/SDM ids
(`source <https://gitlab.nrao.edu/ssa/workspaces/-/blob/20289da18f92609d104860d0d4fe4811e25d6363/apps/cli/utilities/aat_wrest/aat_wrest/metadata_wrester.py#L52>`_):
.. code-block:: sql
SELECT ngas_fileset_id, e.project_code, p.title, e.starttime, a.firstname, a.lastname, telescope
FROM execution_blocks e
JOIN projects p on e.project_code = p.project_code
JOIN authors a on p.project_code = a.project_code;
Troubleshooting the Initial Setup
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
There are a variety of error scenarios that one can encounter when running the above ``docker compose -f docker-compose.local.yml up`` command for the first time. Some of them are listed below, with suggested solutions.
If you notice an error like `No such file or directory`, try:
1. Cancel the above ``docker compose`` command
2. Delete the ``pgdata`` directory
3. Run ``make reallyclean``
4. Run ``make build`` again, followed by the docker compose command previously mentioned.
4. Run ``make build`` again, followed by the above ``docker compose`` command
If you notice an error like `Failed to stat ~/.ssh/id_rsa: no such file or directory` with the docker compose command, try the following:
If you notice an error like `Failed to stat ~/.ssh/id_rsa: no such file or directory`, try:
1. Cancel the docker compose command
2. Make a dummy file at `~/.ssh/id_rsa`
1. Cancel the docker compose ``up`` command
2. Make a dummy file at ``~/.ssh/id_rsa``
3. Try the next set of steps
If you notice an error like `fatal: could not read from remote repository` with the docker compose command, try the following steps:
If you notice an error like `Fatal: could not read from remote repository`, try:
1. Apply the following patch to `config/htcondor/execute/Dockerfile.local`:
1. Apply the following patch to ``config/htcondor/execute/Dockerfile.local``:
.. code-block:: diff
......@@ -78,31 +114,8 @@ If you notice an error like `fatal: could not read from remote repository` with
# Apply config within the container
RUN ./update-config
2. Run `git clone --depth=1 gitlab@gitlab.nrao.edu:scg/condor_transfer_plugin.git` in `workspaces/`
3. Try the above docker compose command again
Once the docker compose stack comes up successfully, do the following to allow worklows to execute:
1. `ssh-keygen ~/.ssh/condor_transfer`
2. `cd workspaces/lustre/aoc/cluster/pipeline/docker/workspaces/sbin/`
2. `touch curator`
3. `touch ingest`
3. `touch productfetcher`
4. Kill and re-run the above docker compose command
Now you should have Workspaces running on your local machine!
You can access the frontend in your browser at localhost:4444 and the database at localhost:54322.
It comes with some sample data to facilitate testing.
For instance, to run a calibration workflow from the form on `http://localhost:4444/workspaces/active-requests`, use the following query to find suitable ngas_fileset_id's/SDM ids:
.. code-block:: sql
select ngas_fileset_id, e.project_code, p.title, e.starttime, a.firstname, a.lastname, telescope from execution_blocks e
JOIN projects p on e.project_code = p.project_code
JOIN authors a on p.project_code = a.project_code
;
`source <https://gitlab.nrao.edu/ssa/workspaces/-/blob/20289da18f92609d104860d0d4fe4811e25d6363/apps/cli/utilities/aat_wrest/aat_wrest/metadata_wrester.py#L52>`_
2. Run ``git clone --depth=1 gitlab@gitlab.nrao.edu:scg/condor_transfer_plugin.git`` in ``workspaces/``
3. Try the above ``docker compose`` command again
Running Different Docker Setups
~~~~~~~~~~~~~
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment