Created
May 12, 2018 08:24
-
-
Save atotto/5465ef3a40bfc5431bfe62a3c706b187 to your computer and use it in GitHub Desktop.
influxdb gce deploy with cloud-init
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
#cloud-config | |
#see: https://cloud.google.com/container-optimized-os/docs/how-to/create-configure-instance | |
write_files: | |
- path: /etc/systemd/system/influxdb.service | |
permissions: 0644 | |
owner: root | |
content: | | |
[Unit] | |
Description=Start influxdb docker container | |
[Service] | |
ExecStart=/usr/bin/docker run --rm --name influxdb -p 80:8086 influxdb:latest | |
ExecStop=/usr/bin/docker stop influxdb | |
ExecStopPost=/usr/bin/docker rm influxdb | |
runcmd: | |
- systemctl daemon-reload | |
- systemctl start influxdb.service |
Author
atotto
commented
May 12, 2018
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment