Installing the Anjuna SGX Runtime

Prerequisites

To install and run the Anjuna SGX Runtime, the following prerequisites must be met:

Hardware requirements

Important

  • The host machine must use a CPU that supports Intel® Software Guard Extensions (SGX).
  • Intel SGX must be enabled in the BIOS of the host machine. Be sure to use the Enabled setting, not Software Controlled.

Supported platforms

  • Ubuntu 18.04 (Bionic Beaver) Server and Desktop editions

Software requirements

  • The user performing the installation must have administrator privileges (root or sudo permissions).
  • The Intel SGX Driver must be installed and loaded (the Anjuna SGX Runtime will attempt to install this component if it is not found).
  • The Intel SGX Platform Software (PSW) must be installed and running (the Anjuna SGX Runtime will attempt to install this component if it is not found).

Important

The Intel SGX components are required to run the Anjuna SGX Runtime. If those components are not already installed on the host, the Anjuna SGX Runtime installer has the ability to set up Intel SGX components during the installation.

Execute the Anjuna SGX Runtime installer

An installation package is provided to install the Anjuna SGX Runtime on an SGX-enabled host. The package is an executable that performs the following actions:

  • Checks for Intel SGX system compatibility.
  • Checks for OS compatibility (Ubuntu 16.04 or Ubuntu 18.04).
  • Checks for availability of the Intel® SGX Driver.
  • Checks for availability of the Intel® PSW stack.
  • Installs the Intel® SGX components if necessary.
  • Installs the Anjuna SGX Runtime on the host.
  • Installs the sealing tool.

The following file should be present on the system:

anjuna-runtime-ubuntu18-0.22.0025.bin

The installer supports various command-line options to customize its behavior. To see the available options, use the --help option:

$ ./anjuna-runtime-ubuntu18-0.22.0025.bin --help

Anjuna SGX Runtime self-extracting installer

Usage: ./anjuna-runtime-ubuntu18-0.22.0025.bin [OPTIONS]
Run this file to extract and install Anjuna Runtime.

Available options:
  -v, --verbose   Print more information during the setup
  -l, --list      List the content of this package
  -e, --extract   Extract the package, but skip the setup
  -t, --tar       Generate a TAR file that contains the whole package
  -h, --help      Print this message
      --clean     Re-install the Intel SGX Driver and Intel PSW even if they
                  were already installed. By default, the installer will setup those
                  components only if the they are not already installed

  --version       Print the version information

To get started, simply run the installer

$ ./anjuna-runtime-ubuntu18-0.22.0025.bin

Important

The Anjuna SGX Runtime installer is a self-extracting file and requires executable permission to run. If the permission was removed during the file transfer between hosts, it can be re-applied with the chmod command. If you see this error:

$ ./anjuna-runtime-ubuntu18-0.22.0025.bin
bash: anjuna-runtime-ubuntu18-0.22.0025.bin: Permission denied

just run the following command:

$ chmod +x ./anjuna-runtime-ubuntu18-0.22.0025.bin

and then run the installer again.

The installer should produce the following output:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
 Anjuna SGX Runtime self-extracting installer

 Checking for Operating System
 Found Ubuntu 18.04.3 LTS

 Checking for SGX Hardware support
 This host is SGX capable (sgx_is_capable => 1)

 <... snip ...>

 Checking for OS packages
 - Package [wget] alread installed
 - Package [jq] alread installed
 - Package [python] alread installed
 - Package [libprotobuf-dev] alread installed
 - Package [build-essential] alread installed
 - Package [libssl-dev] alread installed
 - Package [libcurl4-openssl-dev] alread installed
 - Package [linux-headers-4.15.0-45-generic] alread installed

 Checking for Intel SGX Driver
 Found Intel Driver

 Checking for Anjuna SGX module
 Found Anjuna SGX module

 Kernel module status:
 anjuna                 16384  0
 isgx                   45056  2

 Checking for Intel PSW
 Intel AESMD service already running
 vm.mmap_min_addr already set to 0


 Summary:
 Anjuna SGX Runtime fully installed
 Run the following command to setup your environment

    source /home/sgx/anjuna-runtime-ubuntu18-0.22.0025/env.sh

The message on line 37 indicates that the Anjuna SGX Runtime was properly installed.

The output on line 40 provides a convenient script to set up the environment variables when running the various tools provided by the Anjuna SGX Runtime. You can ensure that these environment variables are always set by adding the following line to your ~/.bash_profile file, where it will be executed automatically at login:

$ source /home/sgx/anjuna-runtime-ubuntu18-0.22.0025/env.sh

Important

The location of env.sh depends on where the installer is run. In the example above, the location is assumed to be /home/sgx. Please adjust the path to the actual directory that env.sh was installed to.

After setting this up, you can either log out and back in, or just manually source the file in the shells in which you will use the tools.