Skip to content

hecomp/file-synchronizer

Repository files navigation

file-synchronizer

A Cliente needs to ensure it's global BIN file is accurately managed, updated timely and proactively monitored for changes, which will help ensure compliance, avoid fines and accept all applicable customer cards. Global BIN file is created by processing various BIN files. Below are different types of BIN files which are need from different vendors to create a Global BIN file:

First Data BIN File

This is the "master" bin file. Edits are made to this file to create the Global BIN File.

Build batch application from Local -

  1. Create a binary image by running below command (for mac use sudo in front of the command) -
$ GOARCH=amd64 GOOS=linux go build -i -v -o bin/filesynchronizer_batch cmd/main.go
  1. Build docker image. Also tag version for every new build -
$ docker build -t default-docker-virtual/filesynchronizer_batch:1.0.0 .
  1. Build docker tag to push it to hecomp.jfrog.io -
$ docker tag default-docker-virtual/filesynchronizer_batch:1.0.0 hecomp.jfrog.io/default-docker-virtual/filesynchronizer_batch:1.0.0
  1. Login into docker.artifactory.homedepot.com -
$ docker login hecomp.jfrog.io --username=hebercomp@yahoo.com --password=H@ecomp21
  1. Push the tagged image into docker artifactory -
$ docker push hecomp.jfrog.io/default-docker-virtual/filesynchronizer_batch:1.0.0
  1. Pull the tag image from docker artifactory
$ docker pull hecomp.jfrog.io/default-docker-virtual/filesynchronizer_batch:1.0.0
docker run -v /first_data_bin/current:/data/first_data_bin/current -v /first_data_bin/archive:/data/first_data_bin/archive -e ENV=docker hecomp.jfrog.io/default-docker-virtual/filesynchronizer_batch

Run the batch application on local -

  1. Create first_data_bin folder in the root directory
$ mkdir first_data_bin
$ cd first_data_bin
$ mkdir current
$ chmod 777 current
$ mkdir archive
$ chmod 777 archive
  1. Place a sample FIRST_DATA_BIN file in first_data_bin/current directory
  2. Run cmd/main.go

Run the docker image of batch application on local -

  1. mount the above folders on docker and run the application -
$ docker run -v /tmp/first_data_bin/current:/home/first_data_bin/current -v /tmp/first_data_bin/archive:/home/first_data_bin/archive  -e ENV=docker hecomp.jfrog.io/default-docker-virtual/filesynchronizer_batch

Run the docker image of batch application on Server

  1. Login into GCP VM
$ ssh root@10.142.0.3
  1. Pull the docker image from docker artifactory -
$ docker pull hecomp.jfrog.io/default-docker-virtual/filesynchronizer_batch:1.0.0
  1. Copy sample BIN file from local to dev server (in-case BizLink is not yet setup)
$ scp /tmp/first_data_bin/current/FIRST_DATA_BIN root@10.142.0.3:/first_data_bin/current
  1. mount the above folders on docker and run the application -
$ docker run -v /tmp/first_data_bin/current:/home/first_data_bin/current -v /tmp/first_data_bin/archive:/home/first_data_bin/archive  -e ENV=docker hecomp.jfrog.io/default-docker-virtual/filesynchronizer_batch

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published