Commit Graph

1537 Commits

Author SHA1 Message Date
Girish Ramakrishnan 8d944f9a4a Allow setup to be run again as long as not-activated
this is useful if the activation fails somewhere mid-way and we don't
need to re-setup the cloudron all over
2018-12-07 15:11:25 -08:00
Girish Ramakrishnan 3bad9e523c Add option to toggle app automatic updates 2018-12-07 10:02:11 -08:00
Girish Ramakrishnan dfa61f1b2d rework how app mailboxes are allocated
Our current setup had a mailbox allocated for an app during app
install (into the mailboxes table). This has many issues:

* When set to a custom mailbox location, there was no way to access
  this mailbox even via IMAP. Even when using app credentials, we
  cannot use IMAP since the ldap logic was testing on the addon type
  (most of our apps only use sendmail addon and thus cannot recvmail).

* The mailboxes table was being used to add hidden 'app' type entries.
  This made it very hard for the user to understand why a mailbox conflicts.
  For example, if you set an app to use custom mailbox 'blog', this is
  hidden from all views.

The solution is to let an app send email as whatever mailbox name is
allocated to it (which we now track in the apps table. the default is in the
db already so that REST response contains it). When not using
Cloudron email, it will just send mail as that mailbox and the auth
checks the "app password" in the addons table. Any replies to that
mailbox will end up in the domain's mail server (not our problem).

When using cloudron email, the app can send mail like above. Any responses
will not end anywhere and bounce since there is no 'mailbox'. This is the
expected behavior. If user wants to access this mailbox name, he can
create a concrete mailbox and set himself as owner OR set this as
an alias.

For apps using the recvmail addon, the workflow is to actually create
a mailbox at some point. Currently, we have no UI for this 'flow'.
It's fine because we have only meemo using it.

