-
traefik2 web-service, with different access points on 2 different domain names
-
oauth2-proxy with gitlab provider
-
Edit .env
- hostname/s
- (traefik) trusted IPs from Load balancers
- (traefik) hetzner DNS API for SSL certs (easily transfered to letsencrypt : change the SSL provider ) https://doc.traefik.io/traefik/user-guides/docker-compose/acme-dns/
-
(netdata) tokens for online dashboards https://learn.netdata.cloud/docs/agent/claim
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
#!/usr/bin/env python3 | |
# https://grafana.com/docs/http_api/annotations/ | |
import os | |
import sys | |
import json | |
import requests | |
import argparse | |
import datetime |
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
version: '3' | |
networks: | |
web: | |
external: true | |
internal: | |
external: false | |
volumes: | |
netdataconfig: |
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
- hosts: all | |
remote_user: admin-cloud | |
sudo: yes | |
vars: | |
limits_conf: /etc/security/limits.conf | |
sysctl_conf: /etc/sysctl.conf | |
tasks: | |
- name: before install fluentd check ulimit | |
shell: grep "{{ item }}" {{ limits_conf }} | |
with_items: |
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 | |
# Requires: awscli (http://aws.amazon.com/cli/) | |
# Prints out a list of all security groups and their settings, just for quickly auditing it. | |
# Your AWS credentials | |
if [ -z ${AWS_ACCESS_KEY_ID} ]; then | |
export AWS_ACCESS_KEY_ID='***' | |
export AWS_SECRET_ACCESS_KEY='***' | |
fi |
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
#!/usr/bin/env python | |
##### USE ON YOUR OWN RISK - THIS IS GOING TO DEREGISTER AMI OLDER THAN 30 DAYS | |
import boto3 | |
from dateutil.parser import parse | |
import datetime | |
age = 30 | |
aws_profile_name = 'prod' | |
def days_old(date): | |
get_date_obj = parse(date) |
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 | |
## oneline : for r in $(aws ec2 describe-regions --query "Regions[].{Name:RegionName}" --output text --region ca-central-1); do echo "---------- AWS Region : $r ----------" ; echo "hello world"; done | |
for r in $(aws ec2 describe-regions --query "Regions[].{Name:RegionName}" --output text --region ca-central-1); | |
do | |
echo "---------- AWS Region : $r ----------" ; | |
echo "hello world"; | |
done | |
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
/** | |
* You might need to import JIRA ssl certificate into your jdk/jre cacerts file: | |
* 1) save JIRA certificate. E.g. in Chrome right click on https icon, click "Certificate information" link. | |
* In "Details" tab, click "Copy to File..." button. | |
* 2) in jdk "bin" folder run: "keytool -importcert -keystore ./cacerts -file /file/from/the/step/above/cacert.crt -trustcacerts -alias jira_ca | |
*/ | |
class JiraMain { | |
static void main(String[] args) { | |
// see https://docs.atlassian.com/jira/REST/latest/ | |
def listWatchers = "https://jira/rest/api/2/issue/PROJ-123/watchers" |