Skip to content

tannerr-dev/suite-sheets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Suite Sheets

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:

  1. download and place insite this directory: NetSuiteODBCDrivers_Linux64bit

Integration

  1. all filepaths are relative to integration directory
  2. run all the reports from integration directory

Directory structure

 .
├──  .dockerignore
├──  .git
├──  .gitignore
├──  deploy.sh
├──  docker-stack.yaml
├──  Dockerfile
├──  integration
├──  mycron
├──  NetSuiteODBCDrivers_Linux64bit (.gitignore)
├──  odbcinst.ini
├──  README.md
└──  secrets (.gitignore)

Docker commands

Build and pull images

local dev machine (each new version):

docker build . -t tannerrhub/data-connect:latest
docker push tannerrhub/data-connect:latest

server:

docker pull tannerrhub/data-connect:latest
docker context use cloud-runner
docker service update --image tannerrhub/data-connect:latest cbp_data-connect
docker service update cbp_data-connect --image tannerrhub/data-connect:latest

docker secrets

server (set up once):

docker swarm init
echo "<insert password>" | docker secret create ns_pw - && echo "treyhons@tannerreyhons.com" | docker secret create ns_id -

docker context & stack

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-runner

deploy using stack configuration

docker stack deploy -c docker-stack.yaml --with-registry-auth cbp

switch back to local environment

docker context use default

Deploy an update

docker 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 default

Enter container

docker exec -it my_container /bin/bash

Deploy Script Command

chmod +x deploy.sh
VERSION="202509270741" ./deploy.sh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors