Merge pull request #33 from 277270678/dev

fix验证ansible安装
pull/49/head
gjmzj 2017-12-21 16:36:36 +08:00 committed by GitHub
commit c338241595
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 14 deletions

View File

@ -122,6 +122,21 @@ pip install --no-cache-dir ansible -i http://mirrors.aliyun.com/pypi/simple/ --t
ssh-keygen -t rsa -b 2048 回车 回车 回车
ssh-copy-id $IPs #$IPs为所有节点地址按照提示输入yes 和root密码
```
### 5.在deploy节点编排k8s安装
``` bash
git clone https://github.com/gjmzj/kubeasz.git
mv kubeasz /etc/ansible
# 下载已打包好的binaries并且解压缩到/etc/ansible/bin目录
# 国内请从我分享的百度云链接下载 https://pan.baidu.com/s/1eSetFSA
# 如果你有合适网络环境也可以按照/down/download.sh自行从官网下载各种tar包到 ./down目录并执行download.sh
tar zxvf k8s.184.tar.gz
mv bin/* /etc/ansible/bin
# 配置ansible的hosts文件
cd /etc/ansible
cp example/hosts.m-masters.example hosts
然后根据上文实际规划修改此hosts文件
```
+ 验证ansible安装
``` bash
@ -146,22 +161,9 @@ ansible all -m ping
"ping": "pong"
}
```
### 5.在deploy节点编排k8s安装
+ 先不要安装,后文将一步一步讲解后执行安装
``` bash
git clone https://github.com/gjmzj/kubeasz.git
mv kubeasz /etc/ansible
# 下载已打包好的binaries并且解压缩到/etc/ansible/bin目录
# 国内请从我分享的百度云链接下载 https://pan.baidu.com/s/1eSetFSA
# 如果你有合适网络环境也可以按照/down/download.sh自行从官网下载各种tar包到 ./down目录并执行download.sh
tar zxvf k8s.184.tar.gz
mv bin/* /etc/ansible/bin
# 配置ansible的hosts文件
cd /etc/ansible
cp example/hosts.m-masters.example hosts
然后根据上文实际规划修改此hosts文件
# 采用分步安装(确定每一步是否安装成功)或者一步安装
# 先不要安装,后文将一步一步讲解后执行安装
#ansible-playbook 01.prepare.yml
#ansible-playbook 02.etcd.yml
#ansible-playbook 03.kubectl.yml