Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
a20ca78f
Commit
a20ca78f
authored
Jan 29, 2015
by
Brendan Burns
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update etcd to version 2.0.0
parent
0345211e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
6 deletions
+22
-6
init.sls
cluster/saltbase/salt/etcd/init.sls
+2
-2
initd
cluster/saltbase/salt/etcd/initd
+3
-1
etcd.sh
hack/lib/etcd.sh
+16
-2
install-etcd.sh
hack/travis/install-etcd.sh
+1
-1
No files found.
cluster/saltbase/salt/etcd/init.sls
View file @
a20ca78f
...
@@ -10,10 +10,10 @@
...
@@ -10,10 +10,10 @@
# shasum <tar>
# shasum <tar>
# 6. Update this file with new tar version and new hash
# 6. Update this file with new tar version and new hash
{% set etcd_version="v
0.4.6
" %}
{% set etcd_version="v
2.0.0
" %}
{% set etcd_tar_url="https://storage.googleapis.com/kubernetes-release/etcd/etcd-%s-linux-amd64.tar.gz"
{% set etcd_tar_url="https://storage.googleapis.com/kubernetes-release/etcd/etcd-%s-linux-amd64.tar.gz"
| format(etcd_version) %}
| format(etcd_version) %}
{% set etcd_tar_hash="sha1=
5db514e30b9f340eda00671230d5136855ae14d7
" %}
{% set etcd_tar_hash="sha1=
b3cd41d1748bf882a58a98c9585fd5849b943811
" %}
etcd-tar:
etcd-tar:
archive:
archive:
...
...
cluster/saltbase/salt/etcd/initd
View file @
a20ca78f
...
@@ -16,7 +16,9 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin
...
@@ -16,7 +16,9 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC
=
"The etcd key-value share configuration service"
DESC
=
"The etcd key-value share configuration service"
NAME
=
etcd
NAME
=
etcd
DAEMON
=
/usr/local/bin/
$NAME
DAEMON
=
/usr/local/bin/
$NAME
DAEMON_ARGS
=
"-peer-addr
$HOSTNAME
:7001 -name
$HOSTNAME
"
# DAEMON_ARGS="-peer-addr $HOSTNAME:7001 -name $HOSTNAME"
host_ip
=
$(
hostname
-i
)
DAEMON_ARGS
=
"-addr
${
host_ip
}
:4001 -bind-addr
${
host_ip
}
:4001 -data-dir /var/etcd -initial-advertise-peer-urls http://
${
HOSTNAME
}
:2380 -name
${
HOSTNAME
}
-initial-cluster
${
HOSTNAME
}
=http://
${
HOSTNAME
}
:2380"
DAEMON_LOG_FILE
=
/var/log/
$NAME
.log
DAEMON_LOG_FILE
=
/var/log/
$NAME
.log
PIDFILE
=
/var/run/
$NAME
.pid
PIDFILE
=
/var/run/
$NAME
.pid
SCRIPTNAME
=
/etc/init.d/
$NAME
SCRIPTNAME
=
/etc/init.d/
$NAME
...
...
hack/lib/etcd.sh
View file @
a20ca78f
...
@@ -30,12 +30,26 @@ kube::etcd::start() {
...
@@ -30,12 +30,26 @@ kube::etcd::start() {
exit
1
exit
1
fi
fi
version
=
$(
etcd
-version
|
cut
-d
" "
-f
3
)
if
[[
"
${
version
}
"
<
"2.0.0"
]]
;
then
kube::log::usage
"etcd version 2.0.0 or greater required."
exit
1
fi
# Start etcd
# Start etcd
ETCD_DIR
=
$(
mktemp
-d
-t
test-etcd.XXXXXX
)
ETCD_DIR
=
$(
mktemp
-d
-t
test-etcd.XXXXXX
)
etcd
-name
test
-data-dir
${
ETCD_DIR
}
-addr
${
host
}
:
${
port
}
>
/dev/null 2>/dev/null &
kube::log::usage
"etcd -data-dir
${
ETCD_DIR
}
-addr
${
host
}
:
${
port
}
>/dev/null 2>/dev/null"
etcd
-data-dir
${
ETCD_DIR
}
-addr
${
host
}
:
${
port
}
>
/dev/null 2>/dev/null &
ETCD_PID
=
$!
ETCD_PID
=
$!
kube::util::wait_for_url
"http://
${
host
}
:
${
port
}
/v2/keys/"
"etcd: "
echo
"Waiting for etcd to come up."
while
true
;
do
if
curl
-L
http://127.0.0.1:4001/v2/keys/test
-XPUT
-d
value
=
"test"
;
then
break
fi
done
kube::util::wait_for_url
"http://
${
host
}
:
${
port
}
/v2/keys/test"
"etcd: "
}
}
kube::etcd::cleanup
()
{
kube::etcd::cleanup
()
{
...
...
hack/travis/install-etcd.sh
View file @
a20ca78f
...
@@ -20,7 +20,7 @@ set -o pipefail
...
@@ -20,7 +20,7 @@ set -o pipefail
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/../..
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/../..
ETCD_VERSION
=
${
ETCD_VERSION
:-
v
0
.4.6
}
ETCD_VERSION
=
${
ETCD_VERSION
:-
v
2
.0.0
}
cd
"
${
KUBE_ROOT
}
/third_party"
cd
"
${
KUBE_ROOT
}
/third_party"
curl
-sL
https://github.com/coreos/etcd/releases/download/
${
ETCD_VERSION
}
/etcd-
${
ETCD_VERSION
}
-linux-amd64
.tar.gz
\
curl
-sL
https://github.com/coreos/etcd/releases/download/
${
ETCD_VERSION
}
/etcd-
${
ETCD_VERSION
}
-linux-amd64
.tar.gz
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment