A nodejs tool to download and process orthoimagery from the IGN website. (with docker & kubernetes support)
The master will run the following node scripts:
entrypoint.js
- This script is responsible for running the correct script based on theROLE
(master/worker) environment variable, and will stop the container whenTTS
is reached.-
master_updates.js
- This script is responsible for checking the IGN website for new images. When new updates are detected, it sends a Slack message to the specifiedBDORTHO_SLACK_URL
(by callingcheck_updates.js
), and then dispatches a job to the worker.
The worker will run the following node scripts:
entrypoint.js
- This script is responsible for running the correct script based on theROLE
(master/worker) environment variable, and will stop the container whenTTS
is reached.-
worker_init.js
- This script is responsible for initializing the worker. By choosing a the first job from the queue, and then callingworker_process.js
to process the job.
-
-
worker_process.js
- This script is responsible for processing the job. By downloading, extracting, transforming, and uploading the new orthoimagery to the specifiedBDORTHO_BUCKET
When the job is complete, it will send a Slack message to the specifiedBDORTHO_SLACK_URL
, and then theworker_init.js
will choose the next job from the queue. until the queue is empty.
-
Variable | Description | default |
---|---|---|
ROLE |
Role of the container (master/worker) | undefined |
TIMEZONE |
Timezone to determine the time to stop | Europe/Paris |
TTS |
Time to stop in format HH:MM the process | undefined (will run forever) |
BDORTHO_SLACK_URL |
Slack webhook url | undefined (will not send slack messages) |
BDORTHO_BUCKET |
location of the bucket (can be a host folder or a s3 bucket) | undefined |
JOBS |
number of transformation jobs to run in parallel (for the workers) | 1 |
(TODO: add rclone config file and access keys for s3 for docker)
- p7zip
- nodejs
- npm
- rclone
- curl
- findutils
- Running to many
JOBS
without enough memory will cause the current update process to fail. - (possible solution : estimate memory available and limit the number of jobs based on the available memory)