#!/bin/bash
region='sa-east-1'
cd /tmp
curl https://amazon-ssm-${region}.s3.amazonaws.com/latest/linux_amd64/amazon-ssm-agent.rpm -o amazon-ssm-agent.rpm
yum install -y amazon-ssm-agent.rpm
rm -f amazon-ssm-agent.rpm
systemctl enable amazon-ssm-agent
systemctl start amazon-ssm-agent
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 | |
#title :wildfly-install-mysql.sh | |
#description :The script to install mysql drive in Wildfly 10.x | |
#usage :/bin/bash wildfly-install-mysql.sh | |
DRIVER_VERSION=5.1.40 | |
DRIVER_FILENAME=mysql-connector-java-${DRIVER_VERSION} | |
DRIVER_ARCHIVE_NAME=${DRIVER_FILENAME}.tar.gz | |
DRIVER_UNTAR_NAME=${DRIVER_FILENAME}-bin.jar | |
DRIVER_DOWNLOAD_ADDRESS=https://cdn.mysql.com//Downloads/Connector-J/${DRIVER_ARCHIVE_NAME} |
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
import subprocess | |
from flask import (Flask, abort, request, jsonify, Response) | |
from pybitbucket.bitbucket import Bitbucket, Client | |
from pybitbucket.auth import ( | |
Authenticator, | |
Anonymous, BasicAuthenticator, | |
OAuth1Authenticator, | |
OAuth2Grant, OAuth2Authenticator) | |
from pybitbucket.repository import ( | |
RepositoryRole, RepositoryType, RepositoryForkPolicy, |
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
ZABBIX_PROXY=zabbix-proxy.lichti.com.br | |
HOSTNAME_AGENT=$(hostname --fqdn) | |
yum update | |
rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm | |
yum install zabbix-agent -y | |
systemctl enable zabbix-agent | |
cat << EOF > /etc/zabbix/zabbix_agentd.conf |
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
ZABBIX_SERVER=zabbix-server.lichti.com.br | |
ZABBIX_PROXY=zabbix-proxy.lichti.com.br | |
ZABBIX_DBPASS=my_super_pass | |
sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config | |
setenforce Permissive | |
sed -i "s/^HOSTNAME=.*/HOSTNAME=${ZABBIX_PROXY}/g" /etc/sysconfig/network | |
echo '${ZABBIX_PROXY}' > /etc/hostname |
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
ZABBIX_HOSTNAME=zabbix-server.lichti.com.br | |
ZABBIX_DBPASS=my_super_pass | |
sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config | |
setenforce Permissive | |
sed -i "s/^HOSTNAME=.*/HOSTNAME=${ZABBIX_HOSTNAME}/g" /etc/sysconfig/network | |
echo "${ZABBIX_HOSTNAME}" > /etc/hostname |
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 | |
ARRAY_ACCESS_KEY="conta001,KEY_ID,ACCESS_KEY:conta002,KEY_ID,ACCESS_KEY" | |
function ec2-public { | |
export AWS_DEFAULT_OUTPUT="json" | |
aws ec2 describe-instances | jq -r --arg ACCOUNT "${1}" --arg REGION "${2}" --arg TYPE "EC2" '.Reservations[] | .Instances | map((.PublicDnsName|tostring), (.PublicIpAddress|tostring), $ACCOUNT, $REGION, $TYPE) | @csv' | grep -v '"","null"' | |
} | |
function eip-public { |
A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."
- Does the design expect failures to happen regularly and handle them gracefully?
- Have we kept things as simple as possible?
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 | |
USER=$1 | |
PASS=$2 | |
GROUPOLD=$3 | |
GROUPNEW=$4 | |
JIRAURL="https://dafiti.jira.com/rest/api/2" | |
STARTAT=0 | |
MAXRESULT=50 |