---
# System prepended metadata

title: SNA Final Report

---

# SNA Final Report
### Group A
Evgeniy Trantsev
Rufina Talalaeva
Kamil Rizatdinov
## Application description
Application includes a simple API to handle and manipulate information about cars. The data is stored in a PostgreSQL database and CRUD operations are performed through the API.
#### How to interact with DB via App?
For this you need to install httpie tool
```
http GET http://localhost:5000/cars
http GET http://localhost:5000/cars/<car_id>
http POST http://localhost:5000/cars name=subaru model=sedan doors=6
http DELETE http://localhost:5000/cars/<car_id>
```
[Source code](https://github.com/KamilRizatdinov/cars_in_a_flask)
[More information about application](https://stackabuse.com/using-sqlalchemy-with-flask-and-postgresql/)
## Information about net
![](https://i.imgur.com/PWc1Q2p.png)
We have several clients and 3 main machines:
1. **192.168.195.188** 
    **Username**: serv/ubuntu
    **Password**: serv/ubuntu accordingly
    **Services**: Load Balancer(nginx), IaC(Ansible), CI/CD(Jenkins)
2. **192.168.195.154** 
    **Username**: serv
    **Password**: serv
    **Services**: App1, Database(PostgreSQL)
3. **192.168.195.239** 
    **Username**: serv
    **Password**: serv
    **Services**: App2, Backup(Bacula)
## IaC using Ansible
All the ansible playbooks can be found inside the github repository under playbooks/ directory.
Confifuration of ansible itself is default apart from 
/etc/ansible/ansible.cfg and /etc/ansible/hosts

![](https://i.imgur.com/B6ieGXv.png)

![](https://i.imgur.com/Dkxyg79.png)
## CI/CD using Jenkins
![](https://i.imgur.com/Cy0R6ug.png)
## High Availability Proxy using nginx
![](https://i.imgur.com/IcWDiR9.png)
## Backup using Bacula
### Bacula server(192.168.195.239)
Bacula storage daemon(other lines are commented out)
![](https://i.imgur.com/OCKsU9n.png)
![](https://i.imgur.com/jT2nv2M.png)
![](https://i.imgur.com/tCOf2jU.png)
Bacula director daemon
![](https://i.imgur.com/GVNNeSH.png)
![](https://i.imgur.com/J8UsY4F.png)
![](https://i.imgur.com/Z21L7bi.png)
![](https://i.imgur.com/lsfE2Wf.png)
![](https://i.imgur.com/6zuzjhj.png)
![](https://i.imgur.com/QSkZGlW.png)
![](https://i.imgur.com/FxDsx1q.png)
![](https://i.imgur.com/L0LYdii.png)
![](https://i.imgur.com/wmvgg52.png)
![](https://i.imgur.com/c0EScYP.png)
![](https://i.imgur.com/hvfHCgW.png)
![](https://i.imgur.com/ynJAMq1.png)
![](https://i.imgur.com/tZwiqo6.png)
![](https://i.imgur.com/WLcxXzD.png)
Bacula console daemon
![](https://i.imgur.com/Fid73P8.png)
### Bacula client(192.168.195.188)
Bacula File daemon
![](https://i.imgur.com/mo2YxJ8.png)
![](https://i.imgur.com/DJa7peu.png)
### Bacula client(192.168.195.154)
Bacula File daemon
![](https://i.imgur.com/e8qe1ej.png)
![](https://i.imgur.com/UkdueXl.png)
## References
[Bacula configuration](https://webmodelling.com/webbits/miscellaneous/bacula.aspx#bacula-main-components)