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 to Docker Compose v2 in docs and workflows #709

Merged
merged 2 commits into from
Aug 2, 2024
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
12 changes: 6 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
# Dockerize
- name: Build docker images
run: |
docker-compose build
docker compose build

- name: Login to Docker Hub
uses: docker/login-action@v3
Expand All @@ -44,13 +44,13 @@ jobs:
export DOCKER_TAG=`git describe --tags --always`

# Tag all images for upload to the registry
docker-compose config | grep 'image: ' | awk -F ': ' '{ print $2 }' | xargs -I {} docker tag {}:latest ${DOCKERHUB_ORG}/{}:latest
docker-compose config | grep 'image: ' | awk -F ': ' '{ print $2 }' | xargs -I {} docker tag {}:latest ${DOCKERHUB_ORG}/{}:${DOCKER_TAG}
docker compose config | grep 'image: ' | awk -F ': ' '{ print $2 }' | xargs -I {} docker tag {}:latest ${DOCKERHUB_ORG}/{}:latest
docker compose config | grep 'image: ' | awk -F ': ' '{ print $2 }' | xargs -I {} docker tag {}:latest ${DOCKERHUB_ORG}/{}:${DOCKER_TAG}

# Upload to docker registry
docker-compose config | grep 'image: ' | awk -F ': ' '{ print $2 }' | xargs -I {} docker push ${DOCKERHUB_ORG}/{}:latest
docker-compose config | grep 'image: ' | awk -F ': ' '{ print $2 }' | xargs -I {} docker push ${DOCKERHUB_ORG}/{}:${DOCKER_TAG}
docker-compose config | grep 'image: ' | awk -F ': ' '{ print $2 }' | xargs -I {} echo ${DOCKERHUB_ORG}/{}:${DOCKER_TAG} pushed
docker compose config | grep 'image: ' | awk -F ': ' '{ print $2 }' | xargs -I {} docker push ${DOCKERHUB_ORG}/{}:latest
docker compose config | grep 'image: ' | awk -F ': ' '{ print $2 }' | xargs -I {} docker push ${DOCKERHUB_ORG}/{}:${DOCKER_TAG}
docker compose config | grep 'image: ' | awk -F ': ' '{ print $2 }' | xargs -I {} echo ${DOCKERHUB_ORG}/{}:${DOCKER_TAG} pushed

wheel:
name: build and deploy to PyPI
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
# Dockerize
- name: Build docker images
run: |
docker-compose build
docker compose build

- name: Login to Docker Hub
uses: docker/login-action@v3
Expand All @@ -47,11 +47,11 @@ jobs:
echo "${DOCKER_TAG}"

# Tag all images for upload to the registry
docker-compose config | grep 'image: ' | awk -F ': ' '{ print $2 }' | xargs -I {} docker tag {}:latest ${DOCKERHUB_ORG}/{}:${DOCKER_TAG}
docker compose config | grep 'image: ' | awk -F ': ' '{ print $2 }' | xargs -I {} docker tag {}:latest ${DOCKERHUB_ORG}/{}:${DOCKER_TAG}

# Upload to docker registry
docker-compose config | grep 'image: ' | awk -F ': ' '{ print $2 }' | xargs -I {} docker push ${DOCKERHUB_ORG}/{}:${DOCKER_TAG}
docker-compose config | grep 'image: ' | awk -F ': ' '{ print $2 }' | xargs -I {} echo ${DOCKERHUB_ORG}/{}:${DOCKER_TAG} pushed
docker compose config | grep 'image: ' | awk -F ': ' '{ print $2 }' | xargs -I {} docker push ${DOCKERHUB_ORG}/{}:${DOCKER_TAG}
docker compose config | grep 'image: ' | awk -F ': ' '{ print $2 }' | xargs -I {} echo ${DOCKERHUB_ORG}/{}:${DOCKER_TAG} pushed

# testing so we can catch any issues before release
# if issues are found, test locally, or copy to pytest.yml for test on push
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Build docker test images
run: |
docker-compose build socs
docker compose build socs
# Integration Tests
- name: Run integration tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ jobs:
# Dockerize
- name: Build docker images
run: |
docker-compose build
docker compose build
2 changes: 1 addition & 1 deletion docs/agents/acti_camera.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Docker Compose
``````````````

