services:
dind:
image: docker:23-dind
restart: always
privileged: true
environment:
DOCKER_TLS_CERTDIR: ""
command:
- --storage-driver=overlay2
runner:
restart: always
image: registry.gitlab.com/gitlab-org/gitlab-runner:alpine
depends_on:
- dind
environment:
- DOCKER_HOST=tcp://dind:2375
volumes:
- ./config:/etc/gitlab-runner:z
# register-runner:
# restart: 'no'
# image: registry.gitlab.com/gitlab-org/gitlab-runner:alpine
# depends_on:
# - dind
# environment:
# - CI_SERVER_URL=${CI_SERVER_URL}
# - REGISTRATION_TOKEN=${REGISTRATION_TOKEN}
# command:
# - register
# - --non-interactive
# - --locked=false
# - --name=${RUNNER_NAME}
# - --executor=docker
# - --docker-image=docker:20-dind
# - --docker-volumes=/var/run/docker.sock:/var/run/docker.sock
# volumes:
# - ./config:/etc/gitlab-runner:z
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::mybucket/toto3/*"
]
},
{
"Effect": "Allow",
"Action": [
"s3:ListAllMyBuckets",
"s3:GetBucketLocation"
],
"Resource": "arn:aws:s3:::*"
},
{
"Effect": "Allow",
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::mybucket",
"Condition": {
"StringLike": {
"s3:prefix": [
"",
"toto3/",
"toto3*"
]
}
}
}
]
}
https://stackoverflow.com/questions/35944349/iam-aws-s3-to-restrict-to-a-specific-sub-folder
compress
compresscmd xz
compressoptions -9
---------------
compress manually:
--verbose show progress
To reduce system load:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=652600
#!/bin/sh
#set -x
required_free_percentage=93
percent_free=`df -h | grep /dev/mapper/data-graphite | awk '{print $5}' | sed 's/%//'`
echo ${percent_free}
i=365
while [ ${percent_free} -gt ${required_free_percentage} ]
do
#echo ${i}
find /var/lib/carbon/whisper/ -type f -mtime +${i} | xargs -n1 -r rm
percent_free=`df -h | grep /dev/mapper/data-graphite | awk '{print $5}' | sed 's/%//'`
#echo ${percent_free}
i=$(( $i -1 ))
done