Merge branch 'dev' into kilo

This commit is contained in:
Jason Ertel
2021-03-19 11:15:47 -04:00
4 changed files with 16 additions and 5 deletions

View File

@@ -246,6 +246,7 @@ postupgrade_changes() {
[[ "$POSTVERSION" =~ rc.1 ]] && post_rc1_to_rc2 [[ "$POSTVERSION" =~ rc.1 ]] && post_rc1_to_rc2
[[ "$POSTVERSION" == 2.3.20 || "$POSTVERSION" == 2.3.21 ]] && post_2.3.2X_to_2.3.30 [[ "$POSTVERSION" == 2.3.20 || "$POSTVERSION" == 2.3.21 ]] && post_2.3.2X_to_2.3.30
[[ "$POSTVERSION" == 2.3.30 ]] && post_2.3.30_to_2.3.40
} }
post_rc1_to_2.3.21() { post_rc1_to_2.3.21() {
@@ -260,6 +261,13 @@ post_2.3.2X_to_2.3.30() {
POSTVERSION=2.3.30 POSTVERSION=2.3.30
} }
post_2.3.30_to_2.3.40() {
so-playbook-sigma-refresh >> /root/soup_playbook_sigma_refresh.log 2>&1 &
so-kibana-space-defaults
POSTVERSION=2.3.40
}
rc1_to_rc2() { rc1_to_rc2() {
# Move the static file to global.sls # Move the static file to global.sls

View File

@@ -89,7 +89,7 @@ def run():
# Update the Fleet host in the static pillar # Update the Fleet host in the static pillar
for line in fileinput.input(STATICFILE, inplace=True): for line in fileinput.input(STATICFILE, inplace=True):
line = re.sub(r'fleet_custom_hostname:.*\n', f"fleet_custom_hostname: {CUSTOMHOSTNAME}", line.rstrip()) line = re.sub(r'fleet_custom_hostname:.*$', f"fleet_custom_hostname: {CUSTOMHOSTNAME}", line.rstrip())
print(line) print(line)
return {} return {}

View File

@@ -949,7 +949,7 @@ create_repo() {
} }
detect_cloud() { detect_cloud() {
echo "Testing if setup is running on a cloud instance..." >> "$setup_log" 2>&1 echo "Testing if setup is running on a cloud instance..." | tee -a "$setup_log"
if ( curl --fail -s -m 5 http://169.254.169.254/latest/meta-data/instance-id > /dev/null ) || ( dmidecode -s bios-vendor | grep -q Google > /dev/null); then export is_cloud="true"; fi if ( curl --fail -s -m 5 http://169.254.169.254/latest/meta-data/instance-id > /dev/null ) || ( dmidecode -s bios-vendor | grep -q Google > /dev/null); then export is_cloud="true"; fi
} }
@@ -1942,7 +1942,7 @@ reset_proxy() {
[[ -f /etc/systemd/system/docker.service.d/http-proxy.conf ]] && rm -f /etc/systemd/system/docker.service.d/http-proxy.conf [[ -f /etc/systemd/system/docker.service.d/http-proxy.conf ]] && rm -f /etc/systemd/system/docker.service.d/http-proxy.conf
systemctl daemon-reload systemctl daemon-reload
command -v docker &> /dev/null && echo "Restarting Docker..." && systemctl restart docker command -v docker &> /dev/null && echo "Restarting Docker..." | tee -a "$setup_log" && systemctl restart docker
[[ -f /root/.docker/config.json ]] && rm -f /root/.docker/config.json [[ -f /root/.docker/config.json ]] && rm -f /root/.docker/config.json

View File

@@ -361,10 +361,10 @@ percentage=0
echo "Could not install packages required for setup, exiting now." >> "$setup_log" 2>&1 echo "Could not install packages required for setup, exiting now." >> "$setup_log" 2>&1
kill -SIGUSR1 "$setup_proc"; exit 1 kill -SIGUSR1 "$setup_proc"; exit 1
fi fi
set_progress_str 99 "Detecting whether setup is running in the cloud." nolog
detect_cloud
} | progress '...' } | progress '...'
detect_cloud
short_name=$(echo "$HOSTNAME" | awk -F. '{print $1}') short_name=$(echo "$HOSTNAME" | awk -F. '{print $1}')
MINION_ID=$(echo "${short_name}_${install_type}" | tr '[:upper:]' '[:lower:]') MINION_ID=$(echo "${short_name}_${install_type}" | tr '[:upper:]' '[:lower:]')
@@ -799,6 +799,9 @@ set_redirect >> $setup_log 2>&1
set_progress_str 70 "$(print_salt_state_apply 'kibana')" set_progress_str 70 "$(print_salt_state_apply 'kibana')"
salt-call state.apply -l info kibana >> $setup_log 2>&1 salt-call state.apply -l info kibana >> $setup_log 2>&1
set_progress_str 70 "Setting up default Space in Kibana"
so-kibana-space-defaults >> $setup_log 2>&1
fi fi
if [[ "$PLAYBOOK" = 1 ]]; then if [[ "$PLAYBOOK" = 1 ]]; then