Class: Google::Cloud::Batch::V1::Runnable
- Inherits:
-
Object
- Object
- Google::Cloud::Batch::V1::Runnable
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/batch/v1/task.rb
Overview
Runnable describes instructions for executing a specific script or container as part of a Task.
Defined Under Namespace
Classes: Barrier, Container, LabelsEntry, Script
Instance Attribute Summary collapse
-
#always_run ⇒ ::Boolean
By default, after a Runnable fails, no further Runnable are executed.
-
#background ⇒ ::Boolean
Normally, a runnable that doesn't exit causes its task to fail.
-
#barrier ⇒ ::Google::Cloud::Batch::V1::Runnable::Barrier
Barrier runnable.
-
#container ⇒ ::Google::Cloud::Batch::V1::Runnable::Container
Container runnable.
-
#display_name ⇒ ::String
Optional.
-
#environment ⇒ ::Google::Cloud::Batch::V1::Environment
Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).
-
#ignore_exit_status ⇒ ::Boolean
Normally, a runnable that returns a non-zero exit status fails and causes the task to fail.
-
#labels ⇒ ::Google::Protobuf::Map{::String => ::String}
Labels for this Runnable.
-
#script ⇒ ::Google::Cloud::Batch::V1::Runnable::Script
Script runnable.
-
#timeout ⇒ ::Google::Protobuf::Duration
Timeout for this Runnable.
Instance Attribute Details
#always_run ⇒ ::Boolean
Returns By default, after a Runnable fails, no further Runnable are executed. This flag indicates that this Runnable must be run even if the Task has already failed. This is useful for Runnables that copy output files off of the VM or for debugging.
The always_run flag does not override the Task's overall max_run_duration. If the max_run_duration has expired then no further Runnables will execute, not even always_run Runnables.
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 |
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 214 class Runnable include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Container runnable. # @!attribute [rw] image_uri # @return [::String] # Required. The URI to pull the container image from. # @!attribute [rw] commands # @return [::Array<::String>] # Required for some container images. Overrides the `CMD` specified in the # container. If there is an `ENTRYPOINT` (either in the container image or # with the `entrypoint` field below) then these commands are appended as # arguments to the `ENTRYPOINT`. # @!attribute [rw] entrypoint # @return [::String] # Required for some container images. Overrides the `ENTRYPOINT` specified # in the container. # @!attribute [rw] volumes # @return [::Array<::String>] # Volumes to mount (bind mount) from the host machine files or directories # into the container, formatted to match `--volume` option for the # `docker run` command—for example, `/foo:/bar` or `/foo:/bar:ro`. # # If the `TaskSpec.Volumes` field is specified but this field is not, Batch # will mount each volume from the host machine to the container with the # same mount path by default. In this case, the default mount option for # containers will be read-only (`ro`) for existing persistent disks and # read-write (`rw`) for other volume types, regardless of the original # mount options specified in `TaskSpec.Volumes`. If you need different # mount settings, you can explicitly configure them in this field. # @!attribute [rw] options # @return [::String] # Required for some container images. Arbitrary additional options to # include in the `docker run` command when running this container—for # example, `--network host`. For the `--volume` option, use the `volumes` # field for the container. # @!attribute [rw] block_external_network # @return [::Boolean] # If set to true, external network access to and from container will be # blocked, containers that are with block_external_network as true can # still communicate with each other, network cannot be specified in the # `container.options` field. # @!attribute [rw] username # @return [::String] # Required if the container image is from a private Docker registry. The # username to login to the Docker registry that contains the image. # # You can either specify the username directly by using plain text or # specify an encrypted username by using a Secret Manager secret: # `projects/*/secrets/*/versions/*`. However, using a secret is # recommended for enhanced security. # # Caution: If you specify the username using plain text, you risk the # username being exposed to any users who can view the job or its logs. # To avoid this risk, specify a secret that contains the username instead. # # Learn more about [Secret # Manager](https://cloud.google.com/secret-manager/docs/) and [using # Secret Manager with # Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). # @!attribute [rw] password # @return [::String] # Required if the container image is from a private Docker registry. The # password to login to the Docker registry that contains the image. # # For security, it is strongly recommended to specify an # encrypted password by using a Secret Manager secret: # `projects/*/secrets/*/versions/*`. # # Warning: If you specify the password using plain text, you risk the # password being exposed to any users who can view the job or its logs. # To avoid this risk, specify a secret that contains the password instead. # # Learn more about [Secret # Manager](https://cloud.google.com/secret-manager/docs/) and [using # Secret Manager with # Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). # @!attribute [rw] enable_image_streaming # @return [::Boolean] # Optional. If set to true, this container runnable uses Image streaming. # # Use Image streaming to allow the runnable to initialize without # waiting for the entire container image to download, which can # significantly reduce startup time for large container images. # # When `enableImageStreaming` is set to true, the container # runtime is [containerd](https://containerd.io/) instead of Docker. # Additionally, this container runnable only supports the following # `container` subfields: `imageUri`, # `commands[]`, `entrypoint`, and # `volumes[]`; any other `container` subfields are ignored. # # For more information about the requirements and limitations for using # Image streaming with Batch, see the [`image-streaming` # sample on # GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming). class Container include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Script runnable. # @!attribute [rw] path # @return [::String] # The path to a script file that is accessible from the host VM(s). # # Unless the script file supports the default `#!/bin/sh` shell # interpreter, you must specify an interpreter by including a # [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) as the # first line of the file. For example, to execute the script using bash, # include `#!/bin/bash` as the first line of the file. Alternatively, # to execute the script using Python3, include `#!/usr/bin/env python3` # as the first line of the file. # @!attribute [rw] text # @return [::String] # The text for a script. # # Unless the script text supports the default `#!/bin/sh` shell # interpreter, you must specify an interpreter by including a # [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) at the # beginning of the text. For example, to execute the script using bash, # include `#!/bin/bash\n` at the beginning of the text. Alternatively, # to execute the script using Python3, include `#!/usr/bin/env python3\n` # at the beginning of the text. class Script include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A barrier runnable automatically blocks the execution of subsequent # runnables until all the tasks in the task group reach the barrier. # @!attribute [rw] name # @return [::String] # Barriers are identified by their index in runnable list. # Names are not required, but if present should be an identifier. class Barrier include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#background ⇒ ::Boolean
Returns Normally, a runnable that doesn't exit causes its task to fail. However,
you can set this field to true
to configure a background runnable.
Background runnables are allowed continue running in the background while
the task executes subsequent runnables. For example, background runnables
are useful for providing services to other runnables or providing
debugging-support tools like SSH servers.
Specifically, background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as task failures.
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 |
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 214 class Runnable include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Container runnable. # @!attribute [rw] image_uri # @return [::String] # Required. The URI to pull the container image from. # @!attribute [rw] commands # @return [::Array<::String>] # Required for some container images. Overrides the `CMD` specified in the # container. If there is an `ENTRYPOINT` (either in the container image or # with the `entrypoint` field below) then these commands are appended as # arguments to the `ENTRYPOINT`. # @!attribute [rw] entrypoint # @return [::String] # Required for some container images. Overrides the `ENTRYPOINT` specified # in the container. # @!attribute [rw] volumes # @return [::Array<::String>] # Volumes to mount (bind mount) from the host machine files or directories # into the container, formatted to match `--volume` option for the # `docker run` command—for example, `/foo:/bar` or `/foo:/bar:ro`. # # If the `TaskSpec.Volumes` field is specified but this field is not, Batch # will mount each volume from the host machine to the container with the # same mount path by default. In this case, the default mount option for # containers will be read-only (`ro`) for existing persistent disks and # read-write (`rw`) for other volume types, regardless of the original # mount options specified in `TaskSpec.Volumes`. If you need different # mount settings, you can explicitly configure them in this field. # @!attribute [rw] options # @return [::String] # Required for some container images. Arbitrary additional options to # include in the `docker run` command when running this container—for # example, `--network host`. For the `--volume` option, use the `volumes` # field for the container. # @!attribute [rw] block_external_network # @return [::Boolean] # If set to true, external network access to and from container will be # blocked, containers that are with block_external_network as true can # still communicate with each other, network cannot be specified in the # `container.options` field. # @!attribute [rw] username # @return [::String] # Required if the container image is from a private Docker registry. The # username to login to the Docker registry that contains the image. # # You can either specify the username directly by using plain text or # specify an encrypted username by using a Secret Manager secret: # `projects/*/secrets/*/versions/*`. However, using a secret is # recommended for enhanced security. # # Caution: If you specify the username using plain text, you risk the # username being exposed to any users who can view the job or its logs. # To avoid this risk, specify a secret that contains the username instead. # # Learn more about [Secret # Manager](https://cloud.google.com/secret-manager/docs/) and [using # Secret Manager with # Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). # @!attribute [rw] password # @return [::String] # Required if the container image is from a private Docker registry. The # password to login to the Docker registry that contains the image. # # For security, it is strongly recommended to specify an # encrypted password by using a Secret Manager secret: # `projects/*/secrets/*/versions/*`. # # Warning: If you specify the password using plain text, you risk the # password being exposed to any users who can view the job or its logs. # To avoid this risk, specify a secret that contains the password instead. # # Learn more about [Secret # Manager](https://cloud.google.com/secret-manager/docs/) and [using # Secret Manager with # Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). # @!attribute [rw] enable_image_streaming # @return [::Boolean] # Optional. If set to true, this container runnable uses Image streaming. # # Use Image streaming to allow the runnable to initialize without # waiting for the entire container image to download, which can # significantly reduce startup time for large container images. # # When `enableImageStreaming` is set to true, the container # runtime is [containerd](https://containerd.io/) instead of Docker. # Additionally, this container runnable only supports the following # `container` subfields: `imageUri`, # `commands[]`, `entrypoint`, and # `volumes[]`; any other `container` subfields are ignored. # # For more information about the requirements and limitations for using # Image streaming with Batch, see the [`image-streaming` # sample on # GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming). class Container include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Script runnable. # @!attribute [rw] path # @return [::String] # The path to a script file that is accessible from the host VM(s). # # Unless the script file supports the default `#!/bin/sh` shell # interpreter, you must specify an interpreter by including a # [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) as the # first line of the file. For example, to execute the script using bash, # include `#!/bin/bash` as the first line of the file. Alternatively, # to execute the script using Python3, include `#!/usr/bin/env python3` # as the first line of the file. # @!attribute [rw] text # @return [::String] # The text for a script. # # Unless the script text supports the default `#!/bin/sh` shell # interpreter, you must specify an interpreter by including a # [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) at the # beginning of the text. For example, to execute the script using bash, # include `#!/bin/bash\n` at the beginning of the text. Alternatively, # to execute the script using Python3, include `#!/usr/bin/env python3\n` # at the beginning of the text. class Script include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A barrier runnable automatically blocks the execution of subsequent # runnables until all the tasks in the task group reach the barrier. # @!attribute [rw] name # @return [::String] # Barriers are identified by their index in runnable list. # Names are not required, but if present should be an identifier. class Barrier include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#barrier ⇒ ::Google::Cloud::Batch::V1::Runnable::Barrier
Returns Barrier runnable.
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 |
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 214 class Runnable include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Container runnable. # @!attribute [rw] image_uri # @return [::String] # Required. The URI to pull the container image from. # @!attribute [rw] commands # @return [::Array<::String>] # Required for some container images. Overrides the `CMD` specified in the # container. If there is an `ENTRYPOINT` (either in the container image or # with the `entrypoint` field below) then these commands are appended as # arguments to the `ENTRYPOINT`. # @!attribute [rw] entrypoint # @return [::String] # Required for some container images. Overrides the `ENTRYPOINT` specified # in the container. # @!attribute [rw] volumes # @return [::Array<::String>] # Volumes to mount (bind mount) from the host machine files or directories # into the container, formatted to match `--volume` option for the # `docker run` command—for example, `/foo:/bar` or `/foo:/bar:ro`. # # If the `TaskSpec.Volumes` field is specified but this field is not, Batch # will mount each volume from the host machine to the container with the # same mount path by default. In this case, the default mount option for # containers will be read-only (`ro`) for existing persistent disks and # read-write (`rw`) for other volume types, regardless of the original # mount options specified in `TaskSpec.Volumes`. If you need different # mount settings, you can explicitly configure them in this field. # @!attribute [rw] options # @return [::String] # Required for some container images. Arbitrary additional options to # include in the `docker run` command when running this container—for # example, `--network host`. For the `--volume` option, use the `volumes` # field for the container. # @!attribute [rw] block_external_network # @return [::Boolean] # If set to true, external network access to and from container will be # blocked, containers that are with block_external_network as true can # still communicate with each other, network cannot be specified in the # `container.options` field. # @!attribute [rw] username # @return [::String] # Required if the container image is from a private Docker registry. The # username to login to the Docker registry that contains the image. # # You can either specify the username directly by using plain text or # specify an encrypted username by using a Secret Manager secret: # `projects/*/secrets/*/versions/*`. However, using a secret is # recommended for enhanced security. # # Caution: If you specify the username using plain text, you risk the # username being exposed to any users who can view the job or its logs. # To avoid this risk, specify a secret that contains the username instead. # # Learn more about [Secret # Manager](https://cloud.google.com/secret-manager/docs/) and [using # Secret Manager with # Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). # @!attribute [rw] password # @return [::String] # Required if the container image is from a private Docker registry. The # password to login to the Docker registry that contains the image. # # For security, it is strongly recommended to specify an # encrypted password by using a Secret Manager secret: # `projects/*/secrets/*/versions/*`. # # Warning: If you specify the password using plain text, you risk the # password being exposed to any users who can view the job or its logs. # To avoid this risk, specify a secret that contains the password instead. # # Learn more about [Secret # Manager](https://cloud.google.com/secret-manager/docs/) and [using # Secret Manager with # Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). # @!attribute [rw] enable_image_streaming # @return [::Boolean] # Optional. If set to true, this container runnable uses Image streaming. # # Use Image streaming to allow the runnable to initialize without # waiting for the entire container image to download, which can # significantly reduce startup time for large container images. # # When `enableImageStreaming` is set to true, the container # runtime is [containerd](https://containerd.io/) instead of Docker. # Additionally, this container runnable only supports the following # `container` subfields: `imageUri`, # `commands[]`, `entrypoint`, and # `volumes[]`; any other `container` subfields are ignored. # # For more information about the requirements and limitations for using # Image streaming with Batch, see the [`image-streaming` # sample on # GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming). class Container include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Script runnable. # @!attribute [rw] path # @return [::String] # The path to a script file that is accessible from the host VM(s). # # Unless the script file supports the default `#!/bin/sh` shell # interpreter, you must specify an interpreter by including a # [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) as the # first line of the file. For example, to execute the script using bash, # include `#!/bin/bash` as the first line of the file. Alternatively, # to execute the script using Python3, include `#!/usr/bin/env python3` # as the first line of the file. # @!attribute [rw] text # @return [::String] # The text for a script. # # Unless the script text supports the default `#!/bin/sh` shell # interpreter, you must specify an interpreter by including a # [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) at the # beginning of the text. For example, to execute the script using bash, # include `#!/bin/bash\n` at the beginning of the text. Alternatively, # to execute the script using Python3, include `#!/usr/bin/env python3\n` # at the beginning of the text. class Script include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A barrier runnable automatically blocks the execution of subsequent # runnables until all the tasks in the task group reach the barrier. # @!attribute [rw] name # @return [::String] # Barriers are identified by their index in runnable list. # Names are not required, but if present should be an identifier. class Barrier include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#container ⇒ ::Google::Cloud::Batch::V1::Runnable::Container
Returns Container runnable.
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 |
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 214 class Runnable include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Container runnable. # @!attribute [rw] image_uri # @return [::String] # Required. The URI to pull the container image from. # @!attribute [rw] commands # @return [::Array<::String>] # Required for some container images. Overrides the `CMD` specified in the # container. If there is an `ENTRYPOINT` (either in the container image or # with the `entrypoint` field below) then these commands are appended as # arguments to the `ENTRYPOINT`. # @!attribute [rw] entrypoint # @return [::String] # Required for some container images. Overrides the `ENTRYPOINT` specified # in the container. # @!attribute [rw] volumes # @return [::Array<::String>] # Volumes to mount (bind mount) from the host machine files or directories # into the container, formatted to match `--volume` option for the # `docker run` command—for example, `/foo:/bar` or `/foo:/bar:ro`. # # If the `TaskSpec.Volumes` field is specified but this field is not, Batch # will mount each volume from the host machine to the container with the # same mount path by default. In this case, the default mount option for # containers will be read-only (`ro`) for existing persistent disks and # read-write (`rw`) for other volume types, regardless of the original # mount options specified in `TaskSpec.Volumes`. If you need different # mount settings, you can explicitly configure them in this field. # @!attribute [rw] options # @return [::String] # Required for some container images. Arbitrary additional options to # include in the `docker run` command when running this container—for # example, `--network host`. For the `--volume` option, use the `volumes` # field for the container. # @!attribute [rw] block_external_network # @return [::Boolean] # If set to true, external network access to and from container will be # blocked, containers that are with block_external_network as true can # still communicate with each other, network cannot be specified in the # `container.options` field. # @!attribute [rw] username # @return [::String] # Required if the container image is from a private Docker registry. The # username to login to the Docker registry that contains the image. # # You can either specify the username directly by using plain text or # specify an encrypted username by using a Secret Manager secret: # `projects/*/secrets/*/versions/*`. However, using a secret is # recommended for enhanced security. # # Caution: If you specify the username using plain text, you risk the # username being exposed to any users who can view the job or its logs. # To avoid this risk, specify a secret that contains the username instead. # # Learn more about [Secret # Manager](https://cloud.google.com/secret-manager/docs/) and [using # Secret Manager with # Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). # @!attribute [rw] password # @return [::String] # Required if the container image is from a private Docker registry. The # password to login to the Docker registry that contains the image. # # For security, it is strongly recommended to specify an # encrypted password by using a Secret Manager secret: # `projects/*/secrets/*/versions/*`. # # Warning: If you specify the password using plain text, you risk the # password being exposed to any users who can view the job or its logs. # To avoid this risk, specify a secret that contains the password instead. # # Learn more about [Secret # Manager](https://cloud.google.com/secret-manager/docs/) and [using # Secret Manager with # Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). # @!attribute [rw] enable_image_streaming # @return [::Boolean] # Optional. If set to true, this container runnable uses Image streaming. # # Use Image streaming to allow the runnable to initialize without # waiting for the entire container image to download, which can # significantly reduce startup time for large container images. # # When `enableImageStreaming` is set to true, the container # runtime is [containerd](https://containerd.io/) instead of Docker. # Additionally, this container runnable only supports the following # `container` subfields: `imageUri`, # `commands[]`, `entrypoint`, and # `volumes[]`; any other `container` subfields are ignored. # # For more information about the requirements and limitations for using # Image streaming with Batch, see the [`image-streaming` # sample on # GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming). class Container include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Script runnable. # @!attribute [rw] path # @return [::String] # The path to a script file that is accessible from the host VM(s). # # Unless the script file supports the default `#!/bin/sh` shell # interpreter, you must specify an interpreter by including a # [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) as the # first line of the file. For example, to execute the script using bash, # include `#!/bin/bash` as the first line of the file. Alternatively, # to execute the script using Python3, include `#!/usr/bin/env python3` # as the first line of the file. # @!attribute [rw] text # @return [::String] # The text for a script. # # Unless the script text supports the default `#!/bin/sh` shell # interpreter, you must specify an interpreter by including a # [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) at the # beginning of the text. For example, to execute the script using bash, # include `#!/bin/bash\n` at the beginning of the text. Alternatively, # to execute the script using Python3, include `#!/usr/bin/env python3\n` # at the beginning of the text. class Script include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A barrier runnable automatically blocks the execution of subsequent # runnables until all the tasks in the task group reach the barrier. # @!attribute [rw] name # @return [::String] # Barriers are identified by their index in runnable list. # Names are not required, but if present should be an identifier. class Barrier include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#display_name ⇒ ::String
Returns Optional. DisplayName is an optional field that can be provided by the caller. If provided, it will be used in logs and other outputs to identify the script, making it easier for users to understand the logs. If not provided the index of the runnable will be used for outputs.
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 |
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 214 class Runnable include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Container runnable. # @!attribute [rw] image_uri # @return [::String] # Required. The URI to pull the container image from. # @!attribute [rw] commands # @return [::Array<::String>] # Required for some container images. Overrides the `CMD` specified in the # container. If there is an `ENTRYPOINT` (either in the container image or # with the `entrypoint` field below) then these commands are appended as # arguments to the `ENTRYPOINT`. # @!attribute [rw] entrypoint # @return [::String] # Required for some container images. Overrides the `ENTRYPOINT` specified # in the container. # @!attribute [rw] volumes # @return [::Array<::String>] # Volumes to mount (bind mount) from the host machine files or directories # into the container, formatted to match `--volume` option for the # `docker run` command—for example, `/foo:/bar` or `/foo:/bar:ro`. # # If the `TaskSpec.Volumes` field is specified but this field is not, Batch # will mount each volume from the host machine to the container with the # same mount path by default. In this case, the default mount option for # containers will be read-only (`ro`) for existing persistent disks and # read-write (`rw`) for other volume types, regardless of the original # mount options specified in `TaskSpec.Volumes`. If you need different # mount settings, you can explicitly configure them in this field. # @!attribute [rw] options # @return [::String] # Required for some container images. Arbitrary additional options to # include in the `docker run` command when running this container—for # example, `--network host`. For the `--volume` option, use the `volumes` # field for the container. # @!attribute [rw] block_external_network # @return [::Boolean] # If set to true, external network access to and from container will be # blocked, containers that are with block_external_network as true can # still communicate with each other, network cannot be specified in the # `container.options` field. # @!attribute [rw] username # @return [::String] # Required if the container image is from a private Docker registry. The # username to login to the Docker registry that contains the image. # # You can either specify the username directly by using plain text or # specify an encrypted username by using a Secret Manager secret: # `projects/*/secrets/*/versions/*`. However, using a secret is # recommended for enhanced security. # # Caution: If you specify the username using plain text, you risk the # username being exposed to any users who can view the job or its logs. # To avoid this risk, specify a secret that contains the username instead. # # Learn more about [Secret # Manager](https://cloud.google.com/secret-manager/docs/) and [using # Secret Manager with # Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). # @!attribute [rw] password # @return [::String] # Required if the container image is from a private Docker registry. The # password to login to the Docker registry that contains the image. # # For security, it is strongly recommended to specify an # encrypted password by using a Secret Manager secret: # `projects/*/secrets/*/versions/*`. # # Warning: If you specify the password using plain text, you risk the # password being exposed to any users who can view the job or its logs. # To avoid this risk, specify a secret that contains the password instead. # # Learn more about [Secret # Manager](https://cloud.google.com/secret-manager/docs/) and [using # Secret Manager with # Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). # @!attribute [rw] enable_image_streaming # @return [::Boolean] # Optional. If set to true, this container runnable uses Image streaming. # # Use Image streaming to allow the runnable to initialize without # waiting for the entire container image to download, which can # significantly reduce startup time for large container images. # # When `enableImageStreaming` is set to true, the container # runtime is [containerd](https://containerd.io/) instead of Docker. # Additionally, this container runnable only supports the following # `container` subfields: `imageUri`, # `commands[]`, `entrypoint`, and # `volumes[]`; any other `container` subfields are ignored. # # For more information about the requirements and limitations for using # Image streaming with Batch, see the [`image-streaming` # sample on # GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming). class Container include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Script runnable. # @!attribute [rw] path # @return [::String] # The path to a script file that is accessible from the host VM(s). # # Unless the script file supports the default `#!/bin/sh` shell # interpreter, you must specify an interpreter by including a # [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) as the # first line of the file. For example, to execute the script using bash, # include `#!/bin/bash` as the first line of the file. Alternatively, # to execute the script using Python3, include `#!/usr/bin/env python3` # as the first line of the file. # @!attribute [rw] text # @return [::String] # The text for a script. # # Unless the script text supports the default `#!/bin/sh` shell # interpreter, you must specify an interpreter by including a # [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) at the # beginning of the text. For example, to execute the script using bash, # include `#!/bin/bash\n` at the beginning of the text. Alternatively, # to execute the script using Python3, include `#!/usr/bin/env python3\n` # at the beginning of the text. class Script include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A barrier runnable automatically blocks the execution of subsequent # runnables until all the tasks in the task group reach the barrier. # @!attribute [rw] name # @return [::String] # Barriers are identified by their index in runnable list. # Names are not required, but if present should be an identifier. class Barrier include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#environment ⇒ ::Google::Cloud::Batch::V1::Environment
Returns Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 |
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 214 class Runnable include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Container runnable. # @!attribute [rw] image_uri # @return [::String] # Required. The URI to pull the container image from. # @!attribute [rw] commands # @return [::Array<::String>] # Required for some container images. Overrides the `CMD` specified in the # container. If there is an `ENTRYPOINT` (either in the container image or # with the `entrypoint` field below) then these commands are appended as # arguments to the `ENTRYPOINT`. # @!attribute [rw] entrypoint # @return [::String] # Required for some container images. Overrides the `ENTRYPOINT` specified # in the container. # @!attribute [rw] volumes # @return [::Array<::String>] # Volumes to mount (bind mount) from the host machine files or directories # into the container, formatted to match `--volume` option for the # `docker run` command—for example, `/foo:/bar` or `/foo:/bar:ro`. # # If the `TaskSpec.Volumes` field is specified but this field is not, Batch # will mount each volume from the host machine to the container with the # same mount path by default. In this case, the default mount option for # containers will be read-only (`ro`) for existing persistent disks and # read-write (`rw`) for other volume types, regardless of the original # mount options specified in `TaskSpec.Volumes`. If you need different # mount settings, you can explicitly configure them in this field. # @!attribute [rw] options # @return [::String] # Required for some container images. Arbitrary additional options to # include in the `docker run` command when running this container—for # example, `--network host`. For the `--volume` option, use the `volumes` # field for the container. # @!attribute [rw] block_external_network # @return [::Boolean] # If set to true, external network access to and from container will be # blocked, containers that are with block_external_network as true can # still communicate with each other, network cannot be specified in the # `container.options` field. # @!attribute [rw] username # @return [::String] # Required if the container image is from a private Docker registry. The # username to login to the Docker registry that contains the image. # # You can either specify the username directly by using plain text or # specify an encrypted username by using a Secret Manager secret: # `projects/*/secrets/*/versions/*`. However, using a secret is # recommended for enhanced security. # # Caution: If you specify the username using plain text, you risk the # username being exposed to any users who can view the job or its logs. # To avoid this risk, specify a secret that contains the username instead. # # Learn more about [Secret # Manager](https://cloud.google.com/secret-manager/docs/) and [using # Secret Manager with # Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). # @!attribute [rw] password # @return [::String] # Required if the container image is from a private Docker registry. The # password to login to the Docker registry that contains the image. # # For security, it is strongly recommended to specify an # encrypted password by using a Secret Manager secret: # `projects/*/secrets/*/versions/*`. # # Warning: If you specify the password using plain text, you risk the # password being exposed to any users who can view the job or its logs. # To avoid this risk, specify a secret that contains the password instead. # # Learn more about [Secret # Manager](https://cloud.google.com/secret-manager/docs/) and [using # Secret Manager with # Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). # @!attribute [rw] enable_image_streaming # @return [::Boolean] # Optional. If set to true, this container runnable uses Image streaming. # # Use Image streaming to allow the runnable to initialize without # waiting for the entire container image to download, which can # significantly reduce startup time for large container images. # # When `enableImageStreaming` is set to true, the container # runtime is [containerd](https://containerd.io/) instead of Docker. # Additionally, this container runnable only supports the following # `container` subfields: `imageUri`, # `commands[]`, `entrypoint`, and # `volumes[]`; any other `container` subfields are ignored. # # For more information about the requirements and limitations for using # Image streaming with Batch, see the [`image-streaming` # sample on # GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming). class Container include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Script runnable. # @!attribute [rw] path # @return [::String] # The path to a script file that is accessible from the host VM(s). # # Unless the script file supports the default `#!/bin/sh` shell # interpreter, you must specify an interpreter by including a # [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) as the # first line of the file. For example, to execute the script using bash, # include `#!/bin/bash` as the first line of the file. Alternatively, # to execute the script using Python3, include `#!/usr/bin/env python3` # as the first line of the file. # @!attribute [rw] text # @return [::String] # The text for a script. # # Unless the script text supports the default `#!/bin/sh` shell # interpreter, you must specify an interpreter by including a # [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) at the # beginning of the text. For example, to execute the script using bash, # include `#!/bin/bash\n` at the beginning of the text. Alternatively, # to execute the script using Python3, include `#!/usr/bin/env python3\n` # at the beginning of the text. class Script include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A barrier runnable automatically blocks the execution of subsequent # runnables until all the tasks in the task group reach the barrier. # @!attribute [rw] name # @return [::String] # Barriers are identified by their index in runnable list. # Names are not required, but if present should be an identifier. class Barrier include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#ignore_exit_status ⇒ ::Boolean
Returns Normally, a runnable that returns a non-zero exit status fails and causes
the task to fail. However, you can set this field to true
to allow the
task to continue executing its other runnables even if this runnable
fails.
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 |
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 214 class Runnable include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Container runnable. # @!attribute [rw] image_uri # @return [::String] # Required. The URI to pull the container image from. # @!attribute [rw] commands # @return [::Array<::String>] # Required for some container images. Overrides the `CMD` specified in the # container. If there is an `ENTRYPOINT` (either in the container image or # with the `entrypoint` field below) then these commands are appended as # arguments to the `ENTRYPOINT`. # @!attribute [rw] entrypoint # @return [::String] # Required for some container images. Overrides the `ENTRYPOINT` specified # in the container. # @!attribute [rw] volumes # @return [::Array<::String>] # Volumes to mount (bind mount) from the host machine files or directories # into the container, formatted to match `--volume` option for the # `docker run` command—for example, `/foo:/bar` or `/foo:/bar:ro`. # # If the `TaskSpec.Volumes` field is specified but this field is not, Batch # will mount each volume from the host machine to the container with the # same mount path by default. In this case, the default mount option for # containers will be read-only (`ro`) for existing persistent disks and # read-write (`rw`) for other volume types, regardless of the original # mount options specified in `TaskSpec.Volumes`. If you need different # mount settings, you can explicitly configure them in this field. # @!attribute [rw] options # @return [::String] # Required for some container images. Arbitrary additional options to # include in the `docker run` command when running this container—for # example, `--network host`. For the `--volume` option, use the `volumes` # field for the container. # @!attribute [rw] block_external_network # @return [::Boolean] # If set to true, external network access to and from container will be # blocked, containers that are with block_external_network as true can # still communicate with each other, network cannot be specified in the # `container.options` field. # @!attribute [rw] username # @return [::String] # Required if the container image is from a private Docker registry. The # username to login to the Docker registry that contains the image. # # You can either specify the username directly by using plain text or # specify an encrypted username by using a Secret Manager secret: # `projects/*/secrets/*/versions/*`. However, using a secret is # recommended for enhanced security. # # Caution: If you specify the username using plain text, you risk the # username being exposed to any users who can view the job or its logs. # To avoid this risk, specify a secret that contains the username instead. # # Learn more about [Secret # Manager](https://cloud.google.com/secret-manager/docs/) and [using # Secret Manager with # Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). # @!attribute [rw] password # @return [::String] # Required if the container image is from a private Docker registry. The # password to login to the Docker registry that contains the image. # # For security, it is strongly recommended to specify an # encrypted password by using a Secret Manager secret: # `projects/*/secrets/*/versions/*`. # # Warning: If you specify the password using plain text, you risk the # password being exposed to any users who can view the job or its logs. # To avoid this risk, specify a secret that contains the password instead. # # Learn more about [Secret # Manager](https://cloud.google.com/secret-manager/docs/) and [using # Secret Manager with # Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). # @!attribute [rw] enable_image_streaming # @return [::Boolean] # Optional. If set to true, this container runnable uses Image streaming. # # Use Image streaming to allow the runnable to initialize without # waiting for the entire container image to download, which can # significantly reduce startup time for large container images. # # When `enableImageStreaming` is set to true, the container # runtime is [containerd](https://containerd.io/) instead of Docker. # Additionally, this container runnable only supports the following # `container` subfields: `imageUri`, # `commands[]`, `entrypoint`, and # `volumes[]`; any other `container` subfields are ignored. # # For more information about the requirements and limitations for using # Image streaming with Batch, see the [`image-streaming` # sample on # GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming). class Container include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Script runnable. # @!attribute [rw] path # @return [::String] # The path to a script file that is accessible from the host VM(s). # # Unless the script file supports the default `#!/bin/sh` shell # interpreter, you must specify an interpreter by including a # [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) as the # first line of the file. For example, to execute the script using bash, # include `#!/bin/bash` as the first line of the file. Alternatively, # to execute the script using Python3, include `#!/usr/bin/env python3` # as the first line of the file. # @!attribute [rw] text # @return [::String] # The text for a script. # # Unless the script text supports the default `#!/bin/sh` shell # interpreter, you must specify an interpreter by including a # [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) at the # beginning of the text. For example, to execute the script using bash, # include `#!/bin/bash\n` at the beginning of the text. Alternatively, # to execute the script using Python3, include `#!/usr/bin/env python3\n` # at the beginning of the text. class Script include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A barrier runnable automatically blocks the execution of subsequent # runnables until all the tasks in the task group reach the barrier. # @!attribute [rw] name # @return [::String] # Barriers are identified by their index in runnable list. # Names are not required, but if present should be an identifier. class Barrier include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#labels ⇒ ::Google::Protobuf::Map{::String => ::String}
Returns Labels for this Runnable.
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 |
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 214 class Runnable include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Container runnable. # @!attribute [rw] image_uri # @return [::String] # Required. The URI to pull the container image from. # @!attribute [rw] commands # @return [::Array<::String>] # Required for some container images. Overrides the `CMD` specified in the # container. If there is an `ENTRYPOINT` (either in the container image or # with the `entrypoint` field below) then these commands are appended as # arguments to the `ENTRYPOINT`. # @!attribute [rw] entrypoint # @return [::String] # Required for some container images. Overrides the `ENTRYPOINT` specified # in the container. # @!attribute [rw] volumes # @return [::Array<::String>] # Volumes to mount (bind mount) from the host machine files or directories # into the container, formatted to match `--volume` option for the # `docker run` command—for example, `/foo:/bar` or `/foo:/bar:ro`. # # If the `TaskSpec.Volumes` field is specified but this field is not, Batch # will mount each volume from the host machine to the container with the # same mount path by default. In this case, the default mount option for # containers will be read-only (`ro`) for existing persistent disks and # read-write (`rw`) for other volume types, regardless of the original # mount options specified in `TaskSpec.Volumes`. If you need different # mount settings, you can explicitly configure them in this field. # @!attribute [rw] options # @return [::String] # Required for some container images. Arbitrary additional options to # include in the `docker run` command when running this container—for # example, `--network host`. For the `--volume` option, use the `volumes` # field for the container. # @!attribute [rw] block_external_network # @return [::Boolean] # If set to true, external network access to and from container will be # blocked, containers that are with block_external_network as true can # still communicate with each other, network cannot be specified in the # `container.options` field. # @!attribute [rw] username # @return [::String] # Required if the container image is from a private Docker registry. The # username to login to the Docker registry that contains the image. # # You can either specify the username directly by using plain text or # specify an encrypted username by using a Secret Manager secret: # `projects/*/secrets/*/versions/*`. However, using a secret is # recommended for enhanced security. # # Caution: If you specify the username using plain text, you risk the # username being exposed to any users who can view the job or its logs. # To avoid this risk, specify a secret that contains the username instead. # # Learn more about [Secret # Manager](https://cloud.google.com/secret-manager/docs/) and [using # Secret Manager with # Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). # @!attribute [rw] password # @return [::String] # Required if the container image is from a private Docker registry. The # password to login to the Docker registry that contains the image. # # For security, it is strongly recommended to specify an # encrypted password by using a Secret Manager secret: # `projects/*/secrets/*/versions/*`. # # Warning: If you specify the password using plain text, you risk the # password being exposed to any users who can view the job or its logs. # To avoid this risk, specify a secret that contains the password instead. # # Learn more about [Secret # Manager](https://cloud.google.com/secret-manager/docs/) and [using # Secret Manager with # Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). # @!attribute [rw] enable_image_streaming # @return [::Boolean] # Optional. If set to true, this container runnable uses Image streaming. # # Use Image streaming to allow the runnable to initialize without # waiting for the entire container image to download, which can # significantly reduce startup time for large container images. # # When `enableImageStreaming` is set to true, the container # runtime is [containerd](https://containerd.io/) instead of Docker. # Additionally, this container runnable only supports the following # `container` subfields: `imageUri`, # `commands[]`, `entrypoint`, and # `volumes[]`; any other `container` subfields are ignored. # # For more information about the requirements and limitations for using # Image streaming with Batch, see the [`image-streaming` # sample on # GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming). class Container include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Script runnable. # @!attribute [rw] path # @return [::String] # The path to a script file that is accessible from the host VM(s). # # Unless the script file supports the default `#!/bin/sh` shell # interpreter, you must specify an interpreter by including a # [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) as the # first line of the file. For example, to execute the script using bash, # include `#!/bin/bash` as the first line of the file. Alternatively, # to execute the script using Python3, include `#!/usr/bin/env python3` # as the first line of the file. # @!attribute [rw] text # @return [::String] # The text for a script. # # Unless the script text supports the default `#!/bin/sh` shell # interpreter, you must specify an interpreter by including a # [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) at the # beginning of the text. For example, to execute the script using bash, # include `#!/bin/bash\n` at the beginning of the text. Alternatively, # to execute the script using Python3, include `#!/usr/bin/env python3\n` # at the beginning of the text. class Script include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A barrier runnable automatically blocks the execution of subsequent # runnables until all the tasks in the task group reach the barrier. # @!attribute [rw] name # @return [::String] # Barriers are identified by their index in runnable list. # Names are not required, but if present should be an identifier. class Barrier include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#script ⇒ ::Google::Cloud::Batch::V1::Runnable::Script
Returns Script runnable.
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 |
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 214 class Runnable include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Container runnable. # @!attribute [rw] image_uri # @return [::String] # Required. The URI to pull the container image from. # @!attribute [rw] commands # @return [::Array<::String>] # Required for some container images. Overrides the `CMD` specified in the # container. If there is an `ENTRYPOINT` (either in the container image or # with the `entrypoint` field below) then these commands are appended as # arguments to the `ENTRYPOINT`. # @!attribute [rw] entrypoint # @return [::String] # Required for some container images. Overrides the `ENTRYPOINT` specified # in the container. # @!attribute [rw] volumes # @return [::Array<::String>] # Volumes to mount (bind mount) from the host machine files or directories # into the container, formatted to match `--volume` option for the # `docker run` command—for example, `/foo:/bar` or `/foo:/bar:ro`. # # If the `TaskSpec.Volumes` field is specified but this field is not, Batch # will mount each volume from the host machine to the container with the # same mount path by default. In this case, the default mount option for # containers will be read-only (`ro`) for existing persistent disks and # read-write (`rw`) for other volume types, regardless of the original # mount options specified in `TaskSpec.Volumes`. If you need different # mount settings, you can explicitly configure them in this field. # @!attribute [rw] options # @return [::String] # Required for some container images. Arbitrary additional options to # include in the `docker run` command when running this container—for # example, `--network host`. For the `--volume` option, use the `volumes` # field for the container. # @!attribute [rw] block_external_network # @return [::Boolean] # If set to true, external network access to and from container will be # blocked, containers that are with block_external_network as true can # still communicate with each other, network cannot be specified in the # `container.options` field. # @!attribute [rw] username # @return [::String] # Required if the container image is from a private Docker registry. The # username to login to the Docker registry that contains the image. # # You can either specify the username directly by using plain text or # specify an encrypted username by using a Secret Manager secret: # `projects/*/secrets/*/versions/*`. However, using a secret is # recommended for enhanced security. # # Caution: If you specify the username using plain text, you risk the # username being exposed to any users who can view the job or its logs. # To avoid this risk, specify a secret that contains the username instead. # # Learn more about [Secret # Manager](https://cloud.google.com/secret-manager/docs/) and [using # Secret Manager with # Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). # @!attribute [rw] password # @return [::String] # Required if the container image is from a private Docker registry. The # password to login to the Docker registry that contains the image. # # For security, it is strongly recommended to specify an # encrypted password by using a Secret Manager secret: # `projects/*/secrets/*/versions/*`. # # Warning: If you specify the password using plain text, you risk the # password being exposed to any users who can view the job or its logs. # To avoid this risk, specify a secret that contains the password instead. # # Learn more about [Secret # Manager](https://cloud.google.com/secret-manager/docs/) and [using # Secret Manager with # Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). # @!attribute [rw] enable_image_streaming # @return [::Boolean] # Optional. If set to true, this container runnable uses Image streaming. # # Use Image streaming to allow the runnable to initialize without # waiting for the entire container image to download, which can # significantly reduce startup time for large container images. # # When `enableImageStreaming` is set to true, the container # runtime is [containerd](https://containerd.io/) instead of Docker. # Additionally, this container runnable only supports the following # `container` subfields: `imageUri`, # `commands[]`, `entrypoint`, and # `volumes[]`; any other `container` subfields are ignored. # # For more information about the requirements and limitations for using # Image streaming with Batch, see the [`image-streaming` # sample on # GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming). class Container include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Script runnable. # @!attribute [rw] path # @return [::String] # The path to a script file that is accessible from the host VM(s). # # Unless the script file supports the default `#!/bin/sh` shell # interpreter, you must specify an interpreter by including a # [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) as the # first line of the file. For example, to execute the script using bash, # include `#!/bin/bash` as the first line of the file. Alternatively, # to execute the script using Python3, include `#!/usr/bin/env python3` # as the first line of the file. # @!attribute [rw] text # @return [::String] # The text for a script. # # Unless the script text supports the default `#!/bin/sh` shell # interpreter, you must specify an interpreter by including a # [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) at the # beginning of the text. For example, to execute the script using bash, # include `#!/bin/bash\n` at the beginning of the text. Alternatively, # to execute the script using Python3, include `#!/usr/bin/env python3\n` # at the beginning of the text. class Script include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A barrier runnable automatically blocks the execution of subsequent # runnables until all the tasks in the task group reach the barrier. # @!attribute [rw] name # @return [::String] # Barriers are identified by their index in runnable list. # Names are not required, but if present should be an identifier. class Barrier include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#timeout ⇒ ::Google::Protobuf::Duration
Returns Timeout for this Runnable.
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 |
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 214 class Runnable include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Container runnable. # @!attribute [rw] image_uri # @return [::String] # Required. The URI to pull the container image from. # @!attribute [rw] commands # @return [::Array<::String>] # Required for some container images. Overrides the `CMD` specified in the # container. If there is an `ENTRYPOINT` (either in the container image or # with the `entrypoint` field below) then these commands are appended as # arguments to the `ENTRYPOINT`. # @!attribute [rw] entrypoint # @return [::String] # Required for some container images. Overrides the `ENTRYPOINT` specified # in the container. # @!attribute [rw] volumes # @return [::Array<::String>] # Volumes to mount (bind mount) from the host machine files or directories # into the container, formatted to match `--volume` option for the # `docker run` command—for example, `/foo:/bar` or `/foo:/bar:ro`. # # If the `TaskSpec.Volumes` field is specified but this field is not, Batch # will mount each volume from the host machine to the container with the # same mount path by default. In this case, the default mount option for # containers will be read-only (`ro`) for existing persistent disks and # read-write (`rw`) for other volume types, regardless of the original # mount options specified in `TaskSpec.Volumes`. If you need different # mount settings, you can explicitly configure them in this field. # @!attribute [rw] options # @return [::String] # Required for some container images. Arbitrary additional options to # include in the `docker run` command when running this container—for # example, `--network host`. For the `--volume` option, use the `volumes` # field for the container. # @!attribute [rw] block_external_network # @return [::Boolean] # If set to true, external network access to and from container will be # blocked, containers that are with block_external_network as true can # still communicate with each other, network cannot be specified in the # `container.options` field. # @!attribute [rw] username # @return [::String] # Required if the container image is from a private Docker registry. The # username to login to the Docker registry that contains the image. # # You can either specify the username directly by using plain text or # specify an encrypted username by using a Secret Manager secret: # `projects/*/secrets/*/versions/*`. However, using a secret is # recommended for enhanced security. # # Caution: If you specify the username using plain text, you risk the # username being exposed to any users who can view the job or its logs. # To avoid this risk, specify a secret that contains the username instead. # # Learn more about [Secret # Manager](https://cloud.google.com/secret-manager/docs/) and [using # Secret Manager with # Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). # @!attribute [rw] password # @return [::String] # Required if the container image is from a private Docker registry. The # password to login to the Docker registry that contains the image. # # For security, it is strongly recommended to specify an # encrypted password by using a Secret Manager secret: # `projects/*/secrets/*/versions/*`. # # Warning: If you specify the password using plain text, you risk the # password being exposed to any users who can view the job or its logs. # To avoid this risk, specify a secret that contains the password instead. # # Learn more about [Secret # Manager](https://cloud.google.com/secret-manager/docs/) and [using # Secret Manager with # Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). # @!attribute [rw] enable_image_streaming # @return [::Boolean] # Optional. If set to true, this container runnable uses Image streaming. # # Use Image streaming to allow the runnable to initialize without # waiting for the entire container image to download, which can # significantly reduce startup time for large container images. # # When `enableImageStreaming` is set to true, the container # runtime is [containerd](https://containerd.io/) instead of Docker. # Additionally, this container runnable only supports the following # `container` subfields: `imageUri`, # `commands[]`, `entrypoint`, and # `volumes[]`; any other `container` subfields are ignored. # # For more information about the requirements and limitations for using # Image streaming with Batch, see the [`image-streaming` # sample on # GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming). class Container include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Script runnable. # @!attribute [rw] path # @return [::String] # The path to a script file that is accessible from the host VM(s). # # Unless the script file supports the default `#!/bin/sh` shell # interpreter, you must specify an interpreter by including a # [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) as the # first line of the file. For example, to execute the script using bash, # include `#!/bin/bash` as the first line of the file. Alternatively, # to execute the script using Python3, include `#!/usr/bin/env python3` # as the first line of the file. # @!attribute [rw] text # @return [::String] # The text for a script. # # Unless the script text supports the default `#!/bin/sh` shell # interpreter, you must specify an interpreter by including a # [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) at the # beginning of the text. For example, to execute the script using bash, # include `#!/bin/bash\n` at the beginning of the text. Alternatively, # to execute the script using Python3, include `#!/usr/bin/env python3\n` # at the beginning of the text. class Script include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A barrier runnable automatically blocks the execution of subsequent # runnables until all the tasks in the task group reach the barrier. # @!attribute [rw] name # @return [::String] # Barriers are identified by their index in runnable list. # Names are not required, but if present should be an identifier. class Barrier include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |