Skip to content

Commit

Permalink
docs: fix guides
Browse files Browse the repository at this point in the history
  • Loading branch information
dtdang committed Oct 29, 2024
1 parent 6d37871 commit 8917799
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
15 changes: 8 additions & 7 deletions docs/userguides/deploying.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Deploying Bots

In this guide, we are going to show you more details on how to deploy your application to the [Silverback Platform](https://silverback.apeworx.io).
In this guide, we are going to show you more details on how to deploy your bot to the [Silverback Platform](https://silverback.apeworx.io).

```{note}
You will need to have created a cluster in your workspace first. More information can be found in the [Managing Your Platform](./managing.md).
```

If you have no bots, we will first have to containerize our Bots and upload them to a container registry that our Cluster is configured to access.
In order to deploy your bots to the Cluster, we will first have to containerize our Bots and upload them to a container registry that our Cluster can access.

```{note}
Building a container for your application can be an advanced topic, we have included the `silverback build` subcommand to help assist in generating Dockerfiles.
Building a container for your bot can be an advanced topic, we have included the `silverback build` subcommand to help assist in generating Dockerfiles.
```

## Building your Bot

To build your container definition(s) for your bot(s), you can use the `silverback build` command. This command searches your `bots` directory for python modules, then auto-generates Dockerfiles.
To build your container definition(s) for your bot(s), you can use the [`silverback build`][silverback-build] command. This command searches your `bots` directory for python modules, then auto-generates Dockerfiles.

For example, if your directory is structured as suggested in [development](./development), and your `bots/` directory looks like this:

Expand Down Expand Up @@ -64,7 +64,7 @@ TODO: Add how to debug containers using `silverback run` w/ `taskiq-redis` broke

## Adding Environment Variables

Once you have created your bot application container image, you might know of some environment variables the image requires to run properly.
Once you have created your bot container image, you might know of some environment variables the image requires to run properly.
Thanks to it's flexible plugin system, ape plugins may also require specific environment variables to load as well.
Silverback Clusters include an environment variable management system for exactly this purpose,
which you can manage using [`silverback cluster vars`][silverback-cluster-vars] subcommand.
Expand All @@ -89,7 +89,7 @@ Use _Ape Account Plugins_ such as [`ape-aws`](https://github.com/ApeWorX/ape-aws

```{note}
The Etherscan plugin _will not function_ without an API key in the cloud environment.
This will likely create errors running your applications if you use Ape's `Contract` class.
This will likely create errors running your bots if you use Ape's `Contract` class.
```

To list your Variable Groups, use [`silverback cluster vars list`][silverback-cluster-vars-list].
Expand Down Expand Up @@ -123,7 +123,7 @@ You can do this using the [`silverback cluster bots health`][silverback-cluster-

```{note}
It usually takes a minute or so for your bot to transition from PROVISIONING to STARTUP to the RUNNING state.
If there are any difficulties in downloading your container image, provisioning your desired infrastructure, or if your application encounters an error during the STARTUP phase,
If there are any difficulties in downloading your container image, provisioning your desired infrastructure, or if your bot encounters an error during the STARTUP phase,
the Bot will not enter into the RUNNING state and will be shut down gracefully into the STOPPED state.
Once in the STOPPED state, you can make any adjustments to the environment Variable Group(s) or other runtime parameters in the Bot config;
Expand Down Expand Up @@ -186,6 +186,7 @@ TODO: Updating runtime parameters

TODO: Downloading metrics from your Bot

[silverback-build]: ../commands/run.html#silverback-build
[silverback-cluster-bots]: ../commands/cluster.html#silverback-cluster-bots
[silverback-cluster-bots-errors]: ../commands/cluster.html#silverback-cluster-bots-errors
[silverback-cluster-bots-health]: ../commands/cluster.html#silverback-cluster-bots-health
Expand Down
4 changes: 2 additions & 2 deletions docs/userguides/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ There are 3 suggested ways to structure your project. In the root directory of y

1. Create a `bot.py` file. This is the simplest way to define your bot project.

1. Create a `bots/` folder. Then develop bots in this folder as separate scripts (Do not include a __init__.py file).
2. Create a `bots/` folder. Then develop bots in this folder as separate scripts (Do not include a __init__.py file).

1. Create a `bot/` folder with a `__init__.py` file that will include the instantiation of your `SilverbackBot()` object.
3. Create a `bot/` folder with a `__init__.py` file that will include the instantiation of your `SilverbackBot()` object.

The `silverback` cli automatically searches for python scripts to run as bots in specific locations relative to the root of your project.
It will also be able to detect the scripts inside your `bots/` directory and let you run those by name (in case you have multiple bots in your project).
Expand Down
10 changes: 5 additions & 5 deletions docs/userguides/managing.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ You can signup for Silverback to get full access for free at [https://silverback

```{note}
The Platform UI will let you create and manage Workspaces and Clusters using a graphical experience, which may be preferred.
The CLI experience is for those working locally who don't want to visit the website, or are locally developing their applications.
The CLI experience is for those working locally who don't want to visit the website, or are locally developing their bots.
```

Once you have signed up, you can actually create (and pay for) your Clusters from the Silverback CLI utility by first
Expand All @@ -16,13 +16,13 @@ logging in to the Platform using [`silverback login`][silverback-login].

A Workspace is an area for one or more people to co-manage a set of clusters together. You can manage workspaces from the Silverback CLI using [`silverback cluster workspaces`][silverback-cluster-workspaces].

Using the Silverback CLI you can [list][silverback-cluster-workspaces-list], [make new][silverback-cluster-workspaces-new], [view the configuration information][silverback-cluster-workspaces-info], [update][silverback-cluster-workspaces-update], and [delete][silverback-cluster-workspaces-delete] workspaces.
Using the Silverback CLI you can [list workspaces][silverback-cluster-workspaces-list], [make new ones][silverback-cluster-workspaces-new], [view their configuration information][silverback-cluster-workspaces-info], [update their metadata][silverback-cluster-workspaces-update], as well as [delete them][silverback-cluster-workspaces-delete] workspaces.

## Managing a Cluster

The Silverback Platform runs your Bots on dedicated managed application Clusters.
These Clusters will take care to orchestrate infrastructure, monitor, run your triggers, and collect metrics for your applications.
Each Cluster is bespoke for an individual or organization, and isolates your applications from others on different infrastructure.
The Silverback Platform runs your Bots on dedicated managed Clusters.
These Clusters will take care to orchestrate infrastructure, monitor, run triggers, and collect metrics for all of your bots you have added to them.
Each Cluster is bespoke for an individual or organization, and isolates your bots from other users by virtual of running on different infrastructure.

Once you have a workspace, you can create (and pay for) your Clusters from the Silverback CLI using [`silverback cluster new`][silverback-cluster-new] to follow the steps necessary to deploy it. You can also use the Silverback CLI to [list][silverback-cluster-list] and [update][silverback-cluster-update] existing clusters.

Expand Down

0 comments on commit 8917799

Please sign in to comment.