Skip to content
Snippets Groups Projects
Commit bc27727d authored by Michiel de Jong's avatar Michiel de Jong
Browse files

using just Docker and bash

parent f7de9058
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@ Make sure you read [getting started](getting-started-as-a-hoster.md) first.
### Prepare your orchestration data
* Get a CoreOS server, for instance from [RackSpace](rackspace.com), [Vultr](vultr.com), or [Hetzner](http://serverboerse.de/).
* We aim to also support Ubuntu 14.10, but this is currently blocked by issue [#44](https://github.com/indiehosters/indiehosters/issues/44)
* If you prefer another operating system, you can also run our Docker images [using just Docker and bash](using-just-docker-and-bash.md).
* If you didn't add your public ssh key during the order process (e.g. through your IaaS control panel or a cloud-config file),
scp your laptop's public ssh key (probably in `~/.ssh/id_rsa.pub`) to `.ssh/authorized_keys` for the remote user
you will be ssh-ing and scp-ing as (the default remote user of our deploy scripts is 'core').
......
# Work in progress
We try to support ubuntu 14.10, but this is blocked by [#44](https://github.com/indiehosters/indiehosters/issues/44)
To run an IndieHosters on ubuntu 14.10 (earlier versions will not work), run something like:
````bash
apt-get update && apt-get -y upgrade && apt-get -y dist-upgrade
dpkg-reconfigure -plow unattended-upgrades
# set unattended upgrades to 'Yes'
apt-get -y install systemd-sysv git docker.io
printf '#!/bin/sh\ndocker run --net=host quay.io/coreos/etcd:v0.4.6 /etcdctl $1 $2 $3 $4' > /usr/local/bin/etcdctl
chmod u+x /usr/local/bin/etcdctl
printf "[Unit]\nRequires=docker.service\nAfter=docker.service\n[Service]\nRestart=always\n\
ExecStartPre=-/usr/bin/docker kill etcd\n\
ExecStartPre=-/usr/bin/docker rm etcd\n\
ExecStart=/usr/bin/docker run \
--name etcd \
-p 127.0.0.1:4001:4001 \
quay.io/coreos/etcd:v0.4.6\n\
ExecReload=/usr/bin/docker restart etcd\n\
ExecStop=/usr/bin/docker stop etcd\n\
[Install]\n\
WantedBy=multi-user.target\n" > /etc/systemd/system/etcd.service
shutdown -r now
````
````
systemctl enable etcd
systemctl start etcd
systemctl list-units
docker ps
etcdctl ls
etcdctl help
````
Now follow the [CoreOS-based instructions](deploying-a-server.md)
# Using just Docker and bash
## 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:
````bash
apt-get update && apt-get -y upgrade && apt-get -y dist-upgrade
apt-get -y install unattended-upgrades
dpkg-reconfigure -plow unattended-upgrades
# set unattended upgrades to 'Yes'
apt-get -y install docker.io
ssh-keygen -t rsa
````
Then I added the .ssh/id_rsa.pub to .ssh/authorized_keys at both backup server accounts, and ran:
````
mkdir -p /data
cd /data
git clone git@bu25:postfix
git clone git@bu25:haproxy
docker run -d -v /data/haproxy:/etc/haproxy -p 80:80 -p 443:443 indiehosters/haproxy
docker run -d --name postfix-forwarder -v /data/postfix:/data -p 25:25 indiehosters/postfix-forwarder
````
And then for each domain I host:
````
cd /data
git clone git@bu25:michielbdejong.com
docker run -d --name michielbdejong.com -v /data/michielbdejong.com:/data indiehosters/lamp-git
````
Now the only thing you need to do is to get each backend IP address from `docker inspect michielbdejong.com` and edit `/data/runtime/haproxy/haproxy.cfg` with the correct IP address.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment