Commit Graph

179 Commits

Author SHA1 Message Date
Girish Ramakrishnan 691f6c7c5c Use docker 1.12.5
Docker uses an embedded DNS server (127.0.0.11) for user defined networks (UDN).

With the latest releases of docker, specifying 127.0.0.1 as --dns makes the
containers resolve 127.0.0.1 _inside_ the container's networking namespace
(not sure how it worked before this).

The next idea was to only specify --dns-search=. but this does not work.
This makes docker setup the containers to use 127.0.0.1 (or 127.0.0.11 for UDN).
In my mind, the UDN case should work but doesn't (not sure why).

So, the solution is to simply go with no --dns or --dns-search. Sadly,
setting dns-search just at container level does not work either :/ Strangely,

    docker run --network=cloudron --dns-search=. appimage  # does not work

    docker run --network=cloudron appimage # works if you manually remove search from /etc/resolv.conf

So clearly, something inside docker triggers when one of the dns* options is set.

This means that #130 has to be fixed at app level (For Go, this means to use the cgo resolver).
2016-12-28 08:57:48 -08:00
Girish Ramakrishnan f5eb5d545f use node 6.9.2 LTS 2016-12-28 08:57:43 -08:00
Girish Ramakrishnan 103019984b Move firewall setup to container.sh
Part of #152
2016-12-28 08:57:20 -08:00
Girish Ramakrishnan 01126aaeea move ssh configuration to container.sh
Note: appstore requires to be fixed to start the provisioning on port 22

Part of #152
2016-12-28 08:57:13 -08:00
Girish Ramakrishnan a6ab8ff02f Mount the btrfs user home data in container.sh
This allows it to be configurable easily at some point

Part of #152
2016-12-28 08:56:55 -08:00
Girish Ramakrishnan b89886a945 Move systemd service creation scripts to container.sh
Part of #152
2016-12-28 08:56:46 -08:00
Girish Ramakrishnan d12b71f69c move journald configuration to container.sh
Part of #152
2016-12-28 08:56:06 -08:00
Girish Ramakrishnan 53c2ed3c82 configure time in container.sh 2016-12-28 08:55:56 -08:00
Girish Ramakrishnan 148c8e6250 Give user access to system logs in container.sh
Part of #152
2016-12-28 08:55:43 -08:00
Girish Ramakrishnan c5ca64af50 cloudron-version is cloudron-setup specific 2016-12-28 08:46:40 -08:00
Girish Ramakrishnan af1e83f12a Remove DO specific grub cmd line
The new DO images have a different label causing DO images to not boot
    root@ubuntu-2gb-sfo1-01:~# e2label /dev/vda1
    cloudimg-rootfs

net.ifnames=0 is used get unpredictable names as per
https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/.
Not sure why we want that.

Not sure about notsc and clocksource.

This change also preserves any existing cmdline
2016-12-22 12:34:23 -08:00
Girish Ramakrishnan 0ec55b0cd4 Unset dns search
This makes sure that the host dns search is not carried over to the
containers

Fixes #130
2016-12-15 14:13:39 -08:00
Johannes Zellner 805125b17f Only reload sshd for caas 2016-12-06 18:41:06 +01:00
Johannes Zellner 0baf092ba4 Ensure we have iptables installed
Fixes #122
2016-12-02 17:13:47 +01:00
Johannes Zellner 7c27f01ab8 Do not automatically enable root ssh access
With our current self-hosting installation process, this
is not longer required. It should be the users responsibility
to gain access to his server. For Cloudron managed hosting,
this does not apply as we always create servers with ssh keys.

Also do not tinker with the sshd configs. The user may choose
to use access via password.

