|
| 1 | +# Deploy to DO App Platform |
| 2 | + |
| 3 | +With a Broker and associated components that are running successfully locally you are ready to deploy them on DO App Platform. |
| 4 | + |
| 5 | +First, stop the local Broker to avoid duplicating consumers. |
| 6 | + |
| 7 | +```console |
| 8 | +tmctl stop |
| 9 | +``` |
| 10 | + |
| 11 | +You can verify that all the components are stopped and that no containers are running |
| 12 | + |
| 13 | +```console |
| 14 | +docker ps |
| 15 | +``` |
| 16 | + |
| 17 | +## Generate the App Spec and Create the App |
| 18 | + |
| 19 | +You can generate the DO App Spec with `tmctl` and pipe it directly to `doctl` like so: |
| 20 | + |
| 21 | +```console |
| 22 | +tmctl dump -p digitalocean |
| 23 | +tmctl dump -p digitalocean | doctl apps create --spec - |
| 24 | +``` |
| 25 | + |
| 26 | +!!! Tip |
| 27 | + The `tmctl dump` command will generate Kubernetes manifests that you can use on a Kubernetes cluster that runs TriggerMesh. The `tmctl dump -p docker-compose` will generate a Docker compose file. Additional options are available to configure the generated manifests. |
| 28 | + |
| 29 | + ```console |
| 30 | + $ tmctl dump --help |
| 31 | + ``` |
| 32 | + |
| 33 | +## View the App on DO |
| 34 | + |
| 35 | +Head over to the DO App Platform console, you will see an App named with the name of your local broker. Each TriggerMesh component will be running as separate container like locally. |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | +You can select the _Runtime Logs_ tab and you will see the logs of each container. |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | +## Manage the App |
| 45 | + |
| 46 | +You can manage the App via the DO console like any other App, and you can manage it via the `doctl` client as well. |
| 47 | + |
| 48 | +```console |
| 49 | +doctl apps list |
| 50 | +ID Spec Name Default Ingress Active Deployment ID In Progress Deployment ID Created At Updated At |
| 51 | +954ab2c0-26cf-4fba-8ef5-de52d8b7c99c do 93b34e5b-439e-4d9b-8ee6-193d481d3904 2023-02-14 20:22:03 +0000 UTC 2023-02-14 20:22:25 +0000 UTC |
| 52 | + |
| 53 | +doctl apps delete 954ab2c0-26cf-4fba-8ef5-de52d8b7c99c |
| 54 | +❯ Are you sure you want to delete this App? yes |
| 55 | +``` |
| 56 | + |
| 57 | +Once you have deleted your App in DO, you can restart your Pipe locally |
| 58 | + |
| 59 | +```console |
| 60 | +tmctl start |
| 61 | +2023/02/14 21:31:48 do | Starting broker |
| 62 | +2023/02/14 21:31:49 do | Starting do-kafkatarget |
| 63 | +2023/02/14 21:31:49 do | Starting do-awssqssource |
| 64 | +2023/02/14 21:31:50 do | Starting do-cloudeventstarget |
| 65 | +``` |
0 commit comments