Skip to content

Commit

Permalink
deploy webhelp during CD to /webstart/VCell_Tutorials/VCell_Help
Browse files Browse the repository at this point in the history
  • Loading branch information
jcschaff committed May 4, 2024
1 parent 75dbb73 commit c7dff9d
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/site_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
echo "VCELL_TAG=`git rev-parse --short HEAD`" >> $GITHUB_ENV
echo "VCELL_REPO_NAMESPACE=ghcr.io/virtualcell" >> $GITHUB_ENV
echo "VCELL_DEPLOY_REMOTE_DIR=/share/apps/vcell3/deployed_github" >> $GITHUB_ENV
echo "VCELL_WEBHELP_REMOTE_DIR="/share/apps/vcell3/apache_webroot/htdocs/webstart/VCell_Tutorials/VCell_Help" >> $GITHUB_ENV
if [ "${{ github.event.inputs.vcell_site }}" == "rel" ]; then\
echo "VCELL_MANAGER_NODE=vcellapi.cam.uchc.edu" >> $GITHUB_ENV;\
echo "VCELL_INSTALLER_REMOTE_DIR="/share/apps/vcell3/apache_webroot/htdocs/webstart/Rel"" >> $GITHUB_ENV;\
Expand Down Expand Up @@ -206,12 +207,14 @@ jobs:
cd docker/swarm
ssh -t ${{ secrets.CD_FULL_USER }}@${VCELL_MANAGER_NODE} sudo docker login -u ${{ secrets.ACTION_USER }} -p ${{ secrets.ACTION_TOKEN }} ghcr.io
if ${{ github.event.inputs.server_only != 'true' }}; then
# build and install the client installers and the singularity images (kubernetes cluster deployments are separate)
# build and install the client installers, the singularity images, and the web help (kubernetes cluster deployments are separate)
./deploy-action-kubernetes.sh \
--ssh-user ${{ secrets.CD_FULL_USER }} \
--install-singularity \
--build-installers \
--installer-deploy-dir $VCELL_INSTALLER_REMOTE_DIR \
--webhelp-local-dir ../../vcell-client/target/classes/vcellDoc \
--webhelp-deploy-dir $VCELL_WEBHELP_REMOTE_DIR \
${VCELL_MANAGER_NODE} \
./${VCELL_CONFIG_FILE_NAME}
export VCELL_SITE_CAMEL=`cat $VCELL_CONFIG_FILE_NAME | grep VCELL_SITE_CAMEL | cut -d"=" -f2`
Expand Down
34 changes: 33 additions & 1 deletion docker/swarm/deploy-action-kubernetes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ show_help() {
echo " directory for installers accessible to users"
echo " typically a web-accessible location to download the client installers for each platform"
echo ""
echo " --webhelp-local-dir /local/path/to/vcellDoc"
echo " directory for VCell java help including html files"
echo ""
echo " --webhelp-deploy-dir /remote/path/to/web/VCell_Help"
echo " directory for deployed html webhelp published on web server"
echo ""
echo " --install-singularity optionally install batch and opt singularity images on each compute node in 'vcell' SLURM partition"
echo ""
echo ""
Expand All @@ -33,6 +39,8 @@ show_help() {
echo " --ssh-user vcell \\"
echo " --install_singularity \\"
echo " --build_installers --installer_deploy_dir /share/apps/vcell3/apache_webroot/htdocs/webstart/Test \\"
echo " --webhelp_local_dir ../../vcell-client/target/classes/vcellDoc \\"
echo " --webhelp_deploy_dir /share/apps/vcell3/apache_webroot/htdocs/webstart/VCell_Tutorials/VCell_Help \\"
echo " vcellapi-test.cam.uchc.edu \\"
echo " ./server.config"
exit 1
Expand All @@ -44,6 +52,8 @@ fi

ssh_user=$(whoami)
installer_deploy_dir=
webhelp_local_dir=
webhelp_deploy_dir=
build_installers=false
install_singularity=false
while :; do
Expand All @@ -60,6 +70,14 @@ while :; do
shift
installer_deploy_dir=$1
;;
--webhelp-local-dir)
shift
webhelp_local_dir=$1
;;
--webhelp-deploy-dir)
shift
webhelp_deploy_dir=$1
;;
--install-singularity)
install_singularity=true
;;
Expand Down Expand Up @@ -167,10 +185,24 @@ if [ "$build_installers" == "true" ]; then
echo "failed to copy installers";
exit 1;
fi

fi
fi

#
# if --webhelp_deploy_dir, then copy the help html files from vcell-client/target/classes/vcellDoc/topics to the webhelp deploy directory
#
if [ ! -z "$webhelp_deploy_dir" ]; then
if ! scp -r "${webhelp_local_dir}/topics" "$ssh_user@$manager_node:${webhelp_deploy_dir}/topics";
then
echo "failed to copy html files in topic directory to webhelp deploy directory";
exit 1;
fi
if ! scp "${webhelp_local_dir}/VCellHelpTOC.html" "$ssh_user@$manager_node:${webhelp_deploy_dir}/index.html";
then
echo "failed to index.html to webhelp deploy directory";
exit 1;
fi
fi

echo "exited normally"

Expand Down

0 comments on commit c7dff9d

Please sign in to comment.