-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide Docker container for running SGX prover. This commit aligns the Raiko Docker image to ensure compatibility with the latest changes made on the unstable branch. The purpose of introducing a Docker container for the SGX prover was to minimize the effort required to set up the machine's infrastructure, such as configuring and starting Intel's PCCS service, bootstrapping the Raiko SGX prover, and populating configuration files. Up until now, we have relied on manually pre-configured machines running in Tencent Cloud. This commit enables running Raiko within a fully-fledged k8s environment (already tested by @johntaiko). Additionally, a CI test was added to build the Docker image from scratch, ensuring that no unintended code changes can break it. --------- Signed-off-by: smtmfft <[email protected]> Co-authored-by: smtmfft <[email protected]> Co-authored-by: john xu <[email protected]> Co-authored-by: Patryk Bęza <[email protected]>
- Loading branch information
1 parent
4a37427
commit d5f7389
Showing
22 changed files
with
276 additions
and
151 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
if [ -z $1 ] ; then | ||
echo "Please provide the new sgx ID" | ||
exit 1 | ||
fi | ||
NEW_ID=$1 | ||
|
||
|
||
FILTER_NAME="raiko" | ||
CONTAINER_ID=$(docker ps --filter "name=$FILTER_NAME" --format "{{.ID}}") | ||
echo "Ready to config container: $CONTAINER_ID" | ||
|
||
# pre-check | ||
echo "Old config" | ||
docker exec $CONTAINER_ID cat /etc/raiko/config.sgx.json | ||
echo | ||
docker exec $CONTAINER_ID sed -i "s/123456/$NEW_ID/" /etc/raiko/config.sgx.json | ||
# post-check update | ||
echo "New config" | ||
docker exec $CONTAINER_ID cat /etc/raiko/config.sgx.json |
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"HTTPS_PORT": 8081, | ||
"hosts": "0.0.0.0", | ||
"uri": "https://api.trustedservices.intel.com/sgx/certification/v4/", | ||
"ApiKey": "YOUR_API_KEY", | ||
"proxy": "", | ||
"RefreshSchedule": "0 0 1 * * *", | ||
"UserTokenHash": "YOUR_USER_TOKEN_HASH", | ||
"AdminTokenHash": "YOUR_ADMIN_TOKEN_HASH", | ||
"CachingFillMode": "LAZY", | ||
"OPENSSL_FIPS_MODE": false, | ||
"LogLevel": "info", | ||
"DB_CONFIG": "sqlite", | ||
"sqlite": { | ||
"database": "database", | ||
"username": "username", | ||
"password": "password", | ||
"options": { | ||
"host": "localhost", | ||
"dialect": "sqlite", | ||
"pool": { | ||
"max": 5, | ||
"min": 0, | ||
"acquire": 30000, | ||
"idle": 10000 | ||
}, | ||
"define": { | ||
"freezeTableName": true | ||
}, | ||
"logging": false, | ||
"storage": "pckcache.db" | ||
} | ||
}, | ||
"mysql": { | ||
"database": "pckcache", | ||
"username": "root", | ||
"password": "mypass", | ||
"options": { | ||
"host": "localhost", | ||
"port": "3306", | ||
"dialect": "mysql", | ||
"pool": { | ||
"max": 5, | ||
"min": 0, | ||
"acquire": 30000, | ||
"idle": 10000 | ||
}, | ||
"define": { | ||
"freezeTableName": true | ||
}, | ||
"logging": false | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"network": "taiko_a7", | ||
"sgx": { | ||
"instance_id": 123456 | ||
} | ||
} |
Oops, something went wrong.