Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Su <[email protected]>
  • Loading branch information
pingsutw committed Mar 28, 2024
1 parent e12ae06 commit f89dfbf
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jupytext:
## How agent plugin service works?
Before testing agents in the development environment, let's talk about how it works.

Compare to the bigquery plugin example here's how the bigquery agent service work.
Compared to the bigquery backend plugin, Flyte agent is running in a separate deployment instead of inside the Flytepropeller.

Bigquery plugin
Bigquery backend plugin (Inside Flytepropeller)

![image.png](https://raw.githubusercontent.com/flyteorg/static-resources/main/flyte/concepts/agents/plugin_life_cycle.png)

Expand All @@ -29,11 +29,10 @@ The life cycle will be
1. FlytePlugins send grpc request to the agent server.
2. Agent server sends request through SDK and return the query data.

You can find that it is a little bit slower than the plugin example above.
Hence, to test the agent server locally, it's necessary to run both the single binary and agent server at the same time.
Flytepropeller will be able to send the requests to your local agent server.

But it is far more easier to be implemented and still faster than writing the service in a pod task.

## How to setup Agent Service in Development Mode?
## How to set up agent service in development mode?
Let's develop the powerful agent service!

1. Use the dev mode through flytectl.
Expand Down Expand Up @@ -70,7 +69,7 @@ plugins:
# Registered Task Types
agent-service:
defaultAgent:
endpoint: "dns:///localhost:8000" # your grpc agent server port
endpoint: "localhost:8000" # your grpc agent server port
insecure: true
timeouts:
GetTask: 10s
Expand All @@ -84,10 +83,10 @@ make compile
```

5. Set up your secrets
In the development environment, you can set up your secrets in local host.
In the development environment, you can set up your secrets in local machine.
- Add secrets in `/etc/secrets/SECRET_NAME`.

Since your agent server is on your localhost, it can retrieve the secret locally.
Since your agent server is running locally rather than within Kubernetes, it can retrieve the secret from your local file system.

6. Test your agent task
```bash
Expand Down

0 comments on commit f89dfbf

Please sign in to comment.