It allows to collect and download the images from multiple image gallery. Right now, it supports only Flickr.
The application runs in different modes as collector
and downloader
- Minikube
- Kubernetes console tool (kubectl)
- Docker
- VirtualBox, KVM2 or other hypervisors supported by minikube if you need it.
$ docker build -t image-collector:latest -f infra/docker/Dockerfile .
docker run -it \
-e SPRING_PROFILES_ACTIVE="collector" \
-e SPRING_RABBITMQ_HOST=<rabbitmq host> \
image-collector:latest
docker run -it \
-e SPRING_PROFILES_ACTIVE="downloader" \
-e SPRING_RABBITMQ_HOST=<rabbitmq host> \
-e DOWNLOAD_PATH=/path/to/download \
image-collector:latest
SPRING_PROFILES_ACTIVE: (required) It can take one ofcollector
or downloader
values.
SPRING_RABBITMQ_HOST (default: localhost) Rabbitmq host machine
SPRING_RABBITMQ_USER (default: guest) Rabbitmq user
SPRING_RABBITMQ_PASSWORD (default: guest) Rabbitmq password
DOWNLOAD_PATH (default: application root) path to download the images
docker run -d \
--name=rabbitmq \
-p5672:5672 \
-p15672:15672 \
--hostname=rabbitmq \
-e RABBITMQ_ERLANG_COOKIE="rabbitmq" \
rabbitmq:3.8.0-management
docker run \
-it \
--network=host \
-e SPRING_RABBITMQ_HOST=localhost \
... (Other environment variables that depend on the profile.) \
image-collector:latest
- Start minikube locally.
- Compile the application and build the docker image by the build script
infra/scripts/build_dev
. Before run the command, please uncomment the line 3. in the script, if you're using minikube with VM(s).
$ infra/scripts/build_dev
- Deploy the docker image to the local Kubernetes cluster by running the following command:
$ kubernetes apply -f infra/kub-config