HUB
Sign inSign up

lvarin/s3cmd

By lvarin

•Updated over 5 years ago

Just a s3cmd client installation

Image
0

2.1K

lvarin/s3cmd repository overview

⁠Openshift 's3cmd' cronJob template (Draft)

This is a (Draft) template to create a s3 cronjob. It uses s3cmd⁠ as client, and creates an example cronjob that lists all the available buckets.

⁠Install

The process to install this template localy to the current namespace is, first add the template to openshift (oc create), then fill up the file secrets with the access_key and the secret_key, finaly create the objects (oc process).

oc create -f s3cmd.yaml
# oc replace -f s3cmd.yaml --force
oc process -f s3cmd.yaml --parameters
vim secrets
# oc delete cronjobs/s3cmd secrets/s3cmd-secret
oc process s3cmd --param-file secrets  | oc create -f -
  • secrets file:
ACCESSKEY=
SECRETKEY=

⁠Test installed cronjob

With the default syntaxt, the cronjob will only run every hour at half past. In order to test it:

oc create job "test-$(date +%s)" --from=cronjob/s3cmd

This creates a job with a name like test-1587549857, which will create a pod. To see the output of the cronjob do a something like oc logs -f test-1587549857-pod.

Tag summary
Recent tags
Content type
Image
Digest
Size
37.2 MB
Last updated
over 6 years ago
docker pull lvarin/s3cmd:latest