Project:RunImporter
From MaRDI portal
Overview
instructions for how to run the importer locally, on staging, and on the portal
Import Locally
Development, testing, and debugging can be done locally on a virtual machine. Instructions for setting up the VM and connecting to it can be found here.
Import to the staging server
- If changes have been made to the script, they need to be pushed and merged to the docker-importer repo so that the docker image includes the changes. Make sure the commits are signed.
- Trigger the workflow on the mardi03 GitHub repo (instructions are on git). (?)
- Execute the importer script from within the mardi-importer container. To do this, there are two options:
- Executing the script on the mardi03 server:
- connect to mardi03 via ssh
shh mardi03 - navigate to the portal-compose directory:
cd portal-compose - access the importer container:
docker exec -it mardi-importer bash - execute the importer script that's in
/mardi_importer/mardi_importer/scripts
- connect to mardi03 via ssh
- Executing the script in Portainer:
- log in to Portainer (user: admin)
- Under 'Environments' click 'local' and then click 'containers' in the side panel on the left
- Search for the mardi-importer container
- If changes have been made to the code, click on "Recreate" with the option to re-pull the image, to pull the latest changes from the docker-importer repo.
- Click '>_ Console' and 'Connect' to access the container.
- execute the importer script that's in
/mardi_importer/mardi_importer/scripts
- Executing the script on the mardi03 server:
Import to the portal
It is recommended to have executed a trial run involving any new changes on the staging server before uploading to the main portal. Assuming changes are already merged to the main branch on the docker-importer GitHub repo and included in the mardi-importer container, the execution steps are similar to those above.
- Trigger the workflow on the mardi02 GitHub repo.
- Execute the script on the mardi02 server:
- connect to mardi03 via ssh
shh mardi02 - navigate to the portal-compose directory:
cd portal-compose - access the importer container:
docker exec -it mardi-importer bash - execute the importer script that's in
/mardi_importer/mardi_importer/scripts
- connect to mardi03 via ssh