Skip to content

Commit 1d7d989

Browse files
BuJianlinRodgerZhu
authored andcommitted
Fix grpc-ra-tls merge error
Signed-off-by: Bu Jianlin <[email protected]>
1 parent 3557804 commit 1d7d989

File tree

7 files changed

+45
-33
lines changed

7 files changed

+45
-33
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#
2+
# Copyright (c) 2022 Intel Corporation
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
#!/bin/bash
17+
18+
unset http_proxy https_proxy
19+
20+
# Start AESM service required by Intel SGX SDK if it is not running
21+
if ! pgrep "aesm_service" > /dev/null ; then
22+
mkdir -p /var/run/aesmd
23+
LD_LIBRARY_PATH="/opt/intel/sgx-aesm-service/aesm:$LD_LIBRARY_PATH" /opt/intel/sgx-aesm-service/aesm/aesm_service
24+
fi

cczoo/grpc-ra-tls/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,7 @@ images for developing the gRPC RA-TLS application.
114114
./build_docker_image.sh ${base_image} ${image_tag}
115115
```
116116
117-
`gramine-sgx-dev:v1.2-ubuntu20.04-latest` and `gramine-sgx-dev:v1.2-ubuntu-20.04-latest`
118-
117+
`gramine-sgx-dev:v1.2-ubuntu20.04-latest` and `gramine-sgx-dev:v1.2-ubuntu-20.04-latest`
119118
could be selected as base_image.
120119
121120
- On Occlum
@@ -128,7 +127,8 @@ images for developing the gRPC RA-TLS application.
128127
./build_docker_image.sh ${base_image} ${image_tag}
129128
```
130129
131-
`occlum-sgx-dev:0.26.3-ubuntu18.04` and `occlum-sgx-dev:0.26.3-ubuntu20.04` could be selected as base_image.
130+
`occlum-sgx-dev:0.26.3-ubuntu18.04` and `occlum-sgx-dev:0.26.3-ubuntu20.04`
131+
could be selected as base_image.
132132
133133
## Config the remote attestation
134134

cczoo/grpc-ra-tls/gramine/CI-Examples/grpc/python/ratls/python.manifest.template

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ fs.mounts = [
4040
{ type = "tmpfs", path = "/var/tmp" },
4141
{ path = "{{ python.stdlib }}", uri = "file:{{ python.stdlib }}" },
4242
{ path = "{{ python.distlib }}", uri = "file:{{ python.distlib }}" },
43-
{ path = "/usr/local/lib/python3.8/dist-packages/", uri = "file:/usr/local/lib/python3.8/dist-packages/" }
43+
#{ path = "/usr/local/lib/python3.6/dist-packages/", uri = "file:/usr/local/lib/python3.6/dist-packages/" } # for ubuntu:18.04
44+
{ path = "/usr/local/lib/python3.8/dist-packages/", uri = "file:/usr/local/lib/python3.8/dist-packages/" } # for ubuntu:20.04
4445
]
4546

