Skip to content

Commit c4003e1

Browse files
committed
Updating documentation for Flow as part of the Beta.
1 parent 1b3cf75 commit c4003e1

14 files changed

Lines changed: 2104 additions & 1197 deletions

docs/distributing/Flow/api.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# API
2+
<FlowLink /> offers a REST API for interacting with the service. There is an OpenAPI specification that can be browsed with [Swagger](https://swagger.io/) available at https://api.velopack.io/swagger that describes the API endpoints and their parameters. This API allows you to build your own automation tools that integrate with Velopack Flow.
3+
4+
`vpk` supports making direct calls against this API using the `vpk flow api` command. This command allows you to make GET, POST, PUT, and DELETE requests to the Flow API. You can use this command to automate tasks such as creating projects, uploading releases, and managing channels.
5+
6+
Some sample commands for managing projects:
7+
- Getting a list of projects: `vpk flow api -m GET -e "v1/projects/list"`
8+
- Create a new project: `vpk flow api -m POST -e "v1/projects/create" -b '{"name": "My Project Name", "teamIdentifier": "Default Team", "packageId": "company.package.id"}'`
9+
- Deleting a project: `vpk flow api -m DELETE -e "v1/projects/$($project.id)"`
10+
11+
For all of the available options see the [vpk CLI documentation](../../reference/cli).
12+
13+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Authentication
2+
<FlowLink /> supports OAuth, forms authentication, and API keys for authentication. You can use any of these methods to authenticate with the Flow service. The recommended method is to use OAuth, as it provides the most secure and flexible authentication mechanism.
3+
4+
To perform an interactive login use the `vpk login` command. This will persist your authentication locally inside of `~/.vpk`. For running commands without interaction, such as a CI/CD pipeline, you can specify the `--api-key` option to the `vpk` commands that interact with Flow.
5+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
sidebar_label: Overview
3+
sidebar_position: 0
4+
---
5+
6+
# Velopack Flow Overview
7+
<AppliesTo all />
8+
9+
<FlowLink text="Flow" /> is Velopack's hosted solution for distributing applications. It provides a seamless way to distribute your Velopack applications. If you would prefer to self-host your application and manually manage infrastructure, updates, and rollbacks, see the [self-hosting](../self-hosting.mdx) section.
10+
11+
## Pricing
12+
Velopack Flow offers a free tier so that you can get started without any upfront costs. The free tier allows you to create a small number of projects in a single free tier team, and limits the amount of storage and bandwidth that can be consumed per-month. You can increase these by upgrading to a paid plan. For pricing and details see the pricing page within your <FlowLink text="team" suffix="teams" />. Though you can be a member of many teams, you will only be able to create Projects in a single Free tier team.
13+
14+
Subscriptions for <FlowLink /> are per-team. This means that the subscription is tied to the team not an individual user. When you first create an account, you will have a default team created for you (see <FlowLink text="teams page" suffix="teams" />). You can create additional teams or rename this team at any time. From the team page, you can select Billing to see your current plan as well as pricing options for paid plans.
15+
16+
## Data Structure
17+
A basic overview of the data structure used by <FlowLink /> is as follows:
18+
```mermaid
19+
flowchart TD
20+
Team -->|many| Project
21+
Team -->|many| User
22+
Team -->|1| Subscription
23+
Project -->|many| Channel
24+
Channel -->|many| Release
25+
```
26+
27+
The [pricing model](#pricing) is linked to a team. Though a user can be a member of many teams, a user will only be able to create projects in a single free tier team (a team without a paid subscription). A team contains projects. A project refers to a single application, more specificially a single package id. A project can have many channels, which are used to organize releases. A channel is a logical grouping of releases, such as "stable", "beta", or "alpha". Channels should also be used to separate different platforms such as "Windows", "macOS" and "Linux". Within a channel, a release is made up of one ore more artifacts (the files created by running `vpk pack`), which are the files distributed to your end users. For a release to be considered valid it must contain at least the full release package as well as the corresponding Setup.exe file.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Static Links
2+
<FlowLink /> provides static links for each channel, and release. These links can be referred from your own website to direct user to download the latest release of an application, or to download a specific release.
3+
4+
The most common will be the latest release for a given channel. On the channel list page you can click the ellipsis menu on the right side of the channel row and select "Copy latest setup link". This will copy a link to the latest setup installer for that channel to your clipboard. This URL will always point to the latest release for that channel, so you can use it in your own website or documentation.
5+
![Latest release for channel static link](../../../static/images/latest-channel-link.png)
6+
7+
You can also get direct link to specific releases. On the release details page there is a Release links section with buttons to copy links to installers at specific versions.
8+
9+
For more advanced use cases see the `download/*` endpoints under the Releases section from [API](./api.mdx). The API provides additional functionality to get links to specific artifacts or artifact types.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Tiered Rollout
2+
Tiered rollout is a feature of <FlowLink /> that allows you to gradually release a new version of your application to a subset of users. This is useful for testing new features or changes before rolling them out to all users. You can specify a rough percentage of users that should receive the new version by adjusting the slider on the release details page for a given release.
3+
4+
![Tiered Rollout Slider](../../../static/images/tiered-rollout-slider.png)
5+
6+
When a user installs a Velopack application they are given a random ID. When the `UpdateManager` queries for updates, this ID is passed to the Flow service. To determine if a user should receive the new version of the application, the Flow service hashes this ID and checks if it falls within the percentage range specified for the release. If it does, the user will receive the new version of the application.
7+
8+

docs/distributing/flow.mdx

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
sidebar_label: Velopack Flow
3+
sidebar_position: 1
4+
---
5+
6+
# Velopack Flow
7+
<AppliesTo all />
8+
9+
:::info Beta
10+
Velopack Flow is currently in **beta**. If you're interested in joining the beta, please reach out to [[email protected]](mailto:[email protected]).
11+
:::
12+
13+
<FlowLink text="Flow" /> is Velopack's hosted solution for distributing applications. It provides a seamless way to distribute your Velopack applications. If you would prefer to self-host your application and manually manage update and rollbacks, see the [self-hosting](self-hosting.mdx) section.
14+
15+
## Features
16+
17+
- Full Managed Solution No need to manage your own infrastructure.
18+
- [Tiered Rollouts](Flow/tiered-rollout.mdx): Gradually release updates to a subset of users before a full rollout.
19+
- [Static Links](Flow/static-links.mdx): Static links that can be used to direct users to the latest release of your application, or a specific release.
20+
- [API](Flow/api.mdx): A REST API that allows you to programmatically manage your releases, channels, and projects.
21+
22+
## Getting Started
23+
24+
### Integrating with Flow
25+
Simply following current [integration guide](../integrating/overview.mdx) to integrate Velopack into your application. Make sure the [UpdateManager](../reference/cs/Velopack/UpdateManager) is configured to use the [VelopackFlowSource](../reference/cs/Velopack/Sources/VelopackFlowSource) as the [IUpdateSource](../reference/cs/Velopack/Sources/IUpdateSource). This is the default behavior of the default constructor.
26+
27+
### Publishing to Flow
28+
Start by creating a free account on <FlowLink />.
29+
30+
Once you have an account, you need to create a project. This can be done by click the "Create New Project" button on the main dashboard, or by navigating to the Projects list on your Team's home page.
31+
Make sure that the Package Id you enter exactly matches the `--packId` you used when building your Velopack release.
32+
33+
Back in the Velopack CLI, package your application as you normally would following the [packaging guide](../packaging/overview.mdx).
34+
35+
Next login to the Flow service by running the following command.
36+
```bash
37+
vpk login
38+
```
39+
For more details on authenticating with Flow through the `vpk` CLI see [Flow Authentication](Flow/authentication.mdx).
40+
41+
You can now upload your release to Flow by running the following command in the directory where your release is located:
42+
```bash
43+
vpk publish --outputDir <OutputDir> --channel <Channel>
44+
```
45+
46+
Done! You can now view the release in Flow. Within a few minutes the release will be available and ready for distrobution.

docs/distributing/overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sidebar_position: 0
55

66
# Distributing Overview
77
<AppliesTo all />
8-
Distributing with Velopack is extremely easy, it's usually just as simple as uploading your files somewhere that can be downloaded with HTTP. This means you could host them on an IIS or nodejs site, on shared file hosting such as AWS S3, Azure Storage, BackBlaze B2, or even for free on GitHub/GitLab releases if your project is open source.
8+
Velopack app can be easily distributed with <FlowLink /> or manually uploading to somewhere that can be downloaded with HTTP. This means you could host them on an IIS or nodejs site, on shared file hosting such as AWS S3, Azure Storage, BackBlaze B2, or even for free on GitHub/GitLab releases if your project is open source.
99

1010
The general steps for creating and deploying a Velopack release are:
1111
1. Download the latest published release (eg. 1.0.0).

docs/distributing/self-hosting.mdx

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Self hosting
2+
<AppliesTo all />
3+
4+
<FlowLink /> provides a fully managed solution for distributing applications. It takes care of handling updates, rollbacks by managing the the releases list. It manages organizing and distributing release assests within separate channels, and provides additional features like tiered rollout.
5+
6+
If instead you would prefer to manage your own infrastructure, Velopack provides tooling for downloading and uploading release assets to many common storage providers. The `vpk` tool has support downloading the latest release, and, for several providers, pushing up new release assets after running `vpk pack` (see [Overview](overview.mdx)).
7+
8+
## Amazon S3
9+
10+
[Amazon S3](https://aws.amazon.com/s3/) is a highly scalable, durable, and secure object storage service.
11+
12+
To upload or download from an S3 bucket you will need to specify either the S3 endpoint or the region. Authentication can be done using an existing session token or by access key ID and secret.
13+
14+
For all of the available options see the [vpk CLI documentation](../reference/cli).
15+
16+
## Azure Blob storage
17+
18+
[Azure Blob Storage](https://learn.microsoft.com/azure/storage/blobs/storage-blobs-introduction) is a scalable, cost-effective cloud storage solution for unstructured data.
19+
20+
You can authenticate to Azure Blob Storage using either a storage account name and access key or by using a shared access signature (SAS).
21+
22+
For all of the available options see the [vpk CLI documentation](../reference/cli).
23+
24+
## File system
25+
Velopack supports local file system paths for both "uploading" and "downloading". This is useful for testing or for local development via network drives. The `vpk` tool can be used to pack releases and then copy them to a local directory.
26+
27+
For all of the available options see the [vpk CLI documentation](../reference/cli).
28+
29+
## Gitea
30+
31+
[Gitea](https://gitea.io) is a lightweight, self-hosted Git service. It provides a private, fast, reliable DevOps platform.
32+
33+
When publishing to Gitea the release name will be the same as the version number unless otherwise specified. If an existing release is not found a new one will be created. Optionally if you would prefer to update an existing release you can specify the `--merge` flag.
34+
35+
For all of the available options see the [vpk CLI documentation](../reference/cli).
36+
37+
## GitHub
38+
39+
[GitHub](https://github.com) is a widely used platform for hosting Git repositories and collaborating on software development. It provides features like pull requests, issue tracking, and CI/CD integrations.
40+
41+
When publishing to GitHub, the release name will default to the version number unless specified. If a release with the same name exists, it can be updated using the `--merge` flag.
42+
43+
For all of the available options see the [vpk CLI documentation](../reference/cli).
44+
45+
## HTTP server
46+
Velopack supports arbitrary HTTP endpoints for downloading. This endpoint must be able to service the `releases.{channel}.json` file, as well as the `nupkg` files. `vpk` does not offer upload support, and it is up to you to upload the updated files to the server after building a new release.
47+
48+
For all of the available options see the [vpk CLI documentation](../reference/cli).
49+

docusaurus.config.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,17 @@ const config: Config = {
1717
defaultLocale: 'en',
1818
locales: ['en'],
1919
},
20+
customFields: {
21+
flowBaseUrl: 'https://app.velopack.io',
22+
},
2023
themes: [
2124
['@easyops-cn/docusaurus-search-local', {
2225
hashed: true,
2326
indexBlog: false,
2427
docsRouteBasePath: '/',
2528
ignoreFiles: new RegExp(".*reference/.*"),
2629
}],
30+
'@docusaurus/theme-mermaid'
2731
],
2832
plugins: [
2933
['@docusaurus/plugin-client-redirects', {
@@ -46,7 +50,8 @@ const config: Config = {
4650
{ tagName: 'meta', attributes: { name: 'theme-color', content: '#ffffff' } },
4751
],
4852
markdown: {
49-
format: 'detect'
53+
format: 'detect',
54+
mermaid: true,
5055
},
5156
presets: [
5257
[

0 commit comments

Comments
 (0)