wazuh-ansible-4.8.1/run_cluster_mode.sh
2019-08-23 11:29:31 +02:00

24 lines
651 B
Bash

#!/bin/bash
paths=( "molecule/default/" "molecule/worker/" "molecule/elasticsearch/" "molecule/kibana/" )
if [ -z "$1" ]
then
echo "Platform not selected. Please select a platform of [bionuc, xenial or centos7]. => Aborting"
echo "Run Instruction: ./run_cluster_mode.sh <platform>"
exit
else
for i in "${paths[@]}"
do
cp "$i/playbook.yml.template" "$i/playbook.yml"
sed -i "s/platform/$1/g" "$i/playbook.yml"
done
cp Pipfile.template Pipfile
sed -i "s/_PLATFORM_/$1/g" Pipfile
fi
sudo pipenv run elasticsearch
sudo pipenv run test
sudo pipenv run agent
sudo pipenv run kibana