Skip to content

Commit

Permalink
docs: add info about openssl, pkg-config deps (#339)
Browse files Browse the repository at this point in the history
* docs: add info about openssl, pkg-config deps

- Without previous installation of `openssl-dev`, `pkg-config`,
  `cargo install cargo-generate` will fail.
- Potential solution is to install the respective dependencies beforehand

Tested On: Windows10 Pro + WSL2 (Ubuntu-20.04 LTS) + rustc > v1.51
Possible Solution found on: sfackler/rust-openssl#951

Signed-off-by: Shan Desai <shantanoo.desai@gmail.com>

* docs: point to `cargo-generate` installation section

- Reason: `cargo install cargo-generate` provides `--features` flag to
  enable SSL binding which can add dependencies and remove the `openssl-dev`
  and `pkg-config` standalone installations.
- Approach: Give user the choice to either install these deps accordingly by
  pointing to the Installtion Instruction for `cargo-generate`

Signed-off-by: Shan Desai <shantanoo.desai@gmail.com>

* docs: refactor docs for clarity

Signed-off-by: Shan Desai <shantanoo.desai@gmail.com>

* refactor(docs): remove redundant sentence
  • Loading branch information
shantanoo-desai authored Jun 14, 2021
1 parent ee228ac commit 8215b98
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
9 changes: 6 additions & 3 deletions discovery-handler-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,12 @@ deleted Configuration.

## Creating a Discovery Handler in Rust using a template
Rust Discovery Handler development can be kick-started using Akri's [Discovery Handler template](https://github.com/kate-goldenring/akri-discovery-handler-template) and
[`cargo-generate`](https://github.com/cargo-generate/cargo-generate). Specify the name of your project.
```sh
cargo install cargo-generate
[`cargo-generate`](https://github.com/cargo-generate/cargo-generate).

Install [`cargo-generate`](https://github.com/cargo-generate/cargo-generate#installation) and
use the tool to pull down Akri's template, specifying the name of the project with the `--name` parameter.

```sh
cargo generate --git https://github.com/kate-goldenring/akri-discovery-handler-template.git --name akri-discovery-handler
```
This template abstracts away the work of registering with the Agent and creating the Discovery Handler service. All you
Expand Down
11 changes: 6 additions & 5 deletions extensibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ the Agent, which hosts the `Registration` service defined in the gRPC interface.

## New DiscoveryHandler implementation
### Use `cargo generate` to clone the Discovery Handler template
Pull down the [Discovery Handler template](https://github.com/kate-goldenring/akri-discovery-handler-template) using
[`cargo-generate`](https://github.com/cargo-generate/cargo-generate).
```sh
cargo install cargo-generate

Install [`cargo-generate`](https://github.com/cargo-generate/cargo-generate#installation) and
use the tool to pull down Akri's template, specifying the name of the project with the `--name` parameter.

```sh
cargo generate --git https://github.com/kate-goldenring/akri-discovery-handler-template.git --name akri-http-discovery-handler
```
### Specify the DiscoveryHandler name and whether discovered devices are sharable
Expand Down Expand Up @@ -672,4 +673,4 @@ used in our installation command.
We can watch as the broker pods get deployed:
```bash
watch kubectl get pods -o wide
```
```

0 comments on commit 8215b98

Please sign in to comment.