2021 national vocational college skills competition -- chinaskills mall e-commerce system

Yunmeng company has developed a set of chinaskills mall e-commerce system based on SpringBoot+MyBatis micro service architecture,
And realize full container deployment. The architecture of chinaskills mall e-commerce application system is shown in Figure 1, and the system description is shown in Table 2.

Library component, Redis message component, RabbitMQ message component, and Nacos registry registration
The central service components and front-end Nginx components are containerized as required. (required package: mall-swarm.tar.gz)
In the http service). [applicable platform] private cloud

[Title 1] container deployment MariaDB[2 points]

Write the / root / mall swarm / dockerfile MariaDB file on the master node to build
Chinaskillmall MariaDB: v1.1 image. The specific requirements are as follows:
(1) Basic image: CentOS: CentOS 7.5.1804;
(2) Author: chinakill;
(3) Install and initialize mariadb, password: root;
(4) Set the database code to UTF-8;
(5) Open port: 3306
(6) Set mariadb to start automatically.

FROM centos:7.5.1804
MAINTAINER Chinaskill
RUN rm -rvf /etc/yum.repos.d/*
ADD ftp.repo /etc/yum.repos.d/
ADD gpmall.sql /root/
RUN yum install -y mariadb-server
RUN sed -i "13cport = 8066" /etc/my.cnf.d/server.cnf
ADD init.sh /root/init.sh
RUN chmod +x /root/init.sh
RUN /root/init.sh
ENV LC_ALL en_US.UTF-8
EXPOSE 3306
EXPOSE 8066
CMD ["mysqld_safe"]

[Topic 2] redis container deployment [1.5 points]

Write the / root / mall swarm / dockerfile redis file on the master node to build chinaskillmall redis: v1.1
Mirror image. The specific requirements are as follows:
(1) Basic image: CentOS: CentOS 7.5.1804;
(2) Author: chinakill;
(3) Install redis service;
(4) Modify bind 127.0.0.1 in the configuration file to bind 0.0.0.0;
(5) Set redis password free and turn off the protection mode;
(6) Open port: 6379;
(7) Set the service to start automatically.
After completion, build the image and submit the user name, password and IP of the master node to the answer box.
1.docker build builds the image, and the correct return is counted as 0.4 points
2. Start the container and enter the container to view the info information of redis. It is connected_ Clients: 0.5 points for 1
3. Enter the container to view the configuration file and cancel the protection mode, 0.6 points

FROM 192.168.200.200/chinaskillproject/centos:7.5.1804
MAINTAINER Chinaskill
RUN rm -rvf /etc/yum.repos.d/*
COPY ftp.repo /etc/yum.repos.d/local.repo
RUN yum clean all
RUN yum list
RUN yum -y install redis
RUN sed -i -e 's@bind 127.0.0.1@bind 0.0.0.0@g' /etc/redis.conf
RUN sed -i -e 's@protected-mode yes@protected-mode no@g' /etc/redis.conf
RUN sed -i -e 's@daemonize yes@daemonize no@g' /etc/redis.conf
EXPOSE 6379
#ENTRYPOINT ["/usr/bin/redis-server","/etc/redis.conf"]
ENTRYPOINT redis-server /etc/redis.conf
CMD ["redis-server"]

[title 3] container deployment Nacos Registry [2 points]

Write the / root / mall swarm / dockerfile Nacos file on the master node to build
Chinaskill mall Nacos: v1.1 image. The specific requirements are as follows:
(1) Basic image: CentOS: CentOS 7.5.1804;
(2) Author: chinakill;
(3) Install jdk tools and Nacos server tools;
(4) Set the nacos service to start automatically.

[root@master mall-swarm]# cat Dockerfile-nacos 
FROM centos:centos7.5.1804
MAINTAINER chinaskill
RUN rm -rf /etc/yum.repos.d/*
COPY local.repo /etc/yum.repos.d/
ADD nacos-server-1.1.0.tar.gz /usr/local/
ADD jdk-8u121-linux-x64.tar.gz /usr/local/
ENV NACOS_HOME /usr/local/nacos
....

[title 4] container deployment front-end service [2 points]

...

[title 5] arranging and deploying chinaskills mall mall [2.5 points]

Write the / root / mall swarm / docker-compose.yaml file on the master node. The specific requirements are as follows:
(1) Container 1 Name: chinaskillmall admin; Image: mall / mall admin: 1.0-snapshot; port
Mapping: 8080:8080;
(2) Container 2 Name: chinaskill mall auth; Image: mall / mall auth: 1.0-snapshot; Port mapping
Shooting: 8401:8401;
(3) Container 3 Name: chinaskill mall gateway; Image: mall / mall gateway: 1.0-snapshot;
Port mapping: 8201:8201;
(4) Container 4 Name: chinaskillmall MySQL; Image: chinaskill mall MariaDB: v1.1; Port mapping:
3306:3306;
(5) Container 5 Name: chinaskillmall Nacos; Mirror image: chinaskill mall Nacos: v1.1; Port mapping:
8848:8848;
(6) Container 6 Name: chinaskillmall nginx; Mirror image: chinaskill mall nginx: v1.1; Port mapping:
8888:80;
(7) Container 1 Name: chinaskillmall redis; Image: chinaskill mall redis: v1.1; Port mapping:
6379:6379.
After completion, arrange and deploy chinaskills mall mall. Then submit the user name, password and IP address of the master node to the answer
Question box.

version: '3'
services:
  db:
    image: chinaskill-mariadb:v1.1
    container_name: chinaskill-mysql
    ports:
      - 3306:3306
  redis:
    image: chinaskill-redis:v1.1
    container_name: chinaskill-redis
    ports:
      - 6379:6379
.. 
nginx:
    image: chinaskill-nginx:v1.1
    container_name: chinaskill-nginx
    ports:
      - 8888:80
      - ....

On the browser http://IP:8888 Access mall swarm

Tags: Mybatis Spring Boot

Posted on Sat, 30 Oct 2021 09:58:19 -0400 by simongcc