diff --git a/Builder/scripts/create-builder.sh b/BuilderQueue/scripts/create-builder.sh similarity index 100% rename from Builder/scripts/create-builder.sh rename to BuilderQueue/scripts/create-builder.sh diff --git a/Builder/scripts/destroy-builder.sh b/BuilderQueue/scripts/destroy-builder.sh similarity index 100% rename from Builder/scripts/destroy-builder.sh rename to BuilderQueue/scripts/destroy-builder.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index a2956e6..28c1ffd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,11 +40,12 @@ set(SOURCE_FILES_CLIENT Common/include/ClientData.h) # Scripts required for runtime -set(SCRIPTS - Builder/scripts/create-builder.sh - Builder/scripts/destroy-builder.sh +set(BUILDER_SCRIPTS Builder/scripts/singularity-builder-backend.sh Builder/scripts/docker-builder-backend.sh) +set(QUEUE_SCRIPTS + Builder/scripts/create-builder.sh + Builder/scripts/destroy-builder.sh) # Create executables add_executable(builder-queue ${SOURCE_FILES_QUEUE}) @@ -87,7 +88,10 @@ install(TARGETS builder-queue COMPONENT builder-queue DESTINATION bin OPTIONAL) install(TARGETS builder-server COMPONENT builder-server DESTINATION bin OPTIONAL) install(TARGETS container-builder COMPONENT container-builder DESTINATION bin OPTIONAL) -# Install scripts if target the builder-server -install(FILES ${SCRIPTS} +# Install scripts +install(FILES ${BUILDER_SCRIPTS} + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ +WORLD_EXECUTE DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" COMPONENT builder-server OPTIONAL) +install(FILES ${QUEUE_SCRIPTS} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ -WORLD_EXECUTE DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" COMPONENT builder-server OPTIONAL) \ No newline at end of file + WORLD_EXECUTE DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" COMPONENT builder-queue OPTIONAL) \ No newline at end of file diff --git a/Deployment/deploy-summit.sh b/Deployment/deploy-summit.sh new file mode 100755 index 0000000..a8fea39 --- /dev/null +++ b/Deployment/deploy-summit.sh @@ -0,0 +1,57 @@ +#!/bin/bash + +set -e +set -o xtrace + +VERSION=$1 + +export TOP_LEVEL=$(pwd)/.. + +source ${MODULESHOME}/init/bash +export PATH=$PATH:${MODULESHOME}/bin + +module unload xalt +module load cmake/3.9.2 +module load gcc + +set -x + +SW_ROOT=/sw/summit/container-builder/${VERSION} +mkdir -p ${SW_ROOT} + +mkdir boost_install && cd boost_install + +# Install boost +cd ${TOP_LEVEL} +rm -rf boost_build && mkdir boost_build && cd boost_build +curl -L https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.gz -O +tar xf boost_1_66_0.tar.gz +cd boost_1_66_0 +./bootstrap.sh --with-libraries=filesystem,regex,system,serialization,thread,program_options --prefix=${SW_ROOT} --with-toolset=gcc +./b2 install || : +rm -rf /boost_1_66_0 + +# Install container-builder +cd ${TOP_LEVEL} +rm -rf build && mkdir build && cd build +CC=gcc CXX=g++ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${SW_ROOT} .. +make container-builder +cmake -DCOMPONENT=container-builder -P cmake_install.cmake + +# Generate a public modulefile +MF_ROOT=/sw/summit/modulefiles/core/container-builder +mkdir -p ${MF_ROOT} + +# Grab latest queue host +QUEUE_HOST=$(curl https://code.ornl.gov/olcf/container-builder/raw/master/queue-host) + +cat << EOF > ${MF_ROOT}/${VERSION} +#%Module +module load gcc + +setenv QUEUE_HOST ${QUEUE_HOST} +setenv QUEUE_PORT 8080 + +prepend-path LD_LIBRARY_PATH ${SW_ROOT}/lib +prepend-path PATH ${SW_ROOT}/bin +EOF \ No newline at end of file diff --git a/Deployment/deploy-summitdev.sh b/Deployment/deploy-summitdev.sh index ed8b8d7..77c0428 100755 --- a/Deployment/deploy-summitdev.sh +++ b/Deployment/deploy-summitdev.sh @@ -12,6 +12,7 @@ export PATH=$PATH:${MODULESHOME}/bin module unload xalt module load cmake/3.9.2 +module load gcc set -x @@ -46,6 +47,7 @@ QUEUE_HOST=$(curl https://code.ornl.gov/olcf/container-builder/raw/master/queue- cat << EOF > ${MF_ROOT}/${VERSION} #%Module +module load gcc setenv QUEUE_HOST ${QUEUE_HOST} setenv QUEUE_PORT 8080