Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
凌波微步_大先生
dashboard
提交
f52117c0
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,发现更多精彩内容 >>
提交
f52117c0
编写于
7月 06, 2016
作者:
P
Piotr Bryk
提交者:
GitHub
7月 06, 2016
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #969 from cheld/fix-hyperkube
Prepare hyperkube for 1.3
上级
6ddc42da
0de08eca
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
77 addition
and
10 deletion
+77
-10
.travis.yml
.travis.yml
+10
-4
build/hyperkube.sh
build/hyperkube.sh
+2
-4
build/setup-docker.sh
build/setup-docker.sh
+59
-0
docs/devel/getting-started.md
docs/devel/getting-started.md
+6
-2
未找到文件。
.travis.yml
浏览文件 @
f52117c0
...
...
@@ -35,6 +35,11 @@ addons:
# Run tests that require a browser on SauceLabs CI provider. Learn more at: https://saucelabs.com
sauce_connect
:
true
# Docker is required to set up a simple, single node Kubernetes cluster.
# Local Docker-based cluster is the simplest way to create kubernetes on the host machine.
services
:
-
docker
before_script
:
# Prepare environment for the Chrome browser. This is required for PRs from forks where
# tests do not run on Saucelabs.
...
...
@@ -43,10 +48,11 @@ before_script:
-
export DISPLAY=:99.0
-
sh -e /etc/init.d/xvfb start
# Docker is required to set up a simple, single node Kubernetes cluster.
# Local Docker-based cluster is the simplest way to create kubernetes on the host machine.
services
:
-
docker
# Upgrade to docker 1.10+. Answer all questions with yes.
# List available docker versions with "apt-cache madison docker-engine"
-
sudo apt-get -o Dpkg::Options::="--force-confnew" install -y docker-engine=1.11.2-0~trusty
-
sudo ./build/setup-docker.sh
-
docker --version
script
:
./node_modules/.bin/gulp check:local-cluster
after_script
:
./node_modules/.bin/gulp coverage-codecov-upload
build/hyperkube.sh
浏览文件 @
f52117c0
...
...
@@ -17,7 +17,7 @@
# Learn more at https://github.com/kubernetes/kubernetes/blob/master/docs/getting-started-guides/docker.md
# Version of kubernetes to use.
K8S_VERSION
=
"v1.
2.4"
K8S_VERSION
=
"v1.
3.0"
# Version heapster to use.
HEAPSTER_VERSION
=
"v1.0.2"
# Port of the apiserver to serve on.
...
...
@@ -26,11 +26,10 @@ PORT=8080
HEAPSTER_PORT
=
8082
docker run
\
--volume
=
/:/rootfs:ro
\
--volume
=
/sys:/sys:ro
\
--volume
=
/dev:/dev
\
--volume
=
/var/lib/docker/:/var/lib/docker:ro
\
--volume
=
/var/lib/kubelet/:/var/lib/kubelet:rw
\
--volume
=
/var/lib/kubelet/:/var/lib/kubelet:rw
,shared
\
--volume
=
/var/run:/var/run:rw
\
--net
=
host
\
--pid
=
host
\
...
...
@@ -39,7 +38,6 @@ docker run \
gcr.io/google_containers/hyperkube-amd64:
${
K8S_VERSION
}
\
/hyperkube kubelet
\
--allow-privileged
=
true
\
--containerized
\
--hostname-override
=
"127.0.0.1"
\
--address
=
"0.0.0.0"
\
--api-servers
=
http://localhost:
${
PORT
}
\
...
...
build/setup-docker.sh
0 → 100755
浏览文件 @
f52117c0
#!/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
浏览文件 @
f52117c0
...
...
@@ -12,7 +12,7 @@ logic and fetches raw data from the various Kubernetes APIs.
## Preparation
Make sure the following software is installed and added to the
`$PATH`
variable:
*
Docker (1.
3
+)
*
Docker (1.
10
+)
*
go (1.5+)
*
nodejs (5.1.1+)
*
npm (3+)
...
...
@@ -30,7 +30,11 @@ $ 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.
Open a separate tab in your terminal and run the following command:
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:
```
$ gulp local-up-cluster
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录