注意
端口只能是 8080 , 试过其余端口 , 不行
Rancher 1.6 的 web 首页
运行成功后第一次进去 , 提示是否能够发送信息给官方 , 我选择不
图中弹窗上的文字:
Welcome to Rancher!
Rancher Labs would like to collect anonymous information about the configuration of your installation to help make Rancher better.
Your data will not be shared with anyone else, and no specific resource names or addresses are collected.
Allow collection of anonymous statistics
Learn More
我勾选不容许上传统计信息 , 不让它访问国外的网站
基础配置
可能会提示这个 , 直接点击肯定 :
What base URL should hosts use to connect to the Rancher API?
配置上国内的 Docker image 仓库
效果图 :
配置 host 主机
把当前电脑 ( 此后都称做
"host" ) 配置进去
第四个步骤 : 指定 public ip , 我没写
由于当前的 host 没有固定的公网 IP , 因此我让它自动识别
它有提示我若是有防火墙或者有相同的
public ip 则没法使用这个 host
验证是否配置好 host 的方式之 1: 看 UI 界面
1.1 点击刚刚的配置 host 的页面最下面的 close 按钮 , 会自动弹出 host 列表
( host 列表的图在后面 )
1.2 经过菜单进入 host 列表
1.3 手动访问路由 URL
http://192.168.31.113:8080/env/1a5/infra/hosts
host 列表 :
验证是否配置好 host 的方式之 2: 访问 API 接口
根据 server 的 URL 加上 v1 就能访问到字符串 , 拼好后的 URL :
http://192.168.31.113:8080/v1
[可选] 配置 "access control ( 访问控制 )"
不配置也能够 , 安全性会低
会在明显的位置自动提示 :
Local Authentication is not configured.
Rancher can be configured to restrict access to a set of accounts defined in the Rancher database. This is not currently set up, so anybody that reach this page (or the API) has full control over the system.
做用
安全性
我暂时没弄 ,
默认是全部人均可以访问
由于都是局域网访问 , 把安全性都关了, 省得被拦截
以下图右上角蓝青色提示 :
建立 stack , 启动好 nginx 容器了
若是是启动过程当中
负载均衡
Add Load Balancer
loadBalancer
host 端口 ( 外部端口 )
90
内部端口 8888 , nginx 的是 80
target 端口是 80 , 不是 外部端口 8888
Ports
172.17.0.1:8888
配置的端口是容器内部的端口
不是暴露给 host 的端口
这文章写得不详细 :
写到 "根据网站操做" , 具体是什么 ? 不够详细 , 没有截图
问题
添加的
agent ( 代理 ) 相关问题
是什么?
是
客户端 ?
在哪执行
要在 host 宿主主机上执行吗 ?
功能
怎么和已有的项目配合 ?
在项目里编写好了 DockerFile 文件
打包成 image
使用 rancher 中拉取本地镜像