Fastest deploy of Dokku server

dreamcompute

#1

I’m looking into how I can speed up launching an Ubuntu instance with Dokku.

I’m considering using Terraform, but I’ve read that it takes 5 minutes to setup Dokku with Terraform. See here: https://github.com/dhinus/dokku-terraform

Is there a faster way (ideally less than a minute) to launch an instance like this?

For example, DigitalOcean provides a Dokku image (as mentioned here).

Perhaps there is a way to set this up manually?

Would using snapshots be fast/stable enough?

Thanks!


#2

The quickest way I know is to follow the tutorial I posted a while ago. The gist of it is to use openstack client to create a server and install dokku, all in one command:

$ source openrc.sh
$ openstack server create
--image Ubuntu-16.04
--flavor gp1.semisonic
--security-group default
--key-name $YOUR_SSH_KEYNAME
--user-data dokku-cloudinit.sh
my-dokku-server

the content of dokku-cloudinit.sh file is on https://help.dreamhost.com/hc/en-us/articles/222729527-How-to-deploy-Dokku-on-Ubuntu-using-cloud-init with a longer explanation of what’s going on.

Hope this helps


#3

Is it possible to use a VM image with Docker pre-installed?

Or are the benefits of doing so negligible? .


#4

You can get Docker installed at the same time that you order to create a new machine. Use the same cloud-init concept I used to install Dokku at boot time to apt install docker and you’ll have it. It’s a lot quicker than you think, plus this way you get the official Docker package installed.


#5

It looks like the “Configuration Script” isn’t being used.

This is the script I’m using: https://pastebin.com/raw/pZBEefsU

When I ssh into the DreamCompute instance and run which dokku and which docker, neither command exists.

But the script does exist at /var/lib/cloud/instance/user-data.txt

Is there something I need to do to use that script?


#6

Uhm… I need more info to give you an answer: how you you start the new machine? Share the exact command (if you use openstack client, or screenshots if you used the web UI). Is there anything related to cloud-init in the instance’s log (you can see them in the web UI, click on the instance and then on the Log tab)?