pkg_add http://pkgsrc.joyent.com/sdc6/2012Q1/i386/All/smtools
# note this is going to shut down the VM
sm-prepare-image
Purpose: To prevent scheduler collapse by disabling scheduler sleep periods. | |
This patch is relative to R16B01 pre-release but may be applied (with "fuzz") | |
on R15B01 and R15B03-1 without difficulty. | |
The new flag, "+zdss", must be used with "+scl false" flag to be successful. | |
See the erl.xml document for a description. Example use: | |
erl +scl false +zdss 500:500 | |
Note that this flag used to be called "+zdnfgtse" |
# These are bash functions. You can just source them on startup based on uname | |
# if you use the same dotfiles for all systems. | |
function listUsers() { | |
dscl . -list /Users UniqueID; | |
} | |
function listGroups() { | |
dscl . -list /Groups PrimaryGroupID; | |
} |
When you build Erlang/OTP on OS X, it unfortunately defaults to handling a maximum of 1024 file descriptors. You can get around this limitation with the right combination of configuration options and manual changes to a generated config file.
First, go into your unpacked Erlang/OTP source directory and run the following command, replacing the value 10000 with whatever value you want for max file descriptors:
perl -i -pe 's/(define\s+FD_SETSIZE\s+)\d+/\1 10000/' erts/config.h.in
Next, when you run configure
in your Erlang/OTP source directory, be sure to include the right CFLAGS
setting, as shown below:
CFLAGS='-DREDEFINE_FD_SETSIZE -DFD_SETSIZE=15000 -D_DARWIN_UNLIMITED_SELECT' ./configure --enable-kernel-poll <other options>
For a moment, I'm going to throw away my automation and configuration management hat. I'll let you know when I put it back on. Also, let's ignore that we're talking about Riak specifically for a moment. Also also, let's ignore any (for a brief moment) the proper role of a package manager.
If you're writing server software, you have two target markets. The system administrator/operations team and the developer.
The main reason you want autostart is to get people up and running quickly. To do this, you need to ship safe and sane defaults. This means something like a default configuration that listens only on localhost.
%%% Run with 'escript app_deps.erl' | |
%%% Change the path in filelib:wildcard/1 as required to capture all | |
%%% your dependencies. | |
%%% | |
%%% Rectangular nodes will represent library apps (no processes involved) | |
%%% and the circular nodes will represent regular apps. An arrow going from | |
%%% 'A -> B' means 'A depends on B'. | |
%%% | |
%%% This script depends on graphviz being present on the system. | |
-module(app_deps). |
Adrian -
I appreciate that you spent time in writing this post. I know I've been up until 2am writing similarly long ones as well. I will take responsibility for having what is likely an irrational response (I blame Twitter for that) to the term "NoOps", but I invite you to investigate why that might be. I'm certainly not the only one who feels this way, apparently, and thus far have decided this issue is easily the largest distraction in my field I've encountered in recent years. I have had the option to simply ignore my opposition to the term, and just let the chips fall where they may with how popular the term "NoOps" may or may not get. I have obviously not taken that option in the past, but I plan to in the future.
You're not an analyst saying "NoOps". Analysts are easy (for me) to ignore, because they're not practitioners. We have expectations of engineering maturity from practitioners in this field of web engineering, especially those we consider leaders. I don't have any expectations from analysts,
This is a mini howto on moving a subdirectory to its own repository retaining history
Assume PARENT
is the original parent Git repository (locally) and CHILD
is the new local repository that you wish to create from a subdirectory, retaining all of its history from the PARENT
repository; PARENT_PATH
and CHILD_PATH
are the paths to PARENT
and CHILD
respectively; SUBDIR is the relative path within the repository under extraction:
git clone --no-hardlinks PARENT_PATH CHILD_PATH
pushd CHILD_PATH
This post has migrated to:
https://superjamie.github.io/2014/09/21/the-8-byte-two-step-redux
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.