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
a7bdb362
Commit
a7bdb362
authored
Nov 02, 2014
by
Deyuan Deng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix local cluster scripts
parent
808be2d1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
11 deletions
+68
-11
README.md
README.md
+1
-1
util.sh
cluster/local/util.sh
+19
-0
local-up-cluster.sh
hack/local-up-cluster.sh
+48
-10
No files found.
README.md
View file @
a7bdb362
...
...
@@ -16,6 +16,7 @@ While the concepts and architecture in Kubernetes represent years of experience
### Contents
*
Getting Started Guides
*
[
Google Compute Engine
](
docs/getting-started-guides/gce.md
)
*
[
Locally
](
docs/getting-started-guides/locally.md
)
*
[
Vagrant
](
docs/getting-started-guides/vagrant.md
)
*
Fedora (w/
[
Ansible
](
docs/getting-started-guides/fedora/fedora_ansible_config.md
)
or
[
manual
](
docs/getting-started-guides/fedora/fedora_manual_config.md
)
)
*
[
Circle CI
](
https://circleci.com/docs/docker#google-compute-engine-and-kubernetes
)
...
...
@@ -27,7 +28,6 @@ While the concepts and architecture in Kubernetes represent years of experience
*
[
vSphere
](
docs/getting-started-guides/vsphere.md
)
*
The following clouds are currently broken at Kubernetes head. Please sync your client to
`v0.3`
(
`git checkout v0.3`
) to use these:
*
[
Locally
](
docs/getting-started-guides/locally.md
)
*
[
Microsoft Azure
](
docs/getting-started-guides/azure.md
)
*
[
Kubernetes 101
](
https://github.com/GoogleCloudPlatform/kubernetes/tree/master/examples/walkthrough
)
*
[
kubecfg command line tool
](
https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/cli.md
)
...
...
cluster/local/util.sh
0 → 100644
View file @
a7bdb362
#!/bin/bash
# Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
function
detect-master
()
{
echo
"Running locally"
}
hack/local-up-cluster.sh
View file @
a7bdb362
...
...
@@ -18,7 +18,14 @@
# local-up.sh, but this one launches the three separate binaries.
# You may need to run this as root to allow kubelet to open docker's socket.
source
$(
dirname
$0
)
/util.sh
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/..
cd
"
${
KUBE_ROOT
}
"
# Stop right away if the build fails
set
-e
source
"
${
KUBE_ROOT
}
/hack/lib/init.sh"
"
${
KUBE_ROOT
}
/hack/build-go.sh"
docker ps 2> /dev/null 1> /dev/null
if
[
"
$?
"
!=
"0"
]
;
then
...
...
@@ -26,13 +33,8 @@ if [ "$?" != "0" ]; then
exit
1
fi
# Stop right away if the build fails
set
-e
$(
dirname
$0
)
/build-go.sh
echo
"Starting etcd"
start_etcd
kube::etcd::start
# Shut down anyway if there's an error.
set
+e
...
...
@@ -44,7 +46,43 @@ API_CORS_ALLOWED_ORIGINS=${API_CORS_ALLOWED_ORIGINS:-"/127.0.0.1(:[0-9]+)?$,/loc
KUBELET_PORT
=
${
KUBELET_PORT
:-
10250
}
LOG_LEVEL
=
${
LOG_LEVEL
:-
3
}
GO_OUT
=
$(
dirname
$0
)
/../_output/go/bin
# Detect the OS name/arch so that we can find our binary
case
"
$(
uname
-s
)
"
in
Darwin
)
host_os
=
darwin
;;
Linux
)
host_os
=
linux
;;
*
)
echo
"Unsupported host OS. Must be Linux or Mac OS X."
>
&2
exit
1
;;
esac
case
"
$(
uname
-m
)
"
in
x86_64
*
)
host_arch
=
amd64
;;
i?86_64
*
)
host_arch
=
amd64
;;
amd64
*
)
host_arch
=
amd64
;;
arm
*
)
host_arch
=
arm
;;
i?86
*
)
host_arch
=
x86
;;
*
)
echo
"Unsupported host arch. Must be x86_64, 386 or arm."
>
&2
exit
1
;;
esac
GO_OUT
=
"
${
KUBE_ROOT
}
/_output/local/bin/
${
host_os
}
/
${
host_arch
}
"
APISERVER_LOG
=
/tmp/apiserver.log
"
${
GO_OUT
}
/apiserver"
\
...
...
@@ -54,15 +92,15 @@ APISERVER_LOG=/tmp/apiserver.log
--etcd_servers
=
"http://127.0.0.1:4001"
\
--portal_net
=
"10.0.0.0/24"
\
--cors_allowed_origins
=
"
${
API_CORS_ALLOWED_ORIGINS
}
"
>
"
${
APISERVER_LOG
}
"
2>&1 &
#--machines="127.0.0.1" \ removed
APISERVER_PID
=
$!
# Wait for apiserver to come up before launching the rest of the components.
wait_for_url
"http://
$API_HOST
:
$API_PORT
/api/v1beta1/pods"
"apiserver: "
kube::util::wait_for_url
"http://
${
API_HOST
}
:
${
API_PORT
}
/api/v1beta1/pods"
"apiserver: "
CTLRMGR_LOG
=
/tmp/controller-manager.log
"
${
GO_OUT
}
/controller-manager"
\
-v
=
${
LOG_LEVEL
}
\
--machines
=
"127.0.0.1"
\
--master
=
"
${
API_HOST
}
:
${
API_PORT
}
"
>
"
${
CTLRMGR_LOG
}
"
2>&1 &
CTLRMGR_PID
=
$!
...
...
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