Created
January 22, 2015 13:57
-
-
Save cgswong/5716fddbcfb76628faa1 to your computer and use it in GitHub Desktop.
Consul discovery service for running Consul server via fleetctl command within unit file (still work in progress as this is not working)
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
- name: consul-discovery.service | |
command: start | |
content: | | |
[Unit] | |
Description=Enable the consul bootstrap process | |
# Requirements | |
Requires=docker.service | |
Requires=fleet.service | |
# Dependency ordering and binding | |
After=docker.service | |
After=fleet.service | |
ConditionFileNotEmpty=/etc/systemd/system/[email protected] | |
[Service] | |
# Get CoreOS environmental variables | |
EnvironmentFile=/etc/environment | |
ExecStart=/usr/bin/fleetctl start $(eval echo "consul-server@{1..3}.service") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment