Kerya techblog

Most Read Posts

  • Gentoo mail (postfix + postfixadmin + dovecot + amavisd-new + roundcube)
  • Zabbix - no such instance currently exists at this oid
  • LVM cant Boot - ALERT /dev/mapper/ubuntu--vg-root does not exist DROPPING to Shell -
  • liquidsoap-1.1.1 gentoo install
  • Laravel manual user register
  • Gentoo: php 5.6.0 + pecl-memcached 2.2.0 install script
  • Zabbix APC Smart UPS monitoring on FreeBSD with snmp
  • Squid 3.4 debian 7 install script
  • Подключение Foxgate S6224-S2 Ubuntu minicom
  • Abills
  • exim+dovecot+postfixadmin+clamav+spamassassin on FreeBSD
  • Openmeetings 2.1.1 Ubuntu 12.04.2 installation
  • libtool version mismatch pecl gentoo
  • Securing NTP
  • FreeBSD 9 ossec setup errors fix
  • Mikrotik no-ip ddns update script
  • Скопировать права mysql gentoo
  • fix for - corrupted record for package (pkgdep line without argument), ignoring
  • mysql backup scripts
  • snmpd less verbose log FreeBSD (Connection from UDP messages)
  1. Вы здесь:  
  2. Home
  • Home
  • Все статьи

gitlab runner dind docker-compose

Подробности
Автор: Kirill
  • gitlab
  • docker
  • docker-compose

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

AWS S3 IAM policy to limit to single sub folder

Подробности
Автор: Kirill

{ "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

logrotate hints

Подробности
Автор: Kirill

compress

compresscmd xz

compressoptions -9

---------------

 compress manually:

--verbose  show progress

 To reduce system load:

/etc/cron.daily/logrotate from:

    /usr/sbin/logrotate /etc/logrotate.conf

to:

    nice -n 19 ionice -c3 /usr/sbin/logrotate /etc/logrotate.conf

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=652600

-M xz option sets memory limit, please check man, for example 32M is required for -3 compression option, for example :

compressoptions -3 -M 128M

also cpulimit may be useful:

cpulimit -l 20

sets cpu usage to 20%

for example:

cpulimit -l 20 nice -n 19 ionice -c3 /usr/sbin/logrotate /etc/logrotate.conf

https://uk.ubunlog.com/cpulimit-%D0%BE%D0%B1%D0%BC%D0%B5%D0%B6%D1%83%D1%94-%D0%BF%D1%80%D0%BE%D1%86%D0%B5%D1%81-%D0%BF%D1%80%D0%BE%D1%86%D0%B5%D1%81%D0%BE%D1%80%D0%B0/

bash script to clean files to required percentage

Подробности
Автор: Kirill
  • bash
  • graphite
  • awk

#!/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

  1. Ansible create LVM and mount
  2. gitlab create user from bash cli and set admin permissions

Страница 4 из 18

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10

Search

Older Posts

  • zerotier one add more routes (24)
  • modsecurity for nginx compilation scripts for freebsd (416)
  • Greenbone Vulnerability Manager (GVM) hacks (486)
  • elasticsearch cluster red status fix due to high watermark (380)
  • ubuntu arrow keys misbehaviour fix (460)
  • icinga IIS monitoring powershell error Get-WmiObject : Invalid namespace "root\WebAdministration" (459)
  • Make user superadmin in zabbix (498)
  • dnf Error: unknown option (601)
  • unpack pfx certificate (used for apache or nginx) (443)
  • mysql audit plugin build script (718)
  • mysql dump one row (504)
  • redmine 5 docker-compose (678)
  • gitlab runner dind docker-compose (502)
  • AWS S3 IAM policy to limit to single sub folder (451)
  • logrotate hints (603)

Login Form

  • Забыли пароль?
  • Забыли логин?
  • Регистрация