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

Make EPICS CA PORTS and the network subnet configurable #16

Merged
merged 10 commits into from
Dec 3, 2024

Conversation

gilesknap
Copy link
Member

@gilesknap gilesknap commented Dec 2, 2024

Intro

This allows a user to set the range of ports and the network subnet that is used by the compose project.

Benefits

Downsides

there is more setup in environment.sh and perhaps it is less legible as a result EDIT: this downside is fixed by #18

@gilesknap
Copy link
Member Author

gilesknap commented Dec 2, 2024

This is a refresh of the example-services project that makes it fully configurable so that it can use unique PORTS and container network subnet.

It's made things a tiny bit more convoluted and has added a few lines of funky bash to environment.sh. Including bash arithmetic evaluation.

@coretl @DiamondJoseph your choices are:-

  • abandon this as too obtuse and leave it in a branch
  • merge it into main and keep it as an example only
  • merge it and apply the same changes to the services-template-compose copier template

The final choice means that all future compose beamlines would look similar, including those made in the tutorials.

@gilesknap
Copy link
Member Author

gilesknap commented Dec 3, 2024

Why am I hesitant about this change?

Because it feels a little off that there is code outside of the compose.yml files to make it work.

Up until now the only reason for environment.sh was to set a UID:GID for starting phoebus and that was just because of podman/docker differences.

Now I have extended the need for environment.sh and it is adding a prior templating step via sed. This is required because pvagw and phoebus cannot be configured by environment variables as far as I can tell.

I could put that templating step inside the phoebus and pvagw containers but that feels more unwieldy (because each time I think of a new thing to make configurable I need to rebuild the containers)

UPDATE: I have removed all of the additions to environment.sh and used a .env file plus an init container. I think this looks neater. See #18

@gilesknap gilesknap merged commit b5593a6 into tidy-up Dec 3, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants