Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions spelling.dic
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,9 @@ scalability
scc
SCC
SCHED
scn
scn
SCN
SDK
SelectUserWithUUID
semconv
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@ Compute functions can access a number of capabilities:

You can configure each capability. If you disable all capabilities, your users' functions will not be able to access the "outside world" in any way.

To configure capabilities, edit the `scc-config.yaml` file that `subo` created for you in your `suborbital/config` directory:
To configure capabilities, edit the `scn-config.yaml` file that `subo` created for you in your `suborbital/config` directory:

```yaml
networkRules: &networkRules
allowIPs: false
allowPrivate: false
allowHTTP: true
blockedDomains:
- "*.cluster.local"
- "scc-controlplane-service"
- "scc-builder-service"
- "scn-controlplane-service"
- "scn-builder-service"

capabilities:
logger:
Expand All @@ -41,4 +42,4 @@ capabilities:

When you run `subo compute deploy core`, your installation will use the configuration file. If you do not create a config file, then the above default is used. The defaults are designed to be a sane configuration for the average use-case.

More capability types are being developed and will be available in upcoming versions.
More capability types are being developed and will be available in upcoming versions.
16 changes: 8 additions & 8 deletions website/docs/compute/cloud-deployment/configure-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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.

To configure a storage bucket, provide the `SCC_STORAGE_PATH` environment variable to both the control plane and builder, e.g. `s3://my-bucket` for Amazon S3 or `gs://my-bucket` for Google Cloud Storage. For Kubernetes deployments, this is done in `.suborbital/scc-controlplane-deployment.yaml` under the `controlplane` and `builder` containers sections, and for local docker-compose deployments, this is done in `docker-compose.yaml` under the `scc-control-plane` and `scc-builder` services.
To configure a storage bucket, provide the `SCN_STORAGE_PATH` environment variable to both the control plane and builder, e.g. `s3://my-bucket` for Amazon S3 or `gs://my-bucket` for Google Cloud Storage. For Kubernetes deployments, this is done in `.suborbital/scn-controlplane-deployment.yaml` under the `controlplane` and `builder` containers sections, and for local docker-compose deployments, this is done in `docker-compose.yaml` under the `scn-controlplane` and `scn-builder` services.

## Authentication

Expand All @@ -18,7 +18,7 @@ GCS expects to read a service account credentials file, so those credentials mus

#### Kubernetes deployment

Create `.suborbital/scc-gcs-credentials.yaml`, providing the base64 encoded contents of your `service-account-file.json`:
Create `.suborbital/scn-gcs-credentials.yaml`, providing the base64 encoded contents of your `service-account-file.json`:

```yaml
apiVersion: v1
Expand All @@ -38,11 +38,11 @@ Mount the secret and provide the `GOOGLE_APPLICATION_CREDENTIALS` environment va
```yaml
containers:
- name: controlplane
image: suborbital/scc-control-plane:v0.3.0
image: suborbital/scn-controlplane:v0.3.3
command: ["controlplane"]

env:
- name: SCC_STORAGE_PATH
- name: SCN_STORAGE_PATH
value: "gs://your-storage-bucket"
- name: GOOGLE_APPLICATION_CREDENTIALS
value: "/etc/gcp/sa_credentials.json"
Expand All @@ -56,11 +56,11 @@ containers:
readOnly: true

- name: builder
image: suborbital/scc-builder:v0.3.0
image: suborbital/scn-builder:v0.3.3
command: ["builder"]

env:
- name: SCC_STORAGE_PATH
- name: SCN_STORAGE_PATH
value: "gs://your-storage-bucket"
- name: GOOGLE_APPLICATION_CREDENTIALS
value: "/etc/gcp/sa_credentials.json"
Expand All @@ -74,9 +74,9 @@ containers:
readOnly: true

volumes:
- name: scc-config
- name: scn-config
configMap:
name: scc-config
name: scn-config
- name: gcs-service-account-credentials-volume
secret:
secretName: gcs-service-account-credentials
Expand Down
10 changes: 5 additions & 5 deletions website/docs/compute/cloud-deployment/configure-webhooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

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.

You can set your own webhooks in the `scc-config.yaml` file that `subo` created for you in your `suborbital/config` directory.
You can set your own webhooks in the `scn-config.yaml` file that `subo` created for you in your `suborbital/config` directory.

## Configuration options
The `webhooks` stanza in `scc-config.yaml` consists of a top level `webhooks` object with a list of entries.
The `webhooks` stanza in `scn-config.yaml` consists of a top level `webhooks` object with a list of entries.

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).

## Examples

A simple inline example:
```yaml title=scc-config.yaml
```yaml title=scn-config.yaml
capabilities:
# ...

Expand All @@ -26,7 +26,7 @@ webhooks:
```

An example with shared headers and multiple targets for a single hook point:
```yaml title=scc-config.yaml
```yaml title=scn-config.yaml
commonHeaders: &commonHeaders
'Authorization': 'Bearer d2UncmUgaGlyaW5nCg=='

Expand Down Expand Up @@ -61,4 +61,4 @@ webhooks:
"version": "v1.0.0"
}
}
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ kubectl get svc -n suborbital

## Set up DNS

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.
When you deploy, a `LoadBalancer` is created for the builder called `scn-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.

## What's next

Expand Down
8 changes: 4 additions & 4 deletions website/docs/compute/concepts/data-plane-vs-control-plane.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ There are two components of Compute: the Data Plane and the Control Plane.

## Data Plane

The "data plane" is the component that actually **executes** your users' functions, and it is comprised of an auto-scaled group of containers running [Atmo](https://github.com/suborbital/atmo). In your cluster, Atmo will be running in a pod called `scc-atmo`.
The "data plane" is the component that actually **executes** your users' functions, and it is comprised of an auto-scaled group of containers running [Atmo](https://github.com/suborbital/atmo). In your cluster, Atmo will be running in a pod called `scn-atmo`.

