Skip to content

Commit 595cfa3

Browse files
committed
caddyfile etc + removed incorrect notary.codes
1 parent 3f1dbe8 commit 595cfa3

File tree

5 files changed

+43
-19
lines changed

5 files changed

+43
-19
lines changed

cd-scripts/tee/azure/Caddyfile

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
{
77
key_type p256
8-
email mac@pse.dev # for acme
8+
email hendrik@pse.dev # for acme
99
servers {
1010
metrics
1111
}
@@ -26,18 +26,9 @@
2626
# will always deliver to :4000 if its up, but if :4000 is down for more than 4s it trys the next one
2727
# # # #
2828

29-
notary.codes {
30-
handle_path /v0.1.0-alpha.8* {
31-
reverse_proxy :4003 :3333 {
32-
lb_try_duration 4s
33-
fail_duration 10s
34-
lb_policy header X-Upstream {
35-
fallback first
36-
}
37-
}
38-
}
29+
notary.pse.dev {
3930
handle_path /v0.1.0-alpha.7* {
40-
reverse_proxy :4002 :3333 {
31+
reverse_proxy :4007 :3333 {
4132
lb_try_duration 4s
4233
fail_duration 10s
4334
lb_policy header X-Upstream {
@@ -66,7 +57,7 @@ notary.codes {
6657
}
6758

6859
handle_path /proxy* {
69-
reverse_proxy :55688 proxy.notary.codes:443 {
60+
reverse_proxy :55688 {
7061
lb_try_duration 4s
7162
fail_duration 10s
7263
lb_policy header X-Upstream {

cd-scripts/tee/azure/github_runner.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,37 @@ docker build -t tee_hendrik .
7777
docker tag tee_hendrik notaryserverbuilds/tee_hendrik
7878
docker images
7979
docker push notaryserverbuilds.azurecr.io/tee_hendrik
80+
```
81+
82+
83+
## Install Intel SGX software
84+
85+
https://download.01.org/intel-sgx/latest/dcap-latest/linux/docs/Intel_SGX_SW_Installation_Guide_for_Linux.pdf
86+
87+
```
88+
wget https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key
89+
cat intel-sgx-deb.key | sudo tee /etc/apt/keyrings/intel-sgx-keyring.asc > /dev/null
90+
91+
# Add the following repository to your sources:
92+
echo 'deb [signed-by=/etc/apt/keyrings/intel-sgx-keyring.asc arch=amd64] https://download.01.org/intel-sgx/sgx_repo/ubuntu noble main' | sudo tee /etc/apt/sources.list.d/intel-sgx.list
93+
94+
95+
sudo apt-get update
96+
sudo apt-get install libsgx-epid libsgx-quote-ex libsgx-dcap-ql -y
97+
```
98+
99+
Note: when I first got it working I also installed this: (not sure if this is necessary)
100+
# sudo apt-get install build-essential ocaml automake autoconf libtool wget python-is-python3 libssl-dev -y
101+
102+
103+
## Install Caddy
104+
105+
https://caddyserver.com/docs/install#debian-ubuntu-raspbian
106+
107+
```
108+
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
109+
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
110+
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
111+
sudo apt update
112+
sudo apt install caddy
80113
```

cd-scripts/tee/azure/updateproxy.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@ get_last_port() {
2424
grep -Po "reverse_proxy :([0-9]+)" "$CADDYFILE" | awk -F: '{print $2}' | sort -n | tail -1
2525
}
2626

27-
# Function to add a new handle_path block with incremented port inside notary.codes block
27+
# Function to add a new handle_path block with incremented port inside notary.pse.dev block
2828
add_new_handle_path() {
2929
local new_port=$1
3030
local commit_hash=$2
3131

3232
# Use a temporary file for inserting the handle_path block
3333
tmp_file=$(mktemp)
3434

35-
# Add the new handle_path in the notary.codes block
35+
# Add the new handle_path in the notary.pse.dev block
3636
awk -v port="$new_port" -v hash="$commit_hash" '
37-
/notary\.codes \{/ {
37+
/notary\.pse\.dev \{/ {
3838
print;
3939
print " handle_path /" hash "* {";
4040
print " reverse_proxy :" port " :3333 {";
@@ -70,7 +70,7 @@ else
7070
fi
7171
new_port=$((last_port + 1))
7272

73-
# Add the new handle_path block inside notary.codes block
73+
# Add the new handle_path block inside notary.pse.dev block
7474
add_new_handle_path "$new_port" "$GIT_COMMIT_HASH"
7575
echo $new_port
7676
# commit the changes

crates/notary/server/tee/config/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
server:
2-
name: "notary-server"
2+
name: "notary.pse.dev"
33
host: "0.0.0.0"
44
port: 7047
55
html_info: |

crates/notary/server/tee/gramine-hendrik2/config/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
server:
2-
name: "notary.codes"
2+
name: "notary.pse.dev"
33
host: "0.0.0.0"
44
port: 7047
55
html_info: |

0 commit comments

Comments
 (0)