Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Michele del Giudice
DevOps Tests
Commits
2e6b8331
Commit
2e6b8331
authored
Nov 20, 2025
by
Michele Del Giudice
Browse files
Added readme assessmet
parent
59726dd5
Changes
1
Hide whitespace changes
Inline
Side-by-side
README_ASSESSMENT.md
0 → 100644
View file @
2e6b8331
## ----------------- Assessment ---------------
L'idea è quella di verificare le capacità di installare in un ambiente vuoto tutto cià che reputa necessario per il deploy di una applicazione python.
In questa fase potremmo discutere delle varie possibilità:
-
Applicazione lanciata nativamente sul server e tenuta in vita tramite systemd
-
Applicazione containerizzata
Spingere verso una direzione (container) ma possibile discussione di come si poteva fare se si fosse adottata l'altra strada
Fornire accesso ssh con chiave e seguire il ragionamento nell'installazione dei software necessari
## ----------------- Assessment ---------------
# Car Rental Flask API
This is a small Flask application exposing CRUD endpoints for Car Reservations using SQLAlchemy and MySQL.
This web api works with python 3.13.3
Install dependencies:
```
bash
python
-m
venv .venv
source
.venv/bin/activate
pip
install
-r
requirements.txt
```
Run the app:
```
bash
flask
--app
app run
```
Run the app (on all interfaces):
```
bash
flask
--app
app run
--host
=
0.0.0.0
```
Run the app (on different port):
```
bash
flask
--app
app run
--port
=
12345
```
Database migrations (Flask-Migrate / Alembic)
After installing requirements, initialize and run migrations with the Flask CLI. Example:
```
bash
flask db init
# only once
flask db migrate
-m
"initial"
flask db upgrade
```
This will create an
`migrations/`
folder and apply the schema to the configured database.
## ----------------- Assessment (Init db with migrations) ---------------
L'idea è quella di verificare le capacità di comprendere la logica di un tool di gestione migrations integrato nel framework/orm
Problematiche in questa fase:
-
Il db non è presente / non è locale e serve ingegnerizzare la soluzione con variabili di ambiente
-
Il database non è creato
-
L'utente usata per la connesione al db non ha i permessi
## ----------------- Assessment (Init db with migrations) ---------------
API endpoints summary:
-
GET /cars
-
GET /cars/
<id>
-
POST /cars
-
PUT /cars/
<id>
-
DELETE /cars/
<id>
-
GET /reservations
-
GET /reservations/
<id>
-
POST /reservations
-
PUT /reservations/
<id>
-
DELETE /reservations/
<id>
Notes:
-
Dates must be ISO formatted strings (e.g. 2025-11-17T12:00:00)
-
Car
`ports`
must be either 3 or 5.
-
Car
`type`
must be one of 'suv', 'small', 'van'.
## ----------------- Assessment (Verifica api with curl) ---------------
L'idea è quella di verificare le capacità di chiamare l'api appena installata per verificarne il funzionamento
Problematiche in questa fase:
-
Non ci sono dati (non è proprio una problematica)
## ----------------- Assessment (Verifica api with curl) ---------------
## ----------------- Assessment (Seeds db) ---------------
L'idea è quella di verificare le capacità di eseguire uno script mysql e gestire la compelssità di doverlo fare nel container avendo lo script esterno
In questa fase potremmo discutere delle varie possibilità:
-
Usare un tool esterno per collegarsi al database (visuale, command line, tunnel ssh con i vari problemi sui diritti di login)
-
Copiare il file nel container ed eseguire lo script da dentro
Spingere verso una direzione (container) ma possibile discussione di come si poteva fare se si fosse adottata l'altra strada
## ----------------- Assessment (Seeds db) ---------------
## ----------------- Assessment (Uviconr) ---------------
L'idea è quella di verificare le capacità di documentarsi su come supportare Flask con un web server integrato non di sviluppo
## ----------------- Assessment (Uviconr) ---------------
## ----------------- Assessment (Reverse proxy) ---------------
L'idea è quella di verificare le capacità di configurare un reverse proxy sull'host come proxy server ed eseguire delle curl per chiamare il servizio tramite nome:
-
Inserire il nome nel fiel di hosts
-
Creare una curl con il domain name incluso
## ----------------- Assessment (Reverse proxy) ---------------
## ----------------- Assessment (Bonus tipo lo assumiamo subito) ---------------
Seguire una guida su come installare un sistema di monitoring con docker , prometeus e grafana e visualizzare alcuni log.
La guida spiega anche come stressare il sistema sia da punto di vista di risorse cpu che di disk IO etc etc
https://medium.com/@jsantoine24/container-monitoring-with-prometheus-grafana-375ec4e9effc
## ----------------- Assessment (Bonus tipo lo assumiamo subito) ---------------
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment