You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Environment expansion is only supported in Exec= lines, and that's documented. the env vars are determined only at execution time, hence this is unlikely to be changed. Also, we really don#t want to turn unit files into a template language, hence we are unlikely to extend any evaluation logic much further anyway...
if you want a template language, consider using one, like shell or so, but unit files are not it, and that's documented.
in systemd perspective I understand the time when service is deployed and service is running
in fleet perspective it should allow making systemd services as template allow matching services on configurable hosts.
Example: I have 3 different lab all running same .services but each has its own top level domain
host01-il-private.saas.lab
host01-il-devops.saas.lab
host01-il-qa.saas.lab
Q: how can i create a service that will support each lab - same time keeping it simple
For that I wanted to create env.sh with TLD=private.saas.lab or devops.saas.lab or qa.saas.lab
Hi All,
I have a problem where i want to control where systemd service (fleet service) is running on multiple hosts cluster.
Problem:
MachineMetadata in X-Fleet block does not support environment variable exported in EnvironmentFile under Service block
Example: docker secure registry .service file
[Unit]
Description=secure registry service
After=docker.service
Requires=docker.service
[Service]
TimeoutStartSec=0
EnvironmentFile=/home/core/trust_authority/bin/env.sh
ExecStartPre=-/usr/bin/docker kill secure-registry
ExecStartPre=-/usr/bin/docker rm secure-registry
ExecStart=/usr/bin/docker run --rm -p 5000:5000 -v ${TA_DATA_PATH}/secure-registry/:/var/lib/registry -v ${TA_CONTAINER_PATH}/secure-registry/config.yml:/go/src/github.com/docker/distribution/cmd/registry/config.yml -v ${TA_CONTAINER_PATH}/secure-registry/certs.d/secure-registry:/certs -e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/server.crt -e REGISTRY_HTTP_TLS_KEY=/certs/server.key -e SEARCH_BACKEND=sqlalchemy -e SQLALCHEMY_INDEX_DATABASE=sqlite:////tmp/docker-registry.db --name secure-registry secure-registry-${TA_DOMAIN}:5000/secure-registry
ExecStop=/usr/bin/bash -c "
/usr/bin/docker stop secure-registry;
"
[X-Fleet]
MachineMetadata=hostname=host01-il-${TA_DOMAIN}
Conflicts=secure-registry@*.service
The text was updated successfully, but these errors were encountered: