From 07cb639bd580052d752eef608d08c14f8a21da02 Mon Sep 17 00:00:00 2001 From: bkniffler Date: Thu, 30 Jul 2015 23:38:27 +0200 Subject: [PATCH 1/6] Add suggestion for low memory VMs --- docs/installation.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/installation.md b/docs/installation.md index ce8148bb4..04962756a 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -29,3 +29,23 @@ As well, you may wish to customize your installation in some other fashion. or e - [Debian Package Installation Notes](http://progrium.viewdocs.io/dokku/getting-started/install/debian) - [Vagrant Installation Notes](http://progrium.viewdocs.io/dokku/getting-started/install/vagrant) - [Advanced Install Customization](http://progrium.viewdocs.io/dokku/advanced-installation) + +### VMs with less than 512mb memory +Having less than 512mb of system-memory available for dokku and its containers, for example Digital Ocean's smallest machines, might result in unexpected errors, such as **! [remote rejected] master -> master (pre-receive hook declined)** during installation of NPM dependencies (https://github.com/npm/npm/issues/3867). + +To work around this issue, it might suffice to augment the linux swap file size to a maximum of twice the physical memory size. + +To resize the swap file of a 512MB machine to 1GB, follow these steps while in SSH within your machine: +``` +root@my.droplet:/# cd /var +root@my.droplet:/# touch swap.img +root@my.droplet:/# chmod 600 swap.img + +root@my.droplet:/# dd if=/dev/zero of=/var/swap.img bs=1024k count=1000 +root@my.droplet:/# mkswap /var/swap.img +root@my.droplet:/# swapon /var/swap.img +root@my.droplet:/# free + +root@my.droplet:/# echo "/var/swap.img none swap sw 0 0" >> /etc/fstab +``` +Reference: https://www.digitalocean.com/community/tutorials/how-to-configure-virtual-memory-swap-file-on-a-vps From d66b4665d018458862304fadbb71f178a4a10245 Mon Sep 17 00:00:00 2001 From: bkniffler Date: Thu, 30 Jul 2015 23:53:01 +0200 Subject: [PATCH 2/6] Little correction --- docs/installation.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/installation.md b/docs/installation.md index 04962756a..ba7ea022f 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -30,8 +30,8 @@ As well, you may wish to customize your installation in some other fashion. or e - [Vagrant Installation Notes](http://progrium.viewdocs.io/dokku/getting-started/install/vagrant) - [Advanced Install Customization](http://progrium.viewdocs.io/dokku/advanced-installation) -### VMs with less than 512mb memory -Having less than 512mb of system-memory available for dokku and its containers, for example Digital Ocean's smallest machines, might result in unexpected errors, such as **! [remote rejected] master -> master (pre-receive hook declined)** during installation of NPM dependencies (https://github.com/npm/npm/issues/3867). +### VMs with only up to 512mb memory +Having only 512mb of system-memory available for dokku and its containers, for example Digital Ocean's smallest machines, might result in unexpected errors, such as **! [remote rejected] master -> master (pre-receive hook declined)** during installation of NPM dependencies (https://github.com/npm/npm/issues/3867). To work around this issue, it might suffice to augment the linux swap file size to a maximum of twice the physical memory size. From 003ab07ff447076a561961222bc8b3bb71fda13f Mon Sep 17 00:00:00 2001 From: bkniffler Date: Thu, 30 Jul 2015 23:57:52 +0200 Subject: [PATCH 3/6] Adapt to other shell example script --- docs/installation.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/installation.md b/docs/installation.md index ba7ea022f..cdc0c7cc3 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -36,16 +36,17 @@ Having only 512mb of system-memory available for dokku and its containers, for e To work around this issue, it might suffice to augment the linux swap file size to a maximum of twice the physical memory size. To resize the swap file of a 512MB machine to 1GB, follow these steps while in SSH within your machine: -``` -root@my.droplet:/# cd /var -root@my.droplet:/# touch swap.img -root@my.droplet:/# chmod 600 swap.img -root@my.droplet:/# dd if=/dev/zero of=/var/swap.img bs=1024k count=1000 -root@my.droplet:/# mkswap /var/swap.img -root@my.droplet:/# swapon /var/swap.img -root@my.droplet:/# free +```shell +cd /var +touch swap.img +chmod 600 swap.img -root@my.droplet:/# echo "/var/swap.img none swap sw 0 0" >> /etc/fstab +dd if=/dev/zero of=/var/swap.img bs=1024k count=1000 +mkswap /var/swap.img +swapon /var/swap.img +free + +echo "/var/swap.img none swap sw 0 0" >> /etc/fstab ``` Reference: https://www.digitalocean.com/community/tutorials/how-to-configure-virtual-memory-swap-file-on-a-vps From 3a0a8730798a903b15ce3a3fd8d570616ba6d9ef Mon Sep 17 00:00:00 2001 From: bkniffler Date: Fri, 31 Jul 2015 18:18:37 +0200 Subject: [PATCH 4/6] Move small memory instructions to advanced installation --- docs/advanced-installation.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/advanced-installation.md b/docs/advanced-installation.md index f9ec9c36a..566017c67 100644 --- a/docs/advanced-installation.md +++ b/docs/advanced-installation.md @@ -57,3 +57,24 @@ If you are using the vagrant installation, you can use the following command to $ cat ~/.ssh/id_rsa.pub | make vagrant-acl-add That's it! + +### VMs with less than 1GB of memory +Having less than 1GB of system memory available for dokku and its containers, for example Digital Ocean's small 512MB machines, might result in unexpected errors, such as **! [remote rejected] master -> master (pre-receive hook declined)** during installation of NPM dependencies (https://github.com/npm/npm/issues/3867). + +To work around this issue, it might suffice to augment the linux swap file size to a maximum of twice the physical memory size. + +To resize the swap file of a 512MB machine to 1GB, follow these steps while in SSH within your machine: + +```shell +cd /var +touch swap.img +chmod 600 swap.img + +dd if=/dev/zero of=/var/swap.img bs=1024k count=1000 +mkswap /var/swap.img +swapon /var/swap.img +free + +echo "/var/swap.img none swap sw 0 0" >> /etc/fstab +``` +Reference: https://www.digitalocean.com/community/tutorials/how-to-configure-virtual-memory-swap-file-on-a-vps From fa36d38fb7724961d5f487d027e3f29c9069aa64 Mon Sep 17 00:00:00 2001 From: bkniffler Date: Fri, 31 Jul 2015 18:19:56 +0200 Subject: [PATCH 5/6] Small fix --- docs/advanced-installation.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/advanced-installation.md b/docs/advanced-installation.md index 566017c67..c4e4644e1 100644 --- a/docs/advanced-installation.md +++ b/docs/advanced-installation.md @@ -58,7 +58,8 @@ If you are using the vagrant installation, you can use the following command to That's it! -### VMs with less than 1GB of memory +## VMs with less than 1GB of memory + Having less than 1GB of system memory available for dokku and its containers, for example Digital Ocean's small 512MB machines, might result in unexpected errors, such as **! [remote rejected] master -> master (pre-receive hook declined)** during installation of NPM dependencies (https://github.com/npm/npm/issues/3867). To work around this issue, it might suffice to augment the linux swap file size to a maximum of twice the physical memory size. From 9fb7c205df8848b9c8aab3cb3a0857775463ca0e Mon Sep 17 00:00:00 2001 From: bkniffler Date: Fri, 31 Jul 2015 18:26:07 +0200 Subject: [PATCH 6/6] Move small memory instructions to advanced installation - installation.md --- docs/installation.md | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/docs/installation.md b/docs/installation.md index cdc0c7cc3..80ac75cae 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -3,6 +3,7 @@ ## Requirements - A fresh VM running Ubuntu `14.04 x64` +- At least `1GB` of system memory ([workaround for 512MB machines](http://progrium.viewdocs.io/dokku/advanced-installation)) Ubuntu 14.04 x64 x64. Ideally have a domain ready to point to your host. It's designed for and is probably best to use a fresh VM. The bootstrapper will install everything it needs. @@ -29,24 +30,3 @@ As well, you may wish to customize your installation in some other fashion. or e - [Debian Package Installation Notes](http://progrium.viewdocs.io/dokku/getting-started/install/debian) - [Vagrant Installation Notes](http://progrium.viewdocs.io/dokku/getting-started/install/vagrant) - [Advanced Install Customization](http://progrium.viewdocs.io/dokku/advanced-installation) - -### VMs with only up to 512mb memory -Having only 512mb of system-memory available for dokku and its containers, for example Digital Ocean's smallest machines, might result in unexpected errors, such as **! [remote rejected] master -> master (pre-receive hook declined)** during installation of NPM dependencies (https://github.com/npm/npm/issues/3867). - -To work around this issue, it might suffice to augment the linux swap file size to a maximum of twice the physical memory size. - -To resize the swap file of a 512MB machine to 1GB, follow these steps while in SSH within your machine: - -```shell -cd /var -touch swap.img -chmod 600 swap.img - -dd if=/dev/zero of=/var/swap.img bs=1024k count=1000 -mkswap /var/swap.img -swapon /var/swap.img -free - -echo "/var/swap.img none swap sw 0 0" >> /etc/fstab -``` -Reference: https://www.digitalocean.com/community/tutorials/how-to-configure-virtual-memory-swap-file-on-a-vps