From bd28cd75ed7041d5b36fed07108664e1e106161d Mon Sep 17 00:00:00 2001 From: Ramin Haeri Azad Date: Mon, 17 Jul 2023 16:25:23 -0400 Subject: [PATCH 1/2] Pass 'no-ssl-verify' for both Opal and Mica calls to prevent possible SSL errors (localhost) --- .gitignore | 2 ++ mica2/Makefile | 18 +++++++++--------- opal/Makefile | 38 +++++++++++++++++++------------------- 3 files changed, 30 insertions(+), 28 deletions(-) diff --git a/.gitignore b/.gitignore index d5839a7..537b353 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ target/ visual_regression/backstop_data/ visual_regression/node_modules/ visual_regression/package-lock.json +.history +venv \ No newline at end of file diff --git a/mica2/Makefile b/mica2/Makefile index 945621c..1a53012 100644 --- a/mica2/Makefile +++ b/mica2/Makefile @@ -22,23 +22,23 @@ seed-mica: seed-studies seed-datasets seed-research-projects index-taxonomies seed-studies: seed-individual-studies seed-harmonization-studies seed-people seed-individual-studies: - mica import-zip -mk $(mica_url) -u $(username) -p $(password) -pub ./mica2/seed/individual-studies + mica import-zip -nv -mk $(mica_url) -u $(username) -p $(password) -pub ./mica2/seed/individual-studies seed-harmonization-studies: - mica import-zip -mk $(mica_url) -u $(username) -p $(password) -pub ./mica2/seed/harmonization-studies + mica import-zip -nv -mk $(mica_url) -u $(username) -p $(password) -pub ./mica2/seed/harmonization-studies seed-single-study: seed-cls-study mica rest -u administrator -p password -m DELETE /draft/network/ialsa seed-cls-study: - mica import-zip -mk $(mica_url) -u $(username) -p $(password) -pub ./mica2/seed/individual-studies/study-cls.zip + mica import-zip -nv -mk $(mica_url) -u $(username) -p $(password) -pub ./mica2/seed/individual-studies/study-cls.zip $(call dataset-create,collected,cls-wave1) $(call dataset-create,collected,cls-wave2) $(call dataset-create,collected,cls-wave3) $(call dataset-create,collected,cls-wave4) seed-cag-study: - mica import-zip -mk $(mica_url) -u $(username) -p $(password) -pub ./mica2/seed/individual-studies/study-cag.zip + mica import-zip -nv -mk $(mica_url) -u $(username) -p $(password) -pub ./mica2/seed/individual-studies/study-cag.zip $(call dataset-create,collected,cag-baseline) seed-datasets: seed-collected-datasets seed-harmonized-datasets @@ -87,7 +87,7 @@ seed-research-projects: $(call research-project-create,lung-cancer) index-taxonomies: - mica rest -mk $(mica_url) -u $(username) -p $(password) /taxonomies/_index -m PUT + mica rest -nv -mk $(mica_url) -u $(username) -p $(password) /taxonomies/_index -m PUT clean-mica: rm -rf ${mica_home} @@ -100,8 +100,8 @@ launch-mica-debug: # # Functions # -dataset-create = mica rest -mk $(mica_url) -u $(username) -p $(password) -m POST /draft/$(1)-datasets --content-type "application/json" < ./mica2/seed/$(1)-datasets/$(2).json && \ - mica rest -mk $(mica_url) -u $(username) -p $(password) -m PUT /draft/$(1)-dataset/$(2)/_publish +dataset-create = mica rest -nv -mk $(mica_url) -u $(username) -p $(password) -m POST /draft/$(1)-datasets --content-type "application/json" < ./mica2/seed/$(1)-datasets/$(2).json && \ + mica rest -nv -mk $(mica_url) -u $(username) -p $(password) -m PUT /draft/$(1)-dataset/$(2)/_publish -research-project-create = mica rest -mk $(mica_url) -u $(username) -p $(password) -m POST /draft/projects --content-type "application/json" < ./mica2/seed/projects/$(1).json && \ - mica rest -mk $(mica_url) -u $(username) -p $(password) -m PUT /draft/project/$(1)/_publish +research-project-create = mica rest -nv -mk $(mica_url) -u $(username) -p $(password) -m POST /draft/projects --content-type "application/json" < ./mica2/seed/projects/$(1).json && \ + mica rest -nv -mk $(mica_url) -u $(username) -p $(password) -m PUT /draft/project/$(1)/_publish diff --git a/opal/Makefile b/opal/Makefile index 021d0e6..fbc4864 100644 --- a/opal/Makefile +++ b/opal/Makefile @@ -170,17 +170,17 @@ seed-mediation: seed-auth: seed-user seed-tokens seed-perm seed-tokens: - opal rest -o $(opal_url) -u $(username) -p $(password) -ct "application/json" -m POST /system/subject-token/_current/tokens < ./opal/seed/auth/resources-token.json - opal rest -o $(opal_url) -u $(username) -p $(password) -ct "application/json" -m POST /system/subject-token/_current/tokens < ./opal/seed/auth/datashield-token.json + opal rest -nv -o $(opal_url) -u $(username) -p $(password) -ct "application/json" -m POST /system/subject-token/_current/tokens < ./opal/seed/auth/resources-token.json + opal rest -nv -o $(opal_url) -u $(username) -p $(password) -ct "application/json" -m POST /system/subject-token/_current/tokens < ./opal/seed/auth/datashield-token.json seed-user: - opal user -o $(opal_url) -u $(username) -p $(password) -n $(dsusername) -upa $(dspassword) -a + opal user -nv -o $(opal_url) -u $(username) -p $(password) -n $(dsusername) -upa $(dspassword) -a seed-perm: - opal perm-datashield -o $(opal_url) -u $(username) -p $(password) -s $(dsusername) -ty user -pe use -a + opal perm-datashield -nv -o $(opal_url) -u $(username) -p $(password) -s $(dsusername) -ty user -pe use -a seed-taxonomies: - opal rest -o $(opal_url) -u $(username) -p $(password) -m POST "/system/conf/taxonomies/import/_github?user=maelstrom-research&repo=maelstrom-taxonomies&override=true&ref=$(taxonomies_ref)&key=$(taxonomies_key)" + opal rest -nv -o $(opal_url) -u $(username) -p $(password) -m POST "/system/conf/taxonomies/import/_github?user=maelstrom-research&repo=maelstrom-taxonomies&override=true&ref=$(taxonomies_ref)&key=$(taxonomies_key)" seed-taxonomies-latest: $(call taxonomy-import,AreaOfInformation) @@ -197,25 +197,25 @@ backup-project: # # Functions # -project-create = opal project -o $(opal_url) -u $(username) -p $(password) --name $(1) --database $(database) --tags $(2) --add && \ - opal project -o $(opal_url) -u $(username) -p $(password) --name $(1) +project-create = opal project -nv -o $(opal_url) -u $(username) -p $(password) --name $(1) --database $(database) --tags $(2) --add && \ + opal project -nv -o $(opal_url) -u $(username) -p $(password) --name $(1) -project-restore = opal file -o $(opal_url) -u $(username) -p $(password) -up ./opal/seed/backup/$(1).zip /home/$(username) && \ - opal restore-project -o $(opal_url) -u $(username) -p $(password) -pr $(1) -ar /home/$(username)/$(1).zip && \ - while [ `opal rest -o $(opal_url) -u $(username) -p $(password) -m GET /shell/commands -j | grep -ch "NOT_STARTED\|IN_PROGRESS"` -gt 0 ] ; do echo -n "."; sleep 5; done; echo "." +project-restore = opal file -nv -o $(opal_url) -u $(username) -p $(password) -up ./opal/seed/backup/$(1).zip /home/$(username) && \ + opal restore-project -nv -o $(opal_url) -u $(username) -p $(password) -pr $(1) -ar /home/$(username)/$(1).zip && \ + while [ `opal rest -nv -o $(opal_url) -u $(username) -p $(password) -m GET /shell/commands -j | grep -ch "NOT_STARTED\|IN_PROGRESS"` -gt 0 ] ; do echo -n "."; sleep 5; done; echo "." -tables-import = opal file -o $(opal_url) -u $(username) -p $(password) -up ./opal/seed/dictionaries/$(1).zip /home/$(username) && \ - opal import-xml -o $(opal_url) -u $(username) -p $(password) -pa /home/$(username)/$(1).zip -d $(1) && \ - while [ `opal rest -o $(opal_url) -u $(username) -p $(password) -m GET /shell/commands -j | grep -ch "NOT_STARTED\|IN_PROGRESS"` -gt 0 ] ; do echo -n "."; sleep 5; done; echo "." +tables-import = opal file -nv -o $(opal_url) -u $(username) -p $(password) -up ./opal/seed/dictionaries/$(1).zip /home/$(username) && \ + opal import-xml -nv -o $(opal_url) -u $(username) -p $(password) -pa /home/$(username)/$(1).zip -d $(1) && \ + while [ `opal rest -nv -o $(opal_url) -u $(username) -p $(password) -m GET /shell/commands -j | grep -ch "NOT_STARTED\|IN_PROGRESS"` -gt 0 ] ; do echo -n "."; sleep 5; done; echo "." -table-ds-perm = opal perm-table -o $(opal_url) -u $(username) -p $(password) -s $(dsusername) -ty user -pr $(1) -pe view -a +table-ds-perm = opal perm-table -nv -o $(opal_url) -u $(username) -p $(password) -s $(dsusername) -ty user -pr $(1) -pe view -a -resources-ds-perm = opal rest -o $(opal_url) -u $(username) -p $(password) -m POST "/project/$(1)/permissions/resources?type=USER&permission=RESOURCES_VIEW&principal=$(dsusername)" +resources-ds-perm = opal rest -nv -o $(opal_url) -u $(username) -p $(password) -m POST "/project/$(1)/permissions/resources?type=USER&permission=RESOURCES_VIEW&principal=$(dsusername)" -taxonomy-import = opal rest -o $(opal_url) -u $(username) -p $(password) -m POST "/system/conf/taxonomies/import/_github?repo=maelstrom-taxonomies&key=$(taxonomies_key)&override=true&file=$(1).yml" +taxonomy-import = opal rest -nv -o $(opal_url) -u $(username) -p $(password) -m POST "/system/conf/taxonomies/import/_github?repo=maelstrom-taxonomies&key=$(taxonomies_key)&override=true&file=$(1).yml" -table-index = opal rest -o $(opal_url) -u $(username) -p $(password) -m PUT "/datasource/$(1)/table/$(2)/index" +table-index = opal rest -nv -o $(opal_url) -u $(username) -p $(password) -m PUT "/datasource/$(1)/table/$(2)/index" -resource-create = sed 's/@project@/$(1)/g' ./opal/seed/resources/$(2).json | opal rest -o $(opal_url) -u $(username) -p $(password) -ct "application/json" -m POST "/project/$(1)/resources" +resource-create = sed 's/@project@/$(1)/g' ./opal/seed/resources/$(2).json | opal rest -nv -o $(opal_url) -u $(username) -p $(password) -ct "application/json" -m POST "/project/$(1)/resources" -file-upload = opal file -o $(opal_url) -u $(username) -p $(password) --upload $(1) $(2) +file-upload = opal file -nv -o $(opal_url) -u $(username) -p $(password) --upload $(1) $(2) From f7e5150ddb05a253f80383def5d9f95546dca13f Mon Sep 17 00:00:00 2001 From: Ramin Haeri Azad Date: Fri, 21 Jul 2023 09:28:33 -0400 Subject: [PATCH 2/2] Changed the https URLs to http --- mica2/Makefile | 20 ++++++++++---------- opal/Makefile | 40 ++++++++++++++++++++-------------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/mica2/Makefile b/mica2/Makefile index 1a53012..59789cb 100644 --- a/mica2/Makefile +++ b/mica2/Makefile @@ -1,7 +1,7 @@ # # Mica2 server # -mica_url=https://localhost:8445 +mica_url=http://localhost:8082 username=administrator password=password @@ -22,23 +22,23 @@ seed-mica: seed-studies seed-datasets seed-research-projects index-taxonomies seed-studies: seed-individual-studies seed-harmonization-studies seed-people seed-individual-studies: - mica import-zip -nv -mk $(mica_url) -u $(username) -p $(password) -pub ./mica2/seed/individual-studies + mica import-zip -mk $(mica_url) -u $(username) -p $(password) -pub ./mica2/seed/individual-studies seed-harmonization-studies: - mica import-zip -nv -mk $(mica_url) -u $(username) -p $(password) -pub ./mica2/seed/harmonization-studies + mica import-zip -mk $(mica_url) -u $(username) -p $(password) -pub ./mica2/seed/harmonization-studies seed-single-study: seed-cls-study mica rest -u administrator -p password -m DELETE /draft/network/ialsa seed-cls-study: - mica import-zip -nv -mk $(mica_url) -u $(username) -p $(password) -pub ./mica2/seed/individual-studies/study-cls.zip + mica import-zip -mk $(mica_url) -u $(username) -p $(password) -pub ./mica2/seed/individual-studies/study-cls.zip $(call dataset-create,collected,cls-wave1) $(call dataset-create,collected,cls-wave2) $(call dataset-create,collected,cls-wave3) $(call dataset-create,collected,cls-wave4) seed-cag-study: - mica import-zip -nv -mk $(mica_url) -u $(username) -p $(password) -pub ./mica2/seed/individual-studies/study-cag.zip + mica import-zip -mk $(mica_url) -u $(username) -p $(password) -pub ./mica2/seed/individual-studies/study-cag.zip $(call dataset-create,collected,cag-baseline) seed-datasets: seed-collected-datasets seed-harmonized-datasets @@ -87,7 +87,7 @@ seed-research-projects: $(call research-project-create,lung-cancer) index-taxonomies: - mica rest -nv -mk $(mica_url) -u $(username) -p $(password) /taxonomies/_index -m PUT + mica rest -mk $(mica_url) -u $(username) -p $(password) /taxonomies/_index -m PUT clean-mica: rm -rf ${mica_home} @@ -100,8 +100,8 @@ launch-mica-debug: # # Functions # -dataset-create = mica rest -nv -mk $(mica_url) -u $(username) -p $(password) -m POST /draft/$(1)-datasets --content-type "application/json" < ./mica2/seed/$(1)-datasets/$(2).json && \ - mica rest -nv -mk $(mica_url) -u $(username) -p $(password) -m PUT /draft/$(1)-dataset/$(2)/_publish +dataset-create = mica rest -mk $(mica_url) -u $(username) -p $(password) -m POST /draft/$(1)-datasets --content-type "application/json" < ./mica2/seed/$(1)-datasets/$(2).json && \ + mica rest -mk $(mica_url) -u $(username) -p $(password) -m PUT /draft/$(1)-dataset/$(2)/_publish -research-project-create = mica rest -nv -mk $(mica_url) -u $(username) -p $(password) -m POST /draft/projects --content-type "application/json" < ./mica2/seed/projects/$(1).json && \ - mica rest -nv -mk $(mica_url) -u $(username) -p $(password) -m PUT /draft/project/$(1)/_publish +research-project-create = mica rest -mk $(mica_url) -u $(username) -p $(password) -m POST /draft/projects --content-type "application/json" < ./mica2/seed/projects/$(1).json && \ + mica rest -mk $(mica_url) -u $(username) -p $(password) -m PUT /draft/project/$(1)/_publish diff --git a/opal/Makefile b/opal/Makefile index fbc4864..8bb6215 100644 --- a/opal/Makefile +++ b/opal/Makefile @@ -1,7 +1,7 @@ # # Opal server # -opal_url=https://localhost:8443 +opal_url=http://localhost:8080 username=administrator password=password taxonomies_ref=1.0 @@ -170,17 +170,17 @@ seed-mediation: seed-auth: seed-user seed-tokens seed-perm seed-tokens: - opal rest -nv -o $(opal_url) -u $(username) -p $(password) -ct "application/json" -m POST /system/subject-token/_current/tokens < ./opal/seed/auth/resources-token.json - opal rest -nv -o $(opal_url) -u $(username) -p $(password) -ct "application/json" -m POST /system/subject-token/_current/tokens < ./opal/seed/auth/datashield-token.json + opal rest -o $(opal_url) -u $(username) -p $(password) -ct "application/json" -m POST /system/subject-token/_current/tokens < ./opal/seed/auth/resources-token.json + opal rest -o $(opal_url) -u $(username) -p $(password) -ct "application/json" -m POST /system/subject-token/_current/tokens < ./opal/seed/auth/datashield-token.json seed-user: - opal user -nv -o $(opal_url) -u $(username) -p $(password) -n $(dsusername) -upa $(dspassword) -a + opal user -o $(opal_url) -u $(username) -p $(password) -n $(dsusername) -upa $(dspassword) -a seed-perm: - opal perm-datashield -nv -o $(opal_url) -u $(username) -p $(password) -s $(dsusername) -ty user -pe use -a + opal perm-datashield -o $(opal_url) -u $(username) -p $(password) -s $(dsusername) -ty user -pe use -a seed-taxonomies: - opal rest -nv -o $(opal_url) -u $(username) -p $(password) -m POST "/system/conf/taxonomies/import/_github?user=maelstrom-research&repo=maelstrom-taxonomies&override=true&ref=$(taxonomies_ref)&key=$(taxonomies_key)" + opal rest -o $(opal_url) -u $(username) -p $(password) -m POST "/system/conf/taxonomies/import/_github?user=maelstrom-research&repo=maelstrom-taxonomies&override=true&ref=$(taxonomies_ref)&key=$(taxonomies_key)" seed-taxonomies-latest: $(call taxonomy-import,AreaOfInformation) @@ -197,25 +197,25 @@ backup-project: # # Functions # -project-create = opal project -nv -o $(opal_url) -u $(username) -p $(password) --name $(1) --database $(database) --tags $(2) --add && \ - opal project -nv -o $(opal_url) -u $(username) -p $(password) --name $(1) +project-create = opal project -o $(opal_url) -u $(username) -p $(password) --name $(1) --database $(database) --tags $(2) --add && \ + opal project -o $(opal_url) -u $(username) -p $(password) --name $(1) -project-restore = opal file -nv -o $(opal_url) -u $(username) -p $(password) -up ./opal/seed/backup/$(1).zip /home/$(username) && \ - opal restore-project -nv -o $(opal_url) -u $(username) -p $(password) -pr $(1) -ar /home/$(username)/$(1).zip && \ - while [ `opal rest -nv -o $(opal_url) -u $(username) -p $(password) -m GET /shell/commands -j | grep -ch "NOT_STARTED\|IN_PROGRESS"` -gt 0 ] ; do echo -n "."; sleep 5; done; echo "." +project-restore = opal file -o $(opal_url) -u $(username) -p $(password) -up ./opal/seed/backup/$(1).zip /home/$(username) && \ + opal restore-project -o $(opal_url) -u $(username) -p $(password) -pr $(1) -ar /home/$(username)/$(1).zip && \ + while [ `opal rest -o $(opal_url) -u $(username) -p $(password) -m GET /shell/commands -j | grep -ch "NOT_STARTED\|IN_PROGRESS"` -gt 0 ] ; do echo -n "."; sleep 5; done; echo "." -tables-import = opal file -nv -o $(opal_url) -u $(username) -p $(password) -up ./opal/seed/dictionaries/$(1).zip /home/$(username) && \ - opal import-xml -nv -o $(opal_url) -u $(username) -p $(password) -pa /home/$(username)/$(1).zip -d $(1) && \ - while [ `opal rest -nv -o $(opal_url) -u $(username) -p $(password) -m GET /shell/commands -j | grep -ch "NOT_STARTED\|IN_PROGRESS"` -gt 0 ] ; do echo -n "."; sleep 5; done; echo "." +tables-import = opal file -o $(opal_url) -u $(username) -p $(password) -up ./opal/seed/dictionaries/$(1).zip /home/$(username) && \ + opal import-xml -o $(opal_url) -u $(username) -p $(password) -pa /home/$(username)/$(1).zip -d $(1) && \ + while [ `opal rest -o $(opal_url) -u $(username) -p $(password) -m GET /shell/commands -j | grep -ch "NOT_STARTED\|IN_PROGRESS"` -gt 0 ] ; do echo -n "."; sleep 5; done; echo "." -table-ds-perm = opal perm-table -nv -o $(opal_url) -u $(username) -p $(password) -s $(dsusername) -ty user -pr $(1) -pe view -a +table-ds-perm = opal perm-table -o $(opal_url) -u $(username) -p $(password) -s $(dsusername) -ty user -pr $(1) -pe view -a -resources-ds-perm = opal rest -nv -o $(opal_url) -u $(username) -p $(password) -m POST "/project/$(1)/permissions/resources?type=USER&permission=RESOURCES_VIEW&principal=$(dsusername)" +resources-ds-perm = opal rest -o $(opal_url) -u $(username) -p $(password) -m POST "/project/$(1)/permissions/resources?type=USER&permission=RESOURCES_VIEW&principal=$(dsusername)" -taxonomy-import = opal rest -nv -o $(opal_url) -u $(username) -p $(password) -m POST "/system/conf/taxonomies/import/_github?repo=maelstrom-taxonomies&key=$(taxonomies_key)&override=true&file=$(1).yml" +taxonomy-import = opal rest -o $(opal_url) -u $(username) -p $(password) -m POST "/system/conf/taxonomies/import/_github?repo=maelstrom-taxonomies&key=$(taxonomies_key)&override=true&file=$(1).yml" -table-index = opal rest -nv -o $(opal_url) -u $(username) -p $(password) -m PUT "/datasource/$(1)/table/$(2)/index" +table-index = opal rest -o $(opal_url) -u $(username) -p $(password) -m PUT "/datasource/$(1)/table/$(2)/index" -resource-create = sed 's/@project@/$(1)/g' ./opal/seed/resources/$(2).json | opal rest -nv -o $(opal_url) -u $(username) -p $(password) -ct "application/json" -m POST "/project/$(1)/resources" +resource-create = sed 's/@project@/$(1)/g' ./opal/seed/resources/$(2).json | opal rest -o $(opal_url) -u $(username) -p $(password) -ct "application/json" -m POST "/project/$(1)/resources" -file-upload = opal file -nv -o $(opal_url) -u $(username) -p $(password) --upload $(1) $(2) +file-upload = opal file -o $(opal_url) -u $(username) -p $(password) --upload $(1) $(2)