当前位置:网站首页>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
边栏推荐
- Deep parsing of kubernetes controller runtime
- 網頁鼠標點擊特效案例收集(直播間紅心同理)
- Modern programming language: rust
- Understand the basic structure of wechat applet project
- Latest MySQL advanced SQL statement Encyclopedia
- Class文件结构和字节码指令集
- MATLB|基于复杂网络的配电系统微电网优化配置
- Alchemy (9): simple but not simple, never-ending test -- always_ run
- HCIP/HCIE Routing&Switching / Datacom备考宝典系列(十九)PKI知识点全面总结(公钥基础架构)
- IIC communication protocol for single chip microcomputer
猜你喜欢

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

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

给女朋友看的消息中间件

每次启动项目的服务,电脑竟然乖乖的帮我打开了浏览器,100行源码揭秘!
![[untitled]](/img/15/21020badab0d70450ccfb71f49da8a.png)
[untitled]

Class文件结构和字节码指令集

zotero文献管理工具安装使用

Why are cloud vendors targeting this KPI?

技术的极限(11): 有趣的编程

Understand the basic structure of wechat applet project
随机推荐
HCIP/HCIE Routing&Switching / Datacom备考宝典系列(十九)PKI知识点全面总结(公钥基础架构)
快速掌握grep命令及正则表达式
How to add live chat in your Shopify store?
投资场内ETF基金是靠谱吗,场内ETF基金安全吗
现在网上开股票账户安全吗?选择上市券商,最快8分钟开户成功
Arduino UNO通过电容的直接检测实现简易触摸开关
翻译(4): 文本自动完成的匹配规则
Message Oriented Middleware for girlfriends
Matlb| optimal configuration of microgrid in distribution system based on complex network
Overview and deployment of GFS distributed file system
Validaterequest= "false" is a "suggestion collection" for what
#795 Div.2 D. Max GEQ Sum 单调栈
Differences and functions between intranet IP and public IP
炼金术(7): 何以解忧,唯有重构
Download, configuration and installation of MySQL
IIC communication protocol for single chip microcomputer
为什么要选择不锈钢旋转接头
代码整洁之道--格式
Deep parsing of kubernetes controller runtime
技术的极限(11): 有趣的编程