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
fd7db14d
Commit
fd7db14d
authored
Apr 06, 2015
by
Fabio Yeon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add local file option to "upgrade.sh".
parent
8b4914dd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
9 deletions
+32
-9
upgrade.sh
cluster/gce/upgrade.sh
+32
-9
No files found.
cluster/gce/upgrade.sh
View file @
fd7db14d
...
...
@@ -40,10 +40,11 @@ source "${KUBE_ROOT}/cluster/${KUBERNETES_PROVIDER}/util.sh"
function
usage
()
{
echo
"!!! EXPERIMENTAL !!!"
echo
""
echo
"
${
0
}
[-M|-N] <release or continuous integration version>"
echo
"
${
0
}
[-M|-N]
-l |
<release or continuous integration version>"
echo
" Upgrades master and nodes by default"
echo
" -M: Upgrade master only"
echo
" -N: Upgrade nodes only"
echo
" -l: Use local(dev) binaries"
echo
""
echo
"(... Fetching current release versions ...)"
echo
""
...
...
@@ -63,10 +64,8 @@ function usage() {
}
function
upgrade-master
()
{
echo
"== Upgrading master to
${
SERVER_BINARY_TAR_URL
}
. Do not interrupt, deleting master instance. =="
echo
"== Upgrading master to
'
${
SERVER_BINARY_TAR_URL
}
'
. Do not interrupt, deleting master instance. =="
ensure-temp-dir
detect-project
detect-master
get-password
set-master-htpasswd
...
...
@@ -95,10 +94,26 @@ function wait-for-master() {
echo
"== Done =="
}
function
upgrade-nodes
()
{
echo
"== Upgrading nodes to
${
SERVER_BINARY_TAR_URL
}
. =="
# Perform common upgrade setup tasks
#
# Assumed vars
# local_binaries
# binary_version
function
prepare-upgrade
()
{
ensure-temp-dir
detect-project
if
[[
"
${
local_binaries
}
"
==
"true"
]]
;
then
find-release-tars
upload-server-tars
else
tars_from_version
${
binary_version
}
fi
}
function
upgrade-nodes
()
{
echo
"== Upgrading nodes to
${
SERVER_BINARY_TAR_URL
}
. =="
detect-minion-names
get-password
set-master-htpasswd
...
...
@@ -130,8 +145,9 @@ function tars_from_version() {
master_upgrade
=
true
node_upgrade
=
true
local_binaries
=
false
while
getopts
":MNh"
opt
;
do
while
getopts
":MN
l
h"
opt
;
do
case
${
opt
}
in
M
)
node_upgrade
=
false
...
...
@@ -139,6 +155,9 @@ while getopts ":MNh" opt; do
N
)
master_upgrade
=
false
;;
l
)
local_binaries
=
true
;;
h
)
usage
exit
0
...
...
@@ -152,7 +171,7 @@ while getopts ":MNh" opt; do
done
shift
$((
OPTIND-1
))
if
[[
$#
-lt
1
]]
;
then
if
[[
$#
-lt
1
]]
&&
[[
"
${
local_binaries
}
"
==
"false"
]]
;
then
usage
exit
1
fi
...
...
@@ -162,7 +181,11 @@ if [[ "${master_upgrade}" == "false" ]] && [[ "${node_upgrade}" == "false" ]]; t
exit
1
fi
tars_from_version
${
1
}
if
[[
"
${
local_binaries
}
"
==
"false"
]]
;
then
binary_version
=
${
1
}
fi
prepare-upgrade
if
[[
"
${
master_upgrade
}
"
==
"true"
]]
;
then
upgrade-master
...
...
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