Commit Graph

6 Commits

Author SHA1 Message Date
dc3683af47 Dynamic worker pools
Dynamic Pools allow you to spin up or remove virtual machines running
Flamenco Worker. Pools can be resized from the Flamenco Manager
dashboard.

The code architecture is mostly set up to support multiple platforms
(like Google Compute, Amazon Web Services, Azure Batch, etc.). Currently
only support for Microsoft Azure Batch has been implemented. To really
properly support multiple platforms some changes will have to be made,
but those are better made when there are actually multiple platforms to
support.

The pool status is polled periodically using the platform's API. The
polling period is dynamic, and depends on whether the Manager dashboard
is actually open in a browser window.
2019-05-03 15:02:49 +02:00
715faa6852 Automatic TLS certificate'ing with Let's Encrypt
To use Let's Encrypt:
- Set `acme_domain_name` to the domain name of the machine.
- Set both `listen` and `listen_https` to the ports Flamenco Manager
  should be listening to. By default these are `:8080` and `:8443`.
- Configure your firewall or user-facing proxy to forward ports 80 and
  443 to respectively 8080 and 8443.

Other changes:
- Added setting `listen_https` which is used for serving HTTPS traffic
  (default `:8443`). If you are using the `tlskey`/`tlscert` settings, you
  need to move `listen` to `listen_https`.
- Changed the default value for `listen` to `:8080` (was `:8083`).

The changes to the default were somewhat necessary to get to more
standard port numbers; it would be silly to add the standard port number
8443 and still keep using the nonstandard 8083.

A new webserver wrapper was introduced that manages both the HTTP and
HTTPS servers as a single unit. When using ACME/Let's Encrypt it is
necessary to have both HTTP (for the ACME web authentication) and HTTPS
(for regular traffic). All other HTTP traffic is redirected to HTTPS on
port 443. This does *not* redirect to the configured `listen_https` port
because firewall-based redirection or reverse proxies may be in use.
Actually, this is recommended because then Flamenco Manager doesn't need
to be run as root.
2019-04-19 13:53:32 +02:00
2ef566ff47 Allow toggling between normal and setup mode from the web
This makes it possible to enter setup, alter config, and restart into
normal mode, all from the web interface.
2019-03-21 15:06:55 +01:00
c911cf2371 Removed LICENSE BLOCK lines + moved license block to top of file
The LICENSE BLOCK lines were there because Blender does that too, but they
are being/have been removed from the Blender sources.

Apparently when there is a newline between the comment and the `package`
keyword, it's no longer interpreted as package documentation (which is why
I had the comment below the `package` keyword in the first place).
2019-03-21 14:06:10 +01:00
a83a7e849e Better documentation of CLI args 2019-03-21 12:24:14 +01:00
7ef7774f7e Split main.go into several smaller files + renamed httpendpoints.go
- `main.go`: entry point and HTTP server
- `normalmode.go`: service management + HTTP routes for normal operation
- `normalendpoints.go`: renamed from  `httpendpoints.go` to match
    `normalmode.go`
- `programstate.go`: CLI arguments, service pointers, and shutdown routine
- `setupmode.go`: HTTP routes for setup mode
- `restart.go`: code for handling restarting the process

There are no functional/semantic changes.
2019-03-21 11:55:52 +01:00