Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

Playce RoRo 실행을 위한 필수 모듈 설치 여부를 확인하시기 바랍니다.

설치 파일 다운로드

Info

기본 설치 경로는 ‘/opt/roro’를 사용합니다. 

...

Code Block
languagebash
#!/bin/sh

#################################################
#                                               #
#        Configuraton for Playce RoRo           #
#                                               #
#################################################

# Working dir입니다, 아래는 예시로 roro로 지정되어 있습니다
# Working directory for RoRo (Inventory, Assessment, Migration and etc.)
WORKING_DIR=/roro

# DB Connection URL 연결할 데이터데이스 URL을 입력합니다. 아래 예시는 MariaDB 기준으로 작성되었습니다.
DB_URL=jdbc:log4jdbc:mariadb://localhost:3306/roro

# DB Username (데이터베이스 사용자를 입력합니다.)
DB_USERNAME=roro

# DB Password (데이터베이스 패스워드를 입력합니다.)
DB_PASSWORD=password

# Bucket name to save disk images for migration (AWS or GCP)
BUCKET_NAME=

# Bucket region about given bucket name for migration (AWS)
BUCKET_REGION=

if [ e$WORKING_DIR = "e" ] ; then
    echo "[Error] WORKING_DIR must be set."
    exit;
fi

if [ e$DB_USERNAME = "e" ] ; then
    echo "[Error] DB_USERNAME must be set."
    exit;
fi

if [ e$DB_PASSWORD = "e" ] ; then
    echo "[Error] DB_PASSWORD must be set."
    exit;
fi

if [ e$BUCKET_NAME = "e" ] ; then
    echo "[Warning] BUCKET_NAME is empty and migration will be failed."
fi

if [ e$BUCKET_REGION = "e" ] ; then
    echo "[Warning] BUCKET_REGION is empty and migration to AWS will be failed."
fi

# 로그파일 경로(Log file path)
JAVA_OPTS="$JAVA_OPTS -DLOG_PATH=$CATALINA_HOME/logs/"
 
# 파일 인코딩(File encoding)
JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF-8 -Dfile.client.encoding=UTF-8"

# 추가 설정(Additional config)
JAVA_OPTS="$JAVA_OPTS -Xms2048m -Xmx2048m -XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=256m"
JAVA_OPTS="$JAVA_OPTS -XX:+UseG1GC"
JAVA_OPTS="$JAVA_OPTS -XX:+UseLargePagesInMetaspace"
JAVA_OPTS="$JAVA_OPTS -XX:+ExplicitGCInvokesConcurrent"
JAVA_OPTS="$JAVA_OPTS -XX:+DisableExplicitGC"
JAVA_OPTS="$JAVA_OPTS -XX:ReservedCodeCacheSize=512m"
JAVA_OPTS="$JAVA_OPTS -XX:-UseCodeCacheFlushing"
JAVA_OPTS="$JAVA_OPTS -Djava.security.egd=file:/dev/urandom"
JAVA_OPTS="$JAVA_OPTS -Djava.net.preferIPv4Stack=true"
JAVA_OPTS="$JAVA_OPTS -Djava.security.properties=$CATALINA_HOME/conf/security/java.security"

# 사전 환경 분석(prerequisite), 평가 수행(assessment), 마이그레이션(migration) 스케줄러 사용여부를 설정합니다.
JAVA_OPTS="$JAVA_OPTS -Denable.prerequisite.schedule=true"
JAVA_OPTS="$JAVA_OPTS -Denable.assessment.schedule=true"
JAVA_OPTS="$JAVA_OPTS -Denable.migration.schedule=true"

# 서버 모니터링 여부 및 주기 설정과 주기적 스캔 여부 및 주기를 설정합니다.
JAVA_OPTS="$JAVA_OPTS -Denable.monitoring.schedule=true"
JAVA_OPTS="$JAVA_OPTS -Denable.scheduled.scan=true"
JAVA_OPTS="$JAVA_OPTS -Dscheduler.schedule.monitoring.cron='0 0 0/3 * * ?'"
JAVA_OPTS="$JAVA_OPTS -Dscheduler.schedule.scheduled-scan.cron='0 0 0 * * ?'"

# 상기 설정한 데이터베이스 정보를 사용하기 위해 설정합니다.
JAVA_OPTS="$JAVA_OPTS -Dspring.datasource.url='$DB_URL'"
JAVA_OPTS="$JAVA_OPTS -Dspring.datasource.username='$DB_USERNAME'"
JAVA_OPTS="$JAVA_OPTS -Dspring.datasource.password='$DB_PASSWORD'"

# RoRo Migration config (마이그레이션 정보를 설정합니다.)
JAVA_OPTS="$JAVA_OPTS -Droro.migration.bucket.name=$BUCKET_NAME"
JAVA_OPTS="$JAVA_OPTS -Droro.migration.bucket.region=$BUCKET_REGION"
JAVA_OPTS="$JAVA_OPTS -Droro.migration.bucket.remove=true"
JAVA_OPTS="$JAVA_OPTS -Droro.migration.include.system.uid=false"

# RoRo working directory
JAVA_OPTS="$JAVA_OPTS -Droro.working.dir-path=$WORKING_DIR"

Database와 User 생성

MariaDB 10.6 이상 버전의 설치를 권고하며, 아래와 같이 권고합니다.

  • 테이블 및 컬럼의 대소문자 구분을 하지 않으며, 타임존을 UTC로 설정하기 위해 /etc/my.cnf 파일을 다음과 같이 수정합니다.

Code Block
#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d

[mariadb]
lower_case_table_names = 1
default_time_zone = '+0:00'
  • roro용 Database 및 User를 생성한다.

Code Block
]$ mysql -u root -p
mysql> CREATE DATABASE roro CHARACTER SET utf8 COLLATE utf8_bin;
mysql> GRANT ALL PRIVILEGES ON roro.* TO roro@'%' IDENTIFIED BY '<PASSWORD>';
mysql> FLUSH PRIVILEGES;

...