govau / instant-https-boshrelease

A BOSH release for just adding HTTPS to web services
MIT License
2 stars 0 forks source link

multiple proxies #12

Open drnic opened 6 years ago

drnic commented 6 years ago

I'd like to support multiple proxies on a single VM. I cannot do this at the bosh manifest level - each instance group (a VM) can only reference a job template once. So it needs to be implemented within the proxy job template.

As an example spec, I'd like to add:

  proxies:
    description: A list of multiple proxies. Each has the same properties as above. The default value will come from above properties.
    example:
    - hostname: mainapp.com
      backends: [some-backend:8000]
    - hostname: staging.mainapp.com
      backends: [another-backend:9000]

It looks like a Caddyfile can only support a single hostname -> backends. So multiple proxies would mean multiple Caddyfiles and I guess multiple check process caddy_123 in monit.

Thoughts or preferences on an implementation?

patrickcrocker commented 6 years ago

@drnic, please take a look at the proxies branch of my fork of this repo: https://github.com/patrickcrocker/instant-https-boshrelease/tree/proxies

I'm looking for feedback on this. It works today and I'm using it to front-end Pivotal Cloud Foundry running in my lab.

Currently I do a manual build and deploy of the instant-https-release from my proxies branch:

$ bosh create-release --force
$ bosh upload-release

Here is the manifest I'm using for the deployment: https://github.com/patrickcrocker/bosh-ops/blob/master/deployments/instant-https/instant-https.yml

Like I said, i'm looking for feedback on this (this is my first attempt at hacking a bosh release and so i'm not sure where i'm making mistakes ;-)

drnic commented 6 years ago

@patrickcrocker nice; though I'm not sure when I'll get a chance to check it out. Convert it to a PR and ask the govau team to have a look.