Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
e611f64
circleci integration
Gunasekar-K Nov 29, 2019
df771bc
service deployment
Gunasekar-K Dec 3, 2019
4e7e1bc
docker file change
Gunasekar-K Dec 3, 2019
7bfa4d7
code changes to autodeploy
Gunasekar-K Dec 16, 2019
f1f0188
fix for async error
Gunasekar-K Dec 17, 2019
5c20b02
fix for async error
Gunasekar-K Dec 17, 2019
e694fa9
[skip ci]
Gunasekar-K Dec 17, 2019
0573e42
[skip ci]
Gunasekar-K Dec 17, 2019
2eac3a7
Update migratedynamodb.js
Gunasekar-K Dec 17, 2019
a0fe97c
Update migratedynamodb.js
Gunasekar-K Dec 17, 2019
6d4e8f3
Update node-server-without-kafka.js
Gunasekar-K Dec 17, 2019
2359647
[skip ci]
Gunasekar-K Dec 17, 2019
8342f12
error fixing
Gunasekar-K Dec 18, 2019
9977d5b
error fixing
Gunasekar-K Dec 18, 2019
9e7a1ae
error fixing
Gunasekar-K Dec 18, 2019
218c2d4
Update migratedynamodb.js
Gunasekar-K Dec 18, 2019
ae7580d
fixing error
Gunasekar-K Dec 18, 2019
ae0493d
[skip ci]
Gunasekar-K Dec 18, 2019
3a41ea0
[skip ci]
Gunasekar-K Dec 18, 2019
439d9f0
notify service integration
Gunasekar-K Dec 19, 2019
ded775f
notify service integration
Gunasekar-K Dec 19, 2019
fa0ce71
notify service integration
Gunasekar-K Dec 19, 2019
026ac35
notify service integration
Gunasekar-K Dec 19, 2019
b37a12e
introducing retry count
Gunasekar-K Dec 19, 2019
9750f51
introducing retry count
Gunasekar-K Dec 19, 2019
9860d77
introducing retry count
Gunasekar-K Dec 20, 2019
9e0310f
introducing retry count
Gunasekar-K Dec 20, 2019
b010889
introducing retry count
Gunasekar-K Dec 20, 2019
27943cd
introducing retry count
Gunasekar-K Dec 20, 2019
24e63d4
introducing retry count
Gunasekar-K Dec 20, 2019
8757ee4
introducing retry count
Gunasekar-K Dec 20, 2019
4b438eb
introducing retry count
Gunasekar-K Dec 20, 2019
2ec66af
introducing retry count
Gunasekar-K Dec 20, 2019
18012f1
introducing without retry count
Gunasekar-K Dec 20, 2019
94290ee
Fixed consumer struck issue
Gunasekar-K Dec 20, 2019
c62b86e
Added notify information
Gunasekar-K Dec 20, 2019
83e5c1a
health checck integration in consumer
Gunasekar-K Dec 20, 2019
736365b
informix trigger changes [skip ci]
Jan 7, 2020
561c08e
cosmetic changes [skip ci]
Jan 9, 2020
5b65c26
Update samplecrtable.sql
Gunasekar-K Jan 9, 2020
87afdb0
date and datetime changes [skip ci]
Jan 9, 2020
e34d8a2
indivitual file creation on log [skip ci]
Jan 10, 2020
e5e2b8a
audit code changes
Gunasekar-K Jan 17, 2020
708b297
audit code changes
Gunasekar-K Jan 17, 2020
5f248a7
datetime relate change
Gunasekar-K Jan 22, 2020
1ba2620
datetime relate change
Gunasekar-K Jan 23, 2020
ac288f9
sample table
Gunasekar-K Jan 23, 2020
cfea39e
unique data type case handling issue
Gunasekar-K Jan 23, 2020
54b0ce6
unique data type null case handling issue
Gunasekar-K Jan 23, 2020
95733a8
unique data type null case handling issue
Gunasekar-K Jan 23, 2020
40674e8
unique data type null case handling issue
Gunasekar-K Jan 23, 2020
2d5c744
decimal data type null case handling issue
Gunasekar-K Jan 24, 2020
01b4c20
decimal data type null case handling issuei [skip ci]
Gunasekar-K Jan 24, 2020
68133e2
modifying update condition for primary key usage [skip ci]
Gunasekar-K Jan 28, 2020
23f2bff
json esacape char [skip ci]
Jan 29, 2020
3d53968
code change on quotes [skip ci]
Jan 29, 2020
7b2bd30
Code changes for delete and unique condition addition
Gunasekar-K Feb 3, 2020
876c700
Code changes for delete and unique condition addition
Gunasekar-K Feb 3, 2020
ab5d567
Code changes for delete and unique condition addition
Gunasekar-K Feb 3, 2020
592b1ad
column object fix
Gunasekar-K Feb 4, 2020
a1841dc
Conciler logic and log implementation
Gunasekar-K Feb 7, 2020
dababa8
Conciler logic and log implementation
Gunasekar-K Feb 7, 2020
c7d3cfc
Conciler logic and log implementation
Gunasekar-K Feb 7, 2020
6e2a0f0
Conciler logic and log implementation
Gunasekar-K Feb 7, 2020
8228b53
Conciler logic and log implementation
Gunasekar-K Feb 7, 2020
d542b85
Conciler logic and log implementation
Gunasekar-K Feb 7, 2020
5478bf7
Conciler logic and log implementation
Gunasekar-K Feb 7, 2020
7e59c50
Conciler logic and log implementation
Gunasekar-K Feb 7, 2020
0495528
Conciler logic and log implementation
Gunasekar-K Feb 7, 2020
ea0feb1
Conciler logic and log implementation
Gunasekar-K Feb 7, 2020
4ec3331
Conciler logic and log implementation
Gunasekar-K Feb 7, 2020
aeb5da3
Conciler logic and log implementation
Gunasekar-K Feb 7, 2020
a21fb1f
table change
Gunasekar-K Feb 12, 2020
54e9a0a
code chang
Gunasekar-K Feb 13, 2020
5634a6a
code chang
Gunasekar-K Feb 13, 2020
f5d53ce
code chang
Gunasekar-K Feb 13, 2020
4bc9368
Reconcile code completed
Gunasekar-K Feb 13, 2020
2b7594b
Reconcile code change
Gunasekar-K Feb 14, 2020
999f230
Reconcile code change
Gunasekar-K Feb 14, 2020
fa2c61c
Reconcile code change
Gunasekar-K Feb 14, 2020
4265921
case sentive issue
Gunasekar-K Feb 17, 2020
532e404
case sentive issue
Gunasekar-K Feb 17, 2020
d1c19c8
case sentive issue
Gunasekar-K Feb 17, 2020
e5582bc
case sentive issue
Gunasekar-K Feb 17, 2020
71d4ad2
reconcile take update
Gunasekar-K Feb 18, 2020
8f2cde0
code changes for unsetenv
Gunasekar-K Feb 19, 2020
476416d
code changes for unsetenv
Gunasekar-K Feb 19, 2020
a9dc89f
code changes for unsetenv
Gunasekar-K Feb 20, 2020
340d998
code changes for unsetenv
Gunasekar-K Feb 20, 2020
aae7954
code changes for unsetenv
Gunasekar-K Feb 20, 2020
7fff6f6
code changes for unsetenv
Gunasekar-K Feb 20, 2020
4537e48
producer and consumer deployment
Gunasekar-K Mar 2, 2020
ee04fe1
producer and consumer deployment
Gunasekar-K Mar 2, 2020
61df77d
consumer code changes for date issue
Gunasekar-K Mar 4, 2020
71b41d7
special char issue
Gunasekar-K Mar 11, 2020
35eb2df
special char issue
Gunasekar-K Mar 11, 2020
5a417ed
special char issue
Gunasekar-K Mar 11, 2020
91d1e7e
null value issue
Gunasekar-K Mar 13, 2020
76dc248
integer datatype length issue
Mar 19, 2020
c4f0434
length issue for particular data type
Gunasekar-K Mar 20, 2020
128c9e3
nodemon removal
Gunasekar-K Mar 26, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 106 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
version: 2
defaults: &defaults
docker:
- image: circleci/python:2.7-stretch-browsers
install_dependency: &install_dependency
name: Installation of build and deployment dependencies.
command: |
sudo apt install jq
sudo pip install awscli --upgrade
sudo pip install docker-compose
install_deploysuite: &install_deploysuite
name: Installation of install_deploysuite.
command: |
git clone --branch v1.4.2 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
cp ./../buildscript/master_deploy.sh .
cp ./../buildscript/buildenv.sh .
cp ./../buildscript/awsconfiguration.sh .
restore_cache_settings_for_build: &restore_cache_settings_for_build
key: docker-node-modules-{{ checksum "package-lock.json" }}

save_cache_settings: &save_cache_settings
key: docker-node-modules-{{ checksum "package-lock.json" }}
paths:
- node_modules

builddeploy_steps: &builddeploy_steps
- checkout
- setup_remote_docker
- run: *install_dependency
- run: *install_deploysuite
- restore_cache: *restore_cache_settings_for_build
- run: ./build.sh ${APPNAME}
- save_cache: *save_cache_settings
- deploy:
name: Running MasterScript.
command: |
./awsconfiguration.sh $DEPLOY_ENV
source awsenvconf
# # producer deployment
# ./unsetenv.sh
# ./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-producer-deployvar
# source buildenvvar
# ./master_deploy.sh -d ECS -e $DEPLOY_ENV -t latest -s ${LOGICAL_ENV}-global-appvar,${LOGICAL_ENV}-${APPNAME}-appvar -i ${APPNAME}
# # notify deployment
# rm -rf buildenvvar
# # ./unsetenv.sh
# ./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-notify-deployvar
# source buildenvvar
# ./master_deploy.sh -d ECS -e $DEPLOY_ENV -t latest -s ${LOGICAL_ENV}-global-appvar,${LOGICAL_ENV}-${APPNAME}-notify-appvar -i ${APPNAME}
# # consumer deployment
# rm -rf buildenvvar
# ./unsetenv.sh
./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-consumer-deployvar
source buildenvvar
./master_deploy.sh -d ECS -e $DEPLOY_ENV -t latest -s ${LOGICAL_ENV}-global-appvar,${LOGICAL_ENV}-${APPNAME}-appvar -i ${APPNAME}
# # without kafka dynamodb
# rm -rf buildenvvar
# ./unsetenv.sh
# ./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-withoutkafka-deployvar
# source buildenvvar
# ./master_deploy.sh -d ECS -e $DEPLOY_ENV -t latest -s ${LOGICAL_ENV}-${APPNAME}-withoutkafka-appvar -i ${APPNAME}
# # reconciler deployment
# rm -rf buildenvvar
# # ./unsetenv.sh
# ./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-reconciler-deployvar
# source buildenvvar
# ./master_deploy.sh -d ECS -e $DEPLOY_ENV -t latest -s ${LOGICAL_ENV}-global-appvar,${LOGICAL_ENV}-${APPNAME}-appvar -i ${APPNAME}


