Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: no references to 'etcd-member.service' for etcd3 on container linux #7436

Closed
euank opened this issue Mar 7, 2017 · 4 comments
Labels

Comments

@euank
Copy link

@euank euank commented Mar 7, 2017

As best I can tell, the recommended way to run etcd3 on recent Container Linux (by CoreOS) versions is using the etcd-member service: https://github.com/coreos/coreos-overlay/blob/build-1325/app-admin/etcd-wrapper/files/etcd-member.service

I can't find any etcd documentation on doing that.

The documentation also doesn't point to config-transpiler's etcd sugar, but really it should mention both how to add the service on an existing node, and how to provision a new one with ct.
We can start with just the etcd-member docs.

cc @crawford

@euank

This comment has been minimized.

Copy link
Author

@euank euank commented Mar 7, 2017

The document https://coreos.com/etcd/docs/latest/op-guide/container.html does exist.

I don't believe there are any links to it though, so it's just something you have to either find on github or know exists somehow.
It's not Container Linux specific though.

@gyuho

This comment has been minimized.

Copy link
Member

@gyuho gyuho commented Mar 7, 2017

Yeah the container doc only covers general usage. On Container Linux, you can do

# to update etcd-member service file
cat > /tmp/override-my-etcd-1.conf <<EOF
[Service]
Environment="ETCD_IMAGE_TAG=v3.1.0"
Environment="ETCD_DATA_DIR=/var/lib/etcd"
Environment="ETCD_SSL_DIR=/etc/ssl/certs"
Environment="ETCD_OPTS=--name my-etcd-1 \
    --listen-client-urls https://10.240.0.1:2379 \
    --advertise-client-urls https://10.240.0.1:2379 \
    --listen-peer-urls https://10.240.0.1:2380 \
    --initial-advertise-peer-urls https://10.240.0.1:2380 \
    --initial-cluster my-etcd-1=https://10.240.0.1:2380,my-etcd-2=https://10.240.0.2:2380,my-etcd-3=https://10.240.0.3:2380 \
    --initial-cluster-token my-etcd-token \
    --initial-cluster-state new \
    --client-cert-auth \
    --trusted-ca-file /etc/ssl/certs/etcd-root-ca.pem \
    --cert-file /etc/ssl/certs/my-etcd-1.pem \
    --key-file /etc/ssl/certs/my-etcd-1-key.pem \
    --peer-client-cert-auth \
    --peer-trusted-ca-file /etc/ssl/certs/etcd-root-ca.pem \
    --peer-cert-file /etc/ssl/certs/my-etcd-1.pem \
    --peer-key-file /etc/ssl/certs/my-etcd-1-key.pem \
    --auto-compaction-retention 1"
EOF
sudo mkdir -p /etc/systemd/system/etcd-member.service.d
sudo mv /tmp/override-my-etcd-1.conf /etc/systemd/system/etcd-member.service.d/override.conf

# to check service-file-override status
sudo systemd-delta --type=extended

# to start service
sudo systemctl daemon-reload
sudo systemctl enable etcd-member.service
sudo systemctl start etcd-member.service

This works in alpha channel. But not sure about other channels.
@crawford should know better?

@crawford

This comment has been minimized.

Copy link
Contributor

@crawford crawford commented Mar 7, 2017

We should document this. Would you mind adding it to coreos/doc?

@gyuho gyuho added the area/doc label Mar 7, 2017
@euank euank changed the title docs: no referenced to 'etcd-member.service' for etcd3 on container linux docs: no references to 'etcd-member.service' for etcd3 on container linux Mar 7, 2017
@xiang90

This comment has been minimized.

Copy link
Contributor

@xiang90 xiang90 commented Mar 9, 2017

I closed this since it is tracked here: coreos/docs#1016

@xiang90 xiang90 closed this Mar 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants
You can’t perform that action at this time.