Skip to content

Commit cf552ee

Browse files
author
Laura Langdon
authored
Merge pull request #155 from suborbital/laura/update-scn-docs
2 parents 580ddad + 2f6c137 commit cf552ee

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+4055
-3486
lines changed

.github/workflows/documentation.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ jobs:
1313
- uses: actions/checkout@v1
1414
- uses: actions/setup-node@v1
1515
with:
16-
node-version: '14'
17-
- name: Upgrade NPM
18-
run: npm install -g npm
16+
node-version: '>=16'
1917
# see https://github.com/bahmutov/npm-install/issues/103#issuecomment-931226602
2018
- name: Test Build
2119
env:

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ website/yarn.lock
88
**/.DS_Store
99

1010
.vscode
11+
.idea
1112
build
1213
dictionary.dic

spelling.dic

+3
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ deployable
8686
deployDraft
8787
desiredmessage
8888
dev
89+
devs
90+
Devs
8991
devgenius
9092
dir
9193
Distroless
@@ -146,6 +148,7 @@ GetStaticFile
146148
getTemplate
147149
gettingStarted
148150
getToken
151+
gettoken
149152
getUsers
150153
GggP
151154
ghstars

website/docs/assets/editor-screen.png

-625 KB
Loading

website/docs/atmo/concepts/static-directory.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
pagination_next: null
3+
---
4+
15
# Static Directory
26

37
An Atmo project can optionally contain a `static` directory. When present,

website/docs/atmo/runnable-api/file.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
pagination_next: null
3+
---
4+
15
import Tabs from '@theme/Tabs';
26
import TabItem from '@theme/TabItem';
37
import { MultiLanguageCodeBlock } from '@site/extensions/mlc.jsx'

website/docs/atmo/runnable-api/introduction.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
pagination_prev: null
3+
---
4+
15
# Introduction to the Runnable API
26

37
import { MultiLanguageCodeBlock } from '@site/extensions/mlc.jsx'

website/docs/atmo/usage/connections.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
pagination_next: null
3+
---
4+
15
# Connections
26

