- How to add content to the pods
- How to use the Miravi version built in this project for query development
- How to convert files into templates
- How to switch to a new version of Miravi
- How to update what's on the public server
-
Add a new directory
<d>in scripts/stuff-pods. -
In script/stuff-pods/stuff-pods.sh, add
<d>to the list of directories to visit on the linefor d in example ; doto also visit your directory:for d in example <d> ; do. -
Add as many new subdirectories
<sdx>, <sdy>in that directory<d>as you want to create new mappings. -
Copy the script scripts/stuff-pods/example/stuff-pods.sh to your directory:
scripts/stuff-pods/<d>/stuff-pods.sh. -
In that script, modify the line
for d in bob ; doto visit your subdirectories:for d in <sdx> <sdy> ; do. -
Add your input data and mapping files.
-
Convert files into templates where needed.
-
Have a look at scripts/stuff-pods/example/ for a working example.
-
If the platform of your choice is not yet running, proceed by building and running it, including the instructions to add pod contents.
-
If the platform of your choice was already running, you can execute the mappings and send them to the pod(s) as follows.
Note that, when executed with
source env-docker-public, this also works to put contents on the public pods, even when run on your local machine.# select your platform by executing one of the next source commands source env-localhost source env-docker-public pushd scripts/stuff-pods/ ../templates/apply-templates.sh popd scripts/stuff-pods/stuff-pods.sh
This project clones the Miravi repo to ../applied-in-architecture-miravi-a-linked-data-viewer
and copies the configuration files and public files from this project's actors/viewer/setup contents.
We can use that build of Miravi to modify or add queries in the context of our project.
This will obviously work in the case of environment variables file env-localhost, but also in the case of env-docker-public, as described in Bonus: local Viewer (Miravi) for querying public pods.
Develop new queries as follows:
- go to
../applied-in-architecture-miravi-a-linked-data-viewer/main; - modify the configuration file and modify/add files in the public directory;
- test by running
npm run devand browsing the localhost port this command reports.
Once you're happy with the result, you can add the new or modified files back to the project, so that they persist and can be used in future builds of Miravi.
Do that as follows:
- Copy new and modified files from
../applied-in-architecture-miravi-a-linked-data-viewer/main/publicto actors/viewer/setup/public. - Copy modified file
../applied-in-architecture-miravi-a-linked-data-viewer/main/src/config.jsonto actors/viewer/setup/config.json. - Convert files into templates where needed (you'll have at least actors/viewer/setup/config.json.template).
If you add a file <f> that contains one or more URLs whose values are defined in environment variable files
env-localhost and env-docker-public, you must rename it into <f>.template,
a template file.
- In
<f>.template, replace all such URLs with their environment variables, for example: changehttp://localhost:3001orhttps://solid4media.ilabt.imec.be/css1into${TV_CSS1_BASE_URL}. - Add
<f>to .gitignore. There is a section# files created from a templatefor that purpose.
Next time you run scripts/templates/apply-templates.sh, each such <f> files will be created from its template file <f>.template.
Note that scripts/templates/apply-templates.sh is called from scripts/setup/finalize-setup.sh, which is listed in the build instructions.
In scripts/viewer/build-webclient-contents.sh, modify the version tag vx.y.z in the line
git clone https://github.com/SolidLabResearch/${VIEWER_REPO}.git -b vx.y.z ${VIEWER_CLONE}Connect to the iGent VPN and then:
# login to the server
ssh s4m@solid4media.privatedmz
# you are s4m on the server now; continue:
cd ~/architecture
# load the current environment variables
source env-docker-public
# stop the old dockers
docker compose --profile backend --profile frontend down -t 0
# update the clone, optionally from a different branch or a tag
git fetch
git checkout <branch-or-tag>
git pull
# load the new environment variables
source env-docker-public
# update what needs to be updated in general
./scripts/setup/finalize-setup.sh
# start the new dockers
docker compose --profile backend --profile frontend up --wait
# stuff the pods
./scripts/stuff-pods/stuff-pods.sh