Intuitive much!
2018-12-06 22:13:32 -08:00
Girish Ramakrishnan 41b0c3242e Make function name clearer 2018-12-06 12:47:50 -08:00
Girish Ramakrishnan 48ed051edf Use list verb 2018-12-06 10:23:10 -08:00
Girish Ramakrishnan a5b8418845 Remove spurious success return 2018-12-04 09:34:00 -08:00
Johannes Zellner 54c96d98d1 Remove all individual test timeouts and ignore timeouts toplevel 2018-12-03 12:24:04 +01:00
Girish Ramakrishnan 2f55abfc60 Fixup logs routes as well 2018-12-02 19:07:12 -08:00
Girish Ramakrishnan f93044ac3b move routes to services.js 2018-12-02 18:46:34 -08:00
Girish Ramakrishnan 7ed422a3c1 Split out service related functions 2018-12-02 18:45:39 -08:00
Girish Ramakrishnan 823b3b8aa8 Rename addon route to service
service are the containers and other things like unbound, nginx.
addons are app development hooks.
2018-12-02 17:56:11 -08:00
Girish Ramakrishnan c72ea91743 make task args an object and put it in eventlog 2018-11-30 14:57:24 -08:00
Girish Ramakrishnan f39ce20580 better name for task functions 2018-11-30 14:41:11 -08:00
Girish Ramakrishnan 30aea047e3 startTask now takes args 2018-11-29 23:28:26 -08:00
Girish Ramakrishnan 9f4226093b Handle bad state if task is already stopped 2018-11-29 23:10:15 -08:00
Girish Ramakrishnan fca0e897b2 Add tasks.startTask 2018-11-29 16:21:04 -08:00
Johannes Zellner 289e018160 Fix comment text 2018-11-26 08:19:24 +01:00
Johannes Zellner cb6699eeed Add api to check if the server needs a reboot 2018-11-26 08:19:24 +01:00
Johannes Zellner 900c008d20 Only allow addon restarts, no start+stop 2018-11-21 16:06:58 +01:00
Johannes Zellner c1183a09a8 Add addon configure route 2018-11-21 15:47:41 +01:00
Girish Ramakrishnan e04b7b55b0 Remove upgrade flag
This is not used since ages since we changed our update methodology
2018-11-20 10:29:54 -08:00
Johannes Zellner 329cc80933 Send memory settings on addon status 2018-11-20 16:53:27 +01:00
Johannes Zellner d1818e31b0 Add addon status hooks 2018-11-20 11:09:09 +01:00
Johannes Zellner 725a7e6dec Add missing requires 2018-11-20 11:09:09 +01:00
Johannes Zellner e08b210001 Add initial addons rest apis 2018-11-20 11:09:09 +01:00
Girish Ramakrishnan 305a3c94d0 Rework the progress API to use the task progress 2018-11-19 21:06:44 -08:00
Girish Ramakrishnan 218739a6b5 Add tasks table and API
progress will be tracked with this table instead of being in-process
like progress.js
2018-11-19 17:37:42 -08:00
Girish Ramakrishnan 390e69c01c Fix backup API routes 2018-11-19 14:41:16 -08:00
Girish Ramakrishnan 8267279779 backup can now be stopped
track the backup process and killable
2018-11-17 20:31:07 -08:00
Girish Ramakrishnan 0b86070fe9 run backuptask as separate process 2018-11-17 19:38:02 -08:00
Girish Ramakrishnan 1b1945e1f5 Move out graphite from port 8000
Port 8000 is used by esxi management service (!)
2018-11-17 19:14:21 -08:00
Girish Ramakrishnan af6653dfeb do not timeout when checking for updates 2018-11-13 10:38:18 -08:00
Girish Ramakrishnan 59b6d2ef66 mail: clear timeout for dns route 2018-11-12 10:25:15 -08:00
Girish Ramakrishnan 3fb8243264 Add route to trigger app import 2018-11-11 21:58:20 -08:00
Girish Ramakrishnan b8861b9d78 Use debug instead 2018-11-11 21:57:45 -08:00
Girish Ramakrishnan aae259479f move configure webadmin and status out of setup logic 2018-11-11 09:56:01 -08:00
Girish Ramakrishnan 0c5cb9c98f Remove settings.initialize/uninitialize
this simplifies the startup sequence
2018-11-10 14:55:23 -08:00
Girish Ramakrishnan 953b55439c eventlog: add domain events 2018-11-10 01:25:34 -08:00
Girish Ramakrishnan 0d65635bc4 eventlog: add email enabled/disabled events 2018-11-10 00:17:38 -08:00
Girish Ramakrishnan 4aa76a859f eventlog: mail list add,remove events 2018-11-10 00:17:25 -08:00
Girish Ramakrishnan 003789265c eventlog: mailbox add,remove events 2018-11-10 00:06:02 -08:00
Girish Ramakrishnan 15039bf293 Fix validation of fallback certs 2018-11-05 21:13:34 -08:00
Girish Ramakrishnan eef6056174 bump timeout of setup route 2018-11-05 16:55:46 -08:00
Johannes Zellner 041285b187 Add dynamic dns settings routes 2018-10-31 16:02:51 +01:00
Girish Ramakrishnan e0b1ebba92 verifyOperator -> isUnmanaged 2018-10-30 21:17:34 -07:00
Girish Ramakrishnan eed8f109bc operator check is now directly based on edition type 2018-10-30 20:26:22 -07:00
Girish Ramakrishnan 63946509b3 Get autoconf data as separate object
This was done because restore API already takes a backupConfig.
So, it's best to split up the primary parameters and the autoconf
2018-10-30 19:27:14 -07:00
Girish Ramakrishnan 668ff99450 Add support for restricted certs as part of dns setup 2018-10-30 18:15:26 -07:00
Girish Ramakrishnan 03984a811f dnsSetup -> setup
It now takes a dnsConfig object. It will end up taking other config
objects for provisioning.
2018-10-30 14:01:02 -07:00
Girish Ramakrishnan f10b80d90d Make apps test great again 2018-10-29 12:49:41 -07:00