source /opt/rh/ruby193/enable
./gem_reinstall.sh /opt/rh/ruby193/root/usr/bin/gem /usr/lib/ruby/gems/1.8/gems
This file contains hidden or 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
apt-get install -y supervisor unzip | |
wget https://dl.bintray.com/mitchellh/consul/0.4.1_linux_amd64.zip | |
unzip 0.4.1_linux_amd64.zip | |
mv consul /usr/local/bin/ | |
chmod +x /usr/local/bin/ | |
rm -f 0.4.1_linux_amd64.zip | |
useradd -r consul | |
mkdir /var/lib/consul | |
chown consul: /var/lib/consul |
This file contains hidden or 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
docker run -it -d --name shipyard-rethinkdb-data --entrypoint /bin/bash shipyard/rethinkdb -l | |
docker run -it -P -d --name shipyard-rethinkdb --volumes-from shipyard-rethinkdb-data shipyard/rethinkdb | |
docker run -it -p 8080:8080 -d --name shipyard --link shipyard-rethinkdb:rethinkdb shipyard/shipyard | |
docker run --name shipyard-cli --link shipyard:shipyard --rm -it shipyard/shipyard-cli | |
shipyard cli> shipyard login | |
URL: http://shipyard:8080 | |
Username: admin | |
Password: | |
shipyard cli> shipyard accounts | |
Username Role |
This file contains hidden or 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
# cwd is repository root | |
mkdir pkg | |
cd pkg | |
gox ../ | |
go-pkg-zip ./ | |
ghr -t TOKEN VERSION ./ |
This file contains hidden or 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
curl -L https://www.opscode.com/chef/install.sh | bash | |
knife configure client -s https://CHEF_SERVER_IP /etc/chef | |
chmod 600 /etc/chef/validation.pem | |
scp CHEF_SERVER_HOST:/etc/chef-server/chef-validator.pem /etc/chef/validation.pem | |
scp CHEF_SERVER_HOST:/etc/chef-server/admin.pem /etc/chef/ | |
chef-client | |
cat <<'EOF' > /root/.chef/knife.rb | |
log_level :info | |
log_location STDOUT |
This file contains hidden or 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
yum install -y curl unzip rpm-build rpmdevtools | |
curl -L -O https://dl.bintray.com/mitchellh/serf/0.6.3_linux_amd64.zip | |
unzip 0.6.3_linux_amd64.zip | |
mv serf /usr/local/bin | |
rpmdev-setuptree | |
curl -L -O http://www.qmailtoaster.com/download/stable/daemontools-toaster-0.76-1.3.6.src.rpm | |
rpmbuild --rebuild daemontools-toaster-0.76-1.3.6.src.rpm | |
rpm -ivh rpmbuild/RPMS/x86_64/daemontools-toaster-0.76-1.3.6.x86_64.rpm |
This file contains hidden or 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 | |
SAR_DIR=/var/log/sa | |
for FILE in $(ls ${SAR_DIR}); do | |
SAR_FILE="${SAR_DIR}/${FILE}" | |
sar -f $SAR_FILE >& /dev/null || rm -f $SAR_FILE && test -f $SAR_FILE || echo "removed ${SAR_FILE}" | |
done |
This file contains hidden or 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 | |
usage() { | |
echo "Usage: $(basename $0) -g|--group PARAM -n|--name PARAM_NAME -v|--value PARAM_VALUE [-p|--pending-reboot] | |
-n|--name parameter name | |
-v|--value parameter value | |
-p|--pending-reboot set ApplyMethod=pending-reboot (default: immediate) | |
-g|--group set parameter group | |
-h|--help show this help message and exit | |
" |