It is a platform mainly used for performance testing, here are some simple features brief:
- Server Management, can view server's basic information uniformly
- Shell Remote Connection, support for files upload and download between local and server
- Server resource usage monitoring
- Nginx's access.log traffic collection
- Performance Testing tool, support for automated and distributed performance testing
- MyPlatform - project files
- staticfiles - static files
- templates - html templates files
- templateFilter - custom filter
- common - generic functions
- user - user related
- shell - shell tool
- monitor - monitor tool
- performance - performance test tool
-
Clone Repository
git clone https://github.com/leeyoshinari/MyPlatform.git
-
Install MySQL(SQLite3 can be used directly, doesn't need to be installed), InfluxDB, Redis, MinIO(Optional installation); (ps:InfluxDB2.x is not supported, influxdb-1.8.3 is recommended.)
-
Install third-party packages
pip3 install -r requirements.txt
-
Modify
config.conf
; -
Initialize database, and execute commands
python3 manage.py migrate python3 manage.py makemigrations shell performance python3 manage.py migrate
-
Create super administrator
python3 manage.py createsuperuser
-
Initialize data
python3 manage.py loaddata initdata.json
-
Collect all static files
python3 manage.py collectstatic --clear --noinput
-
Compress static files (css and js)
python3 manage.py compress --force
-
Modify Port in
startup.sh
-
Deploy
nginx
, thelocation
configuration is as follows: (ps: Theplatform
in the configuration is the prefix, that is the URL prefix in the URL path, which can be modified according to your needs.)
(1) upstream configuration:upstream myplatform-server { server 127.0.0.1:15200; server 127.0.0.1:15201; }
(2) static request: Use Nginx to access static files directly
location /platform/static { alias /home/MyPlatform/static; }
(3) dynamic request:
location /platform { proxy_pass http://myplatform-server; proxy_set_header Host $proxy_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }
(4) websocket protocol:
location /shell { # must be shell, don't modify it proxy_pass http://myplatform-server; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; }
-
Startup
sh startup.sh
Run
sh shutdown.sh
to stop. -
Access home page, url:
http://ip:port/(prefix in config.conf)
-
Access permission management page, url:
http://ip:port/(prefix in config.conf)/admin
-
For more information, please click me.