Skip to content

Commit

Permalink
update Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
voigt committed Dec 5, 2023
1 parent 48e8e60 commit f0c7e5b
Showing 1 changed file with 34 additions and 4 deletions.
38 changes: 34 additions & 4 deletions example-2-redis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,40 @@

## Scenario

This scenario will demonstrate deployment and configuration a Spin application connecting to a Redis database.
This scenario will demonstrate deployment and configuration of a Spin application connecting to a Redis database via [Dynamic Application Configuration](https://developer.fermyon.com/spin/v2/dynamic-configuration).

## Known-Issues
## Usage

At this point in time it is not possible to handover a `runtime_config.toml` to [containerd-shim-spin-v1](https://github.com/deislabs/containerd-wasm-shims/tree/main/containerd-shim-spin-v1). This means that the Spin application will not honor the `RUNTIME_CONFIG_FILE` environment variable and always use a local KV instead.
Deploy a simple Redis instance:

Therefore this scenario is not yet fully functional.
```
$ kubectl apply -f redis.yaml
```

Add data to redis:

```
$ redis-cli
127.0.0.1:6379> SET hello "World"
OK
127.0.0.1:6379> SET spin "Rocks!!"
OK
127.0.0.1:6379> GET hello
"World"
127.0.0.1:6379> get spin
"Rocks!!"
```

Deploy the Spin application:

```
$ kubectl apply -f deploy_spin-redis.yaml
```

Access the Spin application:

```
$ kubectl port-forward deployment/spin-redis 8000:80
```

And access `localhost:8000` in your browser.

0 comments on commit f0c7e5b

Please sign in to comment.