RancherOS是由Rancher labs出品的一个专为Docker而生的精简版Linux,提供了一个完整的Docker运行环境。引导镜像仅有20MB大小,将其安装到ESXi虚拟机上导出之后,ova文件仅为300MB,比其他Linux发行版小的多。在我的工作环境中,需要将其安装至ESXi server,并向其他人分发。如果你有同样的需求,这篇文章也许可以或多或少帮助到你。英文文章,语法错误在所难免,欢迎批评指正。
To install RancherOS on your ESXi server, first of all, download rancheros ISO image from its website here
On ESXi, create a new Virtual Machine with at least 1GB memory. After you created appliance, upload rancheros.iso to your ESXi datastore and set CD/DVD rom to use it.
Once you clicked start button, the OS will boot up rapidly and prompt for login. Now rancheros is running in your RAM, you can login with credential rancher/rancher. Anything you change now will not be saved after you reboot. What we need is a docker ready OS so we need to install Rancher OS to our disk.
Before we install rancheros to our hard disk, you need to setup cloud-config first.
You also need to generate a new SSH key for file by following this article
Add your public key to file like following:
This is for rancher os first boot configuration after installation, you can use your private key to connect this host.
Next, we are going to configure network before installation. Following is an example, you need to configure DNS, IP address of interface and default gateway.
Make sure you only have one ethernet interface, current rancher os installer has problem when configuring multiple NICs.
Following is a complete example of .
At last, you need to put your to rancher os. After you login, configure a accessible temporary IP address and default gateway on eth0, then your to it.
Following is an example
On RancherOS, configure IP and default gateway
On your local machine, copy your to RancherOS via SCP or other method.
You should be all set if you done everything right in previous steps. Now we can call installer to initiate installation.
Installer will download rancher/os to your system and format . It could be some errors during installation, due to China GFW, keep retrying and you will success eventually.
At last, installer will prompt for reboot, after manual reboot you can configure own rancher os now.
When rancher os came back, login interface would prompt several interface ip addresses. Now the old login credential is not valid anymore, you can only use ssh with your private key to login
SSH will log you in directly without prompting for password. The private key should stay in your machine if this key-pair is not only for RancherOS connection. You can genenrate another key pair only for RancherOS first connection and you should distribute private key to other users. To enable multiple login, you need to enable and configure password for user
After reboot, setup new password for user , then you should be able to login from anywhere if you have correct username and password.
Now a lightweight docker ready system is deployed on your ESXi machine.
You can login with account . If it didn’t work, you can share the newly generated ssh key pair to your users, it will cause no security issue, because the key pair is only for connecting exported RancherOS. After first login, user can replace his/her own public SSH key in RancherOS file.
Rancher OS also privoded configuration and upgrade approaches and will be described in another document.
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/bian-cheng-ri-ji/62704.html