当前位置:网站首页>SPuG - lightweight automatic operation and maintenance platform
SPuG - lightweight automatic operation and maintenance platform
2022-06-28 00:58:00 【Ink Sky Wheel】
For SMEs , It is troublesome to manage hosts and applications , Application deployment often requires direct connection to the server , Then manually configure the environment 、 Code pull 、 Application construction, deployment and release , It's easy to make mistakes , And time-consuming . A good automatic operation and maintenance platform , Can often greatly save human and material resources , Improve development and deployment efficiency .Spug, It is a lightweight automatic operation and maintenance platform designed for small and medium-sized enterprises .

Spug Automatic operation and maintenance platform
brief introduction
Spug, yes openspug stay Github Open source automatic operation and maintenance platform , Project is located https://github.com/openspug/spug, At the same time Gitee On maintenance , Project is located https://gitee.com/openspug/spug, The current version is v2.3.9.
Spug For small and medium-sized enterprises , nothing Agent, Very light weight , Integrated host management 、 Host batch execution 、 Host online terminal 、 Application release deployment 、 Online task planning 、 Configuration center 、 monitor 、 Alarm and other functions , Easy to use , Flexible function , It can meet the requirements of general application automation deployment .

Spug project
install
Spug Simple deployment , Recommended for production environments Docker Image mount .Spug Provided in Docker hub And images on alicloud , You can pull it directly :
$ docker pull registry.aliyuncs.com/openspug/spug
After downloading the image , Direct operation , Build the container and start :
$ docker run -d --restart=always --name=spug -p 80:80 registry.aliyuncs.com/openspug/spug
By default, the internal of the image is used MySQL database , If there is a need for data persistence , Data mapping can be done :
$ docker run -d --restart=always --name=spug -p 80:80 -v mydata/:/data registry.aliyuncs.com/openspug/spug
then , Create an administrator account :
$ docker exec spug init_spug <username> <password>
$ docker restart spug
here , The service has been deployed , visit http://localhost:80 Can access .
Spug Depend on Python 3.6+, Node.js 12.14+, Redis 3+, Secondary development and deployment can be carried out . First download the project code :
$ git clone https://github.com/openspug/spug data/spug
then , establish Python Running environment :
$ cd data/spug/spug_api
$ python3 -m venv venv$ source venv/bin/activate$ pip install -r requirements.txt -i https://pypi.doubanio.com/simple/
Initialize database , By default SQLite, And create an administrator account :
$ python manage.py initdb
$ python manage.py useradd -u admin -p spug.dev -s -n Administrators
Start the backend API service :
$ python manage.py runserver
Front end use React Of Antd Development , Start after installing dependencies :
$ cd /data/spug/spug_web
$ npm install --registry=https://registry.npm.taobao.org
$ npm start
here , This completes the manual deployment of the development environment .
Example
After deployment ,Spug Mainly in the Web Use in the background .Spug The backstage mainly includes : The workbench 、 The host management 、 Batch execution 、 Application of release 、 Task plan 、 Configuration center 、 The monitoring center 、 Alarm center and system management module .
host , The server that represents the final deployment of the application , adopt SSH The way of public key , And Spug Services interact .Spug You can add and configure hosts in the background , And can execute commands in batches , Convenient for environment configuration, etc :

Host batch execution
Online terminals are provided in the background , Commands can be executed interactively on the host , At the same time, it supports file uploading and downloading , File management through graphical interface .
Spug Basic management of deployment through application . An application , It is a collection of different versions of applications or services that need to be deployed :

Application management
When we need to deploy an application , Release application is required , For target applications , Select publishing environment , as well as Git Version of the warehouse ( Branch , Or tags ), And the target host to be published , Submit a new release .
Spug Provides custom scripts for different stages , To achieve automated deployment :

Automated Deployment scripts
Execute before checking out the code , Is in Spug Server , Before pulling the code , Environment configuration, etc ;
Execute after checking out the code , After pulling the code , Do dependency installation 、 Compile and build ;
Execute before application publishing , On the target host , Stop the old application 、 Operation environment configuration, etc ;
Execute after the application is published , After the project is published to the target host , Start the application, etc .
Spug It also supports planning tasks , You can configure scheduled script tasks , Implement service status check and other work :

Planning tasks
Spug Monitoring center is provided , You can create monitoring tasks , Regularly detect the application status , For example, regularly open the port for detection , Carry out regular connectivity detection for the station :

The monitoring center
When an exception is detected , The system will automatically give an alarm , And by email 、 WeChat 、 Send nails, etc .
Spug Function permissions can also be set in the background , You can manage the permissions of personnel with different responsibilities within the team :

Role permissions
summary
Spug As an automatic operation and maintenance platform , Relatively light , No complex configuration required , You can complete the deployment of the service , And manage and publish applications through simple applications , Complete version management for different deployment projects , Implement an automated publishing process , And version rollback , It also provides a batch script to support multi host configuration , Provide scheduled tasks to realize status detection , Provide automatic alarm system to realize exception management, etc , It basically meets the requirements of automatic deployment , It's worth trying . at present ,Spug The project is still under active development , Project authors are soliciting new features they want to support , Interested developers may wish to participate in open source contributions .
Reference resources
《 Automatic operation and maintenance platform Spug test 》https://www.modb.pro/db/109402
《 nothing Agent Automatic operation and maintenance platform -spug》https://www.modb.pro/db/109401
边栏推荐
- Ten MySQL locks, one article will give you full analysis
- [untitled]
- 手机股票开户安全吗,买股票在哪开户?
- 炼金术(9): 简约而不简单,永不停歇的测试 -- always_run
- Overview and construction of redis master-slave replication, sentinel mode and cluster
- Is the stock investment exchange group safe? Is it reliable to open an account for free?
- Every time I started the service of the project, the computer helped me open the browser, revealing the 100 lines of source code!
- 互联网的发展为产业的变革和转型提供了新的解决方案
- 电商转化率这么抽象,到底是个啥?
- 796 div.2 C. managing history thinking
猜你喜欢

单晶炉导电滑环的应用范围和作用是什么

大尺寸导电滑环市场应用强度如何

Electron window background transparent borderless (can be used to start the page)

免费、好用、强大的开源笔记软件综合评测

Proe/Creo产品结构设计-钻研不断

Installation and use of Zotero document management tool
Latest MySQL advanced SQL statement Encyclopedia

给女朋友看的消息中间件

独立站卖家都在用的五大电子邮件营销技巧,你知道吗?

Taro--- day2--- compile and run
随机推荐
JVM的内存模型简介
深入解析kubernetes controller-runtime
手机股票开户安全吗,买股票在哪开户?
剑指 Offer 65. 不用加减乘除做加法
软件工程作业设计(1): [个人项目] 实现一个日志查看页面
Sword finger offer 65 Add without adding, subtracting, multiplying, dividing
Latest MySQL advanced SQL statement Encyclopedia
Form forms and form elements (input, select, textarea, etc.)
Matlb| improved forward push back method for solving power flow of low voltage distribution network
炼金术(3): 怎样做好1个业务流程的接口对接
Acwing game 57 [unfinished]
Overview and construction of redis master-slave replication, sentinel mode and cluster
电商转化率这么抽象,到底是个啥?
網頁鼠標點擊特效案例收集(直播間紅心同理)
GFS 分布式文件系统概述与部署
IIC communication protocol for single chip microcomputer
Taro--- day1--- construction project
The limits of Technology (11): interesting programming
#795 Div.2 D. Max GEQ Sum 单调栈
Ten MySQL locks, one article will give you full analysis