X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/06cf38c24519fa21556686545c768429b5af50dc..4727a3b6417bd254b3e8bca1bd19a77773493572:/sdk/cli/bin/crunch-job diff --git a/sdk/cli/bin/crunch-job b/sdk/cli/bin/crunch-job index 7c2855c5ea..88f9d561b4 100755 --- a/sdk/cli/bin/crunch-job +++ b/sdk/cli/bin/crunch-job @@ -109,6 +109,9 @@ unless (defined $ENV{"CRUNCH_TMP"}) { } } +$ENV{"HOST_CRUNCHRUNNER_BIN"} ||= `which crunchrunner`; +$ENV{"HOST_CERTS"} ||= "/etc/ssl/certs/ca-certificates.crt"; + # Create the tmp directory if it does not exist if ( ! -d $ENV{"CRUNCH_TMP"} ) { make_path $ENV{"CRUNCH_TMP"} or die "Failed to create temporary working directory: " . $ENV{"CRUNCH_TMP"}; @@ -917,6 +920,11 @@ for (my $todo_ptr = 0; $todo_ptr <= $#jobstep_todo; $todo_ptr ++) # For now, use the same approach as TASK_WORK above. $ENV{"JOB_WORK"} = "/tmp/crunch-job-work"; + # Bind mount the crunchrunner binary and host TLS certificates file into + # the container. + $command .= "--volume=\Q$ENV{HOST_CRUNCHRUNNER_BIN}:/usr/lib/crunchrunner/crunchrunner\E "; + $command .= "--volume=\Q$ENV{HOST_CERTS}:/usr/lib/crunchrunner/ca-certificates.crt\E "; + while (my ($env_key, $env_val) = each %ENV) { if ($env_key =~ /^(ARVADOS|CRUNCH|JOB|TASK)_/) {