The iBootbar Agent should be configured to run in a Docker container. An
example docker-compose service configuration is shown here::
example docker compose service configuration is shown here::

ocs-cameras:
image: simonsobs/socs:latest
Expand Down
4 changes: 2 additions & 2 deletions docs/agents/bluefors_agent.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ An example configuration for your ocs config file::
Docker Compose
``````````````

Example docker-compose configuration::
Example docker compose configuration::

ocs-bluefors:
image: simonsobs/socs:latest
Expand Down Expand Up @@ -145,7 +145,7 @@ tools, i.e. Docker for Windows, if possible) is:
- Run docker terminal (this performs some Virtualbox setup)
- Run docker login
- Clone the ocs-site-configs repo and create a directory for your machine
- Configure ocs/docker-compose files
- Configure ocs/docker compose files
- Make sure your system clock is set to UTC
- Bring up the container(s)

Expand Down
2 changes: 1 addition & 1 deletion docs/agents/cryomech_cpa.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Docker Compose
``````````````

The Cryomech CPA Agent should be configured to run in a Docker container.
An example docker-compose service configuration is shown here::
An example docker compose service configuration is shown here::

ocs-ptc1:
image: simonsobs/socs:latest
Expand Down
2 changes: 1 addition & 1 deletion docs/agents/generator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Docker Compose
``````````````

The Generator Agent should be configured to run in a Docker container. An
example docker-compose service configuration is shown here::
example docker compose service configuration is shown here::

ocs-generator:
image: simonsobs/socs:latest
Expand Down
2 changes: 1 addition & 1 deletion docs/agents/hi6200.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Docker Compose
``````````````

The SCPI PSU Agent should be configured to run in a Docker container.
An example docker-compose service configuration is shown here::
An example docker compose service configuration is shown here::

ocs-hi6200:
image: simonsobs/socs:latest
Expand Down
2 changes: 1 addition & 1 deletion docs/agents/hwp_encoder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Docker Compose
``````````````

The CHWP BBB agent can be run via a Docker container. The following is an
example of what to insert into your institution's docker-compose file.
example of what to insert into your institution's docker compose file.
This again is an example to run multiple agents::

