diff --git a/demos/cluster_serving/cluster_serving.yaml b/demos/cluster_serving/cluster_serving.yaml new file mode 100644 index 00000000..0de14b04 --- /dev/null +++ b/demos/cluster_serving/cluster_serving.yaml @@ -0,0 +1,23 @@ +includes: + - base.yaml + - java-11-openjdk-amd64.yaml +targets: + # copy flink + - target: /bin + copy: + - from: ../flink-${FLINK_VERSION} + - target: /opt + copy: + - dirs: + - ../flink-${FLINK_VERSION}/conf + # copy hosts and localtime + - target: /etc + copy: + - files: + - ../hosts + - /etc/localtime + # copy libnss_files + - target: /opt/occlum/glibc/lib + copy: + - files: + - /opt/occlum/glibc/lib/libnss_files.so.2 diff --git a/demos/cluster_serving/init-occlum-taskmanager.sh b/demos/cluster_serving/init-occlum-taskmanager.sh index eda550e9..ba945a00 100755 --- a/demos/cluster_serving/init-occlum-taskmanager.sh +++ b/demos/cluster_serving/init-occlum-taskmanager.sh @@ -21,17 +21,8 @@ init_instance() { build_flink() { # Copy JVM and class file into Occlum instance and build - mkdir -p image/usr/lib/jvm - cp -r /usr/lib/jvm/java-11-openjdk-amd64 image/usr/lib/jvm - cp /lib/x86_64-linux-gnu/libz.so.1 image/lib - cp $occlum_glibc/libdl.so.2 image/$occlum_glibc - cp $occlum_glibc/librt.so.1 image/$occlum_glibc - cp $occlum_glibc/libm.so.6 image/$occlum_glibc - cp $occlum_glibc/libnss_files.so.2 image/$occlum_glibc - cp -rf ../flink-${FLINK_VERSION}/* image/bin/ - cp -rf ../flink-${FLINK_VERSION}/conf image/opt/ - cp -rf /etc/java-11-openjdk image/etc/ - cp -rf ../hosts image/etc/ + rm -rf image + copy_bom -f ../cluster_serving.yaml --root image --include-dir /opt/occlum/etc/template # build occlum occlum build }