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
9f60f3ce
Commit
9f60f3ce
authored
Jun 16, 2015
by
Saad Ali
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9831 from jayunit100/local-up-from-docker
Allow docker/ or other source directory for local-up
parents
c463467f
ecdc025b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
4 deletions
+40
-4
local-up-cluster.sh
hack/local-up-cluster.sh
+40
-4
No files found.
hack/local-up-cluster.sh
View file @
9f60f3ce
...
...
@@ -34,7 +34,38 @@ set -e
source
"
${
KUBE_ROOT
}
/hack/lib/init.sh"
"
${
KUBE_ROOT
}
/hack/build-go.sh"
function
usage
{
echo
"This script starts a local kube cluster. "
echo
"Example 1: hack/local-up-cluster.sh -o _output/dockerized/bin/linux/amd64/ (run from docker output)"
echo
"Example 2: hack/local-up-cluster.sh (build a local copy of the source)"
}
### Allow user to supply the source directory.
GO_OUT
=
""
while
getopts
"o:"
OPTION
do
case
$OPTION
in
o
)
echo
"skipping build"
echo
"using source
$OPTARG
"
GO_OUT
=
"
$OPTARG
"
if
[
$GO_OUT
==
""
]
;
then
echo
"You provided an invalid value for the build output directory."
exit
fi
;;
?
)
usage
exit
;;
esac
done
if
[
"x
$GO_OUT
"
==
"x"
]
;
then
"
${
KUBE_ROOT
}
/hack/build-go.sh"
else
echo
"skipped the build."
fi
function
test_docker
{
${
DOCKER
[@]
}
ps 2> /dev/null 1> /dev/null
...
...
@@ -104,6 +135,8 @@ function detect_binary {
exit
1
;;
esac
GO_OUT
=
"
${
KUBE_ROOT
}
/_output/local/bin/
${
host_os
}
/
${
host_arch
}
"
}
cleanup_dockerized_kubelet
()
...
...
@@ -268,12 +301,15 @@ To start using your cluster, open up another terminal/tab and run:
EOF
}
test_docker
test_apiserver_off
detect_binary
### IF the user didn't supply an output/ for the build... Then we detect.
if
[
"
$GO_OUT
"
==
""
]
;
then
detect_binary
fi
echo
"Detected host and ready to start services. Doing some housekeeping first..."
GO_OUT
=
"
${
KUBE_ROOT
}
/_output/local/bin/
${
host_os
}
/
${
host_arch
}
"
echo
"Using GO_OUT
$GO_OUT
"
KUBELET_CIDFILE
=
/tmp/kubelet.cid
trap
cleanup EXIT
echo
"Starting services now!"
...
...
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