Last active
February 18, 2016 16:25
-
-
Save TanyaCouture/7e2cbc90293081c2adf7 to your computer and use it in GitHub Desktop.
etcd-package-plans
This file contains hidden or 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
`mantl-etcd` | |
defaults/main.yml | |
// variables | |
files/etcd-service-start.sh | |
files/etc-service.json | |
handlers/main.yml | |
// sudo systemctl restart etcd | |
// sudo systmectl restart skydns | |
meta/main.yml | |
// dependent on handlers role | |
tasks/main.yml | |
// sudo install version of etcd specified in variables | |
10// generate systemd environment file | |
// copy /etcd.conf.j2 /etc/etcd.conf | |
// chmod 0644 | |
// reload systemd | |
// restart etcd | |
solutions: | |
sudo cp -p templates/etcd.conf /etc/etcd.conf | |
sudo chmod 0644 /etc/etcd.conf | |
sudo systemctl daemon-reload | |
sudo systemctl restart etcd | |
24// install etcd launch script | |
// sudo | |
// copy etcd-service-start.sh to /usr/local/bin | |
// chmod 0755 | |
//restart etcd | |
solutions: | |
sudo cp etcd-service-start.sh /usr/local/bin/ | |
sudo chmod 0755 /usr/local/bin/etcd-service-start.sh | |
sudo systemctl restart etcd | |
35// create directory /etc/systemd/system/etcd.service.d | |
solutions: | |
sudo mkdir -p /etc/systemd/system/etcd.service.d | |
43// create local etcd service override | |
// // gives the config these contents | |
// [Service] | |
ExecStart= | |
ExecStart=/usr/local/bin/etcd-service-start.sh | |
to | |
/etc/systemd/system/etcd.service.d/local.conf | |
56// install consul check script | |
// when consul_dc_group is defined | |
// copy consul-check-etcd-member to /usr/local/bin | |
// chmod 0755 | |
solutions: | |
//when consul_dc_group is defined | |
sudo cp consul-check-etcd-member /usr/local/bin/ | |
chmod 0755 /usr/local/bin/consul-check-etcd-member | |
66// when consul_dc_group is defined | |
// sudo copy etcd-service.json to /etc/consul | |
// reload consul | |
solutions: | |
// when consul_dc_group is defined | |
sudo cp etcd-service.json /etc/consul/ | |
sudo systemctl reload consul | |
77// enable and start etcd service | |
solutions: | |
sudo systemctl enable etcd 2>/dev/null | |
sudo systemctl start etcd | |
86 // when dns_setup is defined include skydns.yml | |
89 // meta: flush_handlers | |
/tasks/skydns.yml | |
// sudo | |
// cp skydns.service.j2 /usr/lib/systemd/system/skydns.service | |
// chmod 0644 | |
// reload systemd | |
// restart skydns | |
solutions: | |
sudo cp skydns.service /usr/lib/systemd/system/skydns.service | |
sudo chmod 0644 /usr/lib/systemd/system/skydns.service | |
sudo systemctl daemon-reload | |
sudo systemctl restart skydns | |
// sudo | |
// cp skydns.env.j2 /etc/default/skydns.env | |
// mode 0644? | |
solutions: | |
sudo cp skydns.env /etc/default/ | |
sudo chmod 0644 /etc/default/skydns.env | |
/templates/ | |
// configurations |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is progress! There are a few comments I'd like to make here, and I can be corrected if need be.
systemctl daemon-reload
andsystemctl restart
. We could squash these into one set of calls at the end. But that can be for a second draft.j2
exts are templates that can't just be copied over. These will have to be translated to consul template files, and they will be installed in/etc/consul-template/templates
sudo
is required for scripts within a package, since I think that all package commands are executed with escalated permissions anyway/etc/mantl
as files. We should keep that in mind as we build out the packages