This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//OS: Ubuntu 16.04 | |
//install Qemu with ARM | |
sudo apt install qemu-system-aarch64 | |
//create a tap device for the VM - it's part of same network | |
sudo ip tuntap add dev sptap0 mode tap user ubuntu | |
sudo ip link set dev sptap0 up | |
//connect the tap and physical nic via a brisge: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Build spark with YARN support, without hadoop dependencies | |
//(this will prevent clashes when distributing the spark assembly jar over yarn cluster) | |
build/mvn -Pyarn -Pbigtop-dist -Dhadoop.version=3.0.0 -Phadoop-provided -DskipTests clean package | |
[Does not work for me... | |
//Create a spark distribution | |
./make-distribution.sh --name <some name> --tgz -Pyarn -Pbigtop-dist -Dhadoop.version=3.0.0 -Phadoop-provided -DskipTests | |
] | |
//setup the same user in the cluster on your spark clinet machine: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OS: ubuntu 16.04 | |
//To run on each node: | |
//==================== | |
//Prerequisistes | |
//-------------- | |
sudo apt install default-jdk | |
//verify java installed | |
java -version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The deployment is comprised of 3 main components: | |
================================================= | |
1. Aiakos provider - running in SGX-LKL | |
2. MariaDB - running in SGX-LKL | |
3. Client application - plain docker compose application (application container + mariadb container) | |
Setting up MariaDB | |
================== | |
Take the mariadb sgx-lkl image |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//prerequisites: python 3.5, pip | |
//clone sgx-lkl repo | |
//fix it's getrandom() problem using this fix: https://gist.github.com/avigail-oron/20261038c9f04df80845a45d5e573bad | |
//set it's iptables according to sgx-lkl instructions | |
//use the miniroot example app as a basis | |
//create a python miniapp using the following buildenv.sh: | |
#!/bin/sh | |
set -ex | |
PATH=/usr/sbin:/sbin:/usr/bin:/bin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In it's initialization, python3 calls getrandom() sys call. this crashes the sgx lkl since there's a problem with the syscall.c file. | |
There are 2 ways to overcome that: | |
1. fix the sgx-lkl/sgx-lkl-musl/src/misc/syscall.c file to include the missing handling for this syscall | |
2. workaround it by setting the following env variable in the shell prior to invoking sgx lkl: export PYTHONHASHSEED=<some number> | |
The modified syscall.c contants: | |
#include "syscall.h" | |
#include <stdarg.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//run a c docker container of aline that declares using port 3306: | |
docker run -it -p 3306:3306/tcp <docker-alpine-image-id> /bin/sh | |
//inside the docker container do the following: | |
apk update | |
apk add mysql mysql-client | |
DB_DATA_PATH="/var/lib/mysql" | |
DB_ROOT_PASS="mariadb_root_password" | |
DB_USER="mariadb_user" | |
DB_PASS="mariadb_user_password" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//on a diff machine - install mysql, bind it to all addresses and create a user called 'aiakos' with all priveleges. | |
//prerequisites: python 3.6, pip | |
//also, need to have mysql clinet instlled: | |
sudo apt-get install libmysqlclient-dev | |
//get aiakos server git repo: | |
git clone https://gitlab.com/aiakos/aiakos | |
//set all environmnet variables that aiakos requires on all shells that will be used in the process: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Installing aiakos server via docker compose: | |
//-------------------------------------------- | |
//prerequisites: make sure you have python 3.6 installed and pip3 & docker-compose installed | |
git clone https://gitlab.com/aiakos/aiakos | |
//modify the docker-compose.yml file: | |
//change this for all services: | |
DATABASE_URL=mysql://<docker container name of sql server>/accounts | |
//specifically for the 'accounts' service: | |
BASE_URL=http://<IP address of server, the way the user's browser can see it (not localhost)>:2121/ | |
//if you want to see Django errors nicely in the browser: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Download Java 8 JRE from oracle's site | |
//Download Eclipse Mars | |
http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/mars/2/eclipse-cpp-mars-2-linux-gtk-x86_64.tar.gz&mirror_id=17 | |
//Changes in eclipse.ini: | |
//Change -Dosgi.requiredJavaVersion=1.7 to -Dosgi.requiredJavaVersion=1.8 | |
//Delete the line: -XX:MaxPermSize=256m | |
//Create eclipse.sh in eclipse dir with the following content (modify the JRE folder to match your own): |
NewerOlder