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 | |
sudo yum install -y nfs-utils libnfsidmap | |
# Enable the nfs client service | |
systemctl enable rpcbind | |
systemctl start rpcbind | |
mkdir /data |
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
# Put this in the User data parameter in the spot instance | |
#!/bin/bash | |
yum -y update | |
yum install -y ecs-init | |
touch /etc/ecs/ecs.config | |
echo "ECS_CLUSTER=prezpoll" > /etc/ecs/ecs.config | |
service docker start | |
start ecs |
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 | |
sudo yum makecache fast | |
sudo yum -y update | |
sudo systemctl stop firewalld && sudo systemctl disable firewalld | |
sudo sed -i s/SELINUX=enforcing/SELINUX=permissive/g /etc/selinux/config && sudo groupadd nogroup | |
sudo sed -i 's/^#\s*\(%wheel\s*ALL=(ALL)\s*NOPASSWD:\s*ALL\)/\1/' /etc/sudoers |
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
#cloud-config | |
hostname: core01 | |
ssh_authorized_keys: | |
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDArlyas86BhZq5KVK9xwnjA5FF6nzEyZv03Ln0PEJ0x90KznA7vijsXoMuu3wC/ZFzxNqdtIi8B7MwbwWi0RSBLF5BeVunA+Oun0vpEtByUEKlyKJSYSJdYmYTjU4LtwowJJQ8FNQ7KrRQyqeriTe/07i5PfuW9XzMQVje1OFV8M8xXmVxBmb1yYpfaBvuynYH6mycO6vdBxGGjmVezTwLeMNDOfEUoa+Fs+i8raMHzteNSUvbyVazCj7i4tucAhf78lpPt+pvNgELdTtyu6sOdDkfjIs/uDEOX5yrgpk0QC3n9WWZjeyBeew3H/n17yyZkU8UaZhhYt+8NmWrndhd ariv3ra@gmail.com | |
coreos: | |
etcd2: | |
# generate a new token for each unique cluster from https://discovery.etcd.io/new?size=3 |
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
# goes in file: /etc/network/interfaces | |
auto lo | |
iface lo inet loopback | |
iface eth0 inet dhcp | |
allow-hotplug wlan0 | |
auto wlan0 | |
iface wlan0 inet dhcp |
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
export PS1='$(whoami):${PWD/*\//}# ' |
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
#remove all exited docker containers | |
docker ps -a | grep Exit | cut -d ' ' -f 1 | xargs docker rm | |
# Remove all images tagged as <none> | |
docker rmi $(docker images -f "dangling=true" -q) | |
# DANGEROUS remove all images from docker | |
docker rmi $(docker images | grep "$2/\|/$2 \| $2 \|$2 \|$2-\|$2_" | awk '{print $1 ":" $2}') 2>/dev/null || echo "No images matching \"$2\" to purge." | |
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
# Search Type Commands | |
grep -Ril "text-to-find-here" / | |
# rsync command to actually sync files | |
rsync -hvrPt angel/home_angel/ /home/angel/ | |
# rsync copy over all files with all attributes | |
rsync -avP source-dir target-dir |
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
# Download and Install the Latest Updates for the OS | |
apt-get update && apt-get upgrade -y | |
# Set the Server Timezone to CST | |
echo "America/Chicago" > /etc/timezone | |
dpkg-reconfigure -f noninteractive tzdata | |
# Enable Ubuntu Firewall and allow SSH & MySQL Ports | |
ufw enable | |
ufw allow 22 |
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
# When getting access denied during upload function in arduino use this cmd to give current user permission on Ubuntu OS | |
sudo usermod -a -G dialout $USER |