ocs-hwpbbb-agent-HBA0:
Expand Down
2 changes: 1 addition & 1 deletion docs/agents/hwp_gripper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ An example site-config-file block::
Docker Compose
`````````````````````

An example docker-compose configuration::
An example docker compose configuration::

ocs-hwp-gripper:
image: simonsobs/socs:latest
Expand Down
2 changes: 1 addition & 1 deletion docs/agents/hwp_picoscope.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Docker
yourself. A Dockerfile is provided in ``socs/docker/hwp_picoscope/``.

The HWP picoscope agent can be run via a Docker container. The following is an
example of what to insert into your institution's docker-compose file::
example of what to insert into your institution's docker compose file::

picoscope:
image: ocs-hwp-picoscope-agent:latest
Expand Down
2 changes: 1 addition & 1 deletion docs/agents/hwp_pid.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ An example site-config-file block::
Docker Compose
``````````````

An example docker-compose configuration::
An example docker compose configuration::

ocs-hwp-pid:
image: simonsobs/socs:latest
Expand Down
2 changes: 1 addition & 1 deletion docs/agents/hwp_pmx.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ An example site-config-file block::
Docker Compose
``````````````

An example docker-compose configuration::
An example docker compose configuration::

ocs-hwp-pmx:
image: simonsobs/socs:latest
Expand Down
2 changes: 1 addition & 1 deletion docs/agents/ibootbar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Docker Compose
``````````````

The iBootbar Agent should be configured to run in a Docker container. An
example docker-compose service configuration is shown here::
example docker compose service configuration is shown here::

ocs-ibootbar:
image: simonsobs/socs:latest
Expand Down
2 changes: 1 addition & 1 deletion docs/agents/ifm_sbn246_flowmeter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Docker Compose
``````````````

The IFM SBN246 Flowmeter Agent should be configured to run in a Docker
container. An example docker-compose service configuration is shown here::
container. An example docker compose service configuration is shown here::

ocs-flow:
image: simonsobs/socs:latest
Expand Down
2 changes: 1 addition & 1 deletion docs/agents/labjack.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Docker Compose
``````````````

The LabJack Agent should be configured to run in a Docker container. An
example docker-compose service configuration is shown here::
example docker compose service configuration is shown here::

ocs-labjack:
image: simonsobs/socs:latest
Expand Down
2 changes: 1 addition & 1 deletion docs/agents/lakeshore425.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ If you would like to chanege the setting or check the status of the lakeshore 42
Docker Compose
``````````````
The ocs-lakeshore425-agent can be run via a Docker container. The following is an
example of what to insert into your institution's docker-compose file.::
example of what to insert into your institution's docker compose file.::

ocs-lakeshore425-agent:
image: simonsobs/socs:latest
Expand Down
4 changes: 2 additions & 2 deletions docs/agents/magpie.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ frame is received.
Configuration File Examples
------------------------------

Below are example docker-compose and ocs configuration files for running the
Below are example docker compose and ocs configuration files for running the
magpie agent.

OCS Site Config
Expand Down Expand Up @@ -67,7 +67,7 @@ fake data by adding the ``--fake-data`` argument.
Docker Compose
``````````````````

Below is an example docker-compose entry for running a magpie corresponding to
Below is an example docker compose entry for running a magpie corresponding to
crate-id 1 and slot 2. If crossbar is being run on a different server, you'll
have to modify the ``site-hub`` and ``site-http`` args accordingly::

Expand Down
2 changes: 1 addition & 1 deletion docs/agents/meinberg_m1000_agent.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Docker Compose
``````````````

The Meinberg M1000 Agent should be configured to run in a Docker container. An
example docker-compose service configuration is shown here::
example docker compose service configuration is shown here::

ocs-m1000:
image: simonsobs/socs:latest
Expand Down
2 changes: 1 addition & 1 deletion docs/agents/meinberg_syncbox_agent.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Docker Compose
``````````````

The Meinberg Syncbox Agent should be configured to run in a Docker container. An
example docker-compose service configuration is shown here::
example docker compose service configuration is shown here::

ocs-timing-syncbox:
image: simonsobs/socs:latest
Expand Down
2 changes: 1 addition & 1 deletion docs/agents/pfeiffer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Docker Compose
``````````````

The Pfeiffer Agent can be run via a Docker container. The following is an
example of what to insest into your institution's docker-compose file. ::
example of what to insest into your institution's docker compose file. ::


ocs-pfeiffer:
Expand Down
2 changes: 1 addition & 1 deletion docs/agents/pfeiffer_tc400.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ block using all of the available arguments::
Docker Compose
``````````````
The agent should be configured to run in a Docker container. An
example docker-compose service configuration is shown here::
example docker compose service configuration is shown here::

ocs-pfeiffer-turboA:
image: simonsobs/socs:latest
Expand Down
2 changes: 1 addition & 1 deletion docs/agents/pysmurf-controller.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ mount in a development copy of SODETLIB so that we have the most recent version
without having to rebuild this container.


The docker-compose for the pysmurf-controller that publishes to a container
The docker compose for the pysmurf-controller that publishes to a container
named ``ocs-pysmurf-monitor`` might look something like::

ocs-pysmurf:
Expand Down
4 changes: 2 additions & 2 deletions docs/agents/pysmurf-monitor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Example site-config entry::

Docker Compose
````````````````
An example docker-compose entry might look like::
An example docker compose entry might look like::

ocs-pysmurf-monitor:
image: simonsobs/socs:latest
Expand All @@ -48,7 +48,7 @@ An example docker-compose entry might look like::
- /data:/data

Where SOCS_TAG and CB_HOST are set in the ``.env`` file in the same dir as the
docker-compose file.
docker compose file.

Description
-----------
Expand Down
2 changes: 1 addition & 1 deletion docs/agents/scpi_psu.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Docker Compose
``````````````

The SCPI PSU Agent should be configured to run in a Docker container.
An example docker-compose service configuration is shown here::
An example docker compose service configuration is shown here::

ocs-psuK:
image: simonsobs/socs:latest
Expand Down
4 changes: 2 additions & 2 deletions docs/agents/smurf_crate_monitor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ steps:
4. Copy ocs-user ssh key using 'ssh-copy-id'

You also need to add the ocs-base anchor and mount the home directory of
the ocs-user in your 'docker-compose' file, see below for an example.
the ocs-user in your 'docker compose' file, see below for an example.

The second argument, 'crate-id', is just an identifier for your feed names
to distinguish between identical sensors on different crates.
Expand All @@ -64,7 +64,7 @@ Docker Compose
``````````````

The SMuRF Crate Agent should be configured to run in a Docker container. An
example docker-compose service configuration is shown here::
example docker compose service configuration is shown here::

ocs-smurf-crate-monitor:
<<: *ocs-base
Expand Down
4 changes: 2 additions & 2 deletions docs/agents/smurf_timing_card.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ timing software.
Configuration File Examples
------------------------------
Below are configuration examples for the ocs config file and for the
docker-compose service.
docker compose service.

OCS Site Config
`````````````````
Expand All @@ -36,7 +36,7 @@ False by default.

