fix multi runs
@@ -8,6 +8,7 @@ default_ip=$(ip addr show dev "$default_iface" | awk '$1 == "inet" { sub("/.*",
if [[ -z "${FAUCET_PREFIX}" ]]; then
# clone faucet
rm -rf /opt/faucet
+ rm -rf /opt/grafana
pushd `pwd` && cd /opt; git clone https://github.com/faucetsdn/faucet; popd
# copy over compose and prometheus files
@@ -27,7 +28,7 @@ if [[ -z "${FAUCET_PREFIX}" ]]; then
wget -O /opt/grafana/dashboards/faucet_inventory.json https://docs.faucet.nz/en/latest/_static/grafana-dashboards/faucet_inventory.json
wget -O /opt/grafana/dashboards/faucet_port_statistics.json https://docs.faucet.nz/en/latest/_static/grafana-dashboards/faucet_port_statistics.json
- pushd `pwd` && cd /opt/faucet; FAUCET_EVENT_SOCK=1 FAUCET_CONFIG_STAT_RELOAD=1 FA_RABBIT_HOST=$default_ip docker-compose -f docker-compose.yaml -f adapters/vendors/rabbitmq/docker-compose.yaml up --build -d; popd
+ pushd `pwd` && cd /opt/faucet; docker-compose down; FAUCET_EVENT_SOCK=1 FAUCET_CONFIG_STAT_RELOAD=1 FA_RABBIT_HOST=$default_ip docker-compose -f docker-compose.yaml -f adapters/vendors/rabbitmq/docker-compose.yaml up --build -d; popd
poseidon restart
wget -O- --auth-no-challenge --post-data='{"name":"${DS_PROMETHEUS}","type":"prometheus","access":"proxy","url":"http://prometheus:9090","basicAuth":false,"isDefault":true}' --header="Content-Type: application/json;charset=UTF-8charset=UTF-8" 'http://admin:admin@192.168.0.8:3000/api/datasources'
