Skip to content

Commit

Permalink
Rename Graphene to Gramine
Browse files Browse the repository at this point in the history
The name "Graphene" was deemed too common, could be impossible to
trademark, and collided with several other software projects. Thus, a
new name "Gramine" was chosen.

Signed-off-by: Dmitrii Kuvaiskii <dmitrii.kuvaiskii@intel.com>
  • Loading branch information
dimakuv committed Sep 24, 2021
1 parent e637fab commit f7e2a77
Show file tree
Hide file tree
Showing 269 changed files with 1,331 additions and 1,307 deletions.
4 changes: 2 additions & 2 deletions .ci/lib/stage-build-nosgx.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ stage('build') {
| jq -r '(map(select(.name == "prefix")) + map(select(.name == "libdir"))) | map(.value) | join("/")'
''').trim()

env.GRAPHENE_PKGLIBDIR = libdir + '/graphene'
env.GRAMINE_PKGLIBDIR = libdir + '/gramine'

// In CI we install to non-standard --prefix (see above). This makes sure the libraries are
// available anyway (e.g. graphene-sgx-pf-crypt needs libsgx_util.so).
// available anyway (e.g. gramine-sgx-pf-crypt needs libsgx_util.so).
env.PKG_CONFIG_PATH = libdir + '/pkgconfig'

// prevent cheating and testing from repo
Expand Down
4 changes: 2 additions & 2 deletions .ci/lib/stage-build-sgx.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ stage('build') {
| jq -r '(map(select(.name == "prefix")) + map(select(.name == "libdir"))) | map(.value) | join("/")'
''').trim()

env.GRAPHENE_PKGLIBDIR = libdir + '/graphene'
env.GRAMINE_PKGLIBDIR = libdir + '/gramine'

// In CI we install to non-standard --prefix (see above). This makes sure the libraries are
// available anyway (e.g. graphene-sgx-pf-crypt needs libsgx_util.so).
// available anyway (e.g. gramine-sgx-pf-crypt needs libsgx_util.so).
env.PKG_CONFIG_PATH = libdir + '/pkgconfig'

