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
82aaf118
Commit
82aaf118
authored
Sep 10, 2015
by
Kevin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove the dependency on brctl, update default config and rephrase minion to node
parent
de9d7229
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
25 additions
and
43 deletions
+25
-43
.gitignore
cluster/centos/.gitignore
+6
-8
build.sh
cluster/centos/build.sh
+5
-19
config-build.sh
cluster/centos/config-build.sh
+2
-2
config-default.sh
cluster/centos/config-default.sh
+4
-5
mk-docker-opts.sh
cluster/centos/node/bin/mk-docker-opts.sh
+0
-0
remove-docker0.sh
cluster/centos/node/bin/remove-docker0.sh
+2
-3
docker.sh
cluster/centos/node/scripts/docker.sh
+0
-0
flannel.sh
cluster/centos/node/scripts/flannel.sh
+0
-0
kubelet.sh
cluster/centos/node/scripts/kubelet.sh
+0
-0
proxy.sh
cluster/centos/node/scripts/proxy.sh
+0
-0
util.sh
cluster/centos/util.sh
+6
-6
No files found.
cluster/centos/.gitignore
View file @
82aaf118
...
...
@@ -4,10 +4,9 @@ master/bin/etcd
master/bin/etcdctl
master/bin/kube*
minion/bin/brctl
minion/bin/docker
minion/bin/etcd
minion/bin/etcdctl
minion/bin/flanneld
minion/bin/kube*
test.sh
\ No newline at end of file
node/bin/docker
node/bin/etcd
node/bin/etcdctl
node/bin/flanneld
node/bin/kube*
local-test.sh
cluster/centos/build.sh
View file @
82aaf118
...
...
@@ -54,28 +54,18 @@ function download-releases() {
echo
"Download docker-latest ..."
curl
-L
https://get.docker.com/builds/Linux/x86_64/docker-latest
-o
${
RELEASES_DIR
}
/docker
echo
"Download bridge-utils from yum repo ..."
sudo
yum
--downloadonly
--downloaddir
=
${
RELEASES_DIR
}
install
bridge-utils
mkdir
-p
${
RELEASES_DIR
}
/brctl-tmp
local
rpm_file
=
$(
ls
${
RELEASES_DIR
}
/bridge-utils-
*
.rpm
)
pushd
${
RELEASES_DIR
}
/brctl-tmp
>
/dev/null 2>&1
rpm2cpio
${
rpm_file
}
| cpio
-id
popd
>
/dev/null 2>&1
cp
${
RELEASES_DIR
}
/brctl-tmp/usr/sbin/brctl
${
RELEASES_DIR
}
}
function
unpack-releases
()
{
rm
-rf
${
BINARY_DIR
}
mkdir
-p
${
BINARY_DIR
}
/master/bin
mkdir
-p
${
BINARY_DIR
}
/
minion
/bin
mkdir
-p
${
BINARY_DIR
}
/
node
/bin
# flannel
if
[[
-f
${
RELEASES_DIR
}
/flannel.tar.gz
]]
;
then
tar
xzf
${
RELEASES_DIR
}
/flannel.tar.gz
-C
${
RELEASES_DIR
}
cp
${
RELEASES_DIR
}
/flannel-
${
FLANNEL_VERSION
}
/flanneld
${
BINARY_DIR
}
/master/bin
cp
${
RELEASES_DIR
}
/flannel-
${
FLANNEL_VERSION
}
/flanneld
${
BINARY_DIR
}
/
minion
/bin
cp
${
RELEASES_DIR
}
/flannel-
${
FLANNEL_VERSION
}
/flanneld
${
BINARY_DIR
}
/
node
/bin
fi
# ectd
...
...
@@ -85,7 +75,7 @@ function unpack-releases() {
cp
${
RELEASES_DIR
}
/
$ETCD
/etcd
\
${
RELEASES_DIR
}
/
$ETCD
/etcdctl
${
BINARY_DIR
}
/master/bin
cp
${
RELEASES_DIR
}
/
$ETCD
/etcd
\
${
RELEASES_DIR
}
/
$ETCD
/etcdctl
${
BINARY_DIR
}
/
minion
/bin
${
RELEASES_DIR
}
/
$ETCD
/etcdctl
${
BINARY_DIR
}
/
node
/bin
fi
# k8s
...
...
@@ -100,17 +90,13 @@ function unpack-releases() {
${
RELEASES_DIR
}
/kubernetes/server/kubernetes/server/bin/kube-scheduler
${
BINARY_DIR
}
/master/bin
cp
${
RELEASES_DIR
}
/kubernetes/server/kubernetes/server/bin/kubelet
\
${
RELEASES_DIR
}
/kubernetes/server/kubernetes/server/bin/kube-proxy
${
BINARY_DIR
}
/
minion
/bin
${
RELEASES_DIR
}
/kubernetes/server/kubernetes/server/bin/kube-proxy
${
BINARY_DIR
}
/
node
/bin
cp
${
RELEASES_DIR
}
/kubernetes/server/kubernetes/server/bin/kubectl
${
BINARY_DIR
}
fi
if
[[
-f
${
RELEASES_DIR
}
/docker
]]
;
then
cp
${
RELEASES_DIR
}
/docker
${
BINARY_DIR
}
/minion/bin
fi
if
[[
-f
${
RELEASES_DIR
}
/brctl
]]
;
then
cp
${
RELEASES_DIR
}
/brctl
${
BINARY_DIR
}
/minion/bin
cp
${
RELEASES_DIR
}
/docker
${
BINARY_DIR
}
/node/bin
fi
chmod
-R
+x
${
BINARY_DIR
}
...
...
cluster/centos/config-build.sh
View file @
82aaf118
...
...
@@ -20,13 +20,13 @@
RELEASES_DIR
=
${
RELEASES_DIR
:-
/tmp/downloads
}
# Define flannel version to use.
FLANNEL_VERSION
=
${
FLANNEL_VERSION
:-
"0.
4.0
"
}
FLANNEL_VERSION
=
${
FLANNEL_VERSION
:-
"0.
5.3
"
}
# Define etcd version to use.
ETCD_VERSION
=
${
ETCD_VERSION
:-
"2.0.12"
}
# Define k8s version to use.
K8S_VERSION
=
${
K8S_VERSION
:-
"1.0.
1
"
}
K8S_VERSION
=
${
K8S_VERSION
:-
"1.0.
4
"
}
FLANNEL_DOWNLOAD_URL
=
\
"https://github.com/coreos/flannel/releases/download/v
${
FLANNEL_VERSION
}
/flannel-
${
FLANNEL_VERSION
}
-linux-amd64.tar.gz"
...
...
cluster/centos/config-default.sh
View file @
82aaf118
...
...
@@ -15,15 +15,14 @@
# limitations under the License.
## Contains configuration values for the CentOS cluster
# Currently only support root user.
export
MASTER
=
${
MASTER
:-
"root@8.8.8.18"
}
# The user should have sudo privilege
export
MASTER
=
${
MASTER
:-
"centos@172.10.0.11"
}
export
MASTER_IP
=
${
MASTER
#*@
}
# Define all your minion nodes,
# And separated with blank space like <user_1@ip_1> <user_2@ip_2> <user_3@ip_3>.
#
Currently only support root user.
export
MINIONS
=
${
MINIONS
:-
"
root@8.8.8.20 root@8.8.8.21
"
}
#
The user should have sudo privilege
export
MINIONS
=
${
MINIONS
:-
"
centos@172.10.0.12 centos@172.10.0.13
"
}
# If it practically impossible to set an array as an environment variable
# from a script, so assume variable is a string then convert it to an array
export
MINIONS_ARRAY
=(
$MINIONS
)
...
...
cluster/centos/
minion
/bin/mk-docker-opts.sh
→
cluster/centos/
node
/bin/mk-docker-opts.sh
View file @
82aaf118
File moved
cluster/centos/
minion
/bin/remove-docker0.sh
→
cluster/centos/
node
/bin/remove-docker0.sh
View file @
82aaf118
...
...
@@ -23,5 +23,5 @@ rc=0
ip
link
show docker0
>
/dev/null 2>&1
||
rc
=
"
$?
"
if
[[
"
$rc
"
-eq
"0"
]]
;
then
ip
link set
dev docker0 down
/opt/kubernetes/bin/brctl delbr docker0
fi
\ No newline at end of file
ip
link
delete docker0
fi
cluster/centos/
minion
/scripts/docker.sh
→
cluster/centos/
node
/scripts/docker.sh
View file @
82aaf118
File moved
cluster/centos/
minion
/scripts/flannel.sh
→
cluster/centos/
node
/scripts/flannel.sh
View file @
82aaf118
File moved
cluster/centos/
minion
/scripts/kubelet.sh
→
cluster/centos/
node
/scripts/kubelet.sh
View file @
82aaf118
File moved
cluster/centos/
minion
/scripts/proxy.sh
→
cluster/centos/
node
/scripts/proxy.sh
View file @
82aaf118
File moved
cluster/centos/util.sh
View file @
82aaf118
...
...
@@ -264,14 +264,14 @@ function provision-minion() {
ensure-setup-dir
${
minion
}
# scp -r ${SSH_OPTS} minion config-default.sh copy-files.sh util.sh "${minion_ip}:${KUBE_TEMP}"
kube-scp
${
minion
}
"
${
ROOT
}
/binaries/
minion
${
ROOT
}
/minion
${
ROOT
}
/config-default.sh
${
ROOT
}
/util.sh"
${
KUBE_TEMP
}
kube-scp
${
minion
}
"
${
ROOT
}
/binaries/
node
${
ROOT
}
/node
${
ROOT
}
/config-default.sh
${
ROOT
}
/util.sh"
${
KUBE_TEMP
}
kube-ssh
"
${
minion
}
"
"
\
sudo cp -r
${
KUBE_TEMP
}
/
minion
/bin /opt/kubernetes;
\
sudo cp -r
${
KUBE_TEMP
}
/
node
/bin /opt/kubernetes;
\
sudo chmod -R +x /opt/kubernetes/bin;
\
sudo bash
${
KUBE_TEMP
}
/
minion
/scripts/flannel.sh
${
ETCD_SERVERS
}
${
FLANNEL_NET
}
;
\
sudo bash
${
KUBE_TEMP
}
/
minion
/scripts/docker.sh
\"
${
DOCKER_OPTS
}
\"
;
\
sudo bash
${
KUBE_TEMP
}
/
minion
/scripts/kubelet.sh
${
master_ip
}
${
minion_ip
}
;
\
sudo bash
${
KUBE_TEMP
}
/
minion
/scripts/proxy.sh
${
master_ip
}
"
sudo bash
${
KUBE_TEMP
}
/
node
/scripts/flannel.sh
${
ETCD_SERVERS
}
${
FLANNEL_NET
}
;
\
sudo bash
${
KUBE_TEMP
}
/
node
/scripts/docker.sh
\"
${
DOCKER_OPTS
}
\"
;
\
sudo bash
${
KUBE_TEMP
}
/
node
/scripts/kubelet.sh
${
master_ip
}
${
minion_ip
}
;
\
sudo bash
${
KUBE_TEMP
}
/
node
/scripts/proxy.sh
${
master_ip
}
"
}
# Create dirs that'll be used during setup on target machine.
...
...
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