Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Instance Domains #324

Closed
8 of 10 tasks
hardillb opened this issue Feb 18, 2022 · 37 comments
Closed
8 of 10 tasks

Custom Instance Domains #324

hardillb opened this issue Feb 18, 2022 · 37 comments
Labels
customer request requested by customer epic A significant feature or piece of work that doesn't easily fit into a single release headline Something to highlight in the release sales request requested by a sales lead scope:enterprise Enterprise adoption and roll out features
Milestone

Comments

@hardillb
Copy link
Contributor

hardillb commented Feb 18, 2022

Description

As a Team Owner,
I want to be able to supply a custom domain to be used with my projects to differentiate them from other projects hosted on the system

Customer requests

  1. https://app-eu1.hubspot.com/contacts/26586079/record/0-2/8209301981
  2. https://app-eu1.hubspot.com/contacts/26586079/record/0-1/7563151
  3. https://app-eu1.hubspot.com/contacts/26586079/record/0-2/8763467964
  4. https://app-eu1.hubspot.com/contacts/26586079/contact/8464752608

1st Iteration Development Work

  1. hardillb
  2. deploy:pr
    hardillb
  3. hardillb

Production Updates

  1. knolleary

Future work

  1. feature-request size:M - 3
    ppawlowski
  2. needs-triage size:M - 3 task
@hardillb hardillb added the epic A significant feature or piece of work that doesn't easily fit into a single release label Feb 18, 2022
@knolleary knolleary changed the title Allow Teams to have custom domains for projects Custom Project Domains Feb 18, 2022
@sammachin
Copy link
Contributor

Just to confirm this should be a FQDN per project rather than a domain per team

@cgsmith
Copy link

cgsmith commented Mar 4, 2022

Would this mean the FQDN would be domain.com for flowforge then each project would be a a subdomain or project folder?

project.domain.com would point to localhost:7880 or w/e?

@hardillb
Copy link
Contributor Author

hardillb commented Mar 4, 2022

@cgsmith This is specifically talking about running with the docker or kubernetes container drivers not the localfs.

With k8s and docker drivers, the projects run in containers so do not have different port numbers on the host and are all mapped to unique hostnames on a single fixed domain at the moment. This epic is about allow teams to have their own root domain. e.g. team one can have <project name>.one.com and team two would have <project name>.two.com

You can not host projects (Node-RED instances) on different paths on a single domain (e.g. example.com/<project name>) due to the way browser local storage works as Node-RED use it as part of the editor authentication. This is a limitation of Node-RED, not the FlowForge platform.

@ZJvandeWeg ZJvandeWeg added the scope:enterprise Enterprise adoption and roll out features label Jun 3, 2022
@protocolus
Copy link

I have customers that would love to use the FF service but, depend on custom domains to serve their clients. Being able to tie a wildcard SSL to an account would be even better. That way new projects could all be under that domain automatically.

@hardillb
Copy link
Contributor Author

hardillb commented Aug 8, 2022

First pass I see the following points that would need working on

  • Support in the forge application to bind a domain to a team
  • Modification to the docker/k8s container driver to allow the domain to be passed as part of project creation
  • Publishing of the Ingress controller hostname to allow domain owners to setup up CNAME entries to point to the ingress controller
  • Some way for the domain owner to provide/update a TLS certificate, most likely this should be a wildcard certificate

The first 3 items are relatively simple to implement, the last point will need very careful planning and may vary based on host environment. I can see a possible k8s approach, but docker may be different.

May be able to make use of letsencrypt to issue individual certs for each project.

@sammachin
Copy link
Contributor

The use case of setting a domain for a team is separate to the original issue which is to set a custom FQDN for a project.

The Initial story is just per project not team domains and wildcards

@hardillb
Copy link
Contributor Author

hardillb commented Aug 8, 2022

All the same problems still apply re TLS, the user is probably going to need to supply a certificate for the given domain. I suspect it will be easier to implement at a team level rather than per-project.

@sammachin sammachin modified the milestones: 1.1, 1.2 Sep 22, 2022
@knolleary knolleary added priority:high High Priority headline Something to highlight in the release labels Nov 24, 2022
@hardillb
Copy link
Contributor Author

@Pezmc stick a slot in the calendar and we can talk about how this will work. I think most of the work will actually be in the UI/UX apart from working out how to handle the TLS certs.

@hardillb
Copy link
Contributor Author

hardillb commented Nov 30, 2022