// prevent cheating and testing from repo
Expand Down
4 changes: 2 additions & 2 deletions .ci/lib/stage-clean-check.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ stage('clean-check') {
rm -rf LibOS/shim/test/ltp/src

# python/ subdir does not have makefiles, so no clean
rm -rf /tmp/*.clean-check.clean/python/graphenelibos/__pycache__
rm -rf python/graphenelibos/__pycache__
rm -rf /tmp/*.clean-check.clean/python/graminelibos/__pycache__
rm -rf python/graminelibos/__pycache__

# on Ubuntu 18.04, git clean -Xf fails to remove packagecache directory itself
rm -rf \
Expand Down
8 changes: 4 additions & 4 deletions .ci/lib/stage-test-direct.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ stage('test-direct') {
sh '''
cd CI-Examples/memcached
make -j8 all
make start-graphene-server &
make start-gramine-server &
../../Scripts/wait_for_server 5 127.0.0.1 11211
# memcslap populates server but doesn't report errors, use
# memcached-tool for this (must return two lines of stats)
Expand All @@ -46,7 +46,7 @@ stage('test-direct') {
export USE_SELECT
fi
make -j8 all
make start-graphene-server &
make start-gramine-server &
../../Scripts/wait_for_server 5 127.0.0.1 6379
./src/src/redis-benchmark
'''
Expand All @@ -55,7 +55,7 @@ stage('test-direct') {
sh '''
cd CI-Examples/lighttpd
make -j8 all
make start-graphene-server &
make start-gramine-server &
../../Scripts/wait_for_server 5 127.0.0.1 8003
LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh 127.0.0.1:8003
'''
Expand All @@ -64,7 +64,7 @@ stage('test-direct') {
sh '''
cd CI-Examples/nginx
make -j8 all
make start-graphene-server &
make start-gramine-server &
../../Scripts/wait_for_server 5 127.0.0.1 8002
LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh 127.0.0.1:8002
'''
Expand Down
8 changes: 4 additions & 4 deletions .ci/lib/stage-test-sgx.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ stage('test-sgx') {
sh '''
cd CI-Examples/memcached
make ${MAKEOPTS}
make SGX=1 start-graphene-server &
make SGX=1 start-gramine-server &
../../Scripts/wait_for_server 60 127.0.0.1 11211
# memcslap populates server but doesn't report errors, use
# memcached-tool for this (must return two lines of stats)
Expand All @@ -37,7 +37,7 @@ stage('test-sgx') {

cd CI-Examples/redis
make ${MAKEOPTS}
make ${MAKEOPTS} start-graphene-server &
make ${MAKEOPTS} start-gramine-server &
../../Scripts/wait_for_server 60 127.0.0.1 6379
./src/src/redis-benchmark
'''
Expand All @@ -46,7 +46,7 @@ stage('test-sgx') {
sh '''
cd CI-Examples/lighttpd
make ${MAKEOPTS}
make ${MAKEOPTS} start-graphene-server &
make ${MAKEOPTS} start-gramine-server &
../../Scripts/wait_for_server 60 127.0.0.1 8003
LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh 127.0.0.1:8003
'''
Expand All @@ -55,7 +55,7 @@ stage('test-sgx') {
sh '''
cd CI-Examples/nginx
make ${MAKEOPTS}
make ${MAKEOPTS} start-graphene-server &
make ${MAKEOPTS} start-gramine-server &
../../Scripts/wait_for_server 60 127.0.0.1 8002
LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh 127.0.0.1:8002
'''
Expand Down
4 changes: 2 additions & 2 deletions .ci/run-pylint
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ find . -name \*.py \
-and -not -path ./LibOS/shim/test/ltp/install/\* \
| sed 's/./\\&/g' \
| xargs "${PYLINT}" "$@" \
python/graphene-sgx-get-token \
python/graphene-sgx-sign
python/gramine-sgx-get-token \
python/gramine-sgx-sign
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Please provide as much information as possible.
Paste any logs using three backticks (```).
IMPORTANT: please do not post general questions here;
if you have questions, please use mailing list: support@graphene-project.io
if you have questions, please use mailing list: gramine-users@googlegroups.com
-->

## Description of the problem
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!--
Please fill in the following form before submitting this PR
and ensure that your code follows our coding style guideline:
https://graphene.readthedocs.io/en/latest/devel/coding-style.html -->
https://gramine.readthedocs.io/en/latest/devel/coding-style.html -->

## Description of the changes <!-- (reasons and measures) -->

Expand Down
10 changes: 5 additions & 5 deletions CI-Examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This folder contains application integration examples. They were tested on
Ubuntu 18.04 and 20.04.

For instructions how to build and run each application under Graphene, please
For instructions how to build and run each application under Gramine, please
see the README.md in each subdirectory.

Please note that most of the examples use oversimplified configurations which
Expand All @@ -13,20 +13,20 @@ production workloads, please inspect and harden the configurations.

We recommend to look at the (extensively commented) Redis example to get an idea
how to write the README, Makefile and manifest files. If you want to contribute
a new example to Graphene and you take the Redis example as a template, we
a new example to Gramine and you take the Redis example as a template, we
recommend to remove the comments from your copies as they only add noise (see
e.g. Memcached for a "stripped-down" example).

## Building Examples

All our examples use simple Makefiles to build the examples and enable them
under Graphene. Use one of these commands:
under Gramine. Use one of these commands:
- `make`: create non-SGX no-debug-log manifest
- `make DEBUG=1`: create non-SGX debug-log manifest
- `make SGX=1`: create SGX no-debug-log manifest
- `make SGX=1 DEBUG=1`: create SGX debug-log manifest

Use `make clean` to remove Graphene-generated artifacts and `make distclean` to
Use `make clean` to remove Gramine-generated artifacts and `make distclean` to
remove all build artifacts (if applicable).

## How to Contribute?
Expand All @@ -45,7 +45,7 @@ addition, your application sample should have the following elements:
command. If your application needs extra building steps, please document them
in the `README.md`. In addition, we ask you to provide sufficient comments in
the `Makefile` to help users understand the build process. If your application
also runs on Graphene-SGX, please include the commands for signing and
also runs on Gramine-SGX, please include the commands for signing and
retrieving the token in the `Makefile`.

- Manifest:
Expand Down
24 changes: 12 additions & 12 deletions CI-Examples/bash/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ SGX_SIGNER_KEY ?= ../../Pal/src/host/Linux-SGX/signer/enclave-key.pem
ARCH_LIBDIR ?= /lib/$(shell $(CC) -dumpmachine)

ifeq ($(DEBUG),1)
GRAPHENE_LOG_LEVEL = debug
GRAMINE_LOG_LEVEL = debug
else
GRAPHENE_LOG_LEVEL = error
GRAMINE_LOG_LEVEL = error
endif

.PHONY: all
Expand All @@ -15,51 +15,51 @@ all: bash.manifest.sgx bash.sig bash.token
endif

bash.manifest: manifest.template
graphene-manifest \
-Dlog_level=$(GRAPHENE_LOG_LEVEL) \
gramine-manifest \
-Dlog_level=$(GRAMINE_LOG_LEVEL) \
-Dexecdir=$(shell dirname $(shell which bash)) \
-Darch_libdir=$(ARCH_LIBDIR) \
$< >$@

bash.manifest.sgx: bash.manifest
@test -s $(SGX_SIGNER_KEY) || \
{ echo "SGX signer private key was not found, please specify SGX_SIGNER_KEY!"; exit 1; }
graphene-sgx-sign \
gramine-sgx-sign \
--key $(SGX_SIGNER_KEY) \
--manifest bash.manifest \
--output $@

bash.sig: bash.manifest.sgx

bash.token: bash.sig
graphene-sgx-get-token --output bash.token --sig bash.sig
gramine-sgx-get-token --output bash.token --sig bash.sig

ifeq ($(SGX),)
GRAPHENE = graphene-direct
GRAMINE = gramine-direct
else
GRAPHENE = graphene-sgx
GRAMINE = gramine-sgx
endif

.PHONY: regression
regression: all
@mkdir -p scripts/testdir

$(GRAPHENE) ./bash -c "ls" > OUTPUT
$(GRAMINE) ./bash -c "ls" > OUTPUT
@grep -q "Makefile" OUTPUT && echo "[ Success 1/7 ]"
@rm OUTPUT

$(GRAPHENE) ./bash -c "cd scripts && bash bash_test.sh 1" > OUTPUT
$(GRAMINE) ./bash -c "cd scripts && bash bash_test.sh 1" > OUTPUT
@grep -q "hello 1" OUTPUT && echo "[ Success 2/7 ]"
@grep -q "createdfile" OUTPUT && echo "[ Success 3/7 ]"
@grep -q "somefile" OUTPUT && echo "[ Success 4/7 ]"
@grep -q "current date" OUTPUT && echo "[ Success 5/7 ]"
@rm OUTPUT

$(GRAPHENE) ./bash -c "cd scripts && bash bash_test.sh 3" > OUTPUT
$(GRAMINE) ./bash -c "cd scripts && bash bash_test.sh 3" > OUTPUT
@grep -q "hello 3" OUTPUT && echo "[ Success 6/7 ]"
@rm OUTPUT

$(GRAPHENE) ./bash -c "readlink /proc/self/exe" > OUTPUT
$(GRAMINE) ./bash -c "readlink /proc/self/exe" > OUTPUT
@grep -qE "^(/usr)?/bin/readlink" OUTPUT && echo "[ Success 7/7 ]"
@rm OUTPUT

Expand Down
14 changes: 7 additions & 7 deletions CI-Examples/bash/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Bash example

This directory contains an example for running Bash in Graphene, including
This directory contains an example for running Bash in Gramine, including
the Makefile and a template for generating the manifest.

# Generating the manifest
Expand All @@ -13,18 +13,18 @@ Run `make` (non-debug) or `make DEBUG=1` (debug) in the directory.

Run `make SGX=1` (non-debug) or `make SGX=1 DEBUG=1` (debug) in the directory.

# Running Bash with Graphene
# Running Bash with Gramine

Here's an example of running Bash scripts under Graphene:
Here's an example of running Bash scripts under Gramine:

Without SGX:
```
graphene-direct ./bash -c "ls"
graphene-direct ./bash -c "cd scripts && bash bash_test.sh 2"
gramine-direct ./bash -c "ls"
gramine-direct ./bash -c "cd scripts && bash bash_test.sh 2"
```

With SGX:
```
graphene-sgx ./bash -c "ls"
graphene-sgx ./bash -c "cd scripts && bash bash_test.sh 2"
gramine-sgx ./bash -c "ls"
gramine-sgx ./bash -c "cd scripts && bash bash_test.sh 2"
```
6 changes: 3 additions & 3 deletions CI-Examples/bash/manifest.template
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This is a general manifest template for running Bash and core utility programs,
# including ls, cat, cp, date, and rm.

loader.preload = "file:{{ graphene.libos }}"
loader.preload = "file:{{ gramine.libos }}"
libos.entrypoint = "{{ execdir }}/bash"
loader.log_level = "{{ log_level }}"

Expand All @@ -12,7 +12,7 @@ loader.insecure__use_cmdline_argv = true

fs.mount.lib.type = "chroot"
fs.mount.lib.path = "/lib"
fs.mount.lib.uri = "file:{{ graphene.runtimedir() }}"
fs.mount.lib.uri = "file:{{ gramine.runtimedir() }}"

fs.mount.lib64.type = "chroot"
fs.mount.lib64.path = "{{ arch_libdir }}"
Expand All @@ -32,7 +32,7 @@ sgx.thread_num = 4

sgx.trusted_files = [
"file:{{ execdir }}/",
"file:{{ graphene.runtimedir() }}/",
"file:{{ gramine.runtimedir() }}/",
"file:{{ arch_libdir }}/",
"file:/usr/{{ arch_libdir }}/",
]
Expand Down
14 changes: 7 additions & 7 deletions CI-Examples/blender/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ BLENDER_DIR = $(PWD)/blender_dir
BLENDER_SRC ?= blender-2.82-linux64.tar.xz
BLENDER_MIRRORS ?= \
https://ftp.nluug.nl/pub/graphics/blender/release/Blender2.82 \
https://packages.grapheneproject.io/distfiles
https://packages.gramineproject.io/distfiles
BLENDER_SHA256 ?= b13600fa2ca23ea1bba511e3a6599b6792acde80b180707c3ea75db592a9b916
BLENDER_VER = 2.82

Expand All @@ -19,9 +19,9 @@ RUN_DIR = $(PWD)/run_dir
UBUNTU_VER = $(shell lsb_release --short --id)$(shell lsb_release --short --release)

ifeq ($(DEBUG),1)
GRAPHENE_LOG_LEVEL = debug
GRAMINE_LOG_LEVEL = debug
else
GRAPHENE_LOG_LEVEL = error
GRAMINE_LOG_LEVEL = error
endif


Expand All @@ -41,8 +41,8 @@ $(RUN_DIR):
mkdir -p $@

blender.manifest: blender.manifest.template | $(RUN_DIR)
graphene-manifest \
-Dlog_level=$(GRAPHENE_LOG_LEVEL) \
gramine-manifest \
-Dlog_level=$(GRAMINE_LOG_LEVEL) \
-Darch_libdir=$(ARCH_LIBDIR) \
-Ddata_dir=$(DATA_DIR) \
-Dblender_dir=$(BLENDER_DIR) \
Expand All @@ -58,13 +58,13 @@ blender.sig blender.manifest.sgx: sgx_outputs
sgx_outputs: $(BLENDER_DIR)/blender blender.manifest | $(RUN_DIR)
@test -s $(SGX_SIGNER_KEY) || \
{ echo "SGX signer private key was not found, please specify SGX_SIGNER_KEY!"; exit 1; }
graphene-sgx-sign \
gramine-sgx-sign \
--output blender.manifest.sgx \
--key $(SGX_SIGNER_KEY) \
--manifest blender.manifest

blender.token: blender.sig
graphene-sgx-get-token --output $@ --sig $<
gramine-sgx-get-token --output $@ --sig $<

$(DATA_DIR)/images:
mkdir -p $@
Expand Down
2 changes: 1 addition & 1 deletion CI-Examples/blender/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Blender

This directory contains a Makefile and template manifest to run Blender v2.82 on
Graphene.
Gramine.

# Quick Start

Expand Down

0 comments on commit f7e2a77

Please sign in to comment.