Setup Script - Add New node types

This commit is contained in:
Mike Reeves
2018-05-18 14:16:43 -04:00
parent 2cec72b970
commit 085a8e8617
2 changed files with 21 additions and 3 deletions

View File

@@ -23,7 +23,7 @@ base:
- logstash - logstash
'G@role:so-node': 'G@role:so-node':
{%- if nodetype == 'parsing' %} {%- if nodetype == 'parser' %}
- common - common
- logstash - logstash
{% elsif nodetype == 'hot' %} {% elsif nodetype == 'hot' %}

View File

@@ -340,6 +340,7 @@ node_pillar() {
echo " ls_input_threads: $LSINPUTTHREADS" >> $TMP/$HOSTNAME.sls echo " ls_input_threads: $LSINPUTTHREADS" >> $TMP/$HOSTNAME.sls
echo " ls_batch_count: $LSINPUTBATCHCOUNT" >> $TMP/$HOSTNAME.sls echo " ls_batch_count: $LSINPUTBATCHCOUNT" >> $TMP/$HOSTNAME.sls
echo " es_shard_count: $SHARDCOUNT" >> $TMP/$HOSTNAME.sls echo " es_shard_count: $SHARDCOUNT" >> $TMP/$HOSTNAME.sls
echo " node_type: $NODETYPE" >> $TMP/$HOSTNAME.sls
} }
@@ -441,7 +442,23 @@ sensor_pillar() {
} }
update_sudoers() { set_node_type() {
# Determine the node type based on whiplash choice
if [ $INSTALLTYPE == 'STORAGENODE' ]; then
$NODETYPE=storage
fi
if [ $INSTALLTYPE == 'PARSINGNODE' ]; then
$NODETYPE=parser
fi
if [ $INSTALLTYPE == 'HOTNODE' ]; then
$NODETYPE=hot
fi
if [ $INSTALLTYPE == 'WARMNODE' ]; then
$NODETYPE=warm
fi
}update_sudoers() {
# Update Sudoers so that socore can accept keys without a password # Update Sudoers so that socore can accept keys without a password
echo "socore ALL=(ALL) NOPASSWD:/usr/bin/salt-key" | sudo tee -a /etc/sudoers echo "socore ALL=(ALL) NOPASSWD:/usr/bin/salt-key" | sudo tee -a /etc/sudoers
@@ -866,7 +883,7 @@ if (whiptail_you_sure) then
salt_checkin salt_checkin
fi fi
if [ $INSTALLTYPE == 'STORAGENODE' ]; then else
whiptail_management_nic whiptail_management_nic
echo "Why isn't this working" echo "Why isn't this working"
whiptail_management_server whiptail_management_server
@@ -889,6 +906,7 @@ if (whiptail_you_sure) then
copy_ssh_key copy_ssh_key
saltify saltify
configure_minion node configure_minion node
set_node_type
node_pillar node_pillar
copy_minion_pillar nodes copy_minion_pillar nodes
salt_checkin salt_checkin