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
from fabric.api import * | |
env.hosts = ['host.name.com'] | |
env.user = 'user' | |
env.key_filename = '/path/to/keyfile.pem' | |
def local_uname(): | |
local('uname -a') | |
def remote_uname(): |
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
from fabric.api import * | |
from fabric.context_managers import settings | |
hosts = ['10.10.6.234', '10.10.6.65'] | |
env.user = 'ubuntu' | |
env.key_filename = '/home/as/work/credentials/pipeline.pem' | |
def local_uname(): | |
local('uname -a') | |
def remote_uname(): |
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
add-apt-repository ppa:webupd8team/java | |
apt-get update | |
apt-get install oracle-java8-installer | |
apt-get install oracle-java8-set-default |
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
# But first install Java version update 20 | |
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.5.2.zip | |
apt-get install unzip | |
unzip elasticsearch-1.5.2 -d /usr/local/elasticsearch | |
cd /usr/local/elasticsearch/elasticsearch-1.5.2/ | |
bin/plugin -install elasticsearch/elasticsearch-cloud-aws/2.4.1 | |
bin/plugin -i elasticsearch/marvel/latest | |
echo "ulimit -n 32000" > /etc/rc.local # we need to increase the max file descriptors from 4096 to 32k | |
echo "export ES_HEAP_SIZE=30g" > /etc/rc.local # keep heap size half of the total available RAM. Should be under 32g to avoid jvm issues. | |
echo "cd /usr/local/elasticsearch/elasticsearch-1.5.2/ && bin/elasticsearch -d" >> /etc/rc.local |
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
from amqplib import client_0_8 as amqp | |
conn = amqp.Connection(host="mq.example.com:5672", userid="admin", password="p@ssw0rd!", virtual_host="/", insist=False) | |
conn = conn.channel() | |
queues = ['celery'] | |
for q in queues: | |
if q: | |
#print 'deleting %s' % q |
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
wget --no-check-certificate http://www.teamviewer.com/download/teamviewer_linux.deb | |
sudo dpkg --add-architecture i386 && sudo apt-get update && sudo dpkg -i teamviewer_linux.deb && sudo apt-get install -f -y |
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
ssh-keygen -f "/home/as/.ssh/known_hosts" -R 10.10.6.193 |
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
sudo apt-get install ruby | |
sudo curl https://hub.github.com/standalone -Lo /usr/bin/hub | |
sudo chmod 755 /usr/bin/hub | |
alias git=hub |
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
tar xf archive.tar -C /target/directory --strip-components=1 | |
#Note that if your tarball already contains a directory name you want to change, adding --strip-components=1 is needed. |