37
In order to build a useful application, Atmo needs to be able to connect to external resources. Currently, Atmo can connect to [NATS](https://nats.io/), [Redis](https://redis.io/), [Kafka](https://kafka.apache.org/), [MySQL](https://www.mysql.com/), and [PostgreSQL](https://www.postgresql.org/). Upcoming releases will include additional data sources as well.

website/docs/atmo/usage/creating-runnables.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
pagination_prev: null
3+
---
4+
15
# Creating Runnables
26

37
:::note

website/docs/compute/api-reference/api-reference.md

-15
This file was deleted.

website/docs/compute/building-functions/github-integration.md

-4
This file was deleted.

website/docs/compute/compute.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@ pagination_prev: null
33
---
44
# Suborbital Compute
55

6-
### The SaaS extensibility platform
6+
![Suborbital logo](/img/suborbital-logo-wide.svg)
77

8-
![](/img/suborbital-logo-wide.svg)
8+
Suborbital Compute is a platform that allows your users to write and deploy
9+
functions and workflows that integrate into your app. Our WebAssembly-based
10+
compute
11+
core lets you run user code within your infrastructure while being sure you're protected from malicious code.
912

10-
Suborbital Compute is a platform that allows your users to write and deploy serverless extensions for your app so they can develop custom integrations, customizations, and workflows. Our WebAssembly-based compute core lets you run user code within your infrastructure while being sure that you're protected from malicious code.
11-
12-
Compute is now in public beta! We are excited for you to [give it a try](https://suborbital.network) and send us your feedback.
13+
Compute is now in public beta! We are excited for you to [give it a try](/get-started)
14+
and send us your feedback.
1315

1416
Compute gives you everything you need to run your users' functions in a secure sandbox and integrate them into your product in whatever way makes sense for you. This includes a code editor, builder service, and an easy-to-use API.
1517

website/docs/compute/concepts/data-plane-vs-control-plane.md

-26
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
pagination_prev: null
3+
---
4+
5+
# Function editor
6+
7+
The Compute code editor is available for you to embed in your application, so your users can build their functions quickly and easily:
8+
9+
![Compute editor containing a 'Hello' function](../../assets/editor-screen.png)
10+
11+
The editor is hosted at `https://editor.suborbital.network`, and uses URL parameters to configure its connection to your builder service.
12+
13+
You will host the Compute builder service in your cloud infrastructure with a configured DNS name. An HTTPS connection to the builder is required to use the editor.
14+
15+
To launch the editor, you can either [embed the editor in a frame]
16+
(https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe) within your own webpage, or launch it in a new tab.
17+
18+
## Editor token
19+
20+
To authenticate the editor for a specific user to edit their own functions,[Compute's Administrative API provides an API to create an `editor token` ]
21+
(https://suborbital-compute.readme.io/reference/gettoken) for a given function.
22+
23+
## Configuration
24+
25+
The editor is configured with URL parameters. Here's an example:
26+
27+
`https://editor.suborbital.network?builder=https://builder.acmeco.com&token=K78as0aslwi30l8h5lbF4lS7&ident=com.suborbital.customer&fn=add-record`
28+
29+
Let's break it down:
30+
31+
**Builder**: `?builder=https://builder.acmeco.com`
32+
33+
* This is the URL of your public builder service
34+
35+
**Token**: `&token=K78as0aslwi30l8h5lbF4lS7`
36+
37+
* The editor token retrieved from the control-plane service
38+
39+
**Ident**: `&ident=com.suborbital.customer`
40+
41+
* The identifier used when addressing your specific user, see [Fully-qualified function names](./fully-qualified-function-names.md) for more details
42+
43+
**Fn**: `&fn=add-record`
44+
45+
* The specific function name that the editor should load
46+
47+
**Namespace** (optional): `&namespace=default`
48+
49+
* The function namespace (if not included, the `default` namespace is used, see [Namespaces](docs/compute/customizing-functions/namespaces.md) for more details)
50+
51+
**Template** (optional): `&template=assemblyscript`
52+
53+
* The language template used for new functions. Check out our [supported languages](../../reactr/language-support.md)!
54+
55+
If the `fn` in question does not exist, the editor will automatically create a new function.
56+
57+
## Building and deploying
58+
59+
Once the user has edited their function, the `build` button in the top right will allow them to check to ensure the function builds. The builder service will build the function and then return the results to the console area.
60+
61+
Assuming the build succeeds, the user can choose to deploy the latest version with the `deploy` button. If they choose not to deploy, the draft will be available to them later.
62+
63+
Until the user deploys the function, it will remain at the previous version. The [API Reference](https://suborbital-compute.readme.io/reference/api-reference) gives you details about the draft and active versions of any function.

website/docs/compute/customizing-functions/custom-function-templates.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ To create a custom function template, create a fork of the `runnable-templates`
1212

1313
Once the repo has been forked into your company or personal account, you can begin editing the `templates` directory to fit your needs.
1414

15-
For now, you are limited to one template per language, but in the future you will be able to create a set of templates for your users to choose from.
15+
For now, you are limited to one template per language, but in the future you'll be able to create a set of templates for your users to choose from.
1616

1717
### AssemblyScript
1818

Original file line numberDiff line numberDiff line change
@@ -1,24 +1,30 @@
1+
---
2+
pagination_next: null
3+
---
4+
15
# Fully-qualified function names
26

37
Each function uploaded by your users has a unique name called a fully-qualified function name, or FQFN. The string representation of an FQFN is as follows:
48

59
```bash
6-
com.awesomeco.nawronuq98hqwekj198fkljbeco#default::[email protected]
7-
|____________|___________________________|________|____________|______|
10+
com.example.nawronuq98hqwekj198fkljbeco#default::[email protected]
11+
|_____________|___________________________|________|____________|______|
812
Environment User ID Namespace Function Version
913
```
1014

1115
Here's a breakdown:
1216

13-
* **Environment**: your company's reverse domain; `com.awesomeco`
17+
* **Environment**: your company's reverse domain; `com.example`
1418
* **User ID**: The unique value that your application uses to identify your users within your system; `nawronuq98hqwekj198fkljbeco`
15-
* **Namespace**: The namespace this function belongs to; allows for separated groups of functions based on product needs \(see [Namespaces](namespaces.md) \); `default`
19+
* **Namespace**: The namespace this function belongs to; allows for separated groups of functions based on product needs (see [Namespaces](docs/compute/customizing-functions/namespaces.md) ); `default`
1620
* **Function**: The name of the function as chosen by the user; `record-event`
1721
* **Version**: The version of this function \(incremented each time a user updates this function\); `v1.0.0`
1822

1923
## Environment name
2024

21-
The domain of your email address should match the `environment` you configure for Compute, i.e. if your email is `[email protected]`, your Compute environment would be called `com.awesomeco`.
25+
The domain of your email address should match the `environment` you
26+
configure for Compute, i.e. if your email is `[email protected]`, your
27+
Compute environment would be called `com.example`.
2228

2329
## FQFN URLs
2430

@@ -28,7 +34,7 @@ To execute a function in Compute you will use a URL representation of FQFN. To r
2834
/{environment}.{userid}/{namespace}/{function}/{version}
2935

3036
Example:
31-
/com.awesomeco.nawronuq98hqwekj198fkljbeco/default/record-event/v1.0.0
37+
com.example.nawronuq98hqwekj198fkljbeco/default/record-event/v1.0.0
3238
```
3339

3440

website/docs/compute/concepts/namespaces.md website/docs/compute/customizing-functions/namespaces.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
pagination_next: null
3+
---
4+
15
# Namespaces
26

37
Within Compute, your users' functions can be organized into `namespaces` at your discretion \(you control them, not your users\). Namespaces can be used to organize groups of functions designed for different use-cases within your product.

website/docs/compute/cloud-deployment/configure-capabilities.md website/docs/compute/deployment/cloud-deployment/configure-capabilities.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1+
---
2+
pagination_prev: null
3+
---
4+
15
# Configure capabilities
26

37
Compute functions can access a number of capabilities:
48

5-
* Logger
9+
* Logging
610
* HTTP requests
711
* GraphQL requests
812
* Key/value store (cache)

website/docs/compute/cloud-deployment/configure-storage.md website/docs/compute/deployment/cloud-deployment/configure-storage.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Configure Storage
1+
# Configure storage
22

33
By default, Compute will store compiled functions and function source code on the local storage in your Kubernetes cluster. For greater scalability, Compute can be configured to store artifacts in cloud-based object storage like Amazon S3 or Google Cloud Storage.
44

website/docs/compute/cloud-deployment/configure-webhooks.md website/docs/compute/deployment/cloud-deployment/configure-webhooks.md

+13-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Configure Webhooks
1+
# Configure webhooks
22

33
Certain actions in Compute can trigger webhooks to notify other services of the event. The receivers of webhooks get contextually relevant information about the request Compute receiver. By default, no webhooks are configured.
44

@@ -7,7 +7,7 @@ You can set your own webhooks in the `scc-config.yaml` file that `subo` created
77
## Configuration options
88
The `webhooks` stanza in `scc-config.yaml` consists of a top level `webhooks` object with a list of entries.
99

10-
Each entry has an `id` referencing one of the predefined [hook points](#hook-points) and a list of **one or more** HTTP `targets`, which consist of a `url`, `method`, and dictionary of `headers` (optional).
10+
Each entry has an `id` referencing the `builder.function.promoted` hook point and a list of **one or more** HTTP `targets`, which consist of a `url`, `method`, and dictionary of `headers` (optional).
1111

1212
## Examples
1313

@@ -41,12 +41,19 @@ webhooks:
4141
method: POST
4242
headers: *commonHeaders
4343
```
44-
4544
## Hook points
46-
### `builder.function.promoted`
47-
**Description**: Runs when an end user successfully deploys a function.
4845
49-
**Sample response** (JSON):
46+
:::info Devs at work
47+
Stay tuned for more hook points!
48+
:::
49+
50+
51+
`builder.function.promoted`
52+
53+
**Description** Runs when an end user successfully deploys a function.
54+
55+
**Sample response(JSON):**
56+
5057
```json
5158
{
5259
"webhook_id": "builder.function.promoted",

website/docs/compute/cloud-deployment/install-compute-in-your-cloud-environment.md website/docs/compute/deployment/cloud-deployment/install-compute-in-your-cloud-environment.md

+13-7
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
1+
---
2+
pagination_next: null
3+
---
4+
15
# Deploy Compute to your cloud environment
26

3-
To install Compute in the cloud, you'll use the `subo` tool to automatically install the Suborbital Compute Core into a Kubernetes cluster. You need to ensure you have some **pre-requisites** ready:
7+
To install Compute in the cloud, you'll use the `subo` tool to
8+
automatically install Suborbital Compute into a Kubernetes cluster.
9+
You need to ensure you have some **pre-requisites** ready:
410

511
1. Deploy a Kubernetes cluster into your cloud provider of choice (if you have a pre-existing one, that works too!).
6-
* [Ensure there is a storage class available in Kubernetes]
7-
* (https://kubernetes.io/docs/concepts/storage/storage-classes/). Some cloud providers such as AWS do not have a default storage class. See this great [GitLab guide on how to set up a storage class](https://docs.gitlab.com/charts/installation/storage.html#configuring-cluster-storage).
8-
* If you would like assistance with storage, [send us an email](mailto:[email protected])!
12+
* [Ensure there is a storage class available in Kubernetes](https://kubernetes.io/docs/concepts/storage/storage-classes/). Some cloud providers such as AWS do not have a default storage class. See this great [GitLab guide on how to set up a storage class](https://docs.gitlab.com/charts/installation/storage.html#configuring-cluster-storage).
13+
* If you would like assistance with storage, [send us an email](mailto:[email protected]) or hit us up on [Discord](https://chat.suborbital.dev)!
914
2. [Install the `kubectl` tool](https://kubernetes.io/docs/tasks/tools/#kubectl) and authenticate it with the cluster you want to use.
1015
3. Ensure you have access to modify your company's DNS records, as you need to create a domain name for the builder service (it must run on HTTPS, which requires a domain)
11-
4. Ensure you've run the `subo compute create token <email>` command from [Create an environment token](../quickstart/1.-create-an-environment-token-with-subo.md) before attempting the install
16+
4. Ensure you've run the [`subo compute create token <email>` command](../get-started#generate-your-token.md) before attempting the install
1217

1318
:::info
1419
`subo` creates a `suborbital` Kubernetes namespace and installs the `KEDA` autoscaler. Don't worry about existing applications installed in the cluster; this won't affect them!
1520
:::
1621

17-
Once you have the pre-requisites in place, navigate to the `suborbital` directory you created in the [quickstart guide](../quickstart/1.-create-an-environment-token-with-subo.md) and use `subo` to install:
22+
Once you have the pre-requisites in place, navigate to the `suborbital`
23+
directory you created when you [generated your token](../get-started#generate-your-token.md) and use `subo` to install:
1824

1925
```bash
2026
subo compute deploy core
@@ -31,7 +37,7 @@ kubectl get svc -n suborbital
3137

3238
## Set up DNS
3339

34-
When you deploy, a `LoadBalancer` is created for the builder called `scc-builder-service`. You should wait until an external IP address is provisioned for the service (use the `get svc` command above to check), and then create a DNS `A` record that matches the domain name you entered during setup. This will allow the builder to automatically provision a TLS certificate and connect with the [code editor](../integrate-the-function-editor/code-editor.md) securely.
40+
When you deploy, a `LoadBalancer` is created for the builder called `scc-builder-service`. You should wait until an external IP address is provisioned for the service (use the `get svc` command above to check), and then create a DNS `A` record that matches the domain name you entered during setup. This will allow the builder to automatically provision a TLS certificate and connect with the [code editor](docs/compute/customizing-functions/code-editor.md) securely.
3541

3642
## What's next
3743

0 commit comments

Comments
 (0)