Skip to content

Commit c9d8f7a

Browse files
authored
fixing whitespaces in markdown (#256)
* fixing whitespaces in markdown * whitspace fixes * publish a hidden page, w/ whitspace fixes
1 parent 288e8f0 commit c9d8f7a

File tree

3 files changed

+31
-9
lines changed

3 files changed

+31
-9
lines changed

docs/readme-sync/deploy-as-a-microservice/012 - quickstart-with-docker.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Quickstart with Docker"
33
excerpt: ""
44
slug: "quickstart-with-docker"
5-
hidden: true
5+
hidden: false
66
metadata:
77
title: "Agent Quickstart with Docker - Optimizely Full Stack"
88
createdAt: "2020-05-21T20:35:58.387Z"
@@ -13,27 +13,31 @@ This is a brief quickstart showing how to run Agent locally via Docker and how t
1313
If Docker is not installed then you can download it [here](https://docs.docker.com/install/).
1414

1515
## Running locally via Docker
16+
1617
First pull the Docker image with:
18+
1719
```bash
1820
docker pull optimizely/agent
1921
```
2022

2123
Then start the service in the foreground with the following command:
24+
2225
```bash
2326
docker run -p 8080:8080 --env OPTIMIZELY_LOG_PRETTY=true optimizely/agent
2427
```
2528
Note that we're enabling "pretty" logs which provide colorized and human readable formatting.
2629
The default log output format is structured JSON.
2730

2831
## Evaluating REST APIs
29-
The rest of the getting started guide will demonstrate the APIs capabilities. For brevity, we've chosen to illustrate the API usage with Python. Note that the APIs are also defined via OpenAPI (Swagger) and can be found [here](http://localhost:8080/openapi.yaml).
32+
33+
The rest of the getting started guide will demonstrate the APIs capabilities. For brevity, we've chosen to illustrate the API usage with Python. Note that the APIs are also defined via OpenAPI (Swagger) and can be found on localhost [here](http://localhost:8080/openapi.yaml).
3034

3135
### Start an http session
32-
Each request made into Optimizely Agent is in the context of an Optimizely SDK Key. SDK Keys map API requests to a specific Optimizely Project and Environment. We can setup a global request header by using the `requests.Session` object.
36+
37+
Each request made into Optimizely Agent is in the context of an Optimizely SDK Key. SDK Keys map API requests to a specific Optimizely Project and Environment. We can set up a global request header by using the `requests.Session` object.
3338

3439
```python
3540
import requests
36-
3741
s = requests.Session()
3842
s.headers.update({'X-Optimizely-SDK-Key': '<<YOUR-SDK-KEY>>'})
3943
```
@@ -43,6 +47,7 @@ To get your SDK key, navigate to the project settings of your Optimizely account
4347
Future examples will assume this session is being maintained.
4448

4549
### Get current environment configuration
50+
4651
The `/config` endpoint returns a manifest of the current working environment.
4752

4853
```python
@@ -54,6 +59,7 @@ for key in env['featuresMap']:
5459
```
5560

5661
### Activate Feature
62+
5763
The `/activate?featureKey={key}` endpoint activates the feature for a given user. In Optimizely, activation is in the context of a given user to make the relative bucketing decision. In this case we'll provide a `userId` via the request body. The `userId` will be used to determine how the feature will be evaluated. Features can either be part of a Feature Test in which variations of feature variables are being measured against one another or a feature rollout, which progressively make the feature available to the selected audience.
5864

5965
From an API standpoint the presence of a Feature Test or Rollout is abstracted away from the response and only the resulting variation or enabled feature is returned.

docs/readme-sync/deploy-as-a-microservice/040 - configure-optimizely-agent/031 - agent-notifications.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Agent Notifications"
2+
title: Agent Notifications
33
excerpt: ""
44
slug: "agent-notifications"
55
hidden: false
@@ -9,7 +9,6 @@ createdAt: "2020-05-21T20:35:58.387Z"
99
updatedAt: "2020-07-14T20:51:52.458Z"
1010
---
1111

12-
1312
Agent provides an endpoint that sends notifications to subscribers via [Server-Sent Events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events). This is Agent's equivalent of Notification Listeners found in Optimizely SDKs.
1413

1514
For details on the notification types, what causes them to be triggered, and the data they provide, see the [Notification Listeners documentation](https://docs.developers.optimizely.com/full-stack/docs/set-up-notification-listener-go).
@@ -22,27 +21,34 @@ By default, the notifications endpoint is disabled. To enable it, change config.
2221
api:
2322
enableNotifications: true
2423
```
24+
2525
Or, enable it by setting an environment variable:
26+
2627
```shell script
2728
export OPTIMIZELY_API_ENABLENOTIFICATIONS=1
2829
```
2930

3031
## Usage
32+
3133
Send a `GET` request to `/v1/notifications/event-stream` to subscribe:
34+
3235
```shell script
3336
curl -N -H "Accept:text/event-stream" -H "X-Optimizely-Sdk-Key:<YOUR SDK KEY>"\
3437
http://localhost:8080/v1/notifications/event-stream
3538
```
39+
3640
This connection will remain open, and any notifications triggered by other requests received by Agent are pushed as events to this stream. Try sending requests to `/v1/activate` or `/v1/track` to see notifications being triggered.
3741

3842

3943
### Filtering
44+
4045
To subscribe only to a particular category of notifications, add a `filter` query parameter. For example, to subscribe only to Decision notifications:
46+
4147
```shell script
4248
curl -N -H "Accept:text/event-stream" -H "X-Optimizely-Sdk-Key:<YOUR SDK KEY>"\
4349
http://localhost:8080/v1/notifications/event-stream?filter=decision
4450
```
4551

46-
4752
## Example
48-
A runnable Python example can be found in [`examples/notifications.py`](../examples/notifications.py).
53+
54+
For a runnable Python example, see [examples/notifications.py](https://github.com/optimizely/agent/tree/master/examples).

docs/readme-sync/deploy-as-a-microservice/040 - configure-optimizely-agent/040 - advanced-configuration.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ updatedAt: "2020-07-14T20:51:52.458Z"
1212
## Setting Configuration Values
1313

1414
Configuration can be provided to Agent via the following methods:
15+
1516
1. Reading from environment variables
1617
2. Reading from a YAML configuration file
1718

@@ -22,25 +23,34 @@ Internally, Optimizely Agent uses the [Viper](https://github.com/spf13/viper) li
2223
## Config File Location
2324

2425
The default location of the config file is `config.yaml` in the root directory. If you want to specify another location, use the `OPTIMIZELY_CONFIG_FILENAME` environment variable:
26+
2527
```bash
2628
OPTIMIZELY_CONFIG_FILENAME=/path/to/other_config_file.yaml make run
2729
```
2830

2931
## Nested Configuration Options
30-
When setting the value of "nested" configuration options using environment variables, underscores denote deeper access. The following examples are equivalent ways of setting the client polling interval:
32+
33+
When setting the value of "nested" configuration options using environment variables, underscores denote deeper access. The following examples are equivalent ways of setting the client polling interval.
34+
35+
Set the polling interval in YAML:
36+
3137
```yaml
3238
# Setting a nested value in a .yaml file:
3339
client:
3440
pollingInterval: 120s
3541
```
3642
43+
Set the polling interval with a shell script:
44+
3745
```shell script
3846
// Set environment variable for pollingInterval, nested inside client
3947
export OPTIMIZELY_CLIENT_POLLINGINTERVAL=120s
4048
```
4149

4250
## Unsupported Environment Variable Options
51+
4352
Some options can only be set via config file, and not environment variable (for details on these options, see the Configuration Options table in the [main README](https://github.com/optimizely/agent/blob/master/README.md):
53+
4454
- `admin.auth.clients`
4555
- `api.auth.clients`
4656
- Options under`webhook.projects`

0 commit comments

Comments
 (0)