Deploying into Containers
After installing and configuring basic software on the physical machine, complete Installing the Basic Environment and Installing OmniStream to containerize the feature.
- Copy the directories of Nexmark, JDK, Flink, third-party dependencies, and OmniStream to all containers.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
docker cp /opt/nexmark flink_jm_8c32g:/usr/local/ docker cp /usr/local/flink-1.16.3 flink_jm_8c32g:/usr/local/ docker cp /usr/local/bisheng-jdk1.8.0_342 flink_jm_8c32g:/usr/local/ docker cp /opt/Dependency_library/Dependency_library_Default flink_jm_8c32g:/opt/Dependency_library docker cp /usr/local/OmniStream flink_jm_8c32g:/usr/local/ docker cp /opt/nexmark flink_tm1_8c32g:/usr/local/ docker cp /usr/local/flink-1.16.3 flink_tm1_8c32g:/usr/local/ docker cp /usr/local/bisheng-jdk1.8.0_342 flink_tm1_8c32g:/usr/local/ docker cp /opt/Dependency_library/Dependency_library_Default flink_tm1_8c32g:/opt/Dependency_library docker cp /usr/local/OmniStream flink_tm1_8c32g:/usr/local/ docker cp /opt/nexmark flink_tm2_8c32g:/usr/local/ docker cp /usr/local/flink-1.16.3 flink_tm2_8c32g:/usr/local/ docker cp /usr/local/bisheng-jdk1.8.0_342 flink_tm2_8c32g:/usr/local/ docker cp /opt/Dependency_library/Dependency_library_Default flink_tm2_8c32g:/opt/Dependency_library docker cp /usr/local/OmniStream flink_tm2_8c32g:/usr/local/
- Access the containers in sequence and perform 3.
1 2 3
docker exec -it flink_jm_8c32g /bin/bash docker exec -it flink_tm1_8c32g /bin/bash docker exec -it flink_tm2_8c32g /bin/bash
- Set environment variables for Flink, JDK, Nexmark, and LLVM in each container.
- Open the /etc/profile file.
1vi /etc/profile - Press i to enter the insert mode and add the following content:
1 2 3 4 5 6 7 8 9
export JAVA_HOME=/usr/local/bisheng-jdk1.8.0_342 export PATH=$JAVA_HOME/bin:$PATH export FLINK_HOME=/usr/local/flink-1.16.3 export PATH=$FLINK_HOME/bin:$PATH export NEXMARK=/usr/local/nexmark export PATH=$NEXMARK/bin:$PATH export LD_PRELOAD=/opt/Dependency_library/libjemalloc.so.2:$LD_PRELOAD export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JAVA_HOME/jre/lib/aarch64:$JAVA_HOME/lib:$JAVA_HOME/jre/lib/aarch64/server export LD_LIBRARY_PATH=/usr/local/OmniStream:/opt/Dependency_library/:$LD_LIBRARY_PATH
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Make the environment variables take effect.
source /etc/profile
- Exit the container.
exit
- Open the /etc/profile file.
Parent topic: Installing the Feature