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 | |
# Note that the -k flag here means we are ignoring cert warnings. | |
# If security matters you should use the Circonus cert provided | |
# here: http://login.circonus.com/pki/ca.crt | |
KEY=$1 | |
VALUE=$2 | |
ENDPOINT_URL=$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
> svcprop /application/management/redis | grep "^start" | |
start/exec astring /usr/local/bin/redis-server\ /etc/redis/redis.conf\ \& | |
start/timeout_seconds count 60 | |
start/type astring method | |
> svcprop /application/management/redis | grep "^stop" | |
stop/exec astring /usr/bin/bash\ -c\ \'LISTEN=\`netstat\ -an\ \|\ grep\ \"127.0.0.1.6379\"\ \|\ grep\ LISTEN\`\;\ if\ [\ !\ -z\ \"$LISTEN\"\ ]\;\ then\ /usr/local/bin/redis-cli\ -h\ 127.0.0.1\ -p\ 6379\ shutdown\;\ fi\' | |
stop/timeout_seconds count 300 | |
stop/type astring method |
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
> prstat -s rss -mL | |
PID USERNAME USR SYS TRP TFL DFL LCK SLP LAT VCX ICX SCL SIG PROCESS/LWPID | |
78760 root 0.0 0.0 0.0 0.0 0.0 100 0.0 0.0 0 0 0 0 redis-server/3 | |
78760 root 0.0 0.0 0.0 0.0 0.0 100 0.0 0.0 0 0 0 0 redis-server/2 | |
78760 root 0.2 0.1 0.0 0.0 0.0 0.0 100 0.0 508 0 1K 0 redis-server/1 | |
15224 root 0.0 0.0 0.0 0.0 0.0 100 0.0 0.0 0 0 0 0 redis-server/3 | |
15224 root 0.0 0.0 0.0 0.0 0.0 100 0.0 0.0 0 0 0 0 redis-server/2 | |
15224 root 0.2 0.1 0.0 0.0 0.0 0.0 100 0.0 504 0 1K 0 redis-server/1 | |
16265 root 0.0 0.0 0.0 0.0 0.0 100 0.0 0.0 0 0 0 0 redis-server/3 | |
16265 root 0.0 0.0 0.0 0.0 0.0 100 0.0 0.0 0 0 0 0 redis-server/2 |
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
## Dedicated 32-core compute nodes | |
4994a399-ff31-4a85-91c0-80bc5501dfb2 Memory size: 32768 Megabytes caps:4:cpucaps_zone_4:baseline 482 cpu_alloc:32 zone.cpu-shares privileged 256 - none - | |
12b5afe2-dc4a-4578-b70b-d0a9731f23fd Memory size: 32768 Megabytes caps:4:cpucaps_zone_4:baseline 482 cpu_alloc:32 zone.cpu-shares privileged 256 - none - | |
669e78bf-23fb-4187-9a23-203099f81488 Memory size: 32768 Megabytes caps:5:cpucaps_zone_5:baseline 482 cpu_alloc:32 zone.cpu-shares privileged 256 - none - | |
25f3a19b-a0b8-4968-a69b-1d425d07a945 Memory size: 32768 Megabytes caps:5:cpucaps_zone_5:baseline 482 cpu_alloc:32 zone.cpu-shares privileged 256 - none - | |
bb6838d3-40d4-4fcf-be1a-4f9d4b531365 Memory size: 32768 Megabytes caps:6:cpucaps_zone_6:baseline 482 cpu_alloc:32 zone.cpu-shares privileged 256 - none - | |
e7e99079-fb23-467d-9139-606c50b9b803 Memory size: 32768 Megabytes caps:6:cpucaps_zone_6:baseline 482 cpu_alloc:32 zone.cpu-shares privileged 256 - none - | |
2226eff3-ce6c-4ca |
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
require 'spec_helper' | |
describe "Dockerfile" do | |
before(:all) do | |
image = Docker::Image.build_from_dir('.') do |v| | |
if (log = JSON.parse(v)) && log.has_key?("stream") | |
$stdout.puts log["stream"] | |
end | |
end |
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
require 'docker' # see https://rubygems.org/gems/docker-api | |
require 'serverspec' # see http://serverspec.org | |
set :backend, :exec | |
Excon.defaults[:write_timeout] = 1000 | |
Excon.defaults[:read_timeout] = 1000 |
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
## curl the raw version of this gist like this: | |
## curl -s -L https://gist.github.com/bixu/5316445/raw/[revision]/ruby-2.0.0-p0+on+smartos | bash | |
pkgin -y install build-essential libyaml readline libxml2 libxslt postgresql92-client | |
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv | |
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile |
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
{ | |
"brand": "joyent", | |
"image_uuid": "cf7e2f40-9276-11e2-af9a-0bad2233fb0b", | |
"max_physical_memory": 512, | |
"quota": 20, | |
"nics": [ | |
{ | |
"nic_tag": "admin", | |
"ip": "dhcp", | |
"primary": true |
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
## these are 8GB smartmachine zones | |
> prctl -n zone.cpu-shares -i zone $(zonename) | |
zone: 57: 81bfaea9-a15f-4d54-b5f4-f4b80082d528 | |
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT | |
zone.cpu-shares | |
usage 8.19K | |
privileged 8.19K - none - | |
system 65.5K max none - |
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
[root@08-00-27-ca-21-aa ~]# vmadm create -f /etc/base64.1.8.1.json | |
UNCAUGHT EXCEPTION (acff1491): dumping core | |
/usr/vm/sbin/vmadm:645:28 | |
fs.readFile (fs.js:176:14) | |
Object.oncomplete (fs.js:297:15) | |
Abort (core dumped) |