fix(dev-db/etcd): Remove coreos-c10n, it is moving to coreos-init

This commit is contained in:
Michael Marineau 2013-08-11 13:55:43 -04:00
parent 3e42b6aded
commit 97c7997850
7 changed files with 5 additions and 53 deletions

View File

@ -31,10 +31,8 @@ src_compile() {
src_install() {
dobin ${S}/${PN}
dobin ${FILESDIR}/coreos-c10n
dobin ${FILESDIR}/etcd-bootstrap
dobin ${FILESDIR}/etcd-pre-exec
dobin ${FILESDIR}/block-until-url
keepdir /var/lib/${PN}
fowners etcd:etcd /var/lib/${PN}

View File

@ -30,10 +30,8 @@ src_compile() {
src_install() {
dobin ${S}/${PN}
dobin ${FILESDIR}/coreos-c10n
dobin ${FILESDIR}/etcd-bootstrap
dobin ${FILESDIR}/etcd-pre-exec
dobin ${FILESDIR}/block-until-url
keepdir /var/lib/${PN}
fowners etcd:etcd /var/lib/${PN}

View File

@ -1,7 +0,0 @@
#!/bin/bash
URL="$1"
CMD="curl -s --capath /usr/share/coreos-ca-certificates/ --capath /etc/ssl/certs/ $URL"
while ($CMD > /dev/null); [ $? -ne 0 ];
do sleep .5; done

View File

@ -1,40 +0,0 @@
#!/bin/bash
VIRT=$(coreos-detect-virt)
if [ "${VIRT}" != "ec2" ]; then
# all of this is currently dependent on ec2, we'll refactor as we add more images
exit 0
fi
C10N_ENDPOINT=https://core-api.appspot.com/v1/c10n/group
META_URL="http://169.254.169.254/latest"
ETCD_BOOTSTRAP="/var/run/etcd/bootstrap.config"
/usr/bin/block-until-url $C10N_ENDPOINT
/usr/bin/block-until-url $META_URL
USER_DATA=$(curl -s --fail $META_URL/user-data)
if [ $? -eq 0 ] && [ ! -z "$USER_DATA" ]; then
URL=$USER_DATA
echo $URL | grep -q '^https://' || (echo Coordination URL requires valid SSL; exit 1)
TMP=`mktemp`
curl -s "$USER_DATA/raw" > $TMP
# validate ssh key
ssh-keygen -l -f $TMP > /dev/null 2>&1
if [ $? -eq 0 ]; then
cat $TMP >> /home/core/.ssh/authorized_keys
echo "SSH key updated"
chown -R core: /home/core/.ssh/
else
echo "Not a valid ssh key"
fi
fi
IP=$(curl -s $META_URL/meta-data/local-ipv4)
curl -s $C10N_ENDPOINT -d "c10n_url=$URL" -d"ip_list=$IP" > $ETCD_BOOTSTRAP

View File

@ -10,8 +10,6 @@ if [ "${VIRT}" != "ec2" ]; then
exec /usr/bin/etcd -v -d $STATE
fi
/usr/bin/coreos-c10n
META_URL="http://169.254.169.254/latest"
MY_IP=$(curl -s $META_URL/meta-data/local-ipv4)
BOOTSTRAP="/var/run/etcd/bootstrap.config"

View File

@ -1,3 +1,8 @@
[Unit]
Description=etcd
Wants=coreos-c10n.service
After=coreos-c10n.service
[Service]
User=etcd
PermissionsStartOnly=true