Skip to content

Commit

Permalink
Merge branch 'main' into 4658-device-group-env-api
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve-Mcl authored Oct 21, 2024
2 parents f2aad78 + eb4d998 commit 38121cb
Show file tree
Hide file tree
Showing 13 changed files with 412 additions and 179 deletions.
6 changes: 6 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ It covers everything from setup, to usage, and development. All [contributions](
<label>FlowFuse Self-Hosted</label>
<p>Run FlowFuse yourself on your own infrastructure.</p>
<ul style="margin-top: 0; margin-bottom: 0;">
<li class="ff-offering-cta">
<a href="/docs/quick-start/">
Quick Start Instructions
<icon-chevron-right class="ff-icon ff-icon-sm" />
</a>
</li>
<li class="ff-offering-cta">
<a href="/docs/install/introduction/">
Install FlowFuse Self-Hosted
Expand Down
2 changes: 1 addition & 1 deletion docs/admin/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
navGroup: FlowFuse Self-Hosted
navOrder: 3
navOrder: 4
navTitle: Administering FlowFuse
redirect:
to: /docs/admin/introduction
Expand Down
10 changes: 6 additions & 4 deletions docs/cloud/billing.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ Stripe will retry the payment several times over a number of days. If the card r

## Cancelling your subscription

When you're on the Starter tier you'll need to delete your team to cancel your subscription.
For the Team and Enterprise tiers, you're charged on active cloud instances and edge devices. To stop being charged it suffices
to suspend all Cloud Node-RED instances and remove all edge devices from the team.
To cancel your subscription you can either delete or suspend your team; both options are available under the Team Settings page.

If you have outstanding credit you can request a refund via a [support ticket](/support/), include the Team ID in your email.
Deleting the team will remove all of the team's instances and devices - they cannot be recovered after being deleted.

Suspending the team will stop all of your team's instances and devices and cancel your subscription so no further charges are made. You will not be able to do anything more with the team whilst it is suspended. You can unsuspend the team in the future by setting up a new payment subscription.

When deleting the team, if you have outstanding credit you can request a refund via a [support ticket](/support/), include the Team ID in your email.
2 changes: 1 addition & 1 deletion docs/install/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ navTitle: Installing FlowFuse
redirect:
to: /docs/install/introduction
layout: redirect
navOrder: 1
navOrder: 2
---
7 changes: 5 additions & 2 deletions docs/install/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ meta:

FlowFuse can be installed to run in Docker or Kubernetes based environments.

- [Docker Install Guide](/docs/install/docker/README.md)
- [Kubernetes Install Guide](/docs/install/kubernetes/README.md)
- **Docker:**
- [Quick Start Guide](/docs/quick-start)
- [Full Install](/docs/install/docker/README.md)
- **Kubernetes:**
- [Install Guide](/docs/install/kubernetes/README.md)

We also provide one-click installs of the Docker version:

Expand Down
4 changes: 2 additions & 2 deletions docs/migration/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ will now be started with the modules installed.
### Static Files

Check your `settings.js` file to see if `httpStatic` has been set, if so then
check for any files in this path. FlowFuse does not currently support serving
static files so you will need to find alternative hosting for these such as AWS S3.
check for any files in this path. The files in this path need to be manually
migrated to [FlowFuse's Static Assets](/docs/user/static-asset-service/) service.
86 changes: 86 additions & 0 deletions docs/quick-start/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
navGroup: FlowFuse Self-Hosted
navTitle: Quick Start
navOrder: 1
meta:
description: Quickly install FlowFuse in Docker or Kubernetes based environments.
tags:
- start
- quick start
- quickstart
- installation
- flowfuse
- docker
- trial license
- deployment models
---

# Quick Start Guide

This guide provides a streamlined process for setting up and running the FlowFuse platform using Docker and docker-compose.

The provided docker-compose file facilitates the deployment of the following services:
* **FlowFuse Platform**: Includes the core application, MQTT broker, and file server for storage
* **Database:** A pre-configured database for storing platform data
* **Proxy Server:** A pre-configured proxy server for managing HTTP traffic

For a full installation guide, including how to setup FlowFuse in a production environment, please refer to the dedicated page for [running FlowFuse on Docker](../install/docker/README.md).

## Prerequisites

Before you begin, ensure you have the following:

1. A domain name that you own and can configure DNS settings for (explained in step 1)
2. Docker and Docker Compose installed on your system (either as a standalone binary or as docker plugin)

## Step 1: Configure DNS

Before running FlowFuse, you need to configure your fully qualified domain name settings:

1. Set up an A record for your domain (e.g., `example.com`) to your server's IP address (this works with subdomain as well e.g. `flowfuse.example.com`). FlowFuse will run here.
2. In the same manner, set up a wildcard DNS record (e.g., `*.example.com`, `*.flowfuse.example.com`) to point to your server's IP address. Any Node-RED instances setup by FlowFuse will run here.

This step is crucial for the proper functioning of the application. FlowFuse will not run properly on `localhost` domain.

## Step 2: Download Compose file

```bash
curl -o docker-compose.yml https://raw.githubusercontent.com/FlowFuse/docker-compose/refs/heads/main/docker-compose-quick-start.yml
```

## Step 3: Start the Application

Run the following command to deploy FlowFuse. Replace the `yourdomain.com` with your domain name configured in step 1.:

```bash
DOMAIN=example.com docker compose up -d
```

This command will download the necessary Docker images, run initial setup and start all the required services in detached mode.

## Step 4: Complete the application Setup

Open your web browser and navigate to `http://forge.example.com/setup` . You will be redirected to the setup page where you can create your admin account and set up your instance.
For detailed information about first setup and configuration, please follow [this guide](../install/first-run.md).


## Cleanup

To stop and remove the FlowFuse application, run the following command. Replace `yourdomain.com` with your domain name:

```bash
DOMAIN=example.com docker compose down -v
```

## Troubleshooting

If you encounter any issues, please check the following:

1. Ensure all prerequisites are correctly installed
2. Verify your DNS settings are correct and have propagated
3. Check the Docker logs for any error messages:
```bash
docker compose logs
```

For more detailed information or advanced configuration options for running FlowFuse on Docker, please refer to our [full documentation](../install/docker/README.md).
2 changes: 1 addition & 1 deletion docs/upgrade/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
navGroup: FlowFuse Self-Hosted
navOrder: 2
navOrder: 3
navTitle: Upgrading FlowFuse
meta:
description: Learn how to upgrade your FlowFuse instance with detailed guidelines for LocalFS, Docker, and Kubernetes deployments.
Expand Down
8 changes: 8 additions & 0 deletions forge/db/controllers/Team.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ module.exports = {
// Reinflate the object now the user has been added
const team = await app.db.models.Team.bySlug(newTeam.slug)

// Record in our Product tracking
app.product.capture(user.username, '$ff-team-created', {
'team-name': team.name,
'created-at': team.createdAt
}, {
team: team.id
})

return team
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export default {
},
isGroupOptionsValid () {
return !this.input.options.groupMapping || (
(this.input.options.type === 'saml' ? this.isGroupAssertionNameValid : this.isGroupsDNValid) &&
(this.input.type === 'saml' ? this.isGroupAssertionNameValid : this.isGroupsDNValid) &&
this.isGroupAdminNameValid
)
},
Expand Down
16 changes: 14 additions & 2 deletions frontend/src/pages/team/Settings/TeamAdminTools.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
</tr>
<tr>
<td class="font-medium pr-4">Customer ID:</td>
<td><div class="py-2">{{ team.billing.customer || 'none' }}</div></td>
<td><div class="py-2"><a v-if="stripeCustomerUrl" :href="stripeCustomerUrl" class="underline" target="_blank">{{ team.billing.customer }}</a><span v-else>none</span></div></td>
</tr>
<tr>
<td class="font-medium pr-4">Subscription ID:</td>
<td><div class="py-2">{{ team.billing.subscription || 'none' }}</div></td>
<td><div class="py-2"><a v-if="stripeSubscriptionUrl" :href="stripeSubscriptionUrl" class="underline" target="_blank">{{ team.billing.subscription }}</a><span v-else>none</span></div></td>
</tr>
</table>
<div v-if="!isUnmanaged && trialMode" class="flex flex-col space-y-4 max-w-2xl lg:flex-row lg:items-center lg:space-y-0">
Expand Down Expand Up @@ -119,6 +119,18 @@ export default {
},
trialEndDate () {
return this.formatDateTime(this.team.billing?.trialEndsAt)
},
stripeCustomerUrl () {
if (this.team.billing?.customer) {
return `https://dashboard.stripe.com/customers/${this.team.billing.customer}`
}
return null
},
stripeSubscriptionUrl () {
if (this.team.billing?.subscription) {
return `https://dashboard.stripe.com/subscriptions/${this.team.billing.subscription}`
}
return null
}
},
methods: {
Expand Down
Loading

0 comments on commit 38121cb

Please sign in to comment.