From aa49ed0182bd2cce9d4f214078715287302d0ddc Mon Sep 17 00:00:00 2001 From: Michiel de Jong <michiel@unhosted.org> Date: Thu, 4 Dec 2014 13:52:14 +0100 Subject: [PATCH] clarify migration format for haproxy backends --- doc/using-just-docker-and-bash.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/doc/using-just-docker-and-bash.md b/doc/using-just-docker-and-bash.md index 3748425..ce5622d 100644 --- a/doc/using-just-docker-and-bash.md +++ b/doc/using-just-docker-and-bash.md @@ -3,15 +3,22 @@ ## WARNING: Still a work-in-process Given that CoreOS is not available everywhere, and the Ubuntu 14.10 setup with etcdctl inside a Docker instance still has some problems, -I'll try if I can run all our services (postfix-forwarder, haproxy, and the various web backend containers) on an off-the-shelf Ubuntu 14.04 server. Here's what I did to prepare the server (not all servers support Docker, because of kernel modules etcetera; I used Ubuntu 12.04-64 at Gandi, and gave it 5GB of disk space and 512Mb of RAM): +I'll try if I can run all our services (postfix-forwarder, haproxy, and the various web backend containers) on an off-the-shelf Ubuntu server. +Note that not all servers support Docker, because of kernel modules etcetera; in this case I used Ubuntu 12.04-64 at Gandi, +and gave it 5GB of disk space and 512Mb of RAM. +Here's what I did to prepare the server: ````bash apt-get update && apt-get -y upgrade apt-get -y install unattended-upgrades curl git + dpkg-reconfigure -plow unattended-upgrades # set unattended upgrades to 'Yes' -curl -s https://get.docker.io/ubuntu/ | sh + ssh-keygen -t rsa +# select all the defaults by hitting <enter> repeatedly + +curl -s https://get.docker.io/ubuntu/ | sh ```` Then I added the .ssh/id_rsa.pub to .ssh/authorized_keys at both backup server accounts, and ran: @@ -28,11 +35,12 @@ TODO: document how to create and update such postfix and haproxy migration archi And then for each domain I host: ```` -cd /data git clone git@bu25:michielbdejong.com -cd michielbdejong.com; ./runme.sh --behind-haproxy; cd .. +cd michielbdejong.com; ./runme.sh; cd .. ```` TODO: document how to create and update such web app migration archives. -Now the only thing you need to do is to get each backend IP address from `docker inspect michielbdejong.com` and edit `/data/haproxy/haproxy.cfg` with the correct IP address (the idea of the `--behind-haproxy` flag would be to automate that; note that the migration format here does not include the postfix-forwarder, DNS, and DNR data). +Now the only thing you need to do is to get each backend IP address from `docker inspect michielbdejong.com` and edit `/data/haproxy/haproxy.cfg` with the correct IP address. + +The idea of this setup would be to eventually make the migration format support both single-tennant and multi-tennant setups out of the box, but for now, the per-user migration archives are just the haproxy backends, and does not include the postfix, haproxy, DNS, and DNR data. -- GitLab