RancherOS Study Notes (1), rancheros Study Notes

Source: Internet
Author: User

RancherOS Study Notes (1), rancheros Study Notes

Today, I just want to briefly understand rancheros and try to install it.

This is the official documentation: http://docs.rancher.com/ OS/

This is the official site Github address: https://github.com/rancher/ OS

Rancheros has a very strange system management method. All system-level services of the operating system, such as udev and syslog, already exist in the form of docker containers. This is a system-level docker Container service; the other is application-level docker Container service, which is generally used.

Rancheros's docker engine software can directly support online upgrades. The more appropriate point is that multiple docker engine versions can be switched at will. This is good, so you can experience the new features of docker in a timely manner.

Rancheros installation package. The latest version is 0.8.1 and the size is 54 Mb.

Rancheros has powerful command lines for managing system services, switching the console, switching docker engine, and operating system versions. All right, you have to install it first.

I am using a virtual machine created under ESXi 5.5 (note that the memory cannot be less than 1 Gb and I am using 2 Gb .)

Load the downloaded rancheros. iso file and start it from the optical drive. It takes about 10 seconds to log on to the system (Automatic Logon with the logon name rancher ). If you want to install it to a disk, you need to write a configuration file: cloud-config.yml. Four recommended configurations: hostname (host name), ssh_authorized_keys (logon authorization public key, which is actually the openssh configuration), and (rancher. network. interfaces) network configuration, rancher. services_include (if vmware-tools is enabled in a virtual machine, open-vm-tools: true ).

#cloud-confighostname: rancher-01rancher:  network:    interfaces:      eth0:        address: 192.168.0.101/16        dhcp: false        gateway: 192.168.1.1        mtu: 1500  services_include:    open-vm-tools: truessh_authorized_keys:- ssh-rsa AAAXXXXXX

The public key here is the Public Key provided after a key pair is generated on another computer. Because clipboard copy is not supported, you can only use the network mode. If you have a linux server, you can use scp to connect to the linux server on the server of rancheros and copy the file. What if you don't have one windows server? Mount a site under IIS and drop the configuration file. Then download it in rancheros via wget command: wget-O cloud-config.yml http: // <your server: your site port>/cloud-config.txt

Use vi to edit the file to see if there are any special symbols. If you are not sure whether the configuration file is correct, run the following command:

sudo ros c validate -i cloud-config.yml

If the console is not displayed, it indicates that the verification is OK. Otherwise, a prompt is displayed indicating the configuration is incorrect.

The next step is to install it to the hard disk. I only configured one hard disk, that is,/dev/sda. I installed it on this hard disk.

sudo ros install -c cloud-config.yml -d /dev/sda

All the way down by default, the installation will be completed after automatic restart.

If the client is Windows, XShell is recommended. remote connection to linux is not too convenient...

What are the ros commands?

rancher@rancher-01:~$ sudo rosNAME:   ros - Control and configure RancherOSUSAGE:   ros [global options] command [command options] [arguments...]   VERSION:   v0.8.1   AUTHOR(S):   Rancher Labs, Inc.    COMMANDS:     config, c   configure settings     console     manage which console container is used     engine      manage which Docker engine is used     service, s  Command line interface for services and compose.     os          operating system upgrade/downgrade     tls         setup tls configuration     install     install RancherOS to disk     selinux     Launch SELinux tools container.     help, h     Shows a list of commands or help for one commandGLOBAL OPTIONS:   --help, -h     show help   --version, -v  print the version

The first is configuration-related. You can directly change the configuration using commands.

The second is the console. By default, almost nothing can be done. You can switch to a console with package management, such as debian, centos, and xfce. The console helps you manage linux servers, rather than installing services. For application services, it is better to use docker containers. (Although the console itself is actually a docker container, it is better to separate it)

The third is docker engine. You can switch the docker version.

The fourth is system service. You can also configure the docker image as a system service.

The fifth is the operating system. You can upgrade or downgrade the system version. (I just upgraded from rancher/OS: v0.7.1 to rancher/OS: v0.8.1)

The sixth is the command used to install the system to the hard disk.

In the seventh case, selinux understands linux and does not need to be said much.

 

As for how to cluster containers, you will be familiar with them later.

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.