Skip to content

Commit

Permalink
Merge pull request #46 from opencrvs/testing-infra-2
Browse files Browse the repository at this point in the history
Fix alert address issue
  • Loading branch information
euanmillar authored Feb 15, 2024
2 parents 3b1280a + 8a7e8f5 commit fe3042a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
6 changes: 6 additions & 0 deletions infrastructure/deployment/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,12 @@ EOF

# Setup configuration files and compose file for the deployment domain
configured_ssh "
HOST=$HOST
SMTP_HOST=$SMTP_HOST
SMTP_PORT=$SMTP_PORT
ALERT_EMAIL=$ALERT_EMAIL
SENDER_EMAIL_ADDRESS=$SENDER_EMAIL_ADDRESS
DOMAIN=$DOMAIN
MINIO_ROOT_USER=$MINIO_ROOT_USER
MINIO_ROOT_PASSWORD=$MINIO_ROOT_PASSWORD
/opt/opencrvs/infrastructure/setup-deploy-config.sh $HOST | tee -a $LOG_LOCATION/setup-deploy-config.log"
Expand Down
2 changes: 0 additions & 2 deletions infrastructure/monitoring/elastalert/elastalert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ buffer_time:

es_host: elasticsearch
es_port: 9200
es_username: '{{ES_USERNAME}}'
es_password: '{{ES_PASSWORD}}'

writeback_index: elastalert_status

Expand Down
13 changes: 13 additions & 0 deletions infrastructure/setup-deploy-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@ done
KIBANA_ENCRYPTION_KEY=`uuidgen`
sed -i "s/{{KIBANA_ENCRYPTION_KEY}}/$KIBANA_ENCRYPTION_KEY/g" /opt/opencrvs/infrastructure/monitoring/kibana/kibana.yml

# Move metabase file
mv /opt/opencrvs/infrastructure/metabase.init.db.sql /data/metabase/metabase.init.db.sql

# Replace environment variables from all alert definition files
for file in /opt/opencrvs/infrastructure/monitoring/elastalert/rules/*.yaml; do
sed -i -e "s%{{HOST}}%$1%" $file
sed -i -e "s%{{SMTP_HOST}}%$SMTP_HOST%" $file
sed -i -e "s%{{SMTP_PORT}}%$SMTP_PORT%" $file
sed -i -e "s%{{ALERT_EMAIL}}%$ALERT_EMAIL%" $file
sed -i -e "s%{{SENDER_EMAIL_ADDRESS}}%$SENDER_EMAIL_ADDRESS%" $file
sed -i -e "s%{{DOMAIN}}%$DOMAIN%" $file
done

sed -i -e "s%{{MINIO_ROOT_USER}}%$MINIO_ROOT_USER%" /opt/opencrvs/infrastructure/mc-config/config.json
sed -i -e "s%{{MINIO_ROOT_PASSWORD}}%$MINIO_ROOT_PASSWORD%" /opt/opencrvs/infrastructure/mc-config/config.json

Expand Down
2 changes: 1 addition & 1 deletion src/data-seeding/employees/source/prod-employees.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
primaryOfficeId,givenNames,familyName,systemRole,role,mobile,username,email,password
CRVS_OFFICE_JWMRGwDBXK,Euan,Millar,NATIONAL_SYSTEM_ADMIN,National System Admin,,e.millar,[email protected],test
CRVS_OFFICE_JWMRGwDBXK,Euan,Millar,NATIONAL_SYSTEM_ADMIN,National System Admin,,e.millar,[email protected],test

0 comments on commit fe3042a

Please sign in to comment.