scs / intel_sgx_setup

Ansible scripts for setting up a development machine with Intel SGX
Apache License 2.0
6 stars 0 forks source link

Automated setup of an Intel SGX Development Machine

This repository contains an Ansible playbook for setting up a development machine with Intel SGX

Requirements

Hardware

A computer with Intel SGX support is needed.

This repository lists some of the computers that support Intel SGX.

We have the following systems up and running:

IMPORTANT The CPU of the PowerEdge R340 is essential! There are cheaper versions availabe, but they don't support all features of Intel SGX.

Software

To run the script, a fresh installation of a Linux is required. We have successfully tested the script with Ubuntu 18.04.3 LTS (bionic) server.

Overview

The Ansible playbook will perform the following steps:

  1. Update the system
  2. Configure the network (using netplan) to DHCP on both network interfaces (eno0 and eno1)
  3. Configure the keyboard and timezone
  4. Create users that can login with a public key
  5. Install the required tools (git, nano, tmux, zsh, gcc, ...)
  6. Install the Intel SGX SDK, PSW and driver with the specified version
  7. Install and enable samba for every user

Because samba requires a password, the script will generate a file called samba-temp-password.txt in the home directory of the user containing the initial password. Instructions how to change the password is shown in the ssh login screen.

Be careful when executing the script on a running system as it may reboot the system. You can disable it in ServersSGX.yml.

The script can also be used to update your server (for example for updating the Intel SGX SDK). Simply change the setting and re-run the script.

Currently, there is only one host configured (see hosts), but you can add as many as you want.

Configuration

The configuration is done with two files:

All variables with <...> need to be replaced by your own settings.

host_vars/devsgx00.yaml

group_vars/developmentServersSGX.yml

Run

To execute the playbook, simply execute:

ansible-playbook site.yml -k