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
694cda4a
Commit
694cda4a
authored
Feb 29, 2016
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #22037 from ixdy/etcd-version-check
Auto commit by PR queue bot
parents
9a4171c9
7adaf80c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
8 deletions
+20
-8
install-etcd.sh
hack/install-etcd.sh
+5
-6
etcd.sh
hack/lib/etcd.sh
+15
-2
No files found.
hack/install-etcd.sh
View file @
694cda4a
...
@@ -14,15 +14,14 @@
...
@@ -14,15 +14,14 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
# Convenience script to download and install etcd in third_party.
# Mostly just used by CI.
set
-o
errexit
set
-o
errexit
set
-o
nounset
set
-o
nounset
set
-o
pipefail
set
-o
pipefail
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/..
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/..
source
"
${
KUBE_ROOT
}
/hack/lib/init.sh"
ETCD_VERSION
=
${
ETCD_VERSION
:-
v2
.2.1
}
kube::etcd::install
cd
"
${
KUBE_ROOT
}
/third_party"
curl
-fsSL
https://github.com/coreos/etcd/releases/download/
${
ETCD_VERSION
}
/etcd-
${
ETCD_VERSION
}
-linux-amd64
.tar.gz
\
|
tar
xzf -
ln
-fns
etcd-
${
ETCD_VERSION
}
-linux-amd64
etcd
hack/lib/etcd.sh
View file @
694cda4a
...
@@ -16,6 +16,8 @@
...
@@ -16,6 +16,8 @@
# A set of helpers for starting/running etcd for tests
# A set of helpers for starting/running etcd for tests
ETCD_VERSION
=
${
ETCD_VERSION
:-
2
.2.1
}
kube::etcd::start
()
{
kube::etcd::start
()
{
local
host
=
${
ETCD_HOST
:-
127
.0.0.1
}
local
host
=
${
ETCD_HOST
:-
127
.0.0.1
}
local
port
=
${
ETCD_PORT
:-
4001
}
local
port
=
${
ETCD_PORT
:-
4001
}
...
@@ -32,8 +34,9 @@ kube::etcd::start() {
...
@@ -32,8 +34,9 @@ kube::etcd::start() {
fi
fi
version
=
$(
etcd
-version
|
cut
-d
" "
-f
3
)
version
=
$(
etcd
-version
|
cut
-d
" "
-f
3
)
if
[[
"
${
version
}
"
<
"2.0.0"
]]
;
then
if
[[
"
${
version
}
"
<
"
${
ETCD_VERSION
}
"
]]
;
then
kube::log::usage
"etcd version 2.0.0 or greater required."
kube::log::usage
"etcd version
${
ETCD_VERSION
}
or greater required."
kube::log::info
"You can use 'hack/install-etcd.sh' to install a copy in third_party/."
exit
1
exit
1
fi
fi
...
@@ -61,3 +64,13 @@ kube::etcd::cleanup() {
...
@@ -61,3 +64,13 @@ kube::etcd::cleanup() {
kube::etcd::stop
kube::etcd::stop
kube::etcd::clean_etcd_dir
kube::etcd::clean_etcd_dir
}
}
kube::etcd::install
()
{
(
cd
"
${
KUBE_ROOT
}
/third_party"
curl
-fsSL
https://github.com/coreos/etcd/releases/download/v
${
ETCD_VERSION
}
/etcd-v
${
ETCD_VERSION
}
-linux-amd64
.tar.gz |
tar
xzf -
ln
-fns
"etcd-v
${
ETCD_VERSION
}
-linux-amd64"
etcd
kube::log::info
"etcd v
${
ETCD_VERSION
}
installed. To use:"
kube::log::info
"export PATH=
\$
{PATH}:
$(
pwd
)
/etcd"
)
}
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