Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
arc6-client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
rubin-lsst
arc6-client
Commits
4b4748c5
Commit
4b4748c5
authored
2 years ago
by
Fabio Hernandez
Browse files
Options
Downloads
Patches
Plain Diff
Improve usability
parent
a426087b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
deploy.sh
+39
-4
39 additions, 4 deletions
deploy.sh
run-arc.sh
+4
-2
4 additions, 2 deletions
run-arc.sh
with
43 additions
and
6 deletions
deploy.sh
+
39
−
4
View file @
4b4748c5
...
...
@@ -15,16 +15,51 @@ thisScript=$(basename $0)
defaultDeployDir
=
'/pbs/throng/lsst/software/arc6-client'
#
# Target directory to deploy to
# Usage
#
function
usage
()
{
local
name
=
$1
echo
-e
"Usage:
${
name
}
[-h] [-d <deploy dir>]
\n
"
echo
-e
" e.g.
${
name
}
-d
${
defaultDeployDir
}
"
}
#
# Parse command line arguments
#
deployDir
=
${
defaultDeployDir
}
OPTIND
=
1
while
getopts
"hd:"
option
;
do
case
"
${
option
}
"
in
h|
\?
)
usage
${
thisScript
}
exit
0
;;
d
)
deployDir
=
$OPTARG
;;
esac
done
shift
$((
OPTIND-1
))
#
# Ensure there are no extra arguments
#
if
[[
$#
-gt
0
]]
;
then
echo
"
${
thisScript
}
: unexpected argument
$1
"
usage
${
thisScript
}
exit
1
fi
#
# Check deploy directory exists
#
deployDir
=
${
1
:-${
defaultDeployDir
}}
if
[[
!
-d
${
deployDir
}
]]
;
then
echo
"
${
thisScript
}
: could not find deploy directory
${
deployDir
}
"
exit
1
fi
#
# Pack and copy the relevant files to the
target
directory
# Pack and copy the relevant files to the
deploy
directory
#
tempFile
=
$(
mktemp
)
trap
"rm -f
${
tempFile
}
"
EXIT
...
...
@@ -62,5 +97,5 @@ declare -a arcCommands=(
)
cd
${
deployDir
}
for
cmd
in
"
${
arcCommands
[@]
}
"
;
do
ln
-sf
./
run-arc.sh
${
cmd
}
ln
-sf
run-arc.sh
${
cmd
}
done
\ No newline at end of file
This diff is collapsed.
Click to expand it.
run-arc.sh
+
4
−
2
View file @
4b4748c5
...
...
@@ -4,6 +4,7 @@
# Init
#
thisScript
=
$(
basename
$0
)
thisDir
=
"
$(
cd
--
"
$(
dirname
--
"
${
BASH_SOURCE
[0]
}
"
)
"
&> /dev/null
&&
pwd
)
"
#
# Ensure this script is run via an ARC subcommand
...
...
@@ -24,9 +25,10 @@ if ! voms-proxy-info --file ${X509_USER_PROXY} --exists &> /dev/null; then
fi
#
# Run the requested command with its arguments inside a Singularity container
# Run the requested command with its arguments inside a Singularity container. The
# container image is expected to be in the same directory as this script.
#
singularityImage
=
'
nordugrid-arc6-client.sif
'
singularityImage
=
"
${
thisDir
}
/
nordugrid-arc6-client.sif
"
singularity
exec
\
--env
X509_USER_PROXY
=
/tmp/x509_user_proxy
\
--bind
/etc/grid-security
\
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment