Skip to content
Snippets Groups Projects

Update dockerized setup docs

Merged Sam Kagan requested to merge update-dockerized-setup-docs into main
3 unresolved threads
@@ -20,18 +20,101 @@ Initial Setup
.. code-block:: sh
make clean
docker build -t brooks.aoc.nrao.edu:5000/ssa-docker/workspaces/base:local -f Dockerfile.base .
docker build -t brooks.aoc.nrao.edu:5000/ssa-docker/workspaces/cache:local -f Dockerfile.cache . --build-arg BASE_IMAGE_TAG=local --build-arg BASE_REGISTRY_URL="brooks.aoc.nrao.edu:5000/ssa-docker/workspaces"
docker compose -f docker-compose.yml -f docker-compose.local.yml up -e TAG=local
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 build -e TAG=local
Please register or sign in to reply
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
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`, try:
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`, try:
1. Apply the following patch to ``config/htcondor/execute/Dockerfile.local``:
.. code-block:: diff
--- a/config/htcondor/execute/Dockerfile.local
+++ b/config/htcondor/execute/Dockerfile.local
@@ -1,8 +1,6 @@
# Condor execute node image
FROM htcondor/execute:9.0.6-el7
-RUN yum install -y git
-
# Create vlapipe group
RUN groupadd --gid 6000 vlapipe && \
# Create vlapipe user placed in vlapipe group
@@ -20,19 +18,7 @@ COPY docker.properties /home/casa/capo/docker.properties
ENV CAPO_PROFILE "docker"
-# Add gitlab as a known SSH host
-RUN mkdir -p ~/.ssh && \
- chmod 0700 ~/.ssh && \
- ssh-keyscan gitlab.nrao.edu > ~/.ssh/known_hosts
-
-# Link to the host's SSH key and clone over SSH (non-public repo)
-RUN --mount=type=secret,id=host_ssh_key,required \
- ln -s /run/secrets/host_ssh_key ~/.ssh/id_rsa \
- && git clone --depth=1 gitlab@gitlab.nrao.edu:scg/condor_transfer_plugin.git \
- && cp condor_transfer_plugin/nraorsync_plugin.py /usr/libexec/condor/
-
-# Remove SSH stuff
-RUN rm -rf ~/.ssh/
+COPY ./condor_transfer_plugin/nraorsync_plugin.py /usr/libexec/condor/
# 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
Please register or sign in to reply
Running Different Docker Setups
~~~~~~~~~~~~~
Loading