Rackspace cloud server – create swap file

Most Rackspace cloud servers now have swap off by default and while it’s not a good idea to use it a lot, you also don’t want ugly stuff to happen once you get close to the physical memory limit, so in some cases, it’s good to allow for some swap. You can set a memory alert so you know how often you are using it and make changes as required.

see: http://www.rackspace.com/knowledge_center/article/create-a-linux-swap-file

sudo fallocate -l 1G /mnt/1GB.swap
# OR #
sudo dd if=/dev/zero of=/mnt/1GB.swap bs=1024 count=1048576
sudo mkswap /mnt/1GB.swap
sudo swapon /mnt/1GB.swap
# Add this line to the end of /etc/fstab to make the change permanent:
sudo echo '/mnt/1GB.swap  none  swap  sw 0  0' >> /etc/fstab
# To change the swappiness value edit /etc/sysctl.conf and add/EDIT the following line.
# vm.swappiness=10
# Check that the swap file was created.
sudo swapon -s
# Reboot the server to ensure that the changes go into effect:
/sbin/shutdown -r now

Rackspace API: Trove install to enable root user for cloud DB

Rackspace Trove set-up:

Mac OSX:

sudo easy_install pip
sudo pip install python-troveclient

# trove:
# http://docs.rackspace.com/cdb/api/v1.0/cdb-getting-started/content/Install_Trove_Client.html

trove list
trove root-enable