jobs:
# Build & Deploy against development backend
"build-dev":
<<: *defaults
environment:
DEPLOY_ENV: "DEV"
LOGICAL_ENV: "dev"
APPNAME: "ifxpg-nodeserver"
steps: *builddeploy_steps

"build-prod":
<<: *defaults
environment:
DEPLOY_ENV: "PROD"
LOGICAL_ENV: "prod"
APPNAME: "ifxpg-nodeserver"
steps: *builddeploy_steps

workflows:
version: 2
build:
jobs:
# Development builds are executed on "develop" branch only.
- "build-dev":
context : org-global
filters:
branches:
only:
- dev

# Production builds are exectuted only on tagged commits to the
# master branch.
- "build-prod":
context : org-global
filters:
branches:
only: master
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ ENV LICENSE accept
RUN rm /usr/bin/python && ln -s /usr/bin/python2.7 /usr/bin/python
RUN echo "sqlexec 2021/tcp" >> /etc/services

RUN mkdir /app
COPY . /app
RUN mkdir /ifxpg-nodeserver
COPY . /ifxpg-nodeserver

WORKDIR /app
WORKDIR /ifxpg-nodeserver
RUN rm -rf node_modules && npm install --unsafe-perm

# ENTRYPOINT [ "/bin/bash" ]
ENTRYPOINT [ "npm" ]
ENTRYPOINT [ "npm","run" ]
23 changes: 23 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
set -eo pipefail
APP_NAME=$1
UPDATE_CACHE=""
#docker-compose -f docker/docker-compose.yml build $APP_NAME
docker build -t $APP_NAME:latest .
docker create --name app $APP_NAME:latest

if [ -d node_modules ]
then
mv package-lock.json old-package-lock.json
docker cp app:/$APP_NAME/package-lock.json package-lock.json
set +eo pipefail
UPDATE_CACHE=$(cmp package-lock.json old-package-lock.json)
set -eo pipefail
else
UPDATE_CACHE=1
fi