The Atmo instances are run in 'headless' mode, which means they load configuration from a remote source, the control plane in this case.

## Control Plane

The Control Plane is comprised of two components; `scc-control-plane` and `scc-builder`. These two components are responsible for administering the cluster of Atmo instances and your users' functions, respectively.
The Control Plane is comprised of two components; `scn-controlplane` and `scn-builder`. These two components are responsible for administering the cluster of Atmo instances and your users' functions, respectively.

* `scc-builder` is the component that builds your users' functions and provides the embedded code editor. It can compile various languages to WebAssembly, it powers the [code editor](../integrate-the-function-editor/code-editor.md), and it provides CI/CD functionality for your users' code.
* `scc-control-plane` acts as a 'director' for Atmo, and controls things like autoscaling, collecting usage and error metrics, connecting to the Suborbital Telemetry service, and providing administrative APIs. It also manages the functions kept in your storage bucket.
* `scn-builder` is the component that builds your users' functions and provides the embedded code editor. It can compile various languages to WebAssembly, it powers the [code editor](../integrate-the-function-editor/code-editor.md), and it provides CI/CD functionality for your users' code.
* `scn-controlplane` acts as a 'director' for Atmo, and controls things like autoscaling, collecting usage and error metrics, connecting to the Suborbital Telemetry service, and providing administrative APIs. It also manages the functions kept in your storage bucket.

:::info
The control plane connects to `https://api.suborbital.network`, our authentication, billing, metadata, and telemetry service. An environment token is needed for the control plane to operate.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ Edit `templates/rust/src/lib.rs.tmpl` to change what your users will see when th

## Configuring Compute

To use the custom templates in your Compute installation, the `SCC_TEMPLATES_REPO` environment variable must be set on the builder service.
To use the custom templates in your Compute installation, the `SCN_TEMPLATES_REPO` environment variable must be set on the builder service.

- For a local deployment, edit `docker-compose.yml` to add `SCC_TEMPLATES_REPO:` to the builder with the value set to your fork \(e.g. `acmeco/runnable-templates`\)
- For a cloud deployment, edit `suborbital/scc-controlplane.yaml`, and add the following to the `builder` container's `environment`:
- For a local deployment, edit `docker-compose.yml` to add `SCN_TEMPLATES_REPO:` to the builder with the value set to your fork \(e.g. `acmeco/runnable-templates`\)
- For a cloud deployment, edit `suborbital/scn-controlplane.yaml`, and add the following to the `builder` container's `environment`:

```yaml
- name: SCC_TEMPLATES_REPO
- name: SCN_TEMPLATES_REPO
value: "{your fork}"
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,16 @@ npm publish --access public

</Tabs>


## Configuring Compute

Since your custom library is listed as a dependency of the template project, it will be installed when your users' functions are built for the first time.

In your Compute installation, you will need to configure the `SCC_TEMPLATES_REPO` environment variable.
In your Compute installation, you will need to configure the `SCN_TEMPLATES_REPO` environment variable.

- For a local deployment, edit `docker-compose.yml` to add `SCC_TEMPLATES_REPO:` to the builder with the value set to your fork \(e.g. `acmeco/runnable-templates`\)
- For a cloud deployment, edit `suborbital/scc-controlplane.yaml`, and add the following to the `builder` container's `environment`:
- For a local deployment, edit `docker-compose.yml` to add `SCN_TEMPLATES_REPO:` to the builder with the value set to your fork \(e.g. `acmeco/runnable-templates`\)
- For a cloud deployment, edit `suborbital/scn-controlplane.yaml`, and add the following to the `builder` container's `environment`:
```yaml
- name: SCC_TEMPLATES_REPO
- name: SCN_TEMPLATES_REPO
value: "{your fork}"
```

Expand Down
2 changes: 1 addition & 1 deletion website/docs/compute/quickstart/client-libraries/golang.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
)

func client() *compute.Client {
token, _ := os.LookupEnv("SCC_ENV_TOKEN")
token, _ := os.LookupEnv("SCN_ENV_TOKEN")
client, _ := compute.NewClient(compute.LocalConfig(), token)

return client
Expand Down
20 changes: 10 additions & 10 deletions website/docs/compute/quickstart/run-compute-locally.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ When you run Compute, it will wait for you to press enter to start a REPL where
✅ DONE: ready to start installation
⏩ START: installing...
▶️ docker-compose up -d
Container suborbital-scc-control-plane-1 Recreate
Container suborbital-scc-control-plane-1 Recreated
Container suborbital-scc-atmo-1 Recreate
Container suborbital-scc-atmo-1 Recreated
Container suborbital-scc-control-plane-1 Starting
Container suborbital-scc-builder-1 Starting
Container suborbital-scc-control-plane-1 Started
Container suborbital-scc-builder-1 Started
Container suborbital-scc-atmo-1 Starting
Container suborbital-scc-atmo-1 Started
Container suborbital-scn-controlplane-1 Recreate
Container suborbital-scn-controlplane-1 Recreated
Container suborbital-scn-atmo-1 Recreate
Container suborbital-scn-atmo-1 Recreated
Container suborbital-scn-controlplane-1 Starting
Container suborbital-scn-builder-1 Starting
Container suborbital-scn-controlplane-1 Started
Container suborbital-scn-builder-1 Started
Container suborbital-scn-atmo-1 Starting
Container suborbital-scn-atmo-1 Started
ℹ️ use `docker ps` and `docker-compose logs` to check deployment status

PROXY: local tunnel to function editor started
Expand Down