Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
凌波微步_大先生
dashboard
提交
9d2d08a8
D
dashboard
项目概览
凌波微步_大先生
/
dashboard
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dashboard
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
9d2d08a8
编写于
8月 29, 2016
作者:
C
Christoph Held
提交者:
Piotr Bryk
8月 29, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update hyperkube and use nsenter (#1157)
* update hyperkube and use nsenter
上级
c3089451
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
12 addition
and
78 deletion
+12
-78
.travis.yml
.travis.yml
+0
-1
build/hyperkube.sh
build/hyperkube.sh
+11
-13
build/setup-docker.sh
build/setup-docker.sh
+0
-59
docs/devel/getting-started.md
docs/devel/getting-started.md
+1
-5
未找到文件。
.travis.yml
浏览文件 @
9d2d08a8
...
...
@@ -50,7 +50,6 @@ before_script:
# Install go 1.6.1. It is not there by default.
-
eval "$(gimme 1.6.1)"
-
sudo ./build/setup-docker.sh
-
docker --version
script
:
./node_modules/.bin/gulp check:local-cluster
...
...
build/hyperkube.sh
浏览文件 @
9d2d08a8
...
...
@@ -17,33 +17,31 @@
# Learn more at https://github.com/kubernetes/kubernetes/blob/master/docs/getting-started-guides/docker.md
# Version of kubernetes to use.
K8S_VERSION
=
"v1.
3.0
"
K8S_VERSION
=
"v1.
4.0-alpha.3
"
# Version heapster to use.
HEAPSTER_VERSION
=
"v1.0.2"
# Port of the apiserver to serve on.
PORT
=
8080
HEAPSTER_VERSION
=
"v1.1.0"
# Port of the heapster to serve on.
HEAPSTER_PORT
=
8082
docker run
\
--volume
=
/sys:/sys:ro
\
--volume
=
/dev:/dev
\
--volume
=
/var/lib/docker/:/var/lib/docker:ro
\
--volume
=
/var/lib/kubelet/:/var/lib/kubelet:rw,shared
\
--volume
=
/var/run:/var/run:rw
\
--net
=
host
\
--pid
=
host
\
--privileged
=
true
\
-d
\
gcr.io/google_containers/hyperkube-amd64:
${
K8S_VERSION
}
\
/hyperkube kubelet
\
/nsenter
\
--target
=
1
\
--mount
\
--wd
=
.
\
--
./hyperkube kubelet
\
--allow-privileged
=
true
\
--hostname-override
=
"127.0.0.1"
\
--address
=
"0.0.0.0"
\
--api-servers
=
http://localhost:
${
PORT
}
\
--config
=
/
etc/kubernetes/manifests
\
--api-servers
=
http://localhost:
8080
\
--config
=
etc/kubernetes/manifests
\
--v
=
2
# Runs Heapster in standalone mode
docker run
--net
=
host
-d
gcr.io/google_containers/heapster:
${
HEAPSTER_VERSION
}
-port
${
HEAPSTER_PORT
}
\
--source
=
kubernetes:http://127.0.0.1:
${
PORT
}
?inClusterConfig
=
false
&auth
=
""
--source
=
kubernetes:http://127.0.0.1:
8080
?inClusterConfig
=
false
&auth
=
""
build/setup-docker.sh
已删除
100755 → 0
浏览文件 @
c3089451
#!/bin/bash
# Copyright 2015 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.
# check sudo and enable mount propagation
main
()
{
check_sudo
if
command_exists systemctl
;
then
restart_docker_systemd
else
make_shared_kubelet_dir
fi
}
# Ensure everything is OK, docker is running and we're root
check_sudo
()
{
if
[[
$(
docker ps 2>&1 1>/dev/null
;
echo
$?
)
!=
0
]]
;
then
echo
"Docker is not running on this machine!"
exit
1
fi
if
[[
"
$(
id
-u
)
"
!=
"0"
]]
;
then
echo
"Please run as root"
exit
1
fi
}
# Check if a command is valid
command_exists
()
{
command
-v
"
$@
"
>
/dev/null 2>&1
}
# Set shared flag
restart_docker_systemd
(){
DOCKER_CONF
=
$(
systemctl
cat
docker |
head
-1
|
awk
'{print $2}'
)
sed
-i
.bak
's/^\(MountFlags=\).*/\1shared/'
$DOCKER_CONF
systemctl daemon-reload
systemctl restart docker
}
# Make shared kubelet directory
make_shared_kubelet_dir
()
{
mkdir
-p
/var/lib/kubelet
mount
--bind
/var/lib/kubelet /var/lib/kubelet
mount
--make-shared
/var/lib/kubelet
}
main
docs/devel/getting-started.md
浏览文件 @
9d2d08a8
...
...
@@ -30,11 +30,7 @@ $ npm install
For development it is recommended to run a local Kubernetes cluster. For your convenience, a
task is provided that checks out the latest stable version, and runs it inside a Docker container.
First, a Docker setting is required to be adapted. Execute the following script, but only once:
```
$ sudo ./build/setup-docker.sh
```
Then, open a separate tab in your terminal and run the following command:
Run the following command:
```
$ gulp local-up-cluster
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录