Last active
February 4, 2016 19:25
-
-
Save errordeveloper/27ef79e5b634065dc91f to your computer and use it in GitHub Desktop.
systemd units for Weave Net
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
#After=install-weave.service | |
After=docker.service | |
Description=Weave Network Router | |
Documentation=http://docs.weave.works/ | |
Requires=docker.service | |
Requires=install-weave.service | |
[Service] | |
TimeoutStartSec=0 | |
EnvironmentFile=-/etc/weave.%H.env | |
EnvironmentFile=-/etc/weave.env | |
ExecStartPre=/usr/local/bin/weave launch-router $WEAVE_PEERS | |
ExecStart=/usr/bin/docker attach weave | |
Restart=on-failure | |
ExecStop=/usr/local/bin/weave stop-router | |
[Install] | |
WantedBy=weave-network.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is optional, if you need to use `weave expose` | |
[Unit] | |
After=install-weave.service | |
After=weave.service | |
After=docker.service | |
Documentation=http://docs.weave.works/ | |
Requires=docker.service | |
Requires=install-weave.service | |
Requires=weave.service | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes | |
TimeoutStartSec=0 | |
EnvironmentFile=-/etc/weave.%H.env | |
EnvironmentFile=-/etc/weave.env | |
ExecStart=/usr/local/bin/weave expose | |
ExecStop=/usr/local/bin/weave hide | |
[Install] | |
WantedBy=weave-network.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Weave Network Setup Complete | |
Documentation=man:systemd.special(7) | |
RefuseManualStart=no | |
After=network-online.target | |
[Install] | |
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WEAVEPROXY_ARGS="-H 0.0.0.0:12375" | |
# WEAVE_PEERS="--init-peer-count <X> <head-node-name-or-addr>" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
#After=install-weave.service | |
After=docker.service | |
Description=Weave proxy for Docker API | |
Documentation=http://docs.weave.works/ | |
Requires=docker.service | |
Requires=install-weave.service | |
[Service] | |
EnvironmentFile=-/etc/weave.%H.env | |
EnvironmentFile=-/etc/weave.env | |
ExecStartPre=/usr/local/bin/weave launch-proxy $WEAVEPROXY_ARGS | |
ExecStart=/usr/bin/docker attach weaveproxy | |
Restart=on-failure | |
ExecStop=/usr/local/bin/weave stop-proxy | |
[Install] | |
WantedBy=weave-network.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment