클라우드 인스턴스의 스케쥴링을 위한 오픈소스 도구
$ sudo apt-get update
$ sudo apt-get upgrade
$ docker run -it -d --net host --name cronicle -v /opt/cronicle/data:/opt/cronicle/data:rw -v /opt/cronicle/logs:/opt/cronicle/logs:rw --hostname vpc-prod-instance1 -p 3012:3012 intelliops/cronicle:latest
# bin/control.sh setup
# bin/control.sh restart
$ docker start cronicle
// node js 설치
$ sudo apt install nodejs
$ sudo apt install npm
// 일반 계정 권한으로 설치를 시도 할 경우 아래와 같이 설치가 진행되지 않는다.
ERROR: The Cronicle auto-installer must be run as root.
# curl -s https://raw.githubusercontent.com/jhuckaby/Cronicle/master/bin/install.js | node
Cronicle Installer v1.3
Copyright (c) 2015 - 2018 PixlCore.com. MIT Licensed.
Log File: /opt/cronicle/logs/install.log
Fetching release list...
Version 0.8.62 is already installed, and is the latest.
# mkdir -p /opt/cronicle
# cd /opt/cronicle
# curl -L https://github.com/jhuckaby/Cronicle/archive/refs/tags/v0.8.62.tar.gz | tar zxvf - --strip-components 1
# npm install
# node bin/build.js dist
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module 'async'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/opt/cronicle/bin/build.js:11:13)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
$ sudo npm install -g async
npm uninstall async
npm install -g async
npm link async
Welcome to Cronicle!
First time installing? You should configure your settings in '/opt/cronicle/conf/config.json'.
Next, if this is a master server, type: '/opt/cronicle/bin/control.sh setup' to init storage.
Then, to start the service, type: '/opt/cronicle/bin/control.sh start'.
For full docs, please visit: http://github.com/jhuckaby/Cronicle
Enjoy!
# node -e 'console.log(require("os").hostname());'
# /opt/cronicle/bin/storage-cli.js get global/servers/0
# /opt/cronicle/bin/storage-cli.js vi global/servers/0
$ sudo docker run -it -d --net host --name cronicle -v /opt/cronicle/data:/opt/cronicle/data:rw -v /opt/cronicle/logs:/opt/cronicle/logs:rw --hostname [WORKERNODE_HOSTNAME] -p 3012:3012 intelliops/cronicle:latest
// Primary server 에서 수행
$ vi /opt/cronicle/conf/config.json
copy secret_key value
// Worker server 에서 수행
// 컨테이너로 실행 한 경우
$ docker exec --user root -i -t [CONTAINER_ID] /bin/bash
$ vi /opt/cronicle/conf/config.json
// 컨테이너 실행 아닌 경우 동일 경로에 붙여넣기
위에서 복사한 secret_key 를 붙여넣음
# /opt/cronicle/bin/control.sh start
/opt/cronicle/bin/control.sh start: Starting up Cronicle Daemon...
/opt/cronicle/bin/control.sh start: Cronicle Daemon started
$ docker update --restart unless-stopped [CONTAINER_ID]
$ sudo cp /opt/cronicle/bin/cronicled.init /etc/init.d/cronicled
$ sudo chmod 775 /etc/init.d/cronicled
Or, if you have Debian-style Linux (i.e. Ubuntu), type this:
$ sudo update-rc.d cronicled defaults
For multi-server clusters, you'll need to repeat these steps on each server.
워커노드에서는 마스터 노드와 통신을 위해 3012 포트가 오픈되어 있어야 함