-
Install Java 8 (default jdk)
sudo apt-get update
sudo apt-get install default-jdk
java -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
import requests | |
import json | |
import boto | |
import socket | |
HOSTNAME = socket.gethostbyaddr(socket.gethostname())[0] | |
JOB_TRACKER_URL = "http://" + HOSTNAME + ":8088/ws/v1/cluster/metrics/" | |
config = json.load(open("config.json")) | |
METRIC_NAMESPACE = config['namespace'] |
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
{ | |
"id": "/production.docker-registry-v2", | |
"cmd": null, | |
"cpus": 1, | |
"mem": 2048, | |
"disk": 2048, | |
"instances": 1, | |
"constraints": [ | |
[ | |
"lifecycle", |
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
package checks | |
import ( | |
"fmt" | |
"time" | |
"strings" | |
maps "github.com/ashwanthkumar/golang-utils/maps" | |
"github.com/gambol99/go-marathon" | |
) |
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 | |
# Ensure we're not running as root | |
if [ $EUID -eq 0 ] ; then | |
echo "Do not run as root!" 1>&2 | |
exit 1 | |
fi | |
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 | |
# Ensure we're not running as root | |
if [ $EUID -eq 0 ] ; then | |
echo "Do not run as root!" 1>&2 | |
exit 1 | |
fi | |
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
# knife cheat | |
## Search Examples | |
knife search "name:ip*" | |
knife search "platform:ubuntu*" | |
knife search "platform:*" -a macaddress | |
knife search "platform:ubuntu*" -a uptime | |
knife search "platform:ubuntu*" -a virtualization.system | |
knife search "platform:ubuntu*" -a network.default_gateway |
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
repo = '%s-tools' % node['lsb']['codename'] | |
apt_repository 'scalyr-agent-2' do | |
uri 'http://10.100.0.xx/repo/snapshots' | |
arch 'amd64' | |
distribution repo | |
components [repo] | |
key 'http://10.100.0.xx/repo/bjn.gpg' | |
end | |
package 'scalyr-agent-2' do |