-
Notifications
You must be signed in to change notification settings - Fork 3
/
summary.sh
33 lines (25 loc) · 1.27 KB
/
summary.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
source /vagrant/lib.sh
dns_domain="$(hostname --domain)"
host_ip_address="$(ip addr show eth1 | perl -n -e'/ inet (\d+(\.\d+)+)/ && print $1')"
first_vm_mac="$(cat /vagrant/shared/machines.json | jq -r '.[] | select(.type == "virtual") | .mac' | head -1)"
title 'matchbox addresses'
cat <<EOF
http://$host_ip_address/ipxe?mac=$first_vm_mac
http://$host_ip_address/metadata?mac=$first_vm_mac
http://$host_ip_address/generic?mac=$first_vm_mac
EOF
title 'addresses'
python3 <<EOF
from tabulate import tabulate
headers = ('service', 'address', 'username', 'password')
def info():
yield ('grafana', 'http://pandora.$dns_domain:3000', None, None)
yield ('meshcommander', 'http://pandora.$dns_domain:4000', None, None)
yield ('machinator', 'http://pandora.$dns_domain:8000', None, None)
yield ('theila', 'http://pandora.$dns_domain:8080', None, None)
yield ('traefik', 'https://traefik.$dns_domain', None, None)
yield ('kubernetes-dashboard', 'https://kubernetes-dashboard.$dns_domain', None, None)
yield ('example', 'https://example-daemonset.$dns_domain', None, None)
print(tabulate(info(), headers=headers))
EOF