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
7adaf80c
Commit
7adaf80c
authored
Feb 25, 2016
by
Jeff Grafton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make hack/install-etcd.sh use hack/lib/etcd.sh
parent
df234d83
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 @
7adaf80c
...
...
@@ -14,15 +14,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# Convenience script to download and install etcd in third_party.
# Mostly just used by CI.
set
-o
errexit
set
-o
nounset
set
-o
pipefail
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/..
source
"
${
KUBE_ROOT
}
/hack/lib/init.sh"
ETCD_VERSION
=
${
ETCD_VERSION
:-
v2
.2.1
}
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
kube::etcd::install
hack/lib/etcd.sh
View file @
7adaf80c
...
...
@@ -16,6 +16,8 @@
# A set of helpers for starting/running etcd for tests
ETCD_VERSION
=
${
ETCD_VERSION
:-
2
.2.1
}
kube::etcd::start
()
{
local
host
=
${
ETCD_HOST
:-
127
.0.0.1
}
local
port
=
${
ETCD_PORT
:-
4001
}
...
...
@@ -32,8 +34,9 @@ kube::etcd::start() {
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."
if
[[
"
${
version
}
"
<
"
${
ETCD_VERSION
}
"
]]
;
then
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
fi
...
...
@@ -61,3 +64,13 @@ kube::etcd::cleanup() {
kube::etcd::stop
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