Log versions of active componects in your system through a JSON Api.
-
PUT /update
-
JSON Fields
- system : "dev" | "test" | "live"
- component
- version
- timestamp
- source
- Git clone from repo .
git clone https://github.com/Alafazam/versions
- build using docker build -t active_versions:v2 .
docker build -t active_versions:v2 .
starting without username and password
docker run -d -p 80:80 active_versions:v2
starting with user and pass
docker run -d -p -e user="USERNAME" -e pass="PASSWORD" 80:80 active_versions:v2
After few seconds, open http://<host>
to see the Flask app.
To add new columns you have to make changes in 3 files ->
- Hello.py
Add the new column to the model, in line 52 and 64.
Add new column values to put and post request in line 260.
- Current.html
Add the new column to the table.
- Hello.html
Add the new column to the table.
#Api
!python
>>>from requests import put
>>>put('http://192.168.59.103/update', data={'systems':'dev', 'components': 'components 1', 'version': 'version 2.', 'source': 'alaf', 'user':'q','pass':'a'}).json()
Done
Current component versions of all systems(dev|production|test)
http://<host>/current
Current versions of a component
http://<host>/current/components/component_name
Current components of a system(dev|production|test)
http://<host>/current/systems/system_name
Latest updates by a source
http://<host>/current/source/source_name
All components of all system(dev|production|test)
http://<host>/logs
All components of a system(dev|production|test)
http://<host>/syslogs/system_name
All versions of a component
http://<host>/logs/component_name
All components of by a source
http://<host>/sourcelogs/source_name
you can simply use the delete button from the web interface.