Clone the project to your server
git clone https://github.com/thatmattlove/hyperglass.git /opt/hyperglass
Install dependencies
apt install python python3-pip nodejs redis-server
npm install --global yarn
Run the Hyperglass install script
/opt/hyperglass/install.sh
I had to manually install Pillow - the install script failed to complete the installation until I did this.
apt install libjpeg-dev zlib1g-dev
pip install Pillow
I'm going to paste my configs - modify them as you see fit.
Hyperglass should now be a valid command on your system
hyperglass --help
Run the setup
hyperglass setup
Install in /etc/hyperglass
Create the Hyperglass config file at /etc/hyperglass/hyperglass.yaml
debug: false
developer_mode: false
org_name: Beloved Hyperglass User
site_title: hyperglass
site_description: "{org_name} Network Looking Glass"
site_keywords: [hyperglass, looking glass, routing, bgp]
request_timeout: 30
listen_address: "0.0.0.0"
listen_port: 8001
cors_origins: [lg.example.com, 192.0.2.1]
Create the devices config file at /etc/hyperglass/devices.yaml
routers:
- name: Router1
commands: custom_commands
address: 172.16.1.20
network:
name: ISP Network 1
display_name: AS123456
credential:
username: lookingglass
password: ********************
port: 22
nos: ios
vrfs:
- name: global
default: true
ipv4:
source_address: x.x.x.x
I didn't use the recommended config:
server {
listen 443 http2 ssl;
server_name lookingglass.example.com;
ssl_certificate /etc/ssl/example.com/mynextlight_net.pem;
ssl_certificate_key /etc/ssl/example.com/mynextlight_net.key;
location / {
proxy_pass http://lookingglass.int.example.com:8001;
proxy_set_header HOST $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache_bypass $http_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Forwarded-Host lookingglass.example.com;
}
}