Skip to content

Instantly share code, notes, and snippets.

@delianides
Forked from rosskukulinski/rax-lb-config.service
Last active August 29, 2015 14:09
Show Gist options
  • Select an option

  • Save delianides/3586454ac8977d369919 to your computer and use it in GitHub Desktop.

Select an option

Save delianides/3586454ac8977d369919 to your computer and use it in GitHub Desktop.
[Unit]
Description=Rackspace LB Configurator
After=docker.service
After=etcd.service
Requires=docker.service
Requires=etcd.service
[Service]
EnvironmentFile=/etc/environment
User=core
Type=simple
TimeoutStartSec=0
ExecStartPre=-/usr/bin/docker kill rax-lb-config
ExecStartPre=-/usr/bin/docker rm rax-lb-config
ExecStartPre=-/usr/bin/docker pull XXXX/rax-lb-config
ExecStart=-/usr/bin/docker run --name rax-lb-config \
-e RAX_ACCOUNT=XXXX \
-e RAX_API=XXXX \
-v /var/log:/var/log \
XXXX/rax-lb-config
ExecStop=-/usr/bin/docker stop rax-lb-config
ExecStop=-/usr/bin/docker kill rax-lb-config
[X-Fleet]
MachineOf=rax-lb-config.timer
[Unit]
Description=Rackspace LB Config Timer
[Timer]
OnCalendar=*:0/2
Persistent=true
[Install]
WantedBy=timers.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment