This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
gitlab: | |
image: 'gitlab/gitlab-ce:14.6.0-ce.0' | |
restart: always | |
hostname: 'localhost' | |
ports: | |
- "443:443" | |
- "80:80" | |
- "22:22" | |
environment: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# example: | |
# ./resize_lvm_storage.sh ubuntu-vg ubuntu-lv 99 | |
SIZE=$3 | |
LG=$1 | |
LV=$2 | |
vgdisplay $LG | |
lvextend -L +"$SIZE"G /dev/"$LG"/"$LV" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add this file to /etc/systemd/system/docker.service.d (you need run mkdir /etc/systemd/system/docker.service.d) and rename file to "http_proxy.conf" | |
[Service] | |
Environment="HTTP_PROXY=" | |
Environment="HTTPS_PROXY=" | |
Environment="NO_PROXY=localhost,127.0.0.0/8,registry.example.com" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
concurrent = 1 | |
check_interval = 0 | |
[session_server] | |
session_timeout = 1800 | |
[[runners]] | |
name = "gitlabrunner" | |
url = "https://localhost/" | |
token = "***************" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
docker exec -it docker-registry-registry_server-1 registry garbage-collect -m /etc/docker/registry/config.yml | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# example: | |
# clear data more than 15 days | |
# ./clear_prometheus_data.sh https://localhost job_example 1296000 | |
TIME=`date '+%s'` | |
TIME=`expr $TIME - $3` | |
BASE_DOMAIN=$1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Bring CPUs online | |
for CPU_DIR in /sys/devices/system/cpu/cpu[0-9]* | |
do | |
CPU=${CPU_DIR##*/} | |
echo "Found cpu: '${CPU_DIR}' ..." | |
CPU_STATE_FILE="${CPU_DIR}/online" | |
if [ -f "${CPU_STATE_FILE}" ]; then | |
if grep -qx 1 "${CPU_STATE_FILE}"; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# example: | |
# set os time to 2022-12-15 | |
# ./change_time.sh 2022-12-15 | |
TIME=$1 | |
timedatectl set-ntp 0 | |
timedatectl set-time $TIME |