From 8215b981024ccb4f1d2dc9e8d10e9ddbea489450 Mon Sep 17 00:00:00 2001 From: Shan Desai Date: Mon, 14 Jun 2021 19:17:20 +0200 Subject: [PATCH] docs: add info about openssl, pkg-config deps (#339) * 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: https://github.com/sfackler/rust-openssl/issues/951 Signed-off-by: Shan Desai * 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 * docs: refactor docs for clarity Signed-off-by: Shan Desai * refactor(docs): remove redundant sentence --- discovery-handler-development.md | 9 ++++++--- extensibility.md | 11 ++++++----- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/discovery-handler-development.md b/discovery-handler-development.md index e88b940..cdd9598 100644 --- a/discovery-handler-development.md +++ b/discovery-handler-development.md @@ -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 diff --git a/extensibility.md b/extensibility.md index 0225f2b..5f36524 100644 --- a/extensibility.md +++ b/extensibility.md @@ -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 @@ -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 -``` \ No newline at end of file +```