Fixes #104
2016-11-17 16:28:32 +01:00
Girish Ramakrishnan cde7599f87 Choose default confs
Fixes #92
2016-11-08 15:36:48 +05:30
Johannes c9e7308f49 Attempt to set kernel params for generic provider
This is useful for running ubuntu on hardware or in virtualbox
2016-11-08 09:35:18 +01:00
Johannes 4668e3a771 Rename box-setup to cloudron-system-setup
This shell script and the associated systemd service
are hooks to setup the system like swap and volumes
It is part of the base image
2016-11-06 14:30:26 +01:00
Johannes 342dd26645 No need to run npm install for the installer anymore 2016-11-06 14:29:41 +01:00
Johannes 8e03295362 Remove the cloudron-installer systemd unit file 2016-11-06 14:29:41 +01:00
Girish Ramakrishnan 7672bc0c40 Add -y to update 2016-10-26 11:07:36 -07:00
Johannes bd163327be Do not disable nginx service 2016-10-25 13:57:25 +02:00
Johannes 6660ef2ff3 Let the cloudron-version tool resolve the version string 2016-10-25 13:13:04 +02:00
Johannes dd9c594387 Install cloudron-version tool 2016-10-25 11:27:04 +02:00
Girish Ramakrishnan 15cfbe3f99 Initial version of configure style cloudron-setup script 2016-10-25 00:07:46 -07:00
Girish Ramakrishnan c8a04f8707 remove code that stops nginx 2016-10-24 14:41:26 -07:00
Johannes 8efa75e5d6 Only use ssh port 202 with caas 2016-10-24 15:56:24 +02:00
Girish Ramakrishnan b9ff8a2cef start the installer 2016-10-21 16:22:25 -07:00
Girish Ramakrishnan e63ef4c991 Extract properly 2016-10-21 16:21:09 -07:00
Girish Ramakrishnan 1244a73a19 run the install web ui on port 80 2016-10-21 16:04:08 -07:00
Girish Ramakrishnan 64f3b45eef download installer in base image script 2016-10-21 15:52:40 -07:00
Girish Ramakrishnan d494129353 default provider to generic 2016-10-21 12:58:01 -07:00
Girish Ramakrishnan ef27a17cae Only update grub if we modified grub 2016-10-11 18:22:27 -07:00
Girish Ramakrishnan 74ffd5c2d3 Fix bash syntax 2016-10-11 16:24:47 -07:00
Girish Ramakrishnan 3a259e9ce0 add some hacks for scaleway
* load loop module if not autoloaded
* allow NBD ports (https://community.online.net/t/how-to-configures-iptables-with-input-rules-with-dynamic-nbd/303/31)
2016-10-11 15:21:10 -07:00
Girish Ramakrishnan 63a0c69e76 modify grub only for ec2 2016-10-08 13:23:45 -07:00
Johannes Zellner 9d98f9fcf5 Retry npm install in base image script 2016-09-07 14:19:29 +02:00
Johannes Zellner 2ce6791771 Make cloudron-installer depend on box-setup service
Part of #37
2016-09-07 12:10:03 +02:00
Girish Ramakrishnan 5b53280cd4 make baseImage an array 2016-08-20 10:24:29 -07:00
Girish Ramakrishnan ba4bb1fd90 box-setup must be run before nginx
nginx configs are in the data volume which get mounted only after
box-setup script.

part of #8
2016-08-19 19:37:44 -07:00
Girish Ramakrishnan bbbc3837b0 box-setup: run before sshd since we modify ssh config files 2016-08-19 19:34:58 -07:00
Girish Ramakrishnan 311e997619 DO: do-resize service has folded into cloud-init 2016-08-19 19:34:12 -07:00
Girish Ramakrishnan 6cfb8226a9 we are tied to docker 1.10 for now 2016-08-11 16:29:03 -07:00
Girish Ramakrishnan 19fad669f1 Use the unbound dns server
docker filters out the localhost in /etc/resolv.conf by design
and will use the Google DNS nameservers as fallback.

https://docs.docker.com/engine/userguide/networking/configure-dns/
2016-08-11 14:52:34 -07:00
Girish Ramakrishnan 7bc5ae17cc Use unbound as nameserver
DO uses Google nameservers by default. This causes RBL queries to fail.

Can be tested with the following command:
$ host 2.0.0.127.zen.spamhaus.org
Host 2.0.0.127.zen.spamhaus.org not found: 3(NXDOMAIN)

With unbound we get:
$ host 2.0.0.127.zen.spamhaus.org
2.0.0.127.zen.spamhaus.org has address 127.0.0.2
2.0.0.127.zen.spamhaus.org has address 127.0.0.10
2.0.0.127.zen.spamhaus.org has address 127.0.0.4

Also, we do not use dnsmasq because it is not a recursive resolver. It will
always forward and this defaults to the value in /etc/network/interfaces
(which is Google DNS on DO!).
2016-08-11 10:32:54 -07:00
Johannes Zellner 65994f307f Make infra_version.js option and fix base image on DO 2016-08-10 12:45:23 +02:00
Johannes Zellner c6c36a4f3c Also make box-setup.service depend on cloud-init for ec2 2016-06-22 10:21:56 +02:00
Johannes Zellner 2a3640032f Remove obsolete SELFHOSTED env 2016-06-22 10:21:56 +02:00
Girish Ramakrishnan d51d2e5131 start addons and apps in the cloudron network
also remove getLinkSync, since we don't use linking anymore
2016-06-17 09:18:10 -05:00
Johannes Zellner 984a191e4c Use the variable correctly 2016-06-09 14:24:53 +02:00