Car.os is a custom navigatgion system built for my personal car to introduce features that exist in new cars (and not). The system utilizes raspberry pis and a 7" touch screen that will integrate into a double-din enclosure to replace the current radio head unit. The purpose of this project is to utilize current technologies and create a system architecture that runs effeciently on low power systems.
Main featues of this project include:
- Navigation
- Music player
- car telementry via OBD2
- position telementry via Navio2
If you want to run this on your local system for testing. CD into the root of the main folder where docker-compose.yml is located
Before launching 2 dependices are required
Once installed you may run these commands
$ cd flask-microservices-main
$ docker-compose up --build
The server should be running on 127.0.0.0:9000
Make sure you are in the same directory as docker-compose.yml
Start in detached mode:
$ docker-compose up -d
Create database:
$ docker-compose run users-service python manage.py recreate_db
Seed Database:
$ docker-compose run users-service python manage.py seed_db
run tests:
$ docker-compose run users-service python manage.py test
List all running and stopped containers:
$ docker ps -a
Stop containers (gracefully):
$ docker-compose stop
Stop all running containers:
$ docker stop $(docker ps -aq)
remove containers:
$ docker-compose rm
build containers:
$ docker-compose --build
$ [or]
$ docker-compose run -d --build
Car.os uses a couple of open source libraries to run properly
- Docker - Software containerization software
- Flask - Python based microframework for backend development
- nginx - High performance web server
- Prometheus - Time series database and monitoring system
- Postgres SQL - Open source SQL databse
- Node js - evented I/O for the backend
- ReactJS - Javascript library for building user interfaces
Below is a visual representation of the software architecture
Becuase Car.os is using a non monolithic application structure, there will be multiple microservices running in parallel. Below are a list of microservices built to run this application
- Bluetooth - Bluetooth microservice hosting all hardware bluetooth functions
The System is comprised of
- 3 raspberry pi's
- bluetooth OBD2 reader
- navio2 hat for the raspberry pi
- 7" IPS touch screen
One pi will be used strictly for data aquisition from the OBD2 device and the navio 2 board. The raw data will be retrived on prometheus_client server and sent over to the Prometheus sever over wifi on port 8000. The Pi with the prometheus sever will serve as the main computer of this network. This pi will run the nginx-flask server, launch docker containers, serve the front end, host the postgres SQL server, host the prometheus server, and hopefully be the master node for load balancing with Kubernetes. The final pi will strictly boot into a chrome full-screen window and connect to the URL of the server to render the application on the touch screen.