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
[Unit] | |
Description=Sonarqube | |
After=network.target network-online.target | |
Wants=network-online.target | |
[Service] | |
ExecStart=/opt/sonarqube/bin/linux-x86-64/sonar.sh start | |
ExecStop=/opt/sonarqube/bin/linux-x86-64/sonar.sh stop | |
ExecReload=/opt/sonarqube/bin/linux-x86-64/sonar.sh restart | |
PIDFile=/opt/sonarqube/bin/linux-x86-64/./SonarQube.pid |
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
#!groovy | |
import groovy.json.JsonOutput | |
import groovy.json.JsonSlurper | |
/* | |
Please make sure to add the following environment variables: | |
HEROKU_PREVIEW=<your heroku preview app> | |
HEROKU_PREPRODUCTION=<your heroku pre-production app> | |
HEROKU_PRODUCTION=<your heroku production app> |
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
FILES=source_dir/*BACKUP* | |
for f in $FILES | |
do | |
echo "Copying $f at `date`" >> copy.log | |
scp -i key.ppk -p $f user@hostname:/destination_dir | |
if [ "$?" = 0 ]; then | |
echo "$f copy has finished at `date`" >> copy.log | |
else | |
echo "Error while trying to copy $f" >> error.log |
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 | |
fio --filename=/dev/xvdx --rw=read --bs=1m --iodepth=32 --ioengine=libaio --direct=1 --name=volume-initialize |
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 | |
AWSEXEC=`which aws` | |
AWSPATH=~/.aws/ | |
PIPEXEC=`which pip` | |
function InstallAWS(){ | |
if [ -a "$PIPEXEC" ]; then | |
$PIPEXEC install awscli --user --upgrade | |
else |
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
DT=`date --date "-15 days" +"%Y-%m-%d"` | |
aws ec2 describe-snapshots --filters Name=description,Values="*OpsAutomator*" --query "Snapshots[?StartTime<='$DT'].{ID:SnapshotId}" | jq -r '.[] .ID' | while read rola; do | |
aws ec2 delete-snapshot --snapshot-id $rola && echo "ok" $rola || echo "not deleted" | |
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
[Unit] | |
Description= kong service | |
After=syslog.target network.target | |
[Service] | |
User=root | |
Group=root | |
Type=forking | |
LimitAS=infinity | |
LimitRSS=infinity |
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
# This example demonstrates how to use Consult templates inside a Helm Chart | |
# It's kinda useful when using Vault Agent Injector :) | |
# We basically have to use `s to escape all templating resources | |
vault.hashicorp.com/agent-inject-template-env: | | |
{{ `{{ with secret "`}} {{- $.Values.app.env -}}/data/{{ .Values.app.name }} {{`" }} | |
{{ range $k, $v := .Data.data }} | |
export {{ $k }}="{{ $v }}" | |
{{ end }} | |
{{ end }} `}} |
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
# Using anytrue() | |
variable "instance_size" { | |
type = string | |
description = "RDS Instance Size" | |
validation { | |
condition = anytrue([ | |
var.instance_size == "db.t3.micro", | |
var.instance_size == "db.t3.small", |