Skip to content

Instantly share code, notes, and snippets.

View ddepaoli3's full-sized avatar
🌶️
automation in progress

Daniel Depaoli ddepaoli3

🌶️
automation in progress
View GitHub Profile
@ddepaoli3
ddepaoli3 / prepare-system-sas.sh
Created October 28, 2016 13:37
default creation for sas
#!/bin/bash
yum update -y
curl -o /tmp/epel-release-latest-7.noarch.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -i /tmp/epel-release-latest-7.noarch.rpm
yum install -y etckeeper
etckeeper init
etckeeper commit -m "Initial commit"
useradd -m -U sas
useradd -m -U sasdemo
@ddepaoli3
ddepaoli3 / ssh-forward-note.txt
Last active November 5, 2016 08:53
Note su bastion host
+
| bastion-privateIP produzione-privateIP
+--+ +-------------+ | +-------------+ +------------+
| | | | | | | | |
| | | COLLAUDO | | | BASTION | | PRODUZIONE |
+--+ | | | | | | |
+------+ +-------------+ | +-------------+ +------------+
collaudo-publicIP | bastion-publicIP
LOCAL +
@ddepaoli3
ddepaoli3 / codecommit-tool.sh
Created November 30, 2016 10:56
Tools for AWS codecommit. Add ssh key into your account and create new repository
#!/bin/bash
REPONAME="reponame"
REPODESC="Description of repo"
PROFILE="profile name"
REGION="eu-west-1"
USERNAME=""
SSH_KEY=`cat ~/.ssh/id_rsa.pub`
@ddepaoli3
ddepaoli3 / codecommit and ec2 role.md
Last active September 11, 2022 15:22
How to use codecommit with IAM role without using IAM user credential
@ddepaoli3
ddepaoli3 / get_centos_7_ami.sh
Created December 13, 2016 09:46
Get Centos 7 AWS AMI list
#!/bin/bash
for region in `echo -e "us-east-1\nus-east-2\nus-west-1\nus-west-2\nap-northeast-2\nap-southeast-1\nap-southeast-2\nap-northeast-1\neu-central-1\neu-west-1"`
do
echo -e "$region" && aws --region $region ec2 describe-images --owners aws-marketplace --filters Name=product-code,Values=aw0evgkw8e5c1q413zgy5pjce --query "Images[].ImageId"
done
@ddepaoli3
ddepaoli3 / Vagrantfile
Created January 3, 2017 08:50
Vagrantfile for AWS provisioner
# https://github.com/mitchellh/vagrant-aws
# vagrant plugin install vagrant-aws
# vagrant box add dummy https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box
# vagrant up --provider=aws
Vagrant.configure("2") do |config|
config.vm.box = "dummy"
config.vm.provider :aws do |aws, override|
aws.keypair_name = "<keypair name>"

Keybase proof

I hereby claim:

  • I am ddepaoli3 on github.
  • I am danielxp (https://keybase.io/danielxp) on keybase.
  • I have a public key ASCMX_q3sMoXCdiUhkBtVd3a0l4fTy7mOrEI8MCc4y4mugo

To claim this, I am signing this object:

@ddepaoli3
ddepaoli3 / bootstrap_AWS_local_ansible_ubuntu_16_04.sh
Last active June 20, 2017 13:20
Bootstrap to install and configure ubuntu 16.04 to allow it to run ansible locally and to clone git repo from codecommit
#!/bin/bash
#Install prerequisities
sudo apt-get update
sudo apt-get install --yes python2.7 git ansible awscli
#Go to home
export HOME='/root'
cd $HOME
@ddepaoli3
ddepaoli3 / route53-update.sh
Last active March 23, 2022 07:01 — forked from phybros/update-route53.sh
BASH Script to keep Route53 updated with your current external IP address
#!/bin/bash
############
## README ##
############
#This script updates DNS with the ip of the machine from which the script is launch.
#The instance or who launch this script needs this permission to hosted zone:
#
#
# route53:ChangeResourceRecordSets