Commit 8a341d1f authored by Jorge S. Mendes de Jesus's avatar Jorge S. Mendes de Jesus
Browse files

Merge branch 'develop'

parents cc500afc 2f3ce566
Pipeline #23478 passed with stages
in 7 minutes and 51 seconds
# leuven.isric.org
Locations:
| Name | URL | Branch |
|-------------|----------------------------------------|--------|
| Development | https://leuven.containers.wur.nl | Develop |
| Production | https://leuven.isric.org | Master |
**Note:** This repository implements git LFS for PDF, images and videos.
## Implemented
Places implementing.
- [http://leuven.isric.org/](http://leuven.isric.org/)
- [https://ees.kuleuven.be/africa-in-profile/virtuele-tentoonstelling/index.html](https://ees.kuleuven.be/africa-in-profile/virtuele-tentoonstelling/index.html)
## How it works
This application will be automatically deployed to the development environment when a commit within the `develop` branch has a commit message that starts with either:
* fix: \<COMMIT MESSAGE>
* feat: \<COMMIT MESSAGE>
......@@ -17,6 +28,7 @@ Or:
`git commit -m 'feat: Added new page contact.html'`
## Details
When using the prefixes as shown above in front of your commit message, a process is automatically started. This process will automate the following:
1. Tag your commit with a subsequent version number [PROD ONLY]
2. Build and tag a container with this version number [DEV gets a unique SHA]
......@@ -24,58 +36,33 @@ When using the prefixes as shown above in front of your commit message, a proces
4. Modify `kustomization.yaml` manifest in [k8s-deployments repository](https://git.wur.nl/isric/ict/k8s-deployments/-/tree/master/leuven/overlays/dev) to deploy the new container to the [Development environment](https://leuven.containers.wur.nl)
## From Development to Production
If you're happy with the Development version and want to deploy it to Production, just merge your changes to master.
>The version that's currently running on Development will now be automatically deployed to Production
# Intro
Generic instructions and documentation concerning the Leuven virtual tour
- [http://leuven.isric.org/](http://leuven.isric.org/)
- [https://ees.kuleuven.be/africa-in-profile/virtuele-tentoonstelling/index.html](https://ees.kuleuven.be/africa-in-profile/virtuele-tentoonstelling/index.html)
Running local server
--------------------
If you're happy with the Development version and want to deploy it to Production, just merge your changes to master.
Local server (`server.py`) was rewritten to python3 (`3.8.4`), using the python3 `http.server` and `socketserver`, both packages are part of basic python3 distribution.
## Persistent volumes
To run locally:
Deployment implements a persistant volume for folder `www/videos` as those are big files.
```
python server.py
```
The script binds to port `80`, it may require permissions to bind to a low port number. If so, change port number to `8080` or anything above `1024`, or sudo.
Currentely sync to folder has be be done manually. Ticket `leuven#1` will make it automatically.
Local docker build
------------------
## Running local server
Script `run.sh` build and runs a local docker image.
Website is plain JS/HTML any local serving server can be used.
## Local docker build
Deployment
----------
Tour is run from OC, project leuven:
To run a local docker instance:
```bash
docker build --no-cache -t leuven .
docker run -p8080:8080
```
#Note that there are some mis-confusion with image names and locations
oc project leuven
docker build -t docker-registry.wur.nl/isric/leuven/leuven-v0-2 .
docker push docker-registry.wur.nl/isric/leuven/leuven-v0-2
oc import-image leuven:latest
```
The docker image contains a video folder that considerable increases the image size and the time for deployment: `./www/videos` this has been changed into using a pod container that will contain a permanent version of the videos.
Google tour key
---------------
## Google tour key
The google tour key is associated to the `worlsoilmuseum@gmail.com`
```
```bash
key=AIzaSyBNjBofeB7ALxZAN0oTSEOJwQfYvzQfl8w
```
......@@ -90,26 +77,25 @@ The key is used on `index.html` around line 30:
</script>
```
Google tour medatainfo
----------------------
## Google tour medatainfo
Checking on the network console (browser) we have the [GeoPhotoService.GetMetadata](https://maps.googleapis.com/maps/api/js/GeoPhotoService.GetMetadata?pb=!1m5!1sapiv3!5sUS!11m2!1m1!1b0!2m2!1sen!2sUS!3m3!1m2!1e10!2sAF1QipN8WM2np43B5Ze7P_A3_Ftc_EYPWRYV6BbFWmzl!4m6!1e1!1e2!1e3!1e4!1e8!1e6&callback=_xdc_._vlmdra) url that contains metadata of the tour:
Checking on the network console (browser) we have the [GeoPhotoService.GetMetadata](https://maps.googleapis.com/maps/api/js/GeoPhotoService.GetMetadata?pb=!1m5!1sapiv3!5sUS!11m2!1m1!1b0!2m2!1sen!2sUS!3m3!1m2!1e10!2sAF1QipN8WM2np43B5Ze7P_A3_Ftc_EYPWRYV6BbFWmzl!4m6!1e1!1e2!1e3!1e4!1e8!1e6&callback=_xdc_._vlmdra) url that contains metadata of the tour:
Panoid
------
## Panoid
Panoid is used on `tour.js` to start the tour and then on `leuven_tour.json` to define the icon location. Therefore the icon location on the tour is defined by this specific id. Looking at the tour on a browser the current panoid can be obtain on the console, inspecting object `panorama.location`
```
```javascript
>> panorama.location
```
Google has new documentation concerning the customization of streeview: [here](https://developers.google.com/maps/documentation/javascript/examples/streetview-custom-simple?hl=nl
)
Development Notes
-----------------
## Development Notes
check
Hierbij de files voor de virtuele tour
......@@ -129,6 +115,3 @@ De gebruikte pdf-en staan in de folder www/assets/pdf.
De gebruikte video’s staan in de folder www/assets/video.
De foto’s van de objecten in de vitrinekasten en de foto’s van de panelen staan in www/images.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment