botanyhelp/job-wq-2

By botanyhelp

Updated over 1 year ago

works, follows task here: https://kubernetes.io/docs/tasks/job/fine-parallel-processing-work-queue/

Image
Message queues
0

110

botanyhelp/job-wq-2 repository overview

We follow task instructions and learning found here, and it works:

https://kubernetes.io/docs/tasks/job/fine-parallel-processing-work-queue/

  • Other files used include these:
  • ..which I downloaded to Linux machine where kubernetes cluster is running, in my case it was minikube running on GCP Cloudshell,
wget https://k8s.io/examples/application/job/redis/redis-pod.yaml
wget https://k8s.io/examples/application/job/redis/redis-service.yaml
wget https://kubernetes.io/examples/application/job/redis/Dockerfile
wget https://kubernetes.io/examples/application/job/redis/job.yaml
wget https://kubernetes.io/examples/application/job/redis/rediswq.py
wget https://kubernetes.io/examples/application/job/redis/worker.py
  • my environment is GCP cloudshell
  • which comes with Cloudshell and was started by me like this:
minikube start --memory=8g --cpus=2  --cni=calico
source <(kubectl completion bash)
alias k=kubectl
alias kdry='kubectl --dry-run=client -o yaml'
complete -o default -F __start_kubectl k
# Specify BROKER_URL and QUEUE when running
FROM ubuntu:18.04

RUN apt-get update && \
    apt-get install -y curl ca-certificates amqp-tools python \
       --no-install-recommends \
    && rm -rf /var/lib/apt/lists/*
COPY ./worker.py /worker.py

CMD  /usr/bin/amqp-consume --url=$BROKER_URL -q $QUEUE -c 1 /worker.py

Tag summary

Content type

Image

Digest

sha256:cc7aa86c6

Size

368.4 MB

Last updated

over 1 year ago

docker pull botanyhelp/job-wq-2:1.0.1