This project was started as a private repo to solve my data analysis needs at a previous job. It queries NetSuite Analytics Connect, converts the data to meet KPIs, and writes them to Google Sheets.
Since then, I removed sensitive data, started a fresh git repo and generalizing the code. I want to showcase the work I have done, and offer my solution to anyone who may need it.
Please reach out if you need help integrating software solutions.
All company names and metrics have been changed to example data. *All connection strings and ids have been modified as well *
TODO:
- download and place insite this directory: NetSuiteODBCDrivers_Linux64bit
- all filepaths are relative to integration directory
- run all the reports from integration directory
.
├── .dockerignore
├── .git
├── .gitignore
├── deploy.sh
├── docker-stack.yaml
├── Dockerfile
├── integration
├── mycron
├── NetSuiteODBCDrivers_Linux64bit (.gitignore)
├── odbcinst.ini
├── README.md
└── secrets (.gitignore)
local dev machine (each new version):
docker build . -t tannerrhub/data-connect:latestdocker push tannerrhub/data-connect:latestserver:
docker pull tannerrhub/data-connect:latestdocker context use cloud-runnerdocker service update --image tannerrhub/data-connect:latest cbp_data-connect
docker service update cbp_data-connect --image tannerrhub/data-connect:latestserver (set up once):
docker swarm initecho "<insert password>" | docker secret create ns_pw - && echo "treyhons@tannerreyhons.com" | docker secret create ns_id -local machine:
create a context connection to server to deploy using stack
docker context create cloud-runner --docker "host=ssh://tannerr@5.78.64.183"switch context to server
docker context use cloud-runnerdeploy using stack configuration
docker stack deploy -c docker-stack.yaml --with-registry-auth cbpswitch back to local environment
docker context use defaultdocker build . -t tannerrhub/data-connect:latest
docker push tannerrhub/data-connect:latest
docker context use cloud-runner
docker pull tannerrhub/data-connect:latest
docker service update cbp_data-connect --image tannerrhub/data-connect:latest
docker context use defaultEnter container
docker exec -it my_container /bin/bashchmod +x deploy.shVERSION="202509270741" ./deploy.sh