4647
sgx.debug = false
@@ -62,8 +63,8 @@ sgx.trusted_files = [
6263
"file:/usr/{{ arch_libdir }}/",
6364
"file:{{ python.stdlib }}/",
6465
"file:{{ python.distlib }}/",
65-
#"file:/usr/local/lib/python3.6/dist-packages/",
66-
"file:/usr/local/lib/python3.8/dist-packages/",
66+
#"file:/usr/local/lib/python3.6/dist-packages/", # for ubuntu:18.04
67+
"file:/usr/local/lib/python3.8/dist-packages/", # for ubuntu:20.04
6768
"file:/etc/ssl/certs/ca-certificates.crt",
6869
"file:server.py",
6970
"file:client.py",

cczoo/grpc-ra-tls/grpc/common/build_cpp.sh

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,13 @@ if [ -z ${BUILD_TYPE} ]; then
2222
fi
2323

2424
if [ -z ${SGX_RA_TLS_BACKEND} ]; then
25-
<<<<<<< HEAD
26-
=======
27-
<<<<<<< HEAD:cczoo/attestation-secret-provision/grpc_overlay/common/build_cpp.sh
28-
export SGX_RA_TLS_BACKEND=GRAMINE # GRAMINE,OCCLUM,TDX,DUMMY
29-
=======
30-
>>>>>>> branch0.1/grpc-ra-tls
3125
export SGX_RA_TLS_BACKEND=GRAMINE # GRAMINE,OCCLUM,DUMMY
3226
fi
3327

3428
if [ -z ${SGX_RA_TLS_SDK} ]; then
3529
export SGX_RA_TLS_SDK=DEFAULT # DEFAULT,LIBRATS
3630
elif [ "${SGX_RA_TLS_SDK}" == "LIBRATS" ]; then
3731
${GRPC_PATH}/build_librats_sdk.sh
38-
<<<<<<< HEAD
39-
=======
40-
>>>>>>> branch0.1/grpc-ra-tls:cczoo/grpc-ra-tls/grpc/common/build_cpp.sh
41-
>>>>>>> branch0.1/grpc-ra-tls
4232
fi
4333

4434
# build and install abseil library
@@ -68,14 +58,7 @@ cmake -DgRPC_INSTALL=ON \
6858
-DgRPC_BUILD_GRPC_RUBY_PLUGIN=OFF \
6959
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
7060
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
71-
<<<<<<< HEAD
7261
-DSGX_RA_TLS_SDK=${SGX_RA_TLS_SDK} \
73-
=======
74-
<<<<<<< HEAD:cczoo/attestation-secret-provision/grpc_overlay/common/build_cpp.sh
75-
=======
76-
-DSGX_RA_TLS_SDK=${SGX_RA_TLS_SDK} \
77-
>>>>>>> branch0.1/grpc-ra-tls:cczoo/grpc-ra-tls/grpc/common/build_cpp.sh
78-
>>>>>>> branch0.1/grpc-ra-tls
7962
-DSGX_RA_TLS_BACKEND=${SGX_RA_TLS_BACKEND} \
8063
..
8164
make -j `nproc`

cczoo/grpc-ra-tls/grpc/common/build_python.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ cd -
3939

4040
ldd ${GRPC_PATH}/python_build/lib.linux-x86_64-*/grpc/_cython/cygrpc.cpython-*-x86_64-linux-gnu.so
4141

42-
pip3 uninstall -y grpcio
42+
# install grpc python wheel
43+
pip3 uninstall -y grpcio protobuf
4344
pip3 install ${GRPC_PATH}/dist/*.whl
4445
pip3 install grpcio-tools==1.38.1
4546

cczoo/grpc-ra-tls/occlum/demos/ra_tls/build_occlum_instance.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,15 @@ build_instance() {
4242

4343
mkdir -p image/usr/share/grpc
4444
cp -rf ${INSTALL_PREFIX}/share/grpc/* image/usr/share/grpc/
45-
cp ${OCCLUM_GLIBC}/libdl.so.2 image/${OCCLUM_GLIBC}
46-
cp ${OCCLUM_GLIBC}/librt.so.1 image/${OCCLUM_GLIBC}
47-
cp ${OCCLUM_GLIBC}/libm.so.6 image/${OCCLUM_GLIBC}
48-
cp /lib/x86_64-linux-gnu/libtinfo.so.5 image/${OCCLUM_GLIBC}
49-
cp /lib/x86_64-linux-gnu/libnss*.so.2 image/${OCCLUM_GLIBC}
50-
cp /lib/x86_64-linux-gnu/libresolv.so.2 image/${OCCLUM_GLIBC}
45+
cp ${OCCLUM_GLIBC}/libdl.so* image/${OCCLUM_GLIBC}
46+
cp ${OCCLUM_GLIBC}/librt.so* image/${OCCLUM_GLIBC}
47+
cp ${OCCLUM_GLIBC}/libm.so* image/${OCCLUM_GLIBC}
48+
cp /usr/lib/x86_64-linux-gnu/libtinfo.so* image/${OCCLUM_GLIBC}
49+
cp /usr/lib/x86_64-linux-gnu/libnss*.so* image/${OCCLUM_GLIBC}
50+
cp /usr/lib/x86_64-linux-gnu/libresolv.so* image/${OCCLUM_GLIBC}
51+
# cp /lib/x86_64-linux-gnu/libtinfo.so* image/${OCCLUM_GLIBC}
52+
# cp /lib/x86_64-linux-gnu/libnss*.so* image/${OCCLUM_GLIBC}
53+
# cp /lib/x86_64-linux-gnu/libresolv.so* image/${OCCLUM_GLIBC}
5154
cp -rf /etc/hostname image/etc/
5255
cp -rf /etc/ssl image/etc/
5356
cp -rf /etc/passwd image/etc/

documents/readthedoc/docs/source/Solutions/grpc-ra-tls/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,7 @@ images for developing the gRPC RA-TLS application.
114114
./build_docker_image.sh ${base_image} ${image_tag}
115115
```
116116
117-
`gramine-sgx-dev:v1.2-ubuntu20.04-latest` and `gramine-sgx-dev:v1.2-ubuntu-20.04-latest`
118-
117+
`gramine-sgx-dev:v1.2-ubuntu20.04-latest` and `gramine-sgx-dev:v1.2-ubuntu-20.04-latest`
119118
could be selected as base_image.
120119
121120
- On Occlum
@@ -128,7 +127,8 @@ images for developing the gRPC RA-TLS application.
128127
./build_docker_image.sh ${base_image} ${image_tag}
129128
```
130129
131-
`occlum-sgx-dev:0.26.3-ubuntu18.04` and `occlum-sgx-dev:0.26.3-ubuntu20.04` could be selected as base_image.
130+
`occlum-sgx-dev:0.26.3-ubuntu18.04` and `occlum-sgx-dev:0.26.3-ubuntu20.04`
131+
could be selected as base_image.
132132
133133
## Config the remote attestation
134134

0 commit comments

Comments
 (0)