Skip to content

Customizing Node Configuration

John Yocum edited this page Apr 16, 2019 · 2 revisions

Rocks has integrated support for customizing the settings applied to a node during installation (deployment). Customization can include something as simple as installing additional packages, to creating custom partitions. The important thing to keep in mind is, the customization is only applied during install. If you modify the settings, the node must be reinstalled for the changes to take effect.

For computing nodes, the configuration can be customized by editing /export/rocks/install/site-profiles/7.0/nodes/extend-compute.xml. If the file doesn't exist, copy skeleton.xml to extend-compute.xml.

Once you have completed the customization, the changes must be incorporated into the local Rocks distribution.

cd /export/rocks/install/
rocks create distro

Examples

Below are some examples of configurations that can be made. For Brain, the real configuration is stored within Git.

Creating a scratch folder

Within the "post" section, you can insert standard shell commands. The commands will then be executed during the final stages of node installation. For example, you could create a scratch folder on the node's /state partition.

mkdir -p /state/partition1/scratch
chmod 1777 /state/partition1/scratch
ln -s /state/partition1/scratch /scratch

Modifying sysctl.conf

While kernel defaults are often safe values, they aren't always ideal for every situation. For example, by default Linux allocates 20% of memory for dirty pages. This is fine on small memory systems, however, it can be problematic on systems with 100s of GBs of RAM.

<file name="/etc/sysctl.conf" mode="append">
vm.dirty_bytes = 4294967296
vm.dirty_background_bytes = 2147483648
</file>