-
Notifications
You must be signed in to change notification settings - Fork 427
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix docker-compose setup and use Hostname env var on test config
- Loading branch information
1 parent
0aca5a7
commit cf14f66
Showing
10 changed files
with
68 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 20 additions & 12 deletions
32
packages/kibana/_dev/deploy/docker/scripts/generate-audit-logs.sh
100644 → 100755
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,32 @@ | ||
#!/bin/sh | ||
|
||
# Makes requests to kibana API so that audit logs can be generated | ||
attempt_counter=0 | ||
max_attempts=6 | ||
|
||
set -e | ||
until curl -s --request GET \ | ||
--url $KIBANA_SERVICE_HOST/login \ | ||
--user "elastic:$KIBANA_PASSWORD" \ | ||
--header 'Content-Type: application/json' | ||
do | ||
|
||
until curl --request GET \ | ||
--user "elastic:$KIBANA_PASSWORD" \ | ||
--url $KIBANA_SERVICE_HOST/login \ | ||
--header 'Content-Type: application/json' | ||
do sleep 10; | ||
done; | ||
if [ ${attempt_counter} -eq ${max_attempts} ];then | ||
echo "Max attempts reached" | ||
exit 1 | ||
fi | ||
|
||
printf '.' | ||
attempt_counter=$(($attempt_counter+1)) | ||
sleep 10 | ||
done | ||
|
||
while true | ||
do | ||
echo Generating audit logs | ||
|
||
curl --request GET \ | ||
curl -s --request GET \ | ||
--url $KIBANA_SERVICE_HOST/api/features \ | ||
--user "elastic:$KIBANA_PASSWORD" \ | ||
--url $KIBANA_SERVICE_HOST/api/features \ | ||
--header 'Content-Type: application/json' | ||
|
||
echo "Audit log created" | ||
sleep 10 | ||
done; | ||
done |
24 changes: 17 additions & 7 deletions
24
packages/kibana/_dev/deploy/docker/scripts/setup.sh
100644 → 100755
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,22 @@ | ||
#!/bin/sh | ||
|
||
#Sets a password for kibana_system user | ||
attempt_counter=0 | ||
max_attempts=6 | ||
|
||
set -e | ||
|
||
until curl --request POST $ES_SERVICE_HOST/_security/user/kibana_system/_password \ | ||
--user elastic:$ELASTIC_PASSWORD \ | ||
until curl -s --request POST $ES_SERVICE_HOST/_security/user/kibana_system/_password \ | ||
--user "elastic:$ELASTIC_PASSWORD" \ | ||
--header 'Content-Type: application/json' \ | ||
--data "{\"password\":\"$KIBANA_PASSWORD\"}" | ||
do sleep 10; | ||
done; | ||
--data "{\"password\":\"$KIBANA_PASSWORD\"}" | ||
do | ||
if [ ${attempt_counter} -eq ${max_attempts} ];then | ||
echo "Max attempts reached" | ||
exit 1 | ||
fi | ||
|
||
printf '.' | ||
attempt_counter=$(($attempt_counter+1)) | ||
sleep 10 | ||
done | ||
|
||
echo "Setup complete" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters