Coreos+docker New Generation Enterprise Lightweight Linux

Source: Internet
Author: User
Tags virtual environment git commands docker run

CoreOS home Page Use a word to summarize its philosophy: "A new way to think about servers", and immediately followed by "CoreOS is Linux for massive server deployments", indicating that this is a new thinking Way to think about the Linux server operating system deployed on a future server scale.

CoreOS claims to minimize the custom Linux system with:

    • Linux kernel, Linux runs the required
    • There are two root partitions, one being used as the boot partition and one being used as the update partition
      The update partition automatically restarts the system after the update is complete, the current machine does not need to be removed from the load cluster, and in order to ensure that other applications are not interrupted, the disk, network, and other IO used in the update process are restricted through Linux cgroup.
    • SYSTEMD, as the default system and Service Manager, has excellent features:
    • Support parallelization tasks;
    • At the same time, socket-type and d-bus-bus activation service are adopted.
    • Start daemon on demand (daemon);
    • Utilize Linux's cgroups monitoring process;
    • Support snapshot and system recovery;
    • Maintain mount points and automatic mount points;
    • Precision control based on dependencies between services.
    • The root partition is designed to be read-only to ensure data consistency and update availability
    • CPU, IO and other resources isolation, naturally to sacrifice the container (Container), CoreOS very wise use Docker as a container manager to build and publish applications, from this perspective, an application is actually a container.
    • The ETCD component is responsible for service discovery and configuration sharing, using the raft Distributed consistency Protocol algorithm to assume that service communication between components is used. Naturally, the application of containers (Container), the scaling of services, is very simple. Its genetic dimension supports cluster features, and of course, you can also interpret the support for cloud environments.

It seems that the system is intended for IT companies that are similar to having many platforms. Between services, granularity becomes very thin.

Just released the first 0.1.0 version, the official summary features are as follows:

    1. Simple interface, Http+json
    2. Secure, selectable SSL communication protocol
    3. Fast, tested 1000s single-instance write operations
    4. Reliable, distributed level using the Raft protocol
    5. Robust, cluster failures can be recovered from disk

To experience, at the moment, the simplest way to do it is to try it out in a virtual environment, and of course it does. This experience is based on a Windows 7 64-bit system. Here are the simple steps:

    1. First install VirtualBox 4.2.16, recommended to download from the official website.
    2. Vagrant, this time installing the latest version of 1.2.7,
    3. Installing Git for Windows 1.8.3 allows you to use GIT commands directly under the command
    4. To install the COREOS environment, open the Windows command-line environment:
    1. Git clonehttps://github.com/coreos/coreos-vagrant/
    2. CD Coreos-vagrant
    3. Vagrant up
    4. Vagrant SSH

After execution vagrant ssh, some of the SSH information is generated automatically:

host:127.0.0.1

port:2222

Username:core

Private Key:c:/users/nieyong/.vagrant.d/insecure_private_key

Use the familiar SSH terminal tools to login, here is recommended Xshell, not detailed. SSH log in successfully, you can see the welcome message:

    1. Experience a Docker as a container manager
      Take a quick look here and click on the command:

10.docker Run Ubuntu/bin/echo Hello World

At this point, the Ubuntu System container image file is downloaded automatically:

For more Docker operations, see their documentation.

    1. One place for process management systemd use here to get the system up and running, perform some simple tasks. Input under Terminal

12.sudo-i

Switch to the Ubuntu root user role and execute vi/media/state/units/hello.service, typing the following:

[Unit]

Description=my Service

After=docker.service

[Service]

Restart=always

Execstart=/usr/bin/docker Run Ubuntu/bin/sh-c "while true; do Echo Hello world; Sleep 1; Done

[Install]

Wantedby=local.target

After saving, we need to do a simulation reboot:

Systemctl Restart Local-enable.service

Now look at the log to see its output:

Journalctl-u hello.service-f

For more systemd details, please refer to http://www.freedesktop.org/wiki/Software/systemd/.

    1. This is the end of this.

Overall, CoreOS is the biggest feature, specifically tailored for large-scale server deployment of Linux thin systems, as much as possible to streamline the insignificant features, the operating system and applications completely separate, reducing the coupling of operating systems and applications, while addressing the existing Linux server in the container resources, Lack of rights management. At present, if it is a subversive operating system, very far-fetched, is not the future, it is not good to say, but certainly a trend.

Therefore, it is well worth looking forward to.

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.