Skip to content

Commit

Permalink
test build oed-4 testing images
Browse files Browse the repository at this point in the history
  • Loading branch information
sambles committed Oct 16, 2024
1 parent 77ecab7 commit 81e42c8
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 12 deletions.
13 changes: 13 additions & 0 deletions Dockerfile.oed-4_server
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM coreoasis/api_server:2.3.9

USER root
RUN apt-get update && apt-get -y install git python3-pip && rm -rf /var/lib/apt/lists/*
USER server

# Install ODS-Tools from git branch (Optional) 'docker build --build-arg ods_tools_branch=develop'
ARG ods_tools_branch
RUN if [ ! -z "$ods_tools_branch" ] ; then \
apt update && apt install -y git; \
pip uninstall ods-tools -y; \
pip install --user --no-warn-script-location -v git+https://git@github.com/OasisLMF/ODS_Tools.git@${ods_tools_branch}#egg=ods-tools; \
fi
17 changes: 17 additions & 0 deletions Dockerfile.oed-4_worker
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM coreoasis/model_worker:2.3.9

# Install ODS-Tools from git branch (Optional) 'docker build --build-arg ods_tools_branch=develop'
ARG ods_tools_branch
RUN if [ ! -z "$ods_tools_branch" ] ; then \
apt update && apt install -y git; \
pip uninstall ods-tools -y; \
pip install --user --no-warn-script-location -v git+https://git@github.com/OasisLMF/ODS_Tools.git@${ods_tools_branch}#egg=ods-tools; \
fi

# install MDK from git branch (Optional) 'docker build --build-arg oasislmf_branch=develop'
ARG oasislmf_branch
RUN if [ ! -z "$oasislmf_branch" ] ; then \
apt update && apt install -y git; \
pip uninstall oasislmf -y; \
pip install -v git+https://git@github.com/OasisLMF/OasisLMF.git@${oasislmf_branch}#egg=oasislmf[extra]; \
fi
19 changes: 19 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

set -x

ODS_BRANCH='feature/v4_integration'
LMF_BRANCH='feature/oed_v4'
IMG_TAG='oed-4-dev'

if [ ! -z $ODS_BRANCH ]; then
BUILD_ARGS_WORKER="${BUILD_ARGS_WORKER} --build-arg ods_tools_branch=${ODS_BRANCH}"
BUILD_ARGS_SERVER="${BUILD_ARGS_SERVER} --build-arg ods_tools_branch=${ODS_BRANCH}"
fi

if [ ! -z $LMF_BRANCH ]; then
BUILD_ARGS_WORKER="${BUILD_ARGS_WORKER} --build-arg oasislmf_branch=${LMF_BRANCH}"
fi

docker build -f Dockerfile.oed-4_worker $BUILD_ARGS_WORKER -t coreoasis/model_worker:$IMG_TAG .
docker build -f Dockerfile.oed-4_server $BUILD_ARGS_SERVER -t coreoasis/api_server:$IMG_TAG .
23 changes: 11 additions & 12 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ set -e

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

export VERS_MDK=2.3.5
export VERS_API=2.3.5
export VERS_WORKER=2.3.5
export VERS_MDK=2.3.9
export VERS_API='oed-4-dev'
export VERS_WORKER='oed-4-dev'
export VERS_UI=1.11.7
export VERS_PIWIND='stable/2.3.x'

Expand Down Expand Up @@ -39,7 +39,7 @@ if [[ $(docker volume ls | grep OasisData -c) -gt 1 || -d $SCRIPT_DIR/$GIT_PIWIN
docker-compose -f $SCRIPT_DIR/oasis-platform.yml -f $SCRIPT_DIR/oasis-ui-standalone.yml down --remove-orphans
set -e
printf "Deleting docker data: \n"
rm -rf $SCRIPT_DIR/$GIT_PIWIND
#rm -rf $SCRIPT_DIR/$GIT_PIWIND
docker volume ls | grep OasisData | awk 'BEGIN { FS = "[ \t\n]+" }{ print $2 }' | xargs -r docker volume rm
else
echo "-- Reinstall aborted -- "
Expand All @@ -48,12 +48,12 @@ if [[ $(docker volume ls | grep OasisData -c) -gt 1 || -d $SCRIPT_DIR/$GIT_PIWIN
fi


# --- Clone PiWind ---------------------------------------------------------- #

mkdir -p $SCRIPT_DIR/$GIT_PIWIND
cd $SCRIPT_DIR/$GIT_PIWIND
git clone --depth 1 --branch $VERS_PIWIND https://github.com/OasisLMF/$GIT_PIWIND.git .
git checkout $VERS_PIWIND
## --- Clone PiWind ---------------------------------------------------------- #
#
#mkdir -p $SCRIPT_DIR/$GIT_PIWIND
#cd $SCRIPT_DIR/$GIT_PIWIND
#git clone --depth 1 --branch $VERS_PIWIND https://github.com/OasisLMF/$GIT_PIWIND.git .
#git checkout $VERS_PIWIND



Expand All @@ -62,9 +62,8 @@ git checkout $VERS_PIWIND
cd $SCRIPT_DIR

set +e
docker pull ${WORKER_IMG}:${VERS_WORKER}
docker pull ${SERVER_IMG}:${VERS_API}
docker pull coreoasis/oasisui_app:$VERS_UI
./build.sh
set -e

# RUN OasisPlatform / OasisUI / Portainer
Expand Down

0 comments on commit 81e42c8

Please sign in to comment.