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

fix readme for ec->dc #9

Merged
merged 1 commit into from
Sep 2, 2024
Merged
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
41 changes: 28 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,22 @@ First install Docker and Docker Compose. See https://docs.docker.com/compose/ins

At DLS you need only run `module load docker-compose` to enable `docker compose` backed by the podman container engine. (see the end of this page if you get errors)

Setup command line completion for docker compose (optional):
Setup command line completion for docker compose (optional). Note - using the short alias `dc` for `docker compose` will most likely not work with auto completion in bash. Using zsh instead of bash will give you completion even with aliasing.

Command line completion is very helpful as it will help you find the correct service names and commands.

Command line completion for docker:
```bash
# these steps will make cli completion work for zsh
mkdir -p ~/.oh-my-zsh/completions
docker completion zsh > ~/.oh-my-zsh/completions/_docker

# these steps will make cli completion work for bash
mkdir -p ~/.local/share/bash-completion/completions
docker completion bash > ~/.local/share/bash-completion/completions/docker
```

Command line completion for podman:
```bash
# these steps will make cli completion work for zsh
mkdir -p ~/.oh-my-zsh/completions
Expand All @@ -31,7 +46,7 @@ To launch a test environment on a workstation, including phoebus perform the fol
git clone https://github.com/epics-containers/example-services.git
cd example-services
source ./environment.sh
ec up -d
dc up -d
```

NOTE: -d detaches from the containers. You may omit this if you would prefer to follow the logs of all the containers - these combinded logs include a colour coded prefix to make them more legible.
Expand All @@ -45,35 +60,35 @@ This will launch the following containers:


## Experimenting
You can now try the following (we use `ec` as a short alias for `docker compose`):
You can now try the following (we use `dc` as a short alias for `docker compose`):

```bash
# use caget/put locally
export EPICS_CA_ADDR_LIST=127.0.0.1
caget BL01T-DI-CAM-01:DET:Acquire_RBV

# OR if you don't have caget/put locally then use one of the containers instead:
ec exec bl01t-ea-test-01 bash
dc exdc bl01t-ea-test-01 bash
export EPICS_CA_ADDR_LIST=127.0.0.1
caget BL01T-DI-CAM-01:DET:Acquire_RBV

# attach to logs of a service (-f follows the logs, use ctrl-c to exit)
ec logs bl01t-di-cam-01 -f
dc logs bl01t-di-cam-01 -f
# stop a service
ec stop bl01t-di-cam-01
dc stop bl01t-di-cam-01
# restart a service
ec start bl01t-di-cam-01
dc start bl01t-di-cam-01
# attach to a service stdio
ec attach bl01t-di-cam-01
# exec a process in a service
ec exec bl01t-di-cam-01 bash
dc attach bl01t-di-cam-01
# exdc a process in a service
dc exdc bl01t-di-cam-01 bash
# delete a service (deletes the container)
ec down bl01t-di-cam-01
dc down bl01t-di-cam-01
# create and launch a single service (plus its dependencies)
ec up bl01t-di-cam-01 -d
dc up bl01t-di-cam-01 -d
# close down and delete all the containers
# volumes are not deleted to preserve the data
ec down
dc down
```

# Deploy To Beamline Servers
Expand Down