Skip to content

Instantly share code, notes, and snippets.

@scarolan
Last active December 21, 2015 22:32
Show Gist options
  • Save scarolan/eb02ae94aec2ba30b952 to your computer and use it in GitHub Desktop.
Save scarolan/eb02ae94aec2ba30b952 to your computer and use it in GitHub Desktop.
AWS Chef Workshop Files
default['web']['width'] = '1280'
default['web']['height'] = '768'
default['web']['base'] = 'http://external.kongregate-games.com/gamez/0021/4044/live/'
default['web']['src'] = 'http://external.kongregate-games.com/gamez/0021/4044/live/embeddable_214044.swf'
<html>
<body>
<img src=https://upload.wikimedia.org/wikipedia/commons/thumb/1/1d/AmazonWebservices_Logo.svg/2000px-AmazonWebservices_Logo.svg.png width=200>
<pre>
Hostname: <%= node['hostname'] %>
IP: <%= node['cloud']['public_ipv4'] %>
Memory: <%= node['memory']['total'] %>
# CPUs: <%= node['cpu']['total'] %>
Kernel: <%= node['kernel']['release'] %>
OS Version: <%= node['platform'] %> <%= node['platform_version'] %>
Zone: <%= node['ec2']['placement_availability_zone'] %>
</pre>
<embed width="<%= node['game']['width'] -%>" height="<%= node['game']['height'] -%>" base="http://external.kongregate-games.com/gamez/0024/<%= node['game']['id'] -%>/live/" src="http://external.kongregate-games.com/gamez/0024/<%= node['game']['id'] -%>/live/embeddable_24<%= node['game']['id'] %>.swf" type="application/x-shockwave-flash"></embed><br/>Play free games at <a href="http://www.kongregate.com/">Kongregate</a>
</body>
</html>
name 'web'
maintainer 'Gandalf the Grey'
maintainer_email '[email protected]'
license 'all_rights'
description 'Chef Training Dojo'
long_description 'Chef Training Dojo'
version '0.1.0'
#!/bin/sh
HOST=$(hostname)
IPADDR=$(curl -s http://169.254.169.254/latest/meta-data/public-ipv4)
MEM=$(grep MemTotal /proc/meminfo | awk '{ print $2 }')
CPUS=$(cat /proc/cpuinfo | grep processor | wc -l)
KERNEL=$(uname -r)
OSVER=$(cat /etc/redhat-release)
echo "<html><body>"
echo "<img src=https://upload.wikimedia.org/wikipedia/commons/thumb/1/1d/AmazonWebservices_Logo.svg/2000px-AmazonWebservices_Logo.svg.png width=200>"
echo "<pre>"
echo "Hostname: $HOST"
echo "IP: $IPADDR"
echo "Memory: $MEM kB"
echo "# CPUs: $CPUS"
echo "Kernel: $KERNEL"
echo "OS Version: $OSVER"
echo "</pre></body></html>"
echo ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment