2017 System Comprehensive Practice-The first practice assignment

2017 System Comprehensive Practice-The first practice assignment

(1) Course survey

I think that systematic integrated practice should be a practical course that takes us to explore the deeper mechanism of the project.

I hope that this course can bring us in-depth knowledge of software architecture without being too unpredictable, and it is daunting. I hope that we can learn from the content we have mastered step by step and learn more healthy.

(2) Understanding microservices

"Microservices is an emerging software architecture, which is to split a large single application and service into dozens of supporting microservices. A microservice strategy can make work easier, it can extend a single Components rather than the entire application stack to meet service level agreements. "

One of the biggest advantages of microservice applications is that they tend to use computing resources more efficiently than traditional applications. This is because they deal with functional bottlenecks by extending components. In this way, developers only need to deploy computing resources for additional components, rather than deploying a completely new iteration of a complete application. The end result is that more resources are available for other tasks.

Another benefit of microservice applications is that they are faster and easier to update. When developers make changes to a traditional monolithic application, they must do detailed QA testing to ensure that the changes do not affect other features or functions. But with microservices, developers can update individual components of an application without affecting other parts. Testing microservice applications is still necessary, but it is easier to identify and isolate problems, thereby accelerating development and supporting DevOps and continuous application development.

The third benefit is that the microservices architecture helps emerging cloud services such as event-driven computing. Features like AWS Lambda allow developers to write code to sleep until application events are triggered. Computing resources are only needed for event processing, and companies only have to pay for each event, not a fixed number of computing instances.

The disadvantage is that microservices constitute a similar distributed system, and various problems of distributed systems have appeared.

(3) Learn docker technology

Compose is a tool for defining and running multi-container Docker applications. With Compose, you can use YML files to configure all the services your application needs. Then, with a single command, you can create and start all services from the YML file configuration.

Dockerfile is a text file that is used to build an image. The text contains instructions and instructions for building an image.

Docker Machine is a tool that allows you to install Docker on a virtual host, and you can use the docker-machine command to manage the host.

Docker Swarm is Docker's cluster management tool. It turns the Docker host pool into a single virtual Docker host. Docker Swarm provides a standard Docker API, and any tool that has communicated with the Docker daemon can be easily extended to multiple hosts using Swarm.

Docker includes three basic concepts:

  • Image : The Docker image is equivalent to a root file system. For example, the official image ubuntu: 16.04 contains a complete set of Ubuntu16.04 minimum system root file system.
  • Container (Container) : The relationship between the image (Image) and the container (Container), just like the class and instance in object-oriented programming, the image is a static definition, the container is the entity of the image runtime. Containers can be created, started, stopped, deleted, suspended, etc.
  • Repository : The warehouse can be viewed as a code control center, which is used to save images.

(3.0) The content of this experiment:

* The official documents are very detailed and specific, only some abstracts and instructions are given here. *

1. Set up your Docker environment.

Uninstall the old version

The old version of Docker is called docker, docker.io or docker-engine. If they are installed, uninstall them:

$ sudo apt-get remove docker docker-engine docker.io containerd runc
Set up warehouse

Update the apt package index.

$ sudo apt-get update

Install the apt dependency package, used to obtain the repository through HTTPS:

$ **sudo** **apt-get install** \
  apt-transport-https \
  ca-certificates \
  curl \
  gnupg-agent \
  software-properties-common

Add Docker's official GPG key:

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88 By searching the last 8 characters of the fingerprint, verify that you now have the key with the fingerprint.

$ **sudo** **apt-key** fingerprint 0EBFCD88
  
pub  rsa4096 2017-02-22 **[**SCEA**]**
   9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88
uid      **[** unknown**]** Docker Release **(**CE deb**)** **<**docker**@**docker.com**>**
sub  rsa4096 2017-02-22 **[**S**]**

Use the following instructions to set up a stable version of the warehouse

$ **sudo** add-apt-repository \
  "deb [arch=amd64] https://download.docker.com/linux/ubuntu **\
** $(lsb_release -cs) **\
** stable"
Install Docker Engine-Community

Update the apt package index.

$ sudo apt-get update

Install the latest version of Docker Engine-Community and containerd.

$ sudo apt-get install docker-ce docker-ce-cli containerd.io

2. Build and run your image to create an image and instance

3.Share images on Docker Hub传到Docker Hub

to be continued(/BGM/Roundabout)

Guess you like

Origin www.cnblogs.com/highwaytohell/p/12683103.html