Using Docker Preparation before Docker Deployment

Machine Learning Artificial Intelligence Natural Language Processing Semantic Web Algorithm Search Technology DataBase Technology Ontology Technology Digital Transformation DevOps UI and DataVisualization Workflow & Services IT Infrastructure Navigation of this blog

Summary

From the Docker Practical Guide. In the previous article, we gave an overview of Docker. In this article, we will discuss the checklist before Docker installation, which Docker edition to use, OS selection, and Docker desktops.

Identification of items to be considered

The first item to consider when introducing Docker is “Does your company need Docker in the first place? Docker offers a variety of features for managing containers, but it is important to understand the advantages and disadvantages of Docker compared to existing virtual environments.

For example, most hypervisor-based virtualization software provides a live migration function that allows users to move a guest OS to another physical machine while it is still running, but Docker does not provide a live migration function as a standard feature. However, Docker does not provide live migration as a standard feature, so it is not possible to move a running container to a different machine.

In addition, when considering the high availability of Docker containers, support for HA clusters is still unclear, so even if an HA cluster is configured for process control using Docker containers, there are still issues such as how to switch the logical volume of the shared disk. Of course, high availability in Docker is not a simple matter. Of course, various demonstrations and studies are being conducted to achieve high availability in Docker (see figure below).

Specific examples include the CRIU project, HA cluster configuration with “DRBD+Corosync+Pacemaker” without non-existent disks, Docker Swam, Meososphere DC/OS load balancing functionality provided by Meososphere, Kubernetes, and Keepalived and Linux Virtual Server (LVS). However, best practices are not available at this time.

OS selection criteria for running Docker

Docker is open source software that anyone can obtain free of charge, but depending on the OS environment in which it is run, the vendor’s response to defects, user friendliness, management man-hours and effort, and methods vary.

Community Edition or Commercial Support?

One of the conditions for OS selection will be the difference between Docker running on a community version of a server OS and Docker running on commercial Linux. The community version of the Docker engine, which is provided free of charge, is called “community version Docker,” and the operating systems on which this community version of Docker runs include Fedora, CentOS, and Ubuntu Server. Naturally, the community version of a server OS is not eligible for vendor maintenance support. The community version of Docker running on it is also not supported by the vendor. When a problem occurs, the user needs to isolate whether the problem is in Docker itself or in the server OS.

On the other hand, commercial Linux systems such as Red Hat Enterprise Linux (RHEL) and SUSE Linux Enterprise Server (SLES) can also run Docker.

For commercial Docker engines running on commercial Linux, such as RHEL and SLES, maintenance support for the OS and Docker engine is available within the scope of their subscription contract. If you need some technical support for Docker, you should consider deploying a commercial Docker engine running on commercial Linux with vendor support. running on a commercial Linux platform with vendor support. Especially when introducing advanced software such as Docker, which is frequently updated, into a production system, not only the stability of its operation and functional aspects, but also the ease of obtaining information on workarounds and solutions to problems and failures of Docker itself are important for the stable operation of the system.

The main checkpoints when considering the introduction of Docker are as follows.

  • Why do we need Docker in the first place?
  • What are the challenges of existing virtual environments?
  • Is it possible to replace existing virtual environments with container environments?
  • What are the biggest obstacles to applying Docker?
  • Which parts of the existing system should we apply Docker to?
  • Is it possible to achieve SLAs (Service Level Agreements) for high availability in physical environments with Dcoker?

In addition, the main checkpoints for server OS selection after the decision to deploy Docker include the following

  • Is a community version of the Linux OS good enough to run Docker? Should it be a commercial version of Linux OS?
  • If a community version of Linux OS is used, which distribution should be adopted?
  • If commercial Linux, which distribution should be used?
  • Can I get maintenance support for OS and Docker from an OEM vendor at the same time?
  • If maintenance support is not available from the OEM vendor, can you isolate the problem in-house?
Understand the current status of container-specific OSs

Another requirement for selection will be the difference in management between Docker running on a regular server OS and a dedicated OS developed for Docker. Here, a dedicated OS developed specifically for container use, such as Docker, is referred to as a container-specific OS. Unlike Docker, which runs on general-purpose CentOS or RHEL, a dedicated OS for containers is an appliance OS focused on running containers. For this reason, the management method of the dedicated OS itself is different from that of a general Linux OS such as CentOS.

A container-specific OS is stripped of applications, daemons, package management managers, etc., and consists of the minimum number of components necessary to run containers. Since a container-specific OS eliminates as much as possible the running of daemons and applications unrelated to containers, it is said to provide stronger security, performance advantages, and high maintainability compared to a general server OS.

