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
2e4c9a2b
Commit
2e4c9a2b
authored
Apr 06, 2015
by
Zach Loafman
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6492 from fabioy/dev-tar-upgrade.fix
Add local file option to "upgrade.sh".
parents
74ec81fb
fd7db14d
Show 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 @
2e4c9a2b
...
@@ -40,10 +40,11 @@ source "${KUBE_ROOT}/cluster/${KUBERNETES_PROVIDER}/util.sh"
...
@@ -40,10 +40,11 @@ source "${KUBE_ROOT}/cluster/${KUBERNETES_PROVIDER}/util.sh"
function
usage
()
{
function
usage
()
{
echo
"!!! EXPERIMENTAL !!!"
echo
"!!! EXPERIMENTAL !!!"
echo
""
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
" Upgrades master and nodes by default"
echo
" -M: Upgrade master only"
echo
" -M: Upgrade master only"
echo
" -N: Upgrade nodes only"
echo
" -N: Upgrade nodes only"
echo
" -l: Use local(dev) binaries"
echo
""
echo
""
echo
"(... Fetching current release versions ...)"
echo
"(... Fetching current release versions ...)"
echo
""
echo
""
...
@@ -63,10 +64,8 @@ function usage() {
...
@@ -63,10 +64,8 @@ function usage() {
}
}
function
upgrade-master
()
{
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
detect-master
get-password
get-password
set-master-htpasswd
set-master-htpasswd
...
@@ -95,10 +94,26 @@ function wait-for-master() {
...
@@ -95,10 +94,26 @@ function wait-for-master() {
echo
"== Done =="
echo
"== Done =="
}
}
function
upgrade-nodes
()
{
# Perform common upgrade setup tasks
echo
"== Upgrading nodes to
${
SERVER_BINARY_TAR_URL
}
. =="
#
# Assumed vars
# local_binaries
# binary_version
function
prepare-upgrade
()
{
ensure-temp-dir
ensure-temp-dir
detect-project
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
detect-minion-names
get-password
get-password
set-master-htpasswd
set-master-htpasswd
...
@@ -130,8 +145,9 @@ function tars_from_version() {
...
@@ -130,8 +145,9 @@ function tars_from_version() {
master_upgrade
=
true
master_upgrade
=
true
node_upgrade
=
true
node_upgrade
=
true
local_binaries
=
false
while
getopts
":MNh"
opt
;
do
while
getopts
":MN
l
h"
opt
;
do
case
${
opt
}
in
case
${
opt
}
in
M
)
M
)
node_upgrade
=
false
node_upgrade
=
false
...
@@ -139,6 +155,9 @@ while getopts ":MNh" opt; do
...
@@ -139,6 +155,9 @@ while getopts ":MNh" opt; do
N
)
N
)
master_upgrade
=
false
master_upgrade
=
false
;;
;;
l
)
local_binaries
=
true
;;
h
)
h
)
usage
usage
exit
0
exit
0
...
@@ -152,7 +171,7 @@ while getopts ":MNh" opt; do
...
@@ -152,7 +171,7 @@ while getopts ":MNh" opt; do
done
done
shift
$((
OPTIND-1
))
shift
$((
OPTIND-1
))
if
[[
$#
-lt
1
]]
;
then
if
[[
$#
-lt
1
]]
&&
[[
"
${
local_binaries
}
"
==
"false"
]]
;
then
usage
usage
exit
1
exit
1
fi
fi
...
@@ -162,7 +181,11 @@ if [[ "${master_upgrade}" == "false" ]] && [[ "${node_upgrade}" == "false" ]]; t
...
@@ -162,7 +181,11 @@ if [[ "${master_upgrade}" == "false" ]] && [[ "${node_upgrade}" == "false" ]]; t
exit
1
exit
1
fi
fi
tars_from_version
${
1
}
if
[[
"
${
local_binaries
}
"
==
"false"
]]
;
then
binary_version
=
${
1
}
fi
prepare-upgrade
if
[[
"
${
master_upgrade
}
"
==
"true"
]]
;
then
if
[[
"
${
master_upgrade
}
"
==
"true"
]]
;
then
upgrade-master
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