Skip to content

Commit

Permalink
Fix scripts that were misplaced and add initial script for summit
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamSimpson committed Feb 6, 2018
1 parent 4097fcb commit 017b112
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 6 deletions.
File renamed without changes.
File renamed without changes.
16 changes: 10 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down Expand Up @@ -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)
WORLD_EXECUTE DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" COMPONENT builder-queue OPTIONAL)
57 changes: 57 additions & 0 deletions Deployment/deploy-summit.sh
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions Deployment/deploy-summitdev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export PATH=$PATH:${MODULESHOME}/bin

module unload xalt
module load cmake/3.9.2
module load gcc

set -x

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 017b112

Please sign in to comment.