diff --git a/pillar/data/addtotab.sh b/pillar/data/addtotab.sh index 206439d2b..21a735214 100644 --- a/pillar/data/addtotab.sh +++ b/pillar/data/addtotab.sh @@ -16,8 +16,12 @@ else if [ $TYPE == 'sensorstab' ]; then echo " manint: $MANINT" >> /opt/so/saltstack/pillar/data/$1.sls echo " monint: $MONINT" >> /opt/so/saltstack/pillar/data/$1.sls - salt-call state.apply common fi + if [ $TYPE == 'nodestab' ]; then + echo " manint: $MANINT" >> /opt/so/saltstack/pillar/data/$1.sls + fi + + salt-call state.apply common salt-call state.apply utility fi diff --git a/salt/common/init.sls b/salt/common/init.sls index fec8546a6..ff44269fa 100644 --- a/salt/common/init.sls +++ b/salt/common/init.sls @@ -261,6 +261,22 @@ dashboard-{{ SN }}: {% endfor %} {% endif %} +{% if salt['pillar.get']('nodestab', False) %} +{%- for SN, SNDATA in salt['pillar.get']('nodestab', {}).iteritems() %} +dashboard-{{ SN }}: + file.managed: + - name: /opt/so/conf/grafana/grafana_dashboards/{{ SN }}-Sensor.json + - user: 939 + - group: 939 + - template: jinja + - source: salt://common/grafana/grafana_dashboards/sensor.json + - defaults: + SERVERNAME: {{ SN }} + MANINT: {{ SNDATA.manint }} + +{% endfor %} +{% endif %} + # Install the docker. This needs to be behind nginx at some point so-grafana: diff --git a/salt/utility/bin/crossthestreams.sh b/salt/utility/bin/crossthestreams.sh index 63859d9e9..2e2ef2fce 100644 --- a/salt/utility/bin/crossthestreams.sh +++ b/salt/utility/bin/crossthestreams.sh @@ -30,6 +30,7 @@ echo "Applying cross cluster search config..." -d "{\"persistent\": {\"search\": {\"remote\": {\"{{ MASTER }}\": {\"seeds\": [\"127.0.0.1:9300\"]}}}}}" # Add all the storage nodes to cross cluster searching. -{%- for SN, SNIP in salt['pillar.get']('nodestab', {}).iteritems() %}} -curl -XPUT http://{{ ES }}:9200/_cluster/settings -H'Content-Type: application/json' -d '{"persistent": {"search": {"remote": {"{{ SN }}": {"skip_unavailable": "true", "seeds": ["{{ SNIP['ip'] }}:9300"]}}}}}' +#{%- for SN, SNIP in salt['pillar.get']('nodestab', {}).iteritems() %}} +{%- for SN, SNDATA in salt['pillar.get']('nodestab', {}).iteritems() %} +curl -XPUT http://{{ ES }}:9200/_cluster/settings -H'Content-Type: application/json' -d '{"persistent": {"search": {"remote": {"{{ SN }}": {"skip_unavailable": "true", "seeds": ["{{ SNDATA.ip }}:9300"]}}}}}' {%- endfor %} diff --git a/so-setup-network.sh b/so-setup-network.sh index c01be1f9d..91d8647d3 100644 --- a/so-setup-network.sh +++ b/so-setup-network.sh @@ -745,7 +745,7 @@ set_initial_firewall_policy() { if [ $INSTALLTYPE == 'STORAGENODE' ]; then ssh -i /root/.ssh/so.key socore@$MSRV sudo /opt/so/saltstack/pillar/firewall/addfirewall.sh minions $MAINIP ssh -i /root/.ssh/so.key socore@$MSRV sudo /opt/so/saltstack/pillar/firewall/addfirewall.sh storage_nodes $MAINIP - ssh -i /root/.ssh/so.key socore@$MSRV sudo /opt/so/saltstack/pillar/data/addtotab.sh nodestab $HOSTNAME $MAINIP + ssh -i /root/.ssh/so.key socore@$MSRV sudo /opt/so/saltstack/pillar/data/addtotab.sh nodestab $HOSTNAME $MAINIP $MAININT fi if [ $INSTALLTYPE == 'PARSINGNODE' ]; then