mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-04 10:09:42 +00:00
added scripts to discover sailing-analytics-server instances and add secrets to them
This commit is contained in:
1 parent
b4ae9d98ff
commit
12ce27f47c
2 files changed
+22
No files matched your search
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
#echo "'${SECRETS_TO_ADD}'" >>'${SECRETS_PATH}'
|
||||
|
||||
# Copy stdin to SECRETS_TO_ADD
|
||||
SECRETS_TO_ADD=$( cat )
|
||||
SERVERS_PATH=/home/sailing/servers
|
||||
SECRETS_PATH=/root/secrets
|
||||
SECRETS_IN_APP_PATH=configuration/secrets
|
||||
FIND_ANALYTICS_SERVERS_SCRIPT="$( dirname ${0} )/findSailingAnalyticsServers"
|
||||
for IP in $( ${FIND_ANALYTICS_SERVERS_SCRIPT} ); do
|
||||
echo "Handling server with IP ${IP} ..."
|
||||
ssh root@$IP 'echo "Appending '${SECRETS_TO_ADD}' to '${SECRETS_PATH}'"
|
||||
echo "'${SECRETS_TO_ADD}'" >>'${SECRETS_PATH}'
|
||||
echo "Server directories:"
|
||||
for i in $( ls '${SERVERS_PATH}' ); do
|
||||
echo "Appending to '${SERVERS_PATH}'/${i}/'${SECRETS_IN_APP_PATH}'"
|
||||
echo "'${SECRETS_TO_ADD}'" >>'${SERVERS_PATH}'/${i}/'${SECRETS_IN_APP_PATH}'
|
||||
done'
|
||||
done
|
||||
Executable
+2
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
aws ec2 describe-instances --filters Name=tag-key,Values=sailing-analytics-server | jq -r '.Reservations[].Instances[].NetworkInterfaces[].PrivateIpAddresses[].Association.PublicIp'
|
||||
Reference in new issue
Block a user