Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass 'no-ssl-verify' for both Opal and Mica calls to prevent possible SSL errors (localhost) #97

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ target/
visual_regression/backstop_data/
visual_regression/node_modules/
visual_regression/package-lock.json
.history
venv
18 changes: 9 additions & 9 deletions mica2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}
Expand All @@ -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
38 changes: 19 additions & 19 deletions opal/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)