enarx-archive / demo

A demonstration of various Enarx components
Apache License 2.0
9 stars 8 forks source link

Add instructions for reproducing the AMD SEV demo #39

Closed connorkuehl closed 4 years ago

connorkuehl commented 4 years ago

Closes https://github.com/enarx/enarx/issues/129

This pull request is accompanied by a corresponding change to the Enarx wiki:

From 792c500dc65b5dddadfa983a1e08de351695053a Mon Sep 17 00:00:00 2001
From: Connor Kuehl <ckuehl@redhat.com>
Date: Tue, 4 Feb 2020 00:02:18 +0000
Subject: [PATCH] Add instructions for reproducing the AMD SEV demo

---
 Demo-video.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/Demo-video.md b/Demo-video.md
index f57935d..89a8ec0 100644
--- a/Demo-video.md
+++ b/Demo-video.md
@@ -7,6 +7,57 @@ In this first example, you can see a Keep being initiated using AMD SEV and exec

 [![Enarx SEV demo video](https://github.com/enarx/enarx.github.io/blob/master/enarx-SEV-demo-video.gif)](https://raw.githubusercontent.com/enarx/enarx.github.io/master/enarx-SEV-demo-video.webm)

+### Building the demo
+
+Want to try it out for yourself? Make sure you've got everything you need
+before you begin:
+
+#### Prerequisites
+
+* An AMD processor with SEV capabilities (EPYC)
+* A Linux kernel with `CONFIG_KVM_AMD_SEV` enabled (set to 'y') with the appropriate
+  kernel command line parameters set: `mem_encrypt=on kvm_amd.sev=1`
+  * NOTE: The above requirements are out of scope for this document. Please refer to
+    the following resources and/or your favorite internet search engine to get started.
+  * [How do I build the Linux kernel?](https://kernelnewbies.org/KernelBuild)
+  * [How do I set kernel command line parameters?](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/system_design_guide/configuring-kernel-command-line-parameters_system-design-guide)
+* An [Enarx development environment](https://github.com/enarx/demo.git)
+* The `wasm32-unknown-unknown` Rust toolchain target
+
+```bash
+$ rustup target add wasm32-unknown-unknown
+```
+
+* The `cmake` package must be installed to build the demo
+
+#### Building
+
+1. Clone the demo repository:
+
+```bash
+$ git clone https://github.com/enarx/demo.git
+```
+2. Enter the cloned repository and build the project:
+
+```bash
+$ cd demo
+$ cargo build
+```
+
+### Running the demo
+
+Once built, the demo can be ran like so:
+
+```bash
+$ cargo run --bin demo 3 4
+```
+
+Alternatively:
+
+```bash
+$ ./target/debug/demo 3 4
+```
+
 ## Intel SGX
 In this second example, the same thing is done using Intel SGX.

-- 
2.24.1
axelsimon commented 4 years ago

This looks good to me, however my current preference was to concentrate all documentation under the main repo's wiki, and have a more minimal readme for this repo that would point to documentation.

A bit like enarx/enarx.github.io now has a minimal readme and everything else is on the main repo.

connorkuehl commented 4 years ago

This looks good to me, however my current preference was to concentrate all documentation under the main repo's wiki, and have a more minimal readme for this repo that would point to documentation.

Done!

axelsimon commented 4 years ago

This PR looks fine now, with the readme referring people to the right place. However i'm not seeing anything on the enarx/enarx/wiki side, am i missing something?

axelsimon commented 4 years ago

Oh, i think i see how you are doing this, You'll make the change in the wiki once this PR goes through. Approving it then.

connorkuehl commented 4 years ago

Changes pushed to wiki.