Skip to content

Commit

Permalink
Merge pull request #1239 from virtualcell/1225-update-help
Browse files Browse the repository at this point in the history
update vcell help
  • Loading branch information
jcschaff committed May 5, 2024
2 parents 59f7e1f + c21fdb5 commit fd186dd
Show file tree
Hide file tree
Showing 11 changed files with 568 additions and 496 deletions.
19 changes: 17 additions & 2 deletions .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 @@ -199,19 +200,33 @@ jobs:
singularity remote login -u ${{ secrets.ACTION_USER }} -p ${{ secrets.ACTION_TOKEN }} oras://ghcr.io
singularity pull $BATCH_SINGULARITY_FILENAME oras://${VCELL_REPO_NAMESPACE}/vcell-batch-singularity:${{ github.event.inputs.vcell_version }}.${{ github.event.inputs.vcell_build }}
singularity pull $OPT_SINGULARITY_FILENAME oras://${VCELL_REPO_NAMESPACE}/vcell-opt-singularity:${{ github.event.inputs.vcell_version }}.${{ github.event.inputs.vcell_build }}
- name: deploy installers and singularity to kubernetes site
- name: setup java 17 with maven cache (for documentation build)
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
- name: build documentation for web help
if: ${{ github.event.inputs.server_only != 'true' }}
run: |
set -ux
cd vcell-client
mvn clean install -DskipTests
- name: deploy installers and singularity to kubernetes site and web help to vcell.org
if: ${{ github.event.inputs.deployment_type == 'kubernetes' }}
run: |
set -ux
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
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public DocImageReference(String imageTarget, boolean bInline) {
super();
this.imageTarget = imageTarget;
this.bInline = bInline;
DocumentCompiler.referencedImageFiles.add(imageTarget);
}

public String getImageTarget() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package org.vcell.documentation;

public interface DocReferenceTarget {
}
Loading

0 comments on commit fd186dd

Please sign in to comment.