This file contains 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 | |
# This script takes a clean Ubuntu Server 24.04 LTS image and installs and configures | |
# everything needed to deploy a production-ready PostgreSQL server. | |
set -euo pipefail | |
# --- AESTHETICS --- | |
GREEN='\033[0;32m' |
This file contains 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 -eux | |
yesterday=$(date -d yesterday +%s) | |
# dnsdock should not be stopped : we limit to the containers created after it | |
docker ps --filter since=dnsdock -q --format "{{.ID}} {{.CreatedAt}}" | while read line | |
do | |
# line looks like: | |
# 123456789abcdef 2017-01-01 00:00:00 +02:00 CEST | |
set $line | |
id=$1 |
This file contains 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
# Scripted Jenkins Plugins install | |
Jenkins has a very rich catalog of plugins and it's quite easy to install and update them via UI. | |
BTW, when you want to add tons of plugin via UI, it's a fairly long and boring procedure. | |
Hopefully, mass installation (or update) could be easy using a simple bash script (curl/python required) : | |
* https://raw.githubusercontent.com/hgomez/devops-incubator/master/forge-tricks/batch-install-jenkins-plugins.sh | |
Create a file containing plugins to be installed (or updated), ie iplugins : |
This file contains 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
## Useful Commands | |
Get kubectl version | |
kubectl version | |
Get cluster info: |
This file contains 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 | |
# | |
# Generates client and server certificates used to enable HTTPS | |
# remote authentication to a Docker daemon. | |
# | |
# See http://docs.docker.com/articles/https/ | |
# | |
# To start the Docker Daemon: | |
# | |
# sudo docker -d \ |
This file contains 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 | |
HOST_IP=`ifconfig eth0| awk '/inet addr/{print substr($2,6)}'` | |
mkdir docker-ca | |
chmod 0700 docker-ca | |
cd docker-ca | |
openssl genrsa -aes256 -out ca-key.pem 2048 | |
openssl req -new -x509 -days 365 -key ca-key.pem -sha256 -out ca.pem | |
openssl genrsa -out server-key.pem 2048 | |
openssl req -subj "/CN=${HOST_IP}" -new -key server-key.pem -out server.csr |