2024-12-25 21:22:33 +11:00
# photonglass
A modern, distributed looking glass application that provides network insight for network operators.
2024-12-22 21:31:10 +11:00
2024-12-25 21:34:02 +11:00
## See it live
https://photonglass.dev
2024-12-25 22:25:32 +11:00
2024-12-25 23:59:47 +11:00
[](https://raw.githubusercontent.com/AliMickey/photonglass/7421c8a6dc1f31fef78ed5e1efb7402c89c9898c/screenshot.png)
2024-12-22 21:31:10 +11:00
## Features
2024-12-25 21:34:02 +11:00
- **Multi Device Support**: Connect to multiple devices from one single interface.
- **Easy Deployment**: Extremely easy to deploy and scale with multiple devices.
2024-12-22 21:31:10 +11:00
2024-12-25 21:22:33 +11:00
## Setup (Docker)
1. Clone repository
2024-12-25 21:35:27 +11:00
- `git clone https://github.com/AliMickey/photonglass.git`
2024-12-26 12:38:19 +11:00
2. Create an instance folder to store your config and logos/favicon
2024-12-25 21:35:27 +11:00
- `cd photonglass`
- `mkdir instance`
- `mkdir instance/images`
2024-12-26 12:38:19 +11:00
3. Create config files and upload logos/favicon (follow config template below)
2024-12-25 21:34:02 +11:00
4. Create `docker-compose.yml` (follow template below)
4. Build and deploy the container (inital build may take a minute)
2024-12-25 21:35:27 +11:00
- `docker compose up -d --build`
2024-12-25 21:22:33 +11:00
5. View the app at `http://IP_ADDRESS:5000` , recommend using a reverse proxy (traefik) for production use.
2024-12-22 21:31:10 +11:00
## Configuration
2024-12-25 21:34:02 +11:00
### docker-compose.yml
```
services:
photonglass:
container_name: photonglass
restart: unless-stopped
build: .
ports:
- 5000:5000
volumes:
- ./instance:/instance
# - ./instance/images:/app/static/images # Commented out by default to use default logos
```
2024-12-25 21:22:33 +11:00
### instance/config.yaml
```
header:
title: "photonglass"
logo_href: "#"
footer:
text: "photonglass"
peeringdb_href: "https://www.peeringdb.com"
github_href: "https://github.com/alimickey"
```
### instance/commands.yaml
```
- id: "ping"
display_name: "Ping"
format: "ping -{ip_version} -c 4 {target}"
description: "Test network connectivity"
field:
type: "text"
placeholder: "Enter IP address or hostname"
- id: "traceroute"
display_name: "Traceroute"
format: "traceroute -{ip_version} {target}"
description: "Trace network path to destination"
field:
type: "text"
placeholder: "Enter IP address or hostname"
- id: "mtr"
display_name: "MTR"
format: "mtr -{ip_version} -r {target}"
description: "Trace network path with stats"
field:
type: "text"
placeholder: "Enter IP address or hostname"
```
### instance/devices.yaml
```
- id: "unique-sydney"
display_name: "Sydney"
subtext: "Equinix SY3"
country_code: "AU"
type: "linux"
host: "IP_ADDRESS"
port: PORT
username: "USERNAME"
password: "PASSWORD"
commands:
- ping
- traceroute
- mtr
```
## Attribution
2024-12-25 22:24:29 +11:00
This project was inspired by [hyperglass ](https://hyperglass.dev/ ) after having difficulty deploying it. This project is not meant as a 1:1 replacement with hyperglass and as such is kept simple by design. At time of release only linux servers were tested as a target device, the same device library as hyperglass is used (netmiko) so compatibility with more devices should not be an issue, just be aware it is untested.