Quick Start of CoreOS installation on PC

Source: Internet
Author: User

Quick Start of CoreOS installation on PC
Meaning

Able to install and deploy the Linux operating system as quickly as possible. The installation is fast and simple, and Docker can be started in almost no time. The running speed is very fast. Use a memory hard disk.

My situation

Win8 laptops occasionally play games, but it may take one day for me to install a Linux system. All my businesses only need to run in Docker. In addition, my laptop has 16 GB of memory (thanks to teacher HUST Jiang ).

Preparation
  1. CoreOS image
  2. EasyBCD 2.2 free download [Chinese multi-language edition]
Commencement
  1. Install EasyBCD and add the ISO boot item file directly using the livecd image of CoreOS
    Detailed steps include:
  2. Start CoreOS to complete CoreOS Installation
Update

You only need to update the ISO file for startup.

Disadvantages
  1. It cannot be persistent (the advantage is that it can be restarted directly)
  2. Files generated by the entire operating system in the hard disk directly occupy the hard disk space (the advantage is that the hard disk speed is greatly improved)
  3. Manually mount the hard disk space at startup and manually run the initialization script of the entire system.

In combination with the advantages and disadvantages, we recommend that you configure this set of configurations to work with specific businesses. If there are many businesses, there may be a lot of optimization points.

Configuration
  1. Open a GB space on the hard disk and format it. Refer to the command:mkfs.ext4 /dev/sda2, And then mount. If you do not understand how to partition, format, and mount the partition, see here. This article is the best article I have ever seen about basic disk management.
  2. Copy the folder after mounting/var/lib/docker/To the Mount location, and then soft connection back. (Then docker images can be persistently stored in the hard disk and restarted without loss ). Follow these steps:
    1. cp -rf /var/lib/docker /mnt/
    2. rm -rf /var/lib/docker
    3. ln -s /mnt/docker /var/lib/docker
My initialization file reference
  1. mkdir /root/.ssh
  2. Echo "ssh-rsa xxx... (Omitted)... xx [email protected]">/root/. ssh/authorized_keys
  3. rm -rf /var/lib/docker
  4. ln -s /mnt/docker /var/lib/docker
  5. #echo 'DOCKER_OPTS="--registry-mirror=http://XXXXX.m.daocloud.io"' >> /run/flannel_docker_opts.env
  6. #systemctl daemon-reload
  7. systemctl restart docker
  8. # using disk

Import rsakey first, and then connect to the docker location.

Add daocloud acceleration (although the official website did not write about how CoreOS is accelerated, but some experts have provided a method), because I do not accelerate faster than acceleration, so I will comment out it first. As an alternative.

Pitfalls encountered by systemd

If error-1 is returned in docker, the container fails. However, scope still exists in systemd.

When the problem container is started, a prompt is displayed.

  1. Error response from daemon:Cannot start container test:[8]System error:Unit docker-e10eb86807cd9971fc03a8eee732771193d506ed2ba678fdf4292916a9fb072c.scope already exists.

So

  1. systemctl stop docker-e10eb86807cd9971fc03a8eee732771193d506ed2ba678fdf4292916a9fb072c.scope

You can do this.

CoreOS. iso pitfall 2

Confirm KnowHosts continuously.

Refer to Solution

Summary

It is too convenient to deploy Linux in a PC using this method. The idea of getting familiar with Docker may take 20 minutes to complete.
After finding this idea, I have gone through various trade-offs.

  1. To quickly solve the boot problem, use EasyBCD to directly boot the memory ISO for the UEFI Grub problem.
  2. To reduce the time cost caused by the configuration environment, change the hairstyle version from normal installation to the hard disk to CoreOS
  3. To avoid the system instability caused by incorrect operations Or version upgrades, change Docker
  4. In the future, we may change to RKT and RunC. (we hope that the big guys can fill in the issue quickly. RunC said that this month's Release does not know if it will jump)
  5. Note that this solution uses the simplest environment configuration to change the development time at any cost. Perfectionists may have to make a detour.

How to deploy a WordPress instance in CoreOS

Initial server operating system CoreOS experience

CoreOS practice: Analyzing etcd

CoreOS practice: Introduction to CoreOS and management tools

[Tutorial] Build your first application on CoreOS

CoreOS details: click here
CoreOS: click here

This article permanently updates the link address:

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.