Add Info to nodestab

This commit is contained in:
Mike Reeves
2018-11-25 19:03:26 -05:00
parent 5e6fae9787
commit 03d16acd5d
4 changed files with 25 additions and 4 deletions

View File

@@ -16,8 +16,12 @@ else
if [ $TYPE == 'sensorstab' ]; then if [ $TYPE == 'sensorstab' ]; then
echo " manint: $MANINT" >> /opt/so/saltstack/pillar/data/$1.sls echo " manint: $MANINT" >> /opt/so/saltstack/pillar/data/$1.sls
echo " monint: $MONINT" >> /opt/so/saltstack/pillar/data/$1.sls echo " monint: $MONINT" >> /opt/so/saltstack/pillar/data/$1.sls
salt-call state.apply common
fi 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 salt-call state.apply utility
fi fi

View File

@@ -261,6 +261,22 @@ dashboard-{{ SN }}:
{% endfor %} {% endfor %}
{% endif %} {% 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 # Install the docker. This needs to be behind nginx at some point
so-grafana: so-grafana:

View File

@@ -30,6 +30,7 @@ echo "Applying cross cluster search config..."
-d "{\"persistent\": {\"search\": {\"remote\": {\"{{ MASTER }}\": {\"seeds\": [\"127.0.0.1:9300\"]}}}}}" -d "{\"persistent\": {\"search\": {\"remote\": {\"{{ MASTER }}\": {\"seeds\": [\"127.0.0.1:9300\"]}}}}}"
# Add all the storage nodes to cross cluster searching. # Add all the storage nodes to cross cluster searching.
{%- for SN, SNIP in salt['pillar.get']('nodestab', {}).iteritems() %}} #{%- 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, 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 %} {%- endfor %}

View File

@@ -745,7 +745,7 @@ set_initial_firewall_policy() {
if [ $INSTALLTYPE == 'STORAGENODE' ]; then 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 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/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 fi
if [ $INSTALLTYPE == 'PARSINGNODE' ]; then if [ $INSTALLTYPE == 'PARSINGNODE' ]; then