Skip to content

Commit 61cd026

Browse files
committed
Added code to fetch IP
1 parent b0e73bd commit 61cd026

6 files changed

+10
-8
lines changed

.github/workflows/healthcheck-app-existingVpc-Ubuntu-Thurs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ jobs:
4040
- name: MATLAB Web App Server Reference Architecture Health Check Test Ubuntu Existing VPC Ubuntu us-east-1 region
4141
run: |
4242
cd healthcheck
43-
python test_mwasrefarch_healthcheck_newvpc.py ${{ secrets.OIDCKeyPairNameVirginia }} ${{ secrets.lmpassword }} ${{ secrets.ipaddress }} "us-east-1" "Ubuntu"
43+
python test_mwasrefarch_healthcheck_newvpc.py ${{ secrets.OIDCKeyPairNameVirginia }} ${{ secrets.lmpassword }} "us-east-1" "Ubuntu"

.github/workflows/healthcheck-app-existingVpc-Win-Tue.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ jobs:
4040
- name: MATLAB Web App Server Reference Architecture Health Check Test Windows Existing VPC Windows eu-west-1 region
4141
run: |
4242
cd healthcheck
43-
python test_webappserver_refarch_existingvpc.py ${{ secrets.OIDCKeyPairNameIreland }} ${{ secrets.lmpassword }} ${{ secrets.ipaddress }} "eu-west-1" "Windows"
43+
python test_webappserver_refarch_existingvpc.py ${{ secrets.OIDCKeyPairNameIreland }} ${{ secrets.lmpassword }} "eu-west-1" "Windows"

.github/workflows/healthcheck-app-newVpc-Ubuntu-Mon.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ jobs:
4242
- name: MATLAB Web App Server Reference Architecture Health Check Test Ubuntu New VPC Ubuntu us-east-1 region
4343
run: |
4444
cd healthcheck
45-
python test_mwasrefarch_healthcheck_newvpc.py ${{ secrets.OIDCKeyPairNameVirginia }} ${{ secrets.lmpassword }} ${{ secrets.ipaddress }} "us-east-1" "Ubuntu"
45+
python test_mwasrefarch_healthcheck_newvpc.py ${{ secrets.OIDCKeyPairNameVirginia }} ${{ secrets.lmpassword }} "us-east-1" "Ubuntu"

.github/workflows/healthcheck-app-newVpc-Win-Wed.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ jobs:
4040
- name: MATLAB Web App Server Reference Architecture Health Check Test Windows New VPC Windows ap-northeast region
4141
run: |
4242
cd healthcheck
43-
python test_mwasrefarch_healthcheck_newvpc.py ${{ secrets.OIDCKeyPairNameTokyo }} ${{ secrets.lmpassword }} ${{ secrets.ipaddress }} "ap-northeast-1" "Windows"
43+
python test_mwasrefarch_healthcheck_newvpc.py ${{ secrets.OIDCKeyPairNameTokyo }} ${{ secrets.lmpassword }} "ap-northeast-1" "Windows"

healthcheck/test_mwasrefarch_healthcheck_newvpc.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
from datetime import date
1111
import json
1212

13-
def main(keypairname, password, ipAddress, location_arg, platform_arg):
13+
def main(keypairname, password, location_arg, platform_arg):
1414
# Reference architectures in production.
1515
ref_arch_name = 'matlab-web-app-server-on-aws'
16+
ipAddress = requests.get("https://api.ipify.org").text + "/32"
1617
parameters = [{'ParameterKey': 'KeyPairName', 'ParameterValue': keypairname},
1718
{'ParameterKey': 'AdminIPAddress', 'ParameterValue': ipAddress},
1819
{'ParameterKey': 'Password', 'ParameterValue': password},
@@ -62,4 +63,4 @@ def main(keypairname, password, ipAddress, location_arg, platform_arg):
6263
print("\n\n")
6364

6465
if __name__ == '__main__':
65-
main(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5])
66+
main(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4])

healthcheck/test_webappserver_refarch_existingvpc.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414
from datetime import date
1515
import sys
1616

17-
def main(keypairname, password, ipAddress, location_arg, platform_arg):
17+
def main(keypairname, password, location_arg, platform_arg):
1818
# Reference architectures in production.
1919
# Deploy a stack for creating VPC with 2 subnets
2020
existing_template_url = "https://matlab-web-app-server-templates.s3.amazonaws.com/r2022a_refarch/VPCStack.yml"
21+
ipAddress = requests.get("https://api.ipify.org").text + "/32"
2122
vpc_parameters = [{"ParameterKey": "AllowPublicIP",
2223
"ParameterValue": "Yes"}]
2324
existingstack = deploy.deploy_stack(existing_template_url, vpc_parameters, location_arg, "existingvpc")
@@ -88,4 +89,4 @@ def main(keypairname, password, ipAddress, location_arg, platform_arg):
8889

8990

9091
if __name__ == '__main__':
91-
main(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5])
92+
main(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4])

0 commit comments

Comments
 (0)