version 1.5.14
What's new
Sync with 0.9.11
Added patched S3 engine
Current cronicle S3 engine relies on aws-sdk package which is 150MB in size. Edge repo contains new version (under patches/S3.js). It uses @aws-sdk/client-s3 and @aws-sdk/lib-storage (aws sdk api V3). Which is about 20MB. You can put patched version under opt/cronicle/node_modules/pixl-server-storage/engines/S3.js
to update. There is also an option to bundle/minify (without installing extra dependency on cronicle package). See more details here. Base docker image of cronicle/cronicle:edge will contain this patched/minified version in the box (it just adds ~700KB).
You can perform a quick test in docker:
# create isolated network (optional)
docker network create demo
# start minio s3
docker run -d --rm --name minio --hostname minio --network demo -p 5000:9000 -p 9001:9001 \
quay.io/minio/minio server /data --console-address ":9001"
# then in UI on http://localhost:9001 create bucket "demo" (default creds are minioadmin/minioadmin)
# run cronicle instance linked to above minio
docker run -it --name cron --hostname cron --rm --network demo -p 3019:3012 -e CRONICLE_manager=1 \
-e CRONICLE_secret_key=MySecretKey \
-e CRONICLE_Storage__engine=S3 \
-e CRONICLE_Storage__S3__params__Bucket=demo \
-e CRONICLE_Storage__AWS__endpoint=http://minio:9000 \
-e CRONICLE_Storage__AWS__forcePathStyle=true \
-e CRONICLE_Storage__AWS__region=us-east-1 \
-e CRONICLE_Storage__AWS__credentials__secretAccessKey=minioadmin \
-e CRONICLE_Storage__AWS__credentials__accessKeyId=minioadmin \
cronicle/cronicle:edge-1.5.14 manager
here is a config snippet to use with config.json:
"Storage": {
"engine": "S3",
"AWS": {
"endpoint": "http://minio:9000",
"endpointPrefix": false,
"forcePathStyle": true,
"region": "us-east-1",
"hostPrefixEnabled": false,
"credentials": {
"secretAccessKey": "minioadmin",
"accessKeyId": "minioadmin"
},
"correctClockSkew": true,
"maxRetries": 5,
"httpOptions": {
"connectTimeout": 5000,
"timeout": 5000
}
},
"S3": {
"fileExtensions": true,
"params": {
"Bucket": "demo"
}
}
},
Run locally (single node)
mkdir -p $HOME/cron && docker run -d --name cron \
--hostname manager1 \
-p 3012:3012 --restart always \
-v $HOME/cron:/opt/cronicle/data \
-e CRONICLE_manager=1 \
-e CRONICLE_secret_key=mysecretKey \
cronicle/cronicle:edge-1.5.14 manager
As docker swarm service
# run 'docker swarm init' first if not yet
# make sure to use overlay network: docker network create cron --driver overlay
mkdir -p $HOME/cron && docker service create \
--name cron \
--hostname manager1 \
--env CRONICLE_manager=1 \
--env CRONICLE_secret_key=mysecretKey \
--mount type=bind,source=$HOME/cron,destination=/opt/cronicle/data \
--network cron \
--entrypoint manager \
--publish 3012:3012 \
cronicle/cronicle:edge-1.5.14
# docker service ls
# docker service rm cron
Update docker swarm service:
docker service update --image cronicle/cronicle:edge-1.5.14 cron