Project overview
dev-lab is an efficient, fast, and easily configurable dev environment: a self-hosting platform for any web services. The dev-lab is desingned to host any helper services for development work or personal usage. It is also a great sandbox for learning new technologies.
Hardware
The current set of devices used for the project includes:
-
1x
Asus Tinker Board
(Raspberry Pi analog):- CPU: 4x core
Rockchip RK3288 ARM Cortex-A17 1.8GHz
- RAM:
2GB
- microSD:
32GB
- Features:
1G Ethernet
,WiFi
,Bluetooth
,40 pins GPIO
,4x USB 2.0
- OS:
Debian 9
- CPU: 4x core
-
2x
Lenovo ThinkCentre M600 Tiny
:- CPU: 4x core
Intel Pentium J3710 @ 1.60GHz
- RAM:
8GB
- SSD:
128GB
- Features:
1G Ethernet
,6x USB 3.0
,WOL
,PXE
- OS:
Ubuntu 20.04
- CPU: 4x core
Architecture
In the context of hardware, the platform can be divided into 2 parts: the control plane and the main cluster. The Control Plane (hosted on ASUS Tinker Board) has services to monitor and manage all the services of the whole platform.
Hierarchically, the architecture looks like a stack, which is based on bare metal, and on top of the stack is the application layer, that is, services that are ready for use.
The whole infrastructure should be provisioned automatically starting from bottom to top:
- Hardware layer - bare metal. The setup on this level is manual:
- Enable WOL. Wake On Lan - protocol for waking computers up from a very low power mode remotely
- Enable PXE. Preboot execution environment - for OS installation over network
- OS layer:
- OS installation via PXE
- System configuration using Ansible
- Infrastructure layer:
- Install docker and docker-compose
- Install k3s - lightweight Kubernetes cluster
- Service layer:
- Install portainer agents on every device and portainer server on control plane
- Install local DNS server on control plane
- Install homeassistant on control plane and load configuration. HA is using for power on/off devices using web UI and monitoring system resources (RAM, CPU, storage) for every device
- Install monitoring tools:
- Glances on cluster devices
- Uptime Kuma on control plane, configure Uptime Kuma
- Install Gitea git server
- Install Drone CI/CD system
- Application layer:
- Deploy custom services (like kafkasender) on Kubernetes
- Deploy services required for development work on Docker using Portainer
Features
- Power on/off devices via UI
- Fast docker stacks management via UI
- Private DNS server
- DNS sinkhole used as network-wide ad blocker
- Dashboard UI to access hosted services
- Uptime monitoring system to monitor which services and devices are up or down, alerting to messengers (Telegram bot)
- Git server backed up with Github
- CI/CD platform
- Documentation hosted on Kubernetes, backed up with Github pages
- Automated infrastructure installation and management (k3s, docker)
- Automatic OS provisioning
- Whole infrastructure provisioning with single command
- Managing Kubernetes using GitOps
- Remote IDE (Intellij IDEA server)
- Task management system
- Configuration management system for local development
- Everything is defined as code, use GitOps for everything
- Secrets and encryption management
- Centralized logs management system
- HTTPS everywhere
- Single sign-on
- Automatic backups
- Private container registry
- Expose some services to the internet securely (VPN server)
- Automatic OS updates
Screenshots
Some screenshots are shown here (click to enlarge). They can't capture all the project's features, but they are sufficient to get a concept of it.
Dashboard powered by Homer | Uptime Kuma - uptime monitor |
Devices management dashboard powered by Home Assistant | PiHole - DNS server/Ad blocker |
Portainer - Docker management | Gitea - Git server |
Drone - CI/CD platform | Longhorn - Persistent storage for Kubernetes |