cat /proc/sys/net/bridge/bridge-nf-call-iptables
sysctl vm.swappiness=0
swapoff -a
8.34.208.0/20 | |
8.35.192.0/21 | |
8.35.200.0/23 | |
23.236.48.0/20 | |
23.251.128.0/19 | |
35.184.0.0/14 | |
35.188.0.0/15 | |
35.190.0.0/17 | |
35.190.128.0/18 | |
35.190.192.0/19 |
People experimenting with kubernetes clusters on the GKE not necessarily have money to keep a full cluster on at all time. GKE clusters can be easily resized, but this still incurs in the full instance cost when the cluster is up.
Google has added preemptible instances that are ideal for many
# Cache 10GB for 1 Month | |
proxy_cache_path /var/cache/nginx keys_zone=GS:10m inactive=720h max_size=10240m; | |
upstream gs { | |
server 'storage.googleapis.com:80'; | |
keepalive 100; | |
} | |
server { | |
set $my_domain "yourdomain.com"; |
# thanks to | |
# http://darkpan.com/files/plenv-imagemagick.txt | |
# for original info. | |
Installing ImageMagick (Image::Magick) on a custom Perl installed via plenv | |
- plenv | |
git clone git://github.com/tokuhirom/plenv.git ~/.plenv | |
echo 'export PATH="$HOME/.plenv/bin:$PATH"' >> ~/.bash_profile | |
echo 'eval "$(plenv init -)"' >> ~/.bash_profile |
diff --git a/Gemfile b/Gemfile | |
index 30c8aab..451aa31 100644 | |
--- a/Gemfile | |
+++ b/Gemfile | |
@@ -12,6 +12,11 @@ group :assets do | |
gem 'uglifier', '>= 1.0.3' | |
end | |
+#uhhhhhhhhhhhhhhhhhhhhhhhhh... | |
+gem 'therubyracer', '=0.11.4' |
So, to get something like /etc/rc.local
you can use the custom SMF import facility. (See the source
for more information about how this actually works.)
/opt
is mounted out of zones/opt
by default. You can create a directory /opt/custom/smf
and populate it with SMF manifests. Any manifests you put in there will be imported by SmartOS when it boots. Below is an example SMF manifest that simply starts /opt/custom/bin/postboot
, a self-explanatory shell script that you can use like /etc/rc.local
.
Note that it would likely be better to customise and respin your own images, as putting a bunch of platform state in the zones pool undoes some of the benefits of the ramdisk platform architecture that SmartOS has.
# This document describes updating the SmartOS boot_archive and /usr volumes. | |
# | |
# The boot_archive effectively contains /. If you want to make changes to SMF | |
# or so forth, you need to update the boot_archive. | |
# | |
# If you want to add things to /usr, such as drivers, you will need to update | |
# usr.lgz. It is compressed, so note the lofiadm -U and -C calls below. Once | |
# you have updated usr.lgz you will need to copy it back to the mounted | |
# boot_arhive. | |
# |
# Update, upgrade and install development tools: | |
apt-get update | |
apt-get -y upgrade | |
apt-get -y install build-essential | |
apt-get -y install git-core | |
# Install rbenv | |
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv | |
# Add rbenv to the path: |