rancheros在vm主机部署

问题描述:

  容器化,越来越重要。在云服务中很大比例的服务都跑在容器中,今天介绍rancheros基于容器的os.

特点:

  • 启动快,比较小系统服务也是基于容器化
  • 使用最新的docker release
  • 跨架构arm/x86/amd

rancheros技术架构

 Rancheros官方:

  • https://rancher.com/docs/os/v1.x/en/
  • https://github.com/rancher/os

01、下载rancheros

###硬件最低配置

部署在vmware主机中

 ###下载rancheros

  • v1.5.4 - Docker 18.09.08 - Linux 4.14.138

02、vmware安装到硬盘中

注意:默认iso载入,重启数据会丢失。默认账户rancher自动登录

 ###挂载rancheros启动

###自动登录进去自动获取IP信息

###设置rancher密码

sudo passwd rancher    //暂且设置rancher/rancher,默认是没有密码的,可以tail /etc/shadow |grep rancher,网上的很多扯淡的话

 ####xshell登录rancheros

 ####配置cloud-config.yml

 生成rsa秘钥对,安装到硬盘默认不允许远程登录(主要是为了安全)

###cloud-config.yml

###cloud-config.yml

rancher: docker: registry_mirror: https:
//registry.docker-cn.com network: interfaces: eth0: address: 192.168.3.15/24 gateway: 192.168.3.1 mtu: 1500 dhcp: false dns: nameservers: - 223.5.5.5 - 223.6.6.6 ssh_authorized_keys: - ssh-rsa xxx //填写rsa公钥

 注意:上面信息请根据具体的情况修改即可,切不可照搬

###查看硬盘设备命名

 ###rancheros   ros install  --help   //命令帮助

 sudo ros install --cloud-config cloud-config.yml  --device /dev/sda   //两次y确认

注意:安装完毕,移除iso

 ###登录系统,sudo system-docker ps    //查看系统运行的容器,非用户层次的  docker ps

 ###用户使用的docker容器

猜你喜欢

转载自www.cnblogs.com/xiaochina/p/11603037.html