Tech Stack and Deployment

Overview

LPE is built with Node.js, containerized with Docker, and deployed/scheduled with Kubernetes. It pulls from Lightspeed's API and uploads the output CSV files to DigitalOcean spaces. It has no database, or persistent state of any kind.

Specifications

Source Code: https://gitlab.com/oz-dev/microservices/lightspeed-parts-exporter

Kubernetes YAMLs: https://gitlab.com/oz-dev/kubernetes/-/tree/master/oz-cluster-2/lightspeed-parts-exporter

Deploy New Version

This project does not currently support CI/CD. In order to deploy a new version, you'll need Docker installed, and be authenticated with Oz's Kubernetes clusters.

Create and Push New Container

Using Docker, create a new container and tag it with the full URL of the image registry plus the semantic version of your new version (seen below as semantic-version-number-here).

sudo docker build -t registry.gitlab.com/oz-dev/microservices/lightspeed-parts-exporter:semantic-version-number-here .
sudo docker push registry.gitlab.com/oz-dev/microservices/lightspeed-parts-exporter:semantic-version-number-here

Once your new container is pushed up to the project's image registry, you'll need to tell Kubernetes to use the new image.

kubectl set image -n microservices cronjobs.batch/lightspeed-parts-exporter lightspeed-parts-exporter=registry.gitlab.com/oz-dev/microservices/lightspeed-parts-exporter:semantic-version-number-here --record=true

Last updated