Created
January 12, 2016 17:06
-
-
Save dhinus/3f40a4d17b0d0c42a92d to your computer and use it in GitHub Desktop.
Installing Dokku on AWS Ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e # Exit on errors | |
# Docker | |
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list | |
# Dokku | |
wget -nv -O - https://packagecloud.io/gpg.key | sudo apt-key add - | |
echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ trusty main" | sudo tee /etc/apt/sources.list.d/dokku.list | |
sudo apt-get update | |
# sudo DEBIAN_FRONTEND=noninteractive apt-get upgrade -y | |
# Setting some options for the dokku deb package | |
echo "dokku dokku/vhost_enable boolean true" | sudo debconf-set-selections | |
echo "dokku dokku/web_config boolean false" | sudo debconf-set-selections | |
echo "dokku dokku/hostname string dokku.example.com" | sudo debconf-set-selections | |
echo "dokku dokku/key_file string /home/ubuntu/.ssh/authorized_keys" | sudo debconf-set-selections | |
sudo apt-get install -y docker-engine dokku | |
sudo dokku plugin:install-dependencies --core | |
sudo reboot |
@josegonzales yeah, that page is where I started from. :) I think the Docker .deb package suggests you to reboot but I will double check if it's really necessary.
A pretty cool thing is that I can run this script from Terraform and I get from zero to a running Dokku with a simple terraform apply
. I was thinking of sharing the Terraform config as well, I just need to remove a few hardcoded values that are specific to my Amazon account.
The deb package is probably detecting that it needs to enable aufs, hence the reboot.
Evolving into this: https://github.com/dhinus/dokku-terraform
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
More or less what we do in our installation notes here for "unattended" installations.
Why did you trigger a reboot?