Compare commits

...

2 Commits

Author SHA1 Message Date
Luis Guzmán 2ed082f67f add safe removal tls_store 2023-12-05 00:46:57 -06:00
Luis Guzmán 3f8d78b0bb fix create_certs function 2023-12-05 00:44:55 -06:00
2 changed files with 7 additions and 5 deletions

View File

@ -35,7 +35,7 @@ install_if_not() {
grep -c "ok installed")" == "1" ]; then
echo " $1 is installed, skipping..."
else
printf "\n---- Installing %s ----" "$1"
printf "\n---- Installing %s ----\n" "$1"
apt-get -yq2 install "$1"
fi
}
@ -61,11 +61,12 @@ fi
dig_dns_ip() {
dig -4 +short "$1"||awk -v RS='([0-9]+\\.){3}[0-9]+' 'RT{print RT}'
}
create_certs(){
create_certs() {
cp static/opensearch_certs.sh "$OPNSDIR"
sed -i "s|__FTSDOMAIN__|$1|" "$OPNSDIR"/opensearch_certs.sh
cp "$OPNSDIR"
cd "$OPNSDIR"
bash opensearch_certs.sh
rm -f "$OPNSDIR"/opensearch_certs.sh
}
countdown() {
printwc "$Cyan" "$1"
@ -330,4 +331,4 @@ docker-compose exec fts_os-node \
docker logs $fts_node
echo "You can now use: \"http://${INDEX_USER}:${OPNSREST}@localhost:9200\""
printwc "$Green" "\n\nYou can now use: \"http://${INDEX_USER}:${OPNSREST}@localhost:9200\"\n"

View File

@ -4,7 +4,8 @@
# Source:
# https://opensearch.org/docs/latest/security-plugin/configuration/generate-certificates/#sample-script
mkdir tls_store
rm -rf tls_store
mkdir -p tls_store
TLS_DN="/C=CA/ST=OPENSEARCH/L=NODE/O=OPENSEARCH/OU=FTS"
# Root CA