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
8abf3c16
Commit
8abf3c16
authored
Sep 27, 2016
by
Wojciech Tyczynski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make it possible to set etcd version in kubemark
parent
1e7fa1f6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
3 deletions
+15
-3
config-default.sh
cluster/kubemark/config-default.sh
+5
-0
start-kubemark-master.sh
test/kubemark/start-kubemark-master.sh
+7
-2
start-kubemark.sh
test/kubemark/start-kubemark.sh
+3
-1
No files found.
cluster/kubemark/config-default.sh
View file @
8abf3c16
...
@@ -45,6 +45,11 @@ CLUSTER_IP_RANGE="${CLUSTER_IP_RANGE:-10.240.0.0/13}"
...
@@ -45,6 +45,11 @@ CLUSTER_IP_RANGE="${CLUSTER_IP_RANGE:-10.240.0.0/13}"
RUNTIME_CONFIG
=
"
${
KUBE_RUNTIME_CONFIG
:-}
"
RUNTIME_CONFIG
=
"
${
KUBE_RUNTIME_CONFIG
:-}
"
TERMINATED_POD_GC_THRESHOLD
=
${
TERMINATED_POD_GC_THRESHOLD
:-
100
}
TERMINATED_POD_GC_THRESHOLD
=
${
TERMINATED_POD_GC_THRESHOLD
:-
100
}
# Set etcd version (e.g. 3.0.4-migration.1) if you need non-default version.
TEST_ETCD_VERSION
=
"
${
TEST_ETCD_VERSION
:-}
"
# Storage backend. 'etcd2' supported, 'etcd3' experimental.
STORAGE_BACKEND
=
${
STORAGE_BACKEND
:-
etcd2
}
# Default Log level for all components in test clusters and variables to override it in specific components.
# Default Log level for all components in test clusters and variables to override it in specific components.
TEST_CLUSTER_LOG_LEVEL
=
"
${
TEST_CLUSTER_LOG_LEVEL
:-
--v=2
}
"
TEST_CLUSTER_LOG_LEVEL
=
"
${
TEST_CLUSTER_LOG_LEVEL
:-
--v=2
}
"
KUBELET_TEST_LOG_LEVEL
=
"
${
KUBELET_TEST_LOG_LEVEL
:-
$TEST_CLUSTER_LOG_LEVEL
}
"
KUBELET_TEST_LOG_LEVEL
=
"
${
KUBELET_TEST_LOG_LEVEL
:-
$TEST_CLUSTER_LOG_LEVEL
}
"
...
...
test/kubemark/start-kubemark-master.sh
View file @
8abf3c16
...
@@ -19,6 +19,11 @@
...
@@ -19,6 +19,11 @@
EVENT_STORE_IP
=
$1
EVENT_STORE_IP
=
$1
EVENT_STORE_URL
=
"http://
${
EVENT_STORE_IP
}
:4002"
EVENT_STORE_URL
=
"http://
${
EVENT_STORE_IP
}
:4002"
NUM_NODES
=
$2
NUM_NODES
=
$2
TEST_ETCD_VERSION
=
$3
if
[[
-z
"
${
TEST_ETCD_VERSION
}
"
]]
;
then
# Default etcd version.
TEST_ETCD_VERSION
=
"2.2.1"
fi
retry
()
{
retry
()
{
for
i
in
{
1..4
}
;
do
for
i
in
{
1..4
}
;
do
...
@@ -31,7 +36,7 @@ if [ "${EVENT_STORE_IP}" == "127.0.0.1" ]; then
...
@@ -31,7 +36,7 @@ if [ "${EVENT_STORE_IP}" == "127.0.0.1" ]; then
# Retry starting etcd to avoid pulling image errors.
# Retry starting etcd to avoid pulling image errors.
retry
sudo
docker run
--net
=
host
\
retry
sudo
docker run
--net
=
host
\
-v
/var/etcd/data-events:/var/etcd/data
-v
/var/log:/var/log
-d
\
-v
/var/etcd/data-events:/var/etcd/data
-v
/var/log:/var/log
-d
\
gcr.io/google_containers/etcd:
2.2.1
/bin/sh
-c
"/usr/local/bin/etcd
\
gcr.io/google_containers/etcd:
${
TEST_ETCD_VERSION
}
/bin/sh
-c
"/usr/local/bin/etcd
\
--listen-peer-urls http://127.0.0.1:2381
\
--listen-peer-urls http://127.0.0.1:2381
\
--advertise-client-urls=http://127.0.0.1:4002
\
--advertise-client-urls=http://127.0.0.1:4002
\
--listen-client-urls=http://0.0.0.0:4002
\
--listen-client-urls=http://0.0.0.0:4002
\
...
@@ -41,7 +46,7 @@ fi
...
@@ -41,7 +46,7 @@ fi
# Retry starting etcd to avoid pulling image errors.
# Retry starting etcd to avoid pulling image errors.
retry
sudo
docker run
--net
=
host
\
retry
sudo
docker run
--net
=
host
\
-v
/var/etcd/data:/var/etcd/data
-v
/var/log:/var/log
-d
\
-v
/var/etcd/data:/var/etcd/data
-v
/var/log:/var/log
-d
\
gcr.io/google_containers/etcd:
2.2.1
/bin/sh
-c
"/usr/local/bin/etcd
\
gcr.io/google_containers/etcd:
${
TEST_ETCD_VERSION
}
/bin/sh
-c
"/usr/local/bin/etcd
\
--listen-peer-urls http://127.0.0.1:2380
\
--listen-peer-urls http://127.0.0.1:2380
\
--advertise-client-urls=http://127.0.0.1:2379
\
--advertise-client-urls=http://127.0.0.1:2379
\
--listen-client-urls=http://0.0.0.0:2379
\
--listen-client-urls=http://0.0.0.0:2379
\
...
...
test/kubemark/start-kubemark.sh
View file @
8abf3c16
...
@@ -25,6 +25,7 @@ source "${KUBE_ROOT}/test/kubemark/common.sh"
...
@@ -25,6 +25,7 @@ source "${KUBE_ROOT}/test/kubemark/common.sh"
function
writeEnvironmentFiles
()
{
function
writeEnvironmentFiles
()
{
cat
>
"
${
RESOURCE_DIRECTORY
}
/apiserver_flags"
<<
EOF
cat
>
"
${
RESOURCE_DIRECTORY
}
/apiserver_flags"
<<
EOF
${
APISERVER_TEST_ARGS
}
${
APISERVER_TEST_ARGS
}
--storage-backend=
${
STORAGE_BACKEND
}
--service-cluster-ip-range="
${
SERVICE_CLUSTER_IP_RANGE
}
"
--service-cluster-ip-range="
${
SERVICE_CLUSTER_IP_RANGE
}
"
EOF
EOF
sed
-i
''
-e
"s/
\"
//g"
"
${
RESOURCE_DIRECTORY
}
/apiserver_flags"
sed
-i
''
-e
"s/
\"
//g"
"
${
RESOURCE_DIRECTORY
}
/apiserver_flags"
...
@@ -145,7 +146,8 @@ gcloud compute copy-files --zone="${ZONE}" --project="${PROJECT}" \
...
@@ -145,7 +146,8 @@ gcloud compute copy-files --zone="${ZONE}" --project="${PROJECT}" \
"
${
MASTER_NAME
}
"
:~
"
${
MASTER_NAME
}
"
:~
gcloud compute ssh
"
${
MASTER_NAME
}
"
--zone
=
"
${
ZONE
}
"
--project
=
"
${
PROJECT
}
"
\
gcloud compute ssh
"
${
MASTER_NAME
}
"
--zone
=
"
${
ZONE
}
"
--project
=
"
${
PROJECT
}
"
\
--command
=
"chmod a+x configure-kubectl.sh && chmod a+x start-kubemark-master.sh && sudo ./start-kubemark-master.sh
${
EVENT_STORE_IP
:-
127
.0.0.1
}
${
NUM_NODES
:-
0
}
"
--command
=
"chmod a+x configure-kubectl.sh && chmod a+x start-kubemark-master.sh &&
\
sudo ./start-kubemark-master.sh
${
EVENT_STORE_IP
:-
127
.0.0.1
}
${
NUM_NODES
:-
0
}
${
TEST_ETCD_VERSION
:-}
"
# create kubeconfig for Kubelet:
# create kubeconfig for Kubelet:
KUBECONFIG_CONTENTS
=
$(
echo
"apiVersion: v1
KUBECONFIG_CONTENTS
=
$(
echo
"apiVersion: v1
...
...
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