Notes:

  1. Scoped to a single project at a time
  2. Only applies to Docker and K8s
  3. Gated on a flag in team type? What is the business logic for this?
  4. With out TLS it's simple
  5. With TLS going to use LetsEncrypt (and work out what to do on AWS with ALB where that won't work)

Pez:

Ben:

@hardillb
Copy link
Contributor Author

hardillb commented Nov 30, 2022

Note: Host names need to be valid and unique across all projects

@hardillb
Copy link
Contributor Author

hardillb commented Dec 5, 2022

Blocking issue for deploying this to FlowForge Cloud https://github.com/flowforge/CloudProject/issues/110

@Pezmc Pezmc removed their assignment Dec 6, 2022
@Pezmc
Copy link
Contributor

Pezmc commented Dec 6, 2022

This feature has been put on hold due to the above blocking issue.
Progress, before it was put on hold, is as follows:

When it is picked up again, the next steps were to:

@ZJvandeWeg ZJvandeWeg removed this from the 1.2 milestone Dec 19, 2022
@knolleary
Copy link
Member

Putting this back on to the Product board for future prioritisation once https://github.com/flowforge/CloudProject/issues/110 has been planned.

@hardillb
Copy link
Contributor Author

I have now got a second ingress-nginx controller installed in a test cluster using

controller:
  ingressClass: "custom-nginx"
  ingressClassByName: true
  ingressClassResource:
    enabled: true
    name: "custom-nginx"
    controllerValue: "flowfuse.com/ingress-nginx-2"
  config:
    proxy-body-size: "0"
    use-gzip: true
  service:
    annotations:
      service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "ssl"
      service.beta.kubernetes.io/aws-load-balancer-type: "nlb"
      service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "443"
      service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: "120"
    externalTrafficPolicy: Local
  allowSnippetAnnotations: true

Important note, the helm release name must not match the existing nginx-ingress release (otherwise the webhook and rbac entries clash)

@ZJvandeWeg ZJvandeWeg added customer request requested by customer and removed blocked labels May 2, 2024
@joepavitt
Copy link
Contributor

Once you've caught back up with this @hardillb - can you update here with a status of the outstanding items before this can be considered finished please?

@ZJvandeWeg ZJvandeWeg removed the consideration A potential feature or improvement that is under review for possible development and implementation label May 7, 2024
@hardillb
Copy link
Contributor Author

hardillb commented May 7, 2024

Current state:

  • Testing of installing second nginx ingress controller on AWS EKS cluster (using the cluster built for the scaling testing)
  • K8s driver Draft PR raised Custom Hostname support driver-k8s#151, the basic work is done and tested on my local setup. Will need full testing with UI
  • UI and hostname storage work started in FlowFuse Project
  • nr-launcher authentication plugin will need updating (and possible forge app) to handle correct redirect back to the editor/dashboard if request comes from custom hostname.

@joepavitt
Copy link
Contributor

UI and hostname storage work started in FlowFuse Project

Any draft PR or linked issues for this?

@robmarcer robmarcer added the sales request requested by a sales lead label May 8, 2024
@knolleary
Copy link
Member

I've updated the description with a task list based on the latest status update.

@joepavitt joepavitt added this to the 2.5 milestone May 8, 2024
@joepavitt
Copy link
Contributor

joepavitt commented May 17, 2024

Status update from Ben:

Wednesday next week is when Ben hope it'll be rounded off

@hardillb
Copy link
Contributor Author

I have this working properly in my local K8s environment.

Following the change to make the authentication redirect to the right place I will need to add a launcher version check to the UI so it's only offered on new launchers/stacks.

@hardillb
Copy link
Contributor Author

HTTPS support appears to be working...

@joepavitt
Copy link
Contributor

Can I get a status update on this please @hardillb? How are we looking for 2.5 release, or earlier?

@hardillb
Copy link
Contributor Author

There is a large amount of extra things that will need configuring in the production cluster to enable this, it should be part of the 2.5 release, even once this is merged.

@hardillb
Copy link
Contributor Author

I'm currently struggling to get the UI to track when the instance is restarted properly. It just gets stuck in the suspended state.

Once that is fixed then all the code should be finished.

@joepavitt
Copy link
Contributor

Once coding is done, can we open relevant issues (and link back to here) to document outstanding work required to get this live please?

@hardillb hardillb mentioned this issue May 29, 2024
3 tasks
@hardillb
Copy link
Contributor Author

@joepavitt
Copy link
Contributor

Can this be closed off now?

@hardillb
Copy link
Contributor Author

@joepavitt it's only because its being used as the overriding epic for the 2 bits of future work.

I can be closed for me.

@joepavitt
Copy link
Contributor

Can close this once FlowFuse/terraform-aws-flowfuse#8 is resolved, #3982 will stay open as a follow-on task should the demand for it be there

@joepavitt
Copy link
Contributor

Closing as majority of work is done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer request requested by customer epic A significant feature or piece of work that doesn't easily fit into a single release headline Something to highlight in the release sales request requested by a sales lead scope:enterprise Enterprise adoption and roll out features
Projects
Status: Closed / Done
Development

No branches or pull requests

10 participants