if [ "$UPDATE_CACHE" == 1 ]
then
docker cp app:/$APP_NAME/node_modules .
fi
25 changes: 25 additions & 0 deletions config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module.exports = {
PARTITION: 0
},
RETRY_COUNTER: 3,
KAFKA_REPOST_COUNT: 5,
topic_error: {
NAME: 'db.ifxpgmigrate.error',
PARTITION: 0,
Expand Down Expand Up @@ -41,5 +42,29 @@ module.exports = {
USER: process.env.IFX_USER || 'informix',
PASSWORD: process.env.IFX_PASSWORD || '1nf0rm1x',
POOL_MAX_SIZE: parseInt(process.env.IFX_POOL_MAX_SIZE || '10')
},
DYNAMODB: {
REGION: process.env.AWS_REGION || 'us-east-1',
TABLENAME: process.env.DYNAMODB_TABLENAME || 'ifxpg-migrator'
},
SLACK: {
URL: process.env.SLACKURL || 'us-east-1',
SLACKCHANNEL: process.env.SLACKCHANNEL || 'ifxpg-migrator',
SLACKNOTIFY: process.env.SLACKNOTIFY || 'false'
},
EXEMPTIONDATATYPE : {
MONEY: {
testdb_testtable5 : 'dmoney'
}
},
RECONCILER :
{
RECONCILER_ELAPSE_TIME : 600000,
RECONCILER_IGNORE_STATUS : 'PostgresUpdated',
RECONCILER_START_ELAPSE_TIME : 1,
RECONCILER_DIFF_PERIOD : 10,
RECONCILER_DURATION_TYPE : 'm',
RECONCILER_RETRY_COUNT : 1,
RECONCILER_POST_URL : 'http://ifxpg-migrator.topcoder-dev.com/kafkaevents'
}
}
10 changes: 5 additions & 5 deletions informix_auditing/UNIX.mak
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# TARGET must be set to the location/filename
# of the platform-specific make include file.

TARGET=$(INFORMIXDIR)/incl/dbdk/makeinc.linux86_64
TARGET=$(INFORMIXDIR)/incl/dbdk/makeinc.linux
include $(TARGET)
# ===============================================================
# This is the project title.
Expand All @@ -39,12 +39,12 @@ BINDIR = $(OS_NAME)-$(PLATFORM)

# Platform independent code goes here.
# The following code was generated by BladeSmith.

LDFLAGS = -m32
LCURL = -lcurl
MI_INCL = $(INFORMIXDIR)/incl
COPTS=-O -DMI_SERVBUILD -DMITRACE_OFF=1
CFLAGS =$(COPTS) $(CC_PIC) -I$(MI_INCL)/public -I$(MI_INCL)
PTCFLAGS =$(LCURL) $(COPTS) $(CC_PIC) -I$(MI_INCL)/public -I$(MI_INCL)
CFLAGS =$(LDFLAGS) $(COPTS) $(CC_PIC) -I$(MI_INCL)/public -I$(MI_INCL)
PTCFLAGS =$(LDFLAGS) $(LCURL) $(COPTS) $(CC_PIC) -I$(MI_INCL)/public -I$(MI_INCL)
LINKFLAGS = $(SHLIBLFLAG) $(SYMFLAG)
LIBS =

Expand Down Expand Up @@ -89,7 +89,7 @@ RecordAudit.jar: RecordAudit.class
# Misspelled symbol names will not be resolved here or at load time.
#
$(PROJECT_LIBS) : $(PROJECT_OBJS)
$(SHLIBLOD) $(LCURL) $(LINKFLAGS) -o $(PROJECT_LIBS) \
$(SHLIBLOD) $(LDFLAGS) $(LCURL) $(LINKFLAGS) -o $(PROJECT_LIBS) \
$(PROJECT_OBJS) $(LIBS) $(DATABLADE_LIBS) 2> link.errs

server: $(PROJECT_LIBS)
Expand Down
105 changes: 105 additions & 0 deletions informix_auditing/UNIX_x64.mak
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# (c) Copyright IBM Corp. 2004 All rights reserved. */
# */
# This sample program is owned by International Business Machines */
# Corporation or one of its subsidiaries ("IBM") and is copyrighted */
# and licensed, not sold. */
# */
# You may copy, modify, and distribute this sample program in any */
# form without payment to IBM, for any purpose including developing,*/
# using, marketing or distributing programs that include or are */
# derivative works of the sample program. */
# */
# The sample program is provided to you on an "AS IS" basis, without */
# warranty of any kind. IBM HEREBY EXPRESSLY DISCLAIMS ALL */
# WARRANTIES EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO*/
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTIC-*/
# ULAR PURPOSE. Some jurisdictions do not allow for the exclusion or */
# limitation of implied warranties, so the above limitations or */
# exclusions may not apply to you. IBM shall not be liable for any */
# damages you suffer as a result of using, modifying or distributing */
# the sample program or its derivatives. */
# */
# Each copy of any portion of this sample program or any derivative */
# work, must include a the above copyright notice and disclaimer of */
# warranty. */
# */
# ********************************************************************/

# This Makefile builds the logger libraries
# TARGET must be set to the location/filename
# of the platform-specific make include file.

TARGET=$(INFORMIXDIR)/incl/dbdk/makeinc.linux86_64
include $(TARGET)
# ===============================================================
# This is the project title.
PROJECT_TITLE = auditing

BINDIR = $(OS_NAME)-$(PLATFORM)

# Platform independent code goes here.
# The following code was generated by BladeSmith.

LCURL = -lcurl
MI_INCL = $(INFORMIXDIR)/incl
COPTS=-O -DMI_SERVBUILD -DMITRACE_OFF=1
CFLAGS =$(COPTS) $(CC_PIC) -I$(MI_INCL)/public -I$(MI_INCL)
PTCFLAGS =$(LCURL) $(COPTS) $(CC_PIC) -I$(MI_INCL)/public -I$(MI_INCL)
LINKFLAGS = $(SHLIBLFLAG) $(SYMFLAG)
LIBS =

PROJECT_OBJS= $(BINDIR)/auditing1.$(OBJSUFF) $(BINDIR)/auditing2.$(OBJSUFF) $(BINDIR)/auditing3.$(OBJSUFF) $(BINDIR)/audit_util.$(OBJSUFF)

PROJECT_LIBS=$(BINDIR)/$(PROJECT_TITLE).$(BLDLIB_SUFF)

all: $(BINDIR) RecordAudit.jar
$(MAKE) $(MAKEFLAGS) -f UNIX.mak server

# Construct the object file.

$(BINDIR)/auditing1.$(OBJSUFF) : auditing1.c
$(CC) $(CFLAGS) -o $@ -c $?

$(BINDIR)/auditing2.$(OBJSUFF) : auditing2.c
$(CC) $(PTCFLAGS) -o $@ -c $?

$(BINDIR)/auditing3.$(OBJSUFF) : auditing3.c
$(CC) $(CFLAGS) -o $@ -c $?

$(BINDIR)/audit_util.$(OBJSUFF) : audit_util.c
$(CC) $(PTCFLAGS) -o $@ -c $?

RecordAudit.class: RecordAudit.java
javac RecordAudit.java

RecordAudit.jar: RecordAudit.class
jar cf RecordAudit.jar RecordAudit.class

# Construct the shared library.
# Do *NOT* link with client side libraries.
# You will see many undefined symbols during linking. This is
# normal since those symbols are resolved when the server loads
# your shared object.
#
# ATTENTION:
# The ld "Symbol referencing errors" warning is normal.
# These unresolved symbols are resolved when the server
# loads the shared object. This list should be examined, however,
# for symbol names that may have been inadvertently misspelled.
# Misspelled symbol names will not be resolved here or at load time.
#
$(PROJECT_LIBS) : $(PROJECT_OBJS)
$(SHLIBLOD) $(LCURL) $(LINKFLAGS) -o $(PROJECT_LIBS) \
$(PROJECT_OBJS) $(LIBS) $(DATABLADE_LIBS) 2> link.errs

server: $(PROJECT_LIBS)

clean:
$(RM) $(RMFLAGS) $(PROJECT_LIBS) $(PROJECT_OBJS) RecordAudit.class RecordAudit.jar

$(BINDIR):
-mkdir $(BINDIR)

INSTALL:
cp $(BINDIR)/$(PROJECT_TITLE).bld $(INFORMIXDIR)/extend/auditing/$(PROJECT_TITLE).bld
cp RecordAudit.jar $(INFORMIXDIR)/extend/auditing/RecordAudit.jar
Loading