Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove jq dependency and fix some shellcheck issues #4761

Merged
merged 2 commits into from Jun 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion nextflow-genomics-cluster-ubuntu/metadata.json
Expand Up @@ -3,5 +3,5 @@
"description": "This template deploys a scalable Nextflow cluster with a Jumpbox, n cluster nodes, docker support and shared storage.",
"summary": "This deploys a Nextflow cluster for running scalable and reproducible scientific workflows using software containers.",
"githubUsername": "lawrencegripper",
"dateUpdated": "2018-01-22"
"dateUpdated": "2018-06-14"
}
15 changes: 7 additions & 8 deletions nextflow-genomics-cluster-ubuntu/scripts/init.sh
Expand Up @@ -19,7 +19,7 @@ ADDITIONAL_INSTALL_SCRIPT_ARGUMENT=${10}
log () {
echo "-------------------------" | tee -a "$2"
date -Is | tee -a "$2"
echo $1 | tee -a "$2"
echo "$1" | tee -a "$2"
echo "-------------------------" | tee -a "$2"
}

Expand Down Expand Up @@ -128,13 +128,12 @@ setupNfs() {
copyLogsToCifsShareForDebugging() {
log "Get machine metadata and copy logs to share"

apt-get install jq curl -y | tee -a /tmp/nfinstall.log
apt-get install curl -y | tee -a /tmp/nfinstall.log

#Write instance details into share log folder for debugging
METADATA=$(curl -H Metadata:true http://169.254.169.254/metadata/instance?api-version=2017-04-02)
# shellcheck disable=SC2116
# shellcheck disable=SC2086
NODENAME=$(echo $METADATA | jq -r '.compute.name')
#Get node name and other instance metadata and write details into share log folder for debugging
#see https://docs.microsoft.com/en-us/azure/virtual-machines/windows/instance-metadata-service
METADATA=$(curl -H Metadata:true "http://169.254.169.254/metadata/instance?api-version=2017-04-02")
NODENAME=$(curl -H Metadata:true "http://169.254.169.254/metadata/instance/compute/name?api-version=2017-04-02&format=text")

#Create a log folder for each node
mkdir -p "$CIFS_SHAREPATH/logs/$NODENAME" | tee -a /tmp/nfinstall.log
Expand Down Expand Up @@ -198,7 +197,7 @@ setNextflowEnvironmentVars() {
echo export "NXF_AZ_NFSPATH=$NFS_SHAREPATH"
} >> /etc/environment

#Use asure epherical instance drive for tmp
#Use azure epherical instance drive for tmp
mkdir -p /mnt/nextflow_temp
echo export NXF_TEMP=/mnt/nextflow_temp >> /etc/environment

Expand Down