Some well-known container-specific OSs include CoreOS (Container Linux), Atomic Host, RancherOS, and Snappy Ubuntu Core.

  • Project Atomic : Project Atomic is a community-based project that aims to develop a Docker-specific operating system that streamlines container deployment and management. Fedora Atomic Host” based on Fedora and “CentOS Atomic Host” based on ContOS. They are available free of charge and allow users to experience a Docker-specific OS.
  • Red Hat Enterprise Linux Atomic Host : Red Hat Enterprise Linux Atomic Host is a commercial product released by RedHat. RHEL Atomic Host is a commercial version of the project Atomic, but with management tools.
  • Snappy Ubuntu Core : Snappy Ubuntu Core provided by Canonical is also a lightweight OS for the use of containers such as Docker, and like Project Atomic, it consists of the minimum necessary components.
  • CoreOS : CoreOS is a lightweight OS optimized for Docker and similar container runtime called rkt. RancherOS : RancherOS is a lightweight OS that is optimized for container runtime.
  • RancherOS : RancherOS is a container-specific OS released by Rancher Labs in 1025 that runs the Docker engine and has a very compact OS size due to its minimal functionality. As with CoreOS and AtomicHost, an ISO image is provided for installation, a GUI management screen is provided as standard, and the container orchestration software Kubernetes can be used immediately. Kubernetes, a container orchestration software, is also a feature of this product.
Server OS vs. container-specific OS

The main checkpoints regarding the adoption of server OSs and container-specific OSs are listed below.

  • Can I switch from a familiar Linux server OS to a dedicated container appliance?
  • Do you need to run third-party applications on the host OS?
  • Do you have the documentation and personnel skillsets to install the OS and Docker?
  • Do you need to manage the server OS in the same way as before? Are new management techniques acceptable?
  • Do Docker containers need to be managed via GUI?
  • Do you use external storage?
  • Do you need monitoring agents provided by hardware or middleware vendors?
Editions of Docker

Currently, there are two main types of Docker engines. One is the free version of the Docker engine and the other is the paid version of the Docker engine. The free version of the Docker engine is called Docket Community Edition (Docker CE), while the paid product is called Docker Enterprise Edition (Docker EE).

Docker CE

Docker CE is primarily for developers and those who want to try out Docker applications on a small scale. Docker CE is maintained by the community and is not supported by OEM vendors who provide genuine Docker products.

Docker CE is released in batches approximately every month as needed, with a stable release every six months. Docker CE binary packages for all channels are available for free from download.docker.co.

Docker EE

Docker EE is an edition for large enterprise development and systems with strict security requirements, and is maintained and supported by Docker, Inc. Enterprise”. Docker Engine Enterprise includes GUI management, Docker image management, user management, security scanning, and other features in addition to Docker Engine Enterprise.

Docker EE runs on Windows servers, Linux OS for servers, on-premise, or in a cloud castle, and includes two container orchestration features, Kubernetes and Swarm.

The differences between Docker EE and Docker CE are listed below.

Docker for Desktop

Docker Desktop is a software application provided by Docker that allows easy installation and use of the open source software Docker on Windows and MacOS.

Since Docker runs on Linux, these applications are necessary for non-Linux Windows and MacOS. Therefore, most developers on Windows and MacOS have been using Docker Desktop. (There are other ways to run Linux as a virtual machine and run Docker inside it.)

) Starting in September 2021, Docker Desktop will be available for a fee except for small businesses, educational institutions, individuals, and non-commercial use. This is only because “Docker Desktop” for running Docker on Windows and MacOS has been made available for a fee, but Docker itself can be used for free.

The following is a summary of the necessary actions for companies regarding the fee and the price change on October 27, 2022.

  • Companies with more than 250 employees or more than $10 million in annual revenue must subscribe to the Pro Plan or higher to use Docker Desktop for commercial purposes.
  • If the number of users exceeds 100, the Team Plan is not available and the Business Plan must be used (it is unknown if the Pro Plan is available).

Commercial use here refers to “an activity in which a product or service is used for commercial gain. This benefit can be financial, honorary, or otherwise, and ultimately benefits the commercial activities of the user.”

In other words, any use of such tools in a commercial enterprise for business purposes is strictly speaking considered “commercial use. According to the terms of use, when you download Docker Desktop, you agree to the terms of use, and it states that late payments will incur late interest charges of 1.5% per month.

Basically, you need to develop with Docker without using Docker Desktop. The way to do this is to 1) use Linux (Linux such as Ubuntu can easily use Docker for free without Docker Desktop), or 2) use a virtualization tool such as VMware, VirtualBox, Parallels, or Hyper-V. (2) Run Linux on virtualization tools such as VMware, VirtualBox, Parallels, and Hyper-V, and use Docker within them, (3) Use WSL (Windows Subsystem for Linux), and other approaches.

Based on the above situations, the use of Docker desktops is described below.

The procedure for downloading the Docker desktop to M1 mac is as follows.

  • Download Docker Desktop for Mac from the following page
  • Select Apple chip when prompted to choose M1 chip or Intel chip.
  • Double-click the downloaded Docker.img file.
  • Drag the Docker icon to the Applications folder
  • Launch Docker.app in the Applications folder
  • A warning will appear, select “Open
  • You need to give access permission, press OK button and enter the password
  • The Docker terms and conditions screen will appear. Check it, and if everything is OK, click “Accept.
  • If Docker starts successfully, the following screen is displayed.

  • Start a terminal and type “docker ps”. If “CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES” is displayed, the system is working properly.
  • Start the container shown in the start screen “docker run -d -p 80:80 docker/getting-started” Wait for a while and the container will be downloaded and started.
  • Start a browser and open “localhost:80” to see the following screen. This means that you are accessing the page of the server on the container.

  • Looking at the docker desktop screen, you can see the list of containers created (currently only one)

  • To stop a container, select it on the docker desktop and click the “stop” button.

コメント

タイトルとURLをコピーしました