You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| startup | Lifecycle | Dispatched when the servo is assembled.|
213
+
| shutdown | Lifecycle | Dispatched when the servo is being shutdown.|
214
+
| metrics | Informational | Dispatched to gather the metrics being measured.|
215
+
| components | Informational | Dispatched to gather the components & settings available for adjustment. |
216
+
| check | Operational | Asks connectors to check if they are ready to run by validating settings, etc.|
217
+
| describe | Operational | Gathers the current state of the application under optimization.|
218
+
| measure | Operational | Takes a measurement of target metrics and reports them to the optimizer.|
219
+
| adjust | Operational| Applies a change to the components/settings of the application under optimization and reports status to the optimizer. |
220
220
221
221
#### Event Handlers & Prepositions
222
222
@@ -708,16 +708,45 @@ During local development, you may wish to invoke these tools as follows:
708
708
Linting is automatically performed when a new branch is pushed or a PR is opened
709
709
and conformance can be remediated during post-implementation code review.
710
710
711
-
### Connecting to Development APIs
711
+
### Connecting to Optimization APIs
712
+
713
+
Optimizer API and authentication can configured be inline with your config yaml (servo.yaml)
714
+
715
+
```
716
+
optimizer:
717
+
base_url: some_url
718
+
id: org.domain/app
719
+
...
720
+
```
721
+
722
+
These details can also be configured via environment variables as highlighted in the following sections.
723
+
Note these sections are mutually exclusive: Opsani API refers to Opsani managed endpoints wheras the Appdynamics
724
+
API refers to upcoming FSO Optimization. Which API type is used is dynamically derived during configuration/env var parsing by
725
+
the [pydantic configuration model (see BaseServoConfiguration.optimizer)](https://github.com/opsani/servox/blob/main/servo/configuration.py).
726
+
727
+
#### Opsani API
712
728
713
729
By default, the servo will connect to the primary Opsani API hosted on
714
730
[https://api.opsani.com](https://api.opsani.com). This behavior can be
715
731
overridden via CLI options and environment variables:
716
732
717
-
| Option | Environment Variable | Description | Example |
| `--base-url` | `OPSANI_BASE_URL` | Sets an alternate base URL. The path is computed using the optimizer. Useful for staging deployments and integration tests. | `servo --base-url https://staging-api.opsani.com:3456 run` |
720
-
| `--url` | `OPSANI_URL` | Sets an explicit URL target. When given, the base URL is ignored and paths are not computed. Useful in unit tests and workstation development with a partial server stack. | `servo --url http://localhost:1234 run` |
| `optimizer.base-url` | `OPSANI_BASE_URL` | Sets an alternate base URL. The path is computed using the provided optimizer id. Useful for staging deployments and integration tests. | `OPSANI_BASE_URL=https://staging-api.opsani.com:3456 servo run` |
736
+
| `optimizer.url` | `OPSANI_URL` | Sets an explicit URL target. When given, the base URL is ignored and paths are not computed. Useful in unit tests and workstation development with a partial server stack. | `OPSANI_URL=http://localhost:1234 servo run` |
737
+
| `optimizer.id` | `OPSANI_ID` | Identifier of the application as provided by the Opsani optimizer provisioned for your application | `OPSANI_ID=newco.com/awesome-app1 servo run` |
738
+
| `optimizer.token` | `OPSANI_TOKEN` | Authentication token as provided by the Opsani optimizer provisioned for your application | `OPSANI_TOKEN=00000000-0000-0000-0000-000000000000 servo run` |
| `optimizer.base-url` | `APPD_BASE_URL` | Sets an alternate base URL. The path is computed using the provided workload and tenant ids. | `APPD_BASE_URL=https://optimize-ignite-test.saas.appd-test.com/ servo run` |
745
+
| `optimizer.url` | `APPD_URL` | Sets an explicit URL target. When given, the base URL is ignored and paths are not computed. Useful in unit tests and workstation development with a partial server stack. | `APPD_URL=http://localhost:1234 servo run` |
746
+
| `optimizer.tenant_id` | `APPD_TENANT_ID` | Identifier of the application tenant | `APPD_TENANT_ID=00000000-0000-0000-0000-000000000000 servo run` |
747
+
| `optimizer.workload_id` | `APPD_WORKLOAD_ID` | Base64 encoded identifier of the workload to be optimized as provided by the provisioned optimizer tenant | `APPD_WORKLOAD_ID=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==== servo run` |
748
+
| `optimizer.client_id` | `APPD_CLIENT_ID` | Authentication client ID as provided by the Opsani optimizer provisioned for your application | `APPD_CLIENT_ID=<client id text> servo run` |
749
+
| `optimizer.client_secret` | `APPD_CLIENT_SECRET` | Authentication client secret as provided by the Opsani optimizer provisioned for your application | `APPD_CLIENT_SECRET=<client secret text> servo run` |
0 commit comments