Create a containerized python geocoding script as a kubernetes job.
- Prepare data
- Run prep_addresses.py
- Pulls data from VISTA
- Partions the data into multiple CSVs
- Run prep_addresses.py
- Create k8s job yaml specifications
- Run vista_job_template.py
- Uploads data to Cloud Storage with service account credenitals
- Creates k8s job template files
- Run vista_job_template.py
- Apply seceret for service worker with cloud storage permissions to k8s cluster
- authorize kubectl with geocoding api cluster
- run
kubectl apply -f .secrets/gcs-secret.yml
- Service account key must first be base64 encoded into gcs-secret.yml
- Apply job yamls to cluster
- run
kubectl apply -f job.yaml
- run
- Download geocoded CSVs from cloud storage
- Build container from docker file
- docker build . -t {container name}
- docker tag {container name}:latest gcr.io/{project id}/webapi/{container name}:latest
- Push to registery
- docker push gcr.io/{project id}/webapi/{container name}:latest
- User needs project permissions to allow push to gcr