当前位置:网站首页>[cloud native] teach you how to build ferry open source work order system

[cloud native] teach you how to build ferry open source work order system

2022-07-06 08:04:00 Xiaopeng Linux

Author's brief introduction : The third season of the New Star program for high-quality creators in cloud computing python Track TOP1  Alibaba cloud ACE Certified Senior Engineer
️ Personal home page : Xiao peng linux
Personal community : Xiao peng linux( Personal community ) Welcome to join !

 

Catalog

System function introduction

1. install docker

1.1 Close the firewall and selinux

2. install docker

2.1 to update yum Indexes

2.2 Uninstall old version docker

2.3 Install dependency packages

2.4 Set alicloud image source

2.5 install docker

3.docker Deployment in China mysql

3.1 Installing the mysql

3.2 Get into mysql example

4.docker Deployment in China redis

4.1 Installing the mysql

4.2 Check whether the container starts normally

5. Deployment launch ferry

5.1 Get local ip

5.2 install git Command and pull ferry Code

5.3 modify ferry The configuration file

5.4 establish needinit file

6. start-up ferry

6.1 establish ferry Container and start

6.2 View container status

7. Log in to the work order system page


Open source software ferry It's centralized work order statistics 、 Task hook 、 Rights management 、 Open source work order system with flexible configuration process and template , Of course, it can also be called workflow engine . Committed to reducing cross departmental communication , Automatic task execution , Improve work efficiency and work quality , Reduce unnecessary workload and human error rate .

System function introduction

Work order system related functions :

  • Work order submission application

  • Work order statistics

  • Multi dimension work order list , Include ( I created 、 I am related to 、 I have to do 、 All work orders )

  • Custom process

  • Custom templates

  • Task hook

  • task management

  • Urging

  • Hand over

  • Manual statement

  • The signature of the

  • Multidimensional processors , Include ( personal , Variable ( The creator 、 The person in charge of the Creator ))

  • Exclusive gateway , That is, jump the work order according to the conditions

  • Parallel gateway , That is, multiple nodes are approved at the same time

  • Notice to remind ( Currently only email is supported )

  • Process classification management

Authority management related functions , Use casbin Implement interface permission control :

  • user 、 role 、 Add, delete, check and change positions , Batch deletion , Multi criteria search

  • role 、 Position data export Excel

  • Reset user password

  • Maintain personal information , Upload management avatar , Change the current account password

  • Addition, deletion, check and modification of departments

  • Menu catalog 、 Jump 、 Button and API Add, delete, check and modify interfaces

  • Login log management

  • Left menu permission control

  • Page button permission control

  • API Interface authority control

This deployment environment is CentOS7 operating system

1. install docker

1.1 Close the firewall and selinux

[[email protected] ~]# setenforce 0                      # close selinux
[[email protected] ~]# systemctl stop firewalld          # Turn off firewall 
[[email protected] ~]# systemctl enable firewalld        # Set the startup not to start automatically 

2. install docker

2.1 to update yum Indexes

[[email protected] ~]# yum makecache fast

2.2 Uninstall old version docker

[[email protected] ~]# yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine

2.3 Install dependency packages

[[email protected] ~]# yum install -y yum-utils device-mapper-persistent-data lvm2

2.4 Set alicloud image source

[[email protected] ~]# yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
[[email protected] ~]# ls /etc/yum.repos.d/             # View yes docker-ce.repo Generate 
bak  CentOS-7.repo  docker-ce.repo  epel.repo

2.5 install docker

[[email protected] ~]# yum install -y docker-ce             # install 
[[email protected] ~]# systemctl start docker               # start-up docker
[[email protected] ~]# systemctl disable docker             # Set to power on and auto start 
[[email protected] ~]# docker version                       # see docker edition 

3.docker Deployment in China mysql

3.1 Installing the mysql

[[email protected] ~]# docker run -d -p3306:3306 --name=mysql5 -e MYSQL_ROOT_PASSWORD=111111 mysql:5   # Password set to 111111

Here's the picture , Download the image and finish the container startup , Wait for :

3.2 Get into mysql example

[[email protected] ~]# docker exec -it mysql5 bash           # Get into mysql Containers 
[email protected]:/# mysql -uroot -h127.0.0.1 -p111111   # Sign in mysql
mysql> create database ferry;                            # Create database ferry
mysql> exit                                              # sign out mysql
[email protected]:/# exit                                # Exit the container 

4.docker Deployment in China redis

4.1 Installing the mysql

[[email protected] ~]# docker run --name=redis6.0  -d -p 6379:6379 redis:6.0

Here's the picture , Download the image and finish the container startup , Wait for :

4.2 Check whether the container starts normally

[[email protected] ~]# docker ps -a			#STATUS Columns show UP The status is that the container starts normally , Here's the picture :

5. Deployment launch ferry

5.1 Get local ip

[[email protected] ~]# ip a		

5.2 install git Command and pull ferry Code

[[email protected] ~]# yum -y install git
[[email protected] ~]# git clone https://github.com/lanyulei/ferry.git	# The pull code is successful, as shown in the following figure :

5.3 modify ferry The configuration file

[[email protected] ~]# cd ferry/
[[email protected] ferry]# vim config/settings.yml
 Find the following configuration :
database:
    dbtype: mysql
    host: ferry_mysql
    name: ferry
    password: 123456
    port: 3306
    username: root
 Make the following changes :
mysql  To configure ( change host  And password for your own ):
host: ferry_mysql -> host: 192.168.0.3
password: 123456 -> password: 111111

 Find the following configuration :
redis:
    url: redis://ferry_redis:6379
 Make the following changes :
redis  To configure ( change host For your own ):
url: redis://ferry_redis:6379 -> url: redis://192.168.0.3:6379

5.4 establish needinit file

[[email protected] ferry]# touch config/needinit

Be careful : stay config New directory needinit file , At first start-up db No data in , At this time, the data can be initialized through this command , Delete the file after the service starts normally ( In case the container starts again )

6. start-up ferry

6.1 establish ferry Container and start

[[email protected] ferry]# docker run -itd --name ferry -v /root/ferry/config:/opt/workflow/ferry/config -p 8002:8002 lanyulei/ferry:1.0.1

#  Command interpretation 
# docker run -it -v    Host Directory absolute path : Absolute path of container Directory   Mirror image ID or NAME /bin/bash
# -it    Interactive run container 
# -d    Run the container in the background , And print containers id
# --name ferry    The name of the container is ferry
# -v     mount volume Data volume 
#  Host Directory absolute path     In the host config The path of the configuration file directory . After mounting, the container can mount the configuration file of the current directory to the specified directory in the container to call 
# -p 8002:8002    Port mapping , Be careful :p Lowercase is to map the port of the container to the designated port of the host , Upper case is to map the port of the container to the random port of the host 

If it fails, you can download the configuration file template packaged after my successful installation and modify it directly , Profile templates

Here's the picture , Download the image and finish the container startup , Wait for :

6.2 View container status

[[email protected] ferry]# docker ps -a
# mysql、redis、ferry The status of all three containers is UP Right , Here's the picture :

7. Log in to the work order system page

Browser access ip:8002 that will do , Here's the picture :

Enter account :admin

Input password :123456

Log in , Pictured :

  Conclusion

原网站

版权声明
本文为[Xiaopeng Linux]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/187/202207060756428981.html