Docker Compose
````````````````
Below is an example of the docker-compose service for the timing card agent::
Below is an example of the docker compose service for the timing card agent::

ocs-smurf-timing-card:
image: simonsobs/socs:latest
Expand Down
2 changes: 1 addition & 1 deletion docs/agents/suprsync.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ transferred files after 7 days, or 604800 seconds::
Docker Compose
``````````````

Below is a sample docker-compose entry for the SupRsync agents.
Below is a sample docker compose entry for the SupRsync agents.
Because the data we'll be transfering is owned by the ``cryo:smurf`` user, we
set that as the user of the agent so it has the correct permissions. This is
only possible because the ``cryo:smurf`` user is already built into the
Expand Down
2 changes: 1 addition & 1 deletion docs/agents/synacc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Docker Compose
``````````````

The Synaccess Agent should be configured to run in a Docker container.
An example docker-compose service configuration is shown here::
An example docker compose service configuration is shown here::

ocs-synacc:
image: simonsobs/socs:latest
Expand Down
2 changes: 1 addition & 1 deletion docs/agents/tektronix3021c.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Docker Compose
``````````````

The Tektronix AWG Agent should be configured to run in a Docker container.
An example docker-compose service configuration is shown here::
An example docker compose service configuration is shown here::

ocs-psuK:
image: simonsobs/socs:latest
Expand Down
2 changes: 1 addition & 1 deletion docs/agents/ucsc_radiometer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Docker Compose
``````````````

The UCSC Radiometer Agent should be configured to run in a Docker container. An
example docker-compose service configuration is shown here::
example docker compose service configuration is shown here::

ocs-ucsc-radiometer:
image: simonsobs/socs:latest
Expand Down
2 changes: 1 addition & 1 deletion docs/agents/ups.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Docker Compose
``````````````

The UPS Agent should be configured to run in a Docker container. An
example docker-compose service configuration is shown here::
example docker compose service configuration is shown here::

ocs-ups:
image: simonsobs/socs:latest
Expand Down
2 changes: 1 addition & 1 deletion docs/agents/vantage_pro2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Docker Compose
``````````````

The Vantage Pro2 Agent should be configured to run in a Docker container. An
example docker-compose service configuration is shown here::
example docker compose service configuration is shown here::

ocs-vantage-pro2:
image: simonsobs/socs:latest
Expand Down
2 changes: 1 addition & 1 deletion docs/agents/wiregrid_actuator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ An example site-config-file block::
Docker Compose
``````````````

An example docker-compose configuration::
An example docker compose configuration::

ocs-wgactuator-agent:
image: simonsobs/ocs-wgactuator-agent:latest
Expand Down
2 changes: 1 addition & 1 deletion docs/agents/wiregrid_encoder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The port number is determined in the script running in the BeagleBoneBlack.
Docker Compose
``````````````

An example docker-compose configuration::
An example docker compose configuration::

ocs-wgencoder-agent:
image: simonsobs/socs:latest
Expand Down
Loading