RoL is an open source platform for managing bare metal servers in your lab. We use a REST API with a CRUD model to manage configuration and interact with the system. RoL is currently under active development, you can follow the current status here.
- Multi-layer architecture
- Logging to database
- Logs reading from API
- Custom typed errors
- Ethernet Switches configuration management
- Ethernet Switches VLAN's and POE management (only a few switch models)
- Host VLAN's and bridges management
- Host network configuration saver and recover
- Device templates
- DHCP servers management
- TFTP servers management
- Devices management
- Projects management
- iPXE provisioning
The following steps are required to build and run RoL from source:
https://golang.org/dl/
cd src && go mod tidy && go build
- Add rights for network management.
- For RoL binary:
sudo setcap cap_net_admin+ep ./rol
- For iptables run without root:
sudo setcap "cap_net_raw+ep cap_net_admin+ep" /usr/sbin/xtables-nft-multi
- If you don't want to add right to iptables: you can run
./rol
as root.
- For RoL binary:
- Run RoL binary.
./rol
- If all ok the last output string will be:
[GIN-debug] Listening and serving HTTP on localhost:8080
- Go to the http://localhost:8080/swagger/index.html to read API swagger documentation.
A typical multi-layer architecture is implemented.
.
├── docs # Docs files
│ ├── plantuml # Struct diagrams in puml and svg formats
├── src # Source code
│ ├── tests # Unit tests
│ ├── domain # Entities
│ ├── dtos # DTO's is Data transfer objects
│ ├── app # Application logic
│ │ ├── errors # Custom errors implementation
│ │ ├── interfaces # All defined interfaces
│ │ ├── mappers # DTO to Entity converters
│ │ ├── services # Entities management logic
│ │ ├── utils # Utils and simple helpers
│ │ ├── validators # DTO's validators
│ ├── webapi # HTTP WEP API application
│ │ ├── controllers # API controllers
│ │ ├── swagger # Swagger auto-generated docs
│ ├── infrastructure # Implemenatations
└── ...
All description for swagger documentation is in the controllers, which are located in the src/webapi/controllers folder, changing the description of the controllers, you need to update the swagger documentation with the command:
cd src && swag init -o webapi/swagger
The swag utility can be installed according to the official documentation.