설치 및 시작

설치 환경

1) 설치 디렉토리

  • agent: /home/assemble/agent

  • console(Assemble): /home/assemble/console

2) domain name

  • console 및 short url 도메인을 셋팅 합니다.

3) webApp name: commone

4) Startup & Shutdown Name: conestart.sh start/stop

5) service port(http / https): 80(application.properties 에서 수정 가능 - server.port=80) 80 포트 사용 시 root 권한이 필요하므로 다른 포트 사용을 권장합니다.

server jdk version: openjdk 1.8.x

6) 서비스 설치 대상 DB에 관련 테이블 생성용 sq을 이용하여 테이블 설치 후 서버에 관련 jar 및 설정 파일을 위치 시킵니다. 이후 과정은 ‘서비스 시작/종료’를 이용합니다.

7) 환경설정 파일

application.properties
# Server set
server.port=80
server.session.timeout=1800
# DataBase : MariaDB
spring.datasource.driverClassName=ENC(R1BK31eKv8JbbTfH44o42mEuLflIzjHWrKt19HMXSLFl4br2c/3vAXUw+M5kon17)
spring.datasource.url=ENC(SpLwFlBdP0O4IkYK8RzzAXrq+7/RPf5mvzcuphoDW6SmKieWOrTellXfYGCJf4O3iRb3da0QBOf6Ridk1+flVA==)
spring.datasource.username=ENC(ZjQ8fllbUqrSdyM4DwX8tiwTntbInHeWpDFuSWWLA+s=)
spring.datasource.password=ENC(qGk0TgUEsUBa8kyUEQ3suLUOx0Q8rQ9or9yizYOQTi2R1522fhItZVeWrmzNFQ2H)
# jasypt encryptor
jasypt.encryptor.bean=jasyptStringEncrptor
# jpa table 설정 대소분자 구분
spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true
# sql query 보기
#spring.jpa.show-sql=true
spring.jpa.properties.hibernate.format_sql=true
spring.jpa.properties.hibernate.jdbc.batch_size=1000
spring.jpa.hibernate.use-new-id-generator-mappings=false
# tomcat datasource
spring.datasource.tomcat.min-idle=30
spring.datasource.tomcat.max-idle=30
spring.datasource.tomcat.max-active=30
spring.datasource.tomcat.initial-size=30
spring.datasource.tomcat.test-while-idle=true    
spring.datasource.tomcat.time-between-eviction-runs-millis=3600000    
spring.datasource.tomcat.min-evictable-idle-time-millis=7200000    
spring.datasource.tomcat.testOnBorrow=true        
spring.datasource.tomcat.validationQuery=SELECT 1
# servlet multipart file size
spring.servlet.multipart.max-file-size=10485760
spring.servlet.multipart.max-request-size=10485760
#log
logging.level.org.springframework.web=DEBUG
logging.level.org.hibernate= ERROR
logging.file=./logs/assemble.log
#push statistics api
push.api.domain=https://api-v2.fingerpush.com
push.api.appReport=/rest/cjcaas/console_v1/getAppList.jsp
push.api.appInfo=/rest/cjcaas/console_v1/getAppReport.jsp
push.api.appTagList=/rest/cjcaas/console_v1/getDBAppTagList.jsp
push.api.appTagDel=/rest/cjcaas/console_v1/getDBAppTagDel.jsp
push.api.appUpdAKey=/rest/cjcaas/console_v1/setAndroidKey.jsp
push.api.appUpdIKey=/rest/cjcaas/console_v1/setAppP12.jsp
push.api.appSOD=/rest/cjcaas/console_v1/getDBAppSOD.jsp
push.api.activeDevice=/rest/cjcaas/console_v1/getDBActiveDeviceCont.jsp
push.api.appRtCont=/rest/cjcaas/console_v1/getDBAppRtCont.jsp
push.api.appInstallM=/rest/cjcaas/console_v1/getDBInstallM.jsp
push.api.appInstallH=/rest/cjcaas/console_v1/getDBInstallH.jsp
push.api.identityList=/rest/cjcaas/console_v1/getDBIdentityList.jsp
push.api.pushInfo=/rest/cjcaas/console_v1/getPushInfo.jsp
push.api.cancelPush=/rest/cjcaas/console_v1/cancelPush.jsp
push.api.pushSendList=/rest/cjcaas/console_v1/getPushSendList.jsp
push.api.instDataYear=/rest/cjcaas/console_v1/getInstDataYear.jsp
push.api.connDataYear=/rest/cjcaas/console_v1/getConnDataYear.jsp
push.api.activeDeviceStat=/rest/cjcaas/console_v1/getActiveDevice.jsp
push.api.deactiveDeviceStat=/rest/cjcaas/console_v1/getDeactiveDevice.jsp
push.api.installDevice=/rest/cjcaas/console_v1/getInstalledDevice.jsp
push.api.connectedDevice=/rest/cjcaas/console_v1/getConnectedDevice.jsp
push.api.statusByOs=/rest/cjcaas/console_v1/getStatusByOS.jsp
push.api.rtSendStatsJson=/rest/cjcaas/console_v1/getRTSendStatsJson.jsp
push.api.openedTimeList=/rest/cjcaas/console_v1/getOpenedTimeList.jsp
push.api.connTimeList=/rest/cjcaas/console_v1/getConnTimeList.jsp
push.api.uploadPushImg=/rest/cjcaas/console_v1/setPushImg.jsp
push.api.openTimeRate=/rest/cjcaas/console_v1/getOpenTimeRate.jsp
push.api.getDeviceCount=/rest/cjcaas/console_v1/getDeviceCount.jsp
#cj heartbeat api
cj.api.heartBeat=https://commone.cjmplace.com/heartbeat/v1
cj.api.account=https://commone.cjmplace.com/stl/v1
CJ.properties
excelFilePath=/home/cjcaas/console/upload/xls/
ImgFilePath=/home/cjcaas/console/upload/images/
tempFilePath=/home/cjcaas/console/upload/temp/
sampleFilePath=/home/cjcaas/console/upload/sample/
sampleFileName=assembleTestSample.zip
excelFileDelYn=Y
dayByBatchTerm=7,23
DomainURL=도메인주소
imgSizeLimit=400
xlsSizeLimit=10240
loginip=접근허용 ip
#short url
useShortUrl=Y
SHORT_URL=단축URL
#batch
isrunbatch=true
batch.fixedDelay.agmonitor=300000
batch.fixedDelay.sendcount=1800000
batch.fixedDelay.cmpnstep=600000
#agent use on
usepush=true
usemsg=true
usekko=true
usekkf=true
usemail=true
#agent monitor
daemonid=test
# admin sms
msg.callback=07046937281
# push api value
push.userid=푸시서비스아이디
push.customerkey=푸시서비스고객키
# cj api id value
cj.idat=
cj.idft=
cj.idmsg=
cj.idemail=
cj.idcommone=
# send cancel time
cancelDispatchTime=30
#send time
emgTime=5
reservTime=30
#dbtodb option
dbtodbCntLimit=1000000
dbtodbPageCnt=50000
isTestSkip=Y
isSmsAuth=Y,N
isNewDbtoDb=Y,N
isSpltSend=Y
version={version}

8) 접속 정보 설정 관련 내용은 암호화되어 있으며, DB 정보가 변경될 시 다음과 같이 변경된 내용을 적용할 수 있습니다.

# DataBase : MariaDB
spring.datasource.driverClassName=ENC(암호화된 값)
spring.datasource.url=ENC(암호화된 값)
spring.datasource.username=ENC(암호화된 값)
spring.datasource.password=ENC(암호화된 값)

보안을 위해 핑거푸시 어셈블의 프로퍼티 값 중 DB 접속 정보는 암호화되어 처리됩니다. 이와 관련하여 Encrtpion 폴더의 암호화 툴을 이용하여 평문을 암호화하여 접속정보를 적용할 수 있습니다.

i. Encrypter_Tomcat.bat

  • Encryption_Data-1.0.jar 와 같은 경로에 위치 시킬 것

  • 편집을 통해 Encryption_Data-1.0.jar의 경로를 변경할 수 있습니다.

  • 실행 시 내장된 톰캣 서버(port:9999)가 실행되고 10초 뒤 웹 브라우저를 실행시켜 localhost:9999 페이지를 띄웁니다.

ii. Encrypter_Console.bat

  • Encryption_CsData-1.0.jar 와 같은 경로에 위치 시킬 것

  • 편집을 통해 Encryption_CsData-1.0.jar의 경로를 변경할 수 있습니다.

  • 실행 시 DriverClass, Url, Username, Password를 입력 받고 암호화한 값을 출력합니다.

iii. Encrypter_Tomcat.sh

  • Encryption_Data-1.0.jar 와 같은 경로에 위치 시킬 것

  • PATH_TO_JAR 변수를 조작하여 Encryption_Data-1.0.jar의 경로를 변경할 수 있습니다. 실행 시 내장된 톰캣 서버(port:9999)가 실행됩니다.

  • 외부에서 http://xxx.xxx.xxx.xxx:9999 를 통해 encrypt 페이지에 접속할 수 있습니다. (xxx.xxx.xxx.xxx는 Encrypter_tomcat.sh가 실행된 서버의 ip)

  • 외부에서 접속하기 위해서는 아래의 명령을 통해 포트를 개방할 필요가 있습니다. #firewall-cmd --permanent --add-port=9999/tcp #firewall-cmd --reload

iv. Encrypter_Console.bat

  • Encryption_CsData-1.0.jar 와 같은 경로에 위치 시킬 것

  • PATH_TO_JAR 변수를 조작하여 Encryption_CsData-1.0.jar의 경로를 변경할 수 있습니다.

  • 실행 시 DriverClass, Url, Username, Password를 입력 받고 암호화한 값을 출력합니다.

[입력]

[결과]

운영 장비 환경

당 서비스는 고객별 환경 및 DB 종류에 유연하게 적용할 수 있는 서비스이나, 아래 항목에 대해서는 필수적으로 충족되어야 합니다.

1) Domain 사용

Short Url 등을 이용한 고객의 메시지 클릭률 수집 등을 위해, 고객이 입력한 full url이 치환될 도메인이 필수적으로 필요합니다. 또한, 해당 도메인 접속 트래픽을 고려하여 해당 서비스는 핑거푸시 어셈블 콘솔과 Short url 클릭 트래픽 전용 서버로 구성한다면, 각각 접속에 필요한 도메인을 셋팅 하는 것을 추천합니다.

2) Java Version

해당 서비스의 빌드 버전은 Java 1.8.x 버전 이므로 대상 서버는 해당 버전의 JDK 가 설치되어 있어야 합니다.

3) 외부 데이터 통신을 위해 Agent에서 사용하는 포트 이외에 다음 도메인에 대한 outbound 80, 443 포트가 개방되어 있어야 합니다.

  • https://commone.cjmplace.com

  • https://api-v2.fingerpush.com

서비스 시작과 정지

서버 OS에 따라, Shell(coneStart.sh) 혹은 Batch (coneStart.bat)로 실행할 수 있습니다.

1) 다음과 같이 실행합니다. (1024 포트 이하 사용 시 root 권한 실행)

./conestart.sh start

2) 서비스 종료 시 다음과 같이 입력합니다.

./conestart.sh stop

시스템 시작과 종료 방법

1) 사용자는 시스템 접속을 위해 웹 브라우저를 기동 시킨 후 주소란에 Assemble의 도메인을 입력합니다.

2) 시스템은 사용자 인증을 위해 Login 화면을 Display 하며, 이때 사용자는 본인의 ID 및 Password를 입력한 후 Login을 클릭합니다.

3) 시스템은 사용자 확인 후 Main화면을 Display합니다. 사용자는 Main 화면에서 작업할 단위 시스템 별 화면으로 이동하여 작업합니다.

4) 사용자는 단위 업무별 작업을 수행합니다.

  • 관리자(ADM): 모든 메뉴에 접근 가능

  • 사용자(USR): 계정 권한을 가진 메뉴에 접근 가능

5) 사용자가 작업을 마친 후 종료 시 화면 우측 상단의 계정을 클릭 후 로그아웃을 클릭합니다.

Last updated