VirtualBox using ISO installation rancheros--experience the impact of container technology on operating system development

Source: Internet
Author: User


In college, when we were on the first operating system course, the teacher told us what the operating system was going to do. It is not easy to tell the question clearly. In the different periods of the development of the operating system, the functions it completes are not the same, the single-channel program, multi-channel program, batch processing program, network operating system, multi-user operating system, open source operating system, closed source operating system, distributed operating system, time-sharing operating system, RTOs and so on, divided into different angles, The result of division is different. With so many divisions, what does the operating system do? Teacher said: "Very simple, is to manage the computer hardware resources, control other programs run and provide users with interactive interface of the System software collection." ”。 The concept of something that needs to be carefully understood. Cloud computing today, let's verify the following:

    1. Managing computer Hardware Resources-cores (such as the Linux kernel)

    2. Control other programs to run-like Rancheros's system Docker

    3. Other programs--docker packages (this is not strictly the operating system of the thing, but now it seems the boundary is blurred)

    4. User-Provided interactive interface--android, IOS, VR virtual reality, etc.

But now more detailed, each division just do it itself, I also clearly remember the Academy Academician NI Guangnan that sentence, after the operating system will be divided into two, one is to focus on the various screens to present the sound screen, the other is to focus on processing service data, which is the future development of the operating system trend. Slowly we can not see the boundaries of the original definition, they are in the fusion of differentiation!

Let's say Rancheros:

Rancheros, the goal is to become a mini Linux distribution running Docker container, the volume is only about 30M, streamlined very good, rancheros in the Docker daemon is the first loaded process, PID 1, the kernel started the first process, This Docker instance is called "System Docker", and its job is to initialize the system services, and all processes, services, and so on are done through a Docker instance, the system Docker is similar to other Linux distributions in systemd such as ArchLinux.

In fact, Rancheros technology is not very strong, a lot of Linux distribution is very small, but its thinking, its concept is fierce. When it comes to having to mention Coreos,coreos's goal is to run Docker, but Rancheros more than CoreOS's design ideas. Rancheros initially wanted to be able to run Docker directly on the Linux kernel, distributing all the user-space Linux services as Docker containers. This makes the deployment of a service very simple, for the Ops people, need to take, do not need to remove, the trick is to go.

Here's a look at my notes and experience of installing Rancheros. Rancheros's website: rancheros, and official documents: http://docs.rancher.com/os/, as a reference.

Pre-installation, of course, is to download Rancheros iso image file: Rancheros.iso, I use the version is V0.4.4-rc2,rancheros installation is actually more than the CoreOS installation is much simpler, because its site is not the Wall ~ ~ ~ Hehe. However, it is recommended to build a Web server in the physical machine environment to facilitate the transfer of CLOUD-CONFIG.YML configuration files, as for the creation of a Web server in my previous blog has written, please refer to CoreOS installation.

The following formally began, the usual, VirtualBox configuration: At least 1G of memory, hard disk 5G enough to use, CPU look at the configuration of personal computers, network mode changed to bridge adapter, EFI boot do not tick.

Load and start Rancheros ISO, the user name password after startup is rancher, at this stage in rancher CLOUD-CONFIG.YML configuration file does not support the addition of users, the default user only rancher, this and CoreOS is not the same. First of all, let our ISO system be able to access the Internet:

If your network has a DHCP server, because the Rancheros default is to open the DHCP client Docker process, it is possible to obtain an IP address automatically, so there is no need to configure the following static IP.

#先查看自己网络设备名称ip link# Add IP, pay attention to replacing IP and eth0 with your own sudo ip addr add 192.168.0.2/24 dev eth0# Adding a default gateway, pay attention to replacing IP with your own sudo route add default GW 192.168.0.254# Add DNS, note to replace IP with your own sudo vi/etc/resolv.conf# open resolv.conf file after adding nameserver 192.168.0.1# save exit

You can ping the external network to confirm that you can use it.

All right, go ahead.

Here is the download of the CLOUD-CONFIG.YML configuration file in Rancheros:

#注意将IP换成实体机IPwget   #用vi查看下vi  cloud-config.yml#cloud-configssh_authorized_keys:  -  ssh-rsa aaaab3nzac1yc2eaaaabiwaaaqea0v4tvnpf2ahyrdp6dsw7hkc+nkowfifzbvcvrjgox31scm/z+syoen/ 21r4tkbprukmvvg/o2tdwj1uezkgaaj+ 7gygynrdhojh4rnrdyhii27hk9qgauhlti8gjmigmmhk63yl2euwc18fc6bn6zr2sgzpolob2gzjecorykdk3/ bcv6fwufsebewjoqqttdnhfrt9vmilmzkqcrogq+g2fjfrgn2f/yxlpmcayq0xp9o3bvnc5mf1x59hpa/yqscm2riqw+ 3eftinuvjdth65y1sxrdmnqhtspq48m1gd/m9f6pessloraw96q5l0h2hgibvu8kt9iymxmffweyw==hostname:  rancheros1rancher:  network:    interfaces:       eth0:        address: 192.168.0.102/24         gateway: 192.168.0.1        mtu:  1500        dhcp: false    dns:       nameservers:        - 192.168.0.1 

Note: The TAB key in all Cloud-config configuration files cannot be recognized, so remember to use the SPACEBAR when indenting. In addition, the line breaks in Windows are not the same as the line breaks in Linux, Mac, so using Windows to build this file requires processing the next line break to make it match Linux, Mac.

Note that the IP address in the above configuration file, DNS and SSH public key are replaced by their own, Windows clients can use putty or Xshell generation Ssh,linux or Mac clients directly on the command line using the Ssh-keygen command generation. The above configuration does not turn on DHCP by default.

The configuration file after installation is in the/var/lib/rancher/conf/directory. For more detailed explanation of cloud-config.yml configuration file, please refer to: Rancher documentation.

All right, go ahead.

Install the following:

#安装RancherOS命令sudo Ros Install-c cloud-config.yml-d/dev/sda# Prompt to continue, confirm yy# Sometimes the network will be less stable, try to install several times after the successful prompt whether to restart, do not restart nn# Then shut down sudo poweroff

After the shutdown, remove the optical drive, start rancheros again, boot if it fails, check the configuration file. Important thing to say three times: boot if it fails, check the configuration file. If the boot fails, check the configuration file. If the boot fails, check the configuration file. Please pay attention to the failure prompt, you can open a recording screen in the virtual machine, in order to replay, to find the error message, there is a similar hint of the row 11,col 1, which indicates that the 11th row of the configuration file 1th column has a problem.

After success can use SSH login, after the installation of Rancheros is not able to use rancher user native login, the recommended use SSH login username or rancher.


This article is from the "end of Philosophy" blog, please be sure to keep this source http://lucien1970.blog.51cto.com/10670905/1761554

VirtualBox using ISO installation rancheros--experience the impact of container technology on operating system development

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.