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, Script
Instance Attribute Summary collapse
-
#always_run ⇒ ::Boolean
By default, after a Runnable fails, no further Runnable are executed.
-
#background ⇒ ::Boolean
This flag allows a Runnable to continue running in the background while the Task executes subsequent Runnables.
-
#barrier ⇒ ::Google::Cloud::Batch::V1::Runnable::Barrier
Barrier runnable.
-
#container ⇒ ::Google::Cloud::Batch::V1::Runnable::Container
Container runnable.
-
#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 non-zero exit status causes the Task to fail.
-
#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.
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 138 class Runnable include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Container runnable. # @!attribute [rw] image_uri # @return [::String] # The URI to pull the container image from. # @!attribute [rw] commands # @return [::Array<::String>] # Overrides the `CMD` specified in the container. If there is an ENTRYPOINT # (either in the container image or with the entrypoint field below) then # commands are appended as arguments to the ENTRYPOINT. # @!attribute [rw] entrypoint # @return [::String] # 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 docker run's --volume option, # e.g. /foo:/bar, or /foo:/bar:ro # @!attribute [rw] options # @return [::String] # Arbitrary additional options to include in the "docker run" command when # running this container, e.g. "--network host". # @!attribute [rw] block_external_network # @return [::Boolean] # If set to true, external network access to and from container will be # blocked. The container will use the default internal network # 'goog-internal'. # @!attribute [rw] username # @return [::String] # Optional username for logging in to a docker registry. If username # matches `projects/*/secrets/*/versions/*` then Batch will read the # username from the Secret Manager. # @!attribute [rw] password # @return [::String] # Optional password for logging in to a docker registry. If password # matches `projects/*/secrets/*/versions/*` then Batch will read the # password from the Secret Manager; class Container include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Script runnable. # @!attribute [rw] path # @return [::String] # Script file path on the host VM. # @!attribute [rw] text # @return [::String] # Shell script text. class Script include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Barrier runnable blocks until all tasks in a taskgroup reach it. # @!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 end |
#background ⇒ ::Boolean
Returns This flag allows a Runnable to continue running in the background while the Task executes subsequent Runnables. This is useful to provide services to other Runnables (or to provide debugging support tools like SSH servers).
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 138 class Runnable include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Container runnable. # @!attribute [rw] image_uri # @return [::String] # The URI to pull the container image from. # @!attribute [rw] commands # @return [::Array<::String>] # Overrides the `CMD` specified in the container. If there is an ENTRYPOINT # (either in the container image or with the entrypoint field below) then # commands are appended as arguments to the ENTRYPOINT. # @!attribute [rw] entrypoint # @return [::String] # 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 docker run's --volume option, # e.g. /foo:/bar, or /foo:/bar:ro # @!attribute [rw] options # @return [::String] # Arbitrary additional options to include in the "docker run" command when # running this container, e.g. "--network host". # @!attribute [rw] block_external_network # @return [::Boolean] # If set to true, external network access to and from container will be # blocked. The container will use the default internal network # 'goog-internal'. # @!attribute [rw] username # @return [::String] # Optional username for logging in to a docker registry. If username # matches `projects/*/secrets/*/versions/*` then Batch will read the # username from the Secret Manager. # @!attribute [rw] password # @return [::String] # Optional password for logging in to a docker registry. If password # matches `projects/*/secrets/*/versions/*` then Batch will read the # password from the Secret Manager; class Container include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Script runnable. # @!attribute [rw] path # @return [::String] # Script file path on the host VM. # @!attribute [rw] text # @return [::String] # Shell script text. class Script include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Barrier runnable blocks until all tasks in a taskgroup reach it. # @!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 end |
#barrier ⇒ ::Google::Cloud::Batch::V1::Runnable::Barrier
Returns Barrier runnable.
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 138 class Runnable include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Container runnable. # @!attribute [rw] image_uri # @return [::String] # The URI to pull the container image from. # @!attribute [rw] commands # @return [::Array<::String>] # Overrides the `CMD` specified in the container. If there is an ENTRYPOINT # (either in the container image or with the entrypoint field below) then # commands are appended as arguments to the ENTRYPOINT. # @!attribute [rw] entrypoint # @return [::String] # 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 docker run's --volume option, # e.g. /foo:/bar, or /foo:/bar:ro # @!attribute [rw] options # @return [::String] # Arbitrary additional options to include in the "docker run" command when # running this container, e.g. "--network host". # @!attribute [rw] block_external_network # @return [::Boolean] # If set to true, external network access to and from container will be # blocked. The container will use the default internal network # 'goog-internal'. # @!attribute [rw] username # @return [::String] # Optional username for logging in to a docker registry. If username # matches `projects/*/secrets/*/versions/*` then Batch will read the # username from the Secret Manager. # @!attribute [rw] password # @return [::String] # Optional password for logging in to a docker registry. If password # matches `projects/*/secrets/*/versions/*` then Batch will read the # password from the Secret Manager; class Container include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Script runnable. # @!attribute [rw] path # @return [::String] # Script file path on the host VM. # @!attribute [rw] text # @return [::String] # Shell script text. class Script include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Barrier runnable blocks until all tasks in a taskgroup reach it. # @!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 end |
#container ⇒ ::Google::Cloud::Batch::V1::Runnable::Container
Returns Container runnable.
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 138 class Runnable include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Container runnable. # @!attribute [rw] image_uri # @return [::String] # The URI to pull the container image from. # @!attribute [rw] commands # @return [::Array<::String>] # Overrides the `CMD` specified in the container. If there is an ENTRYPOINT # (either in the container image or with the entrypoint field below) then # commands are appended as arguments to the ENTRYPOINT. # @!attribute [rw] entrypoint # @return [::String] # 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 docker run's --volume option, # e.g. /foo:/bar, or /foo:/bar:ro # @!attribute [rw] options # @return [::String] # Arbitrary additional options to include in the "docker run" command when # running this container, e.g. "--network host". # @!attribute [rw] block_external_network # @return [::Boolean] # If set to true, external network access to and from container will be # blocked. The container will use the default internal network # 'goog-internal'. # @!attribute [rw] username # @return [::String] # Optional username for logging in to a docker registry. If username # matches `projects/*/secrets/*/versions/*` then Batch will read the # username from the Secret Manager. # @!attribute [rw] password # @return [::String] # Optional password for logging in to a docker registry. If password # matches `projects/*/secrets/*/versions/*` then Batch will read the # password from the Secret Manager; class Container include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Script runnable. # @!attribute [rw] path # @return [::String] # Script file path on the host VM. # @!attribute [rw] text # @return [::String] # Shell script text. class Script include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Barrier runnable blocks until all tasks in a taskgroup reach it. # @!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 end |
#environment ⇒ ::Google::Cloud::Batch::V1::Environment
Returns Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 138 class Runnable include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Container runnable. # @!attribute [rw] image_uri # @return [::String] # The URI to pull the container image from. # @!attribute [rw] commands # @return [::Array<::String>] # Overrides the `CMD` specified in the container. If there is an ENTRYPOINT # (either in the container image or with the entrypoint field below) then # commands are appended as arguments to the ENTRYPOINT. # @!attribute [rw] entrypoint # @return [::String] # 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 docker run's --volume option, # e.g. /foo:/bar, or /foo:/bar:ro # @!attribute [rw] options # @return [::String] # Arbitrary additional options to include in the "docker run" command when # running this container, e.g. "--network host". # @!attribute [rw] block_external_network # @return [::Boolean] # If set to true, external network access to and from container will be # blocked. The container will use the default internal network # 'goog-internal'. # @!attribute [rw] username # @return [::String] # Optional username for logging in to a docker registry. If username # matches `projects/*/secrets/*/versions/*` then Batch will read the # username from the Secret Manager. # @!attribute [rw] password # @return [::String] # Optional password for logging in to a docker registry. If password # matches `projects/*/secrets/*/versions/*` then Batch will read the # password from the Secret Manager; class Container include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Script runnable. # @!attribute [rw] path # @return [::String] # Script file path on the host VM. # @!attribute [rw] text # @return [::String] # Shell script text. class Script include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Barrier runnable blocks until all tasks in a taskgroup reach it. # @!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 end |
#ignore_exit_status ⇒ ::Boolean
Returns Normally, a non-zero exit status causes the Task to fail. This flag allows execution of other Runnables to continue instead.
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 138 class Runnable include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Container runnable. # @!attribute [rw] image_uri # @return [::String] # The URI to pull the container image from. # @!attribute [rw] commands # @return [::Array<::String>] # Overrides the `CMD` specified in the container. If there is an ENTRYPOINT # (either in the container image or with the entrypoint field below) then # commands are appended as arguments to the ENTRYPOINT. # @!attribute [rw] entrypoint # @return [::String] # 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 docker run's --volume option, # e.g. /foo:/bar, or /foo:/bar:ro # @!attribute [rw] options # @return [::String] # Arbitrary additional options to include in the "docker run" command when # running this container, e.g. "--network host". # @!attribute [rw] block_external_network # @return [::Boolean] # If set to true, external network access to and from container will be # blocked. The container will use the default internal network # 'goog-internal'. # @!attribute [rw] username # @return [::String] # Optional username for logging in to a docker registry. If username # matches `projects/*/secrets/*/versions/*` then Batch will read the # username from the Secret Manager. # @!attribute [rw] password # @return [::String] # Optional password for logging in to a docker registry. If password # matches `projects/*/secrets/*/versions/*` then Batch will read the # password from the Secret Manager; class Container include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Script runnable. # @!attribute [rw] path # @return [::String] # Script file path on the host VM. # @!attribute [rw] text # @return [::String] # Shell script text. class Script include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Barrier runnable blocks until all tasks in a taskgroup reach it. # @!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 end |
#script ⇒ ::Google::Cloud::Batch::V1::Runnable::Script
Returns Script runnable.
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 138 class Runnable include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Container runnable. # @!attribute [rw] image_uri # @return [::String] # The URI to pull the container image from. # @!attribute [rw] commands # @return [::Array<::String>] # Overrides the `CMD` specified in the container. If there is an ENTRYPOINT # (either in the container image or with the entrypoint field below) then # commands are appended as arguments to the ENTRYPOINT. # @!attribute [rw] entrypoint # @return [::String] # 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 docker run's --volume option, # e.g. /foo:/bar, or /foo:/bar:ro # @!attribute [rw] options # @return [::String] # Arbitrary additional options to include in the "docker run" command when # running this container, e.g. "--network host". # @!attribute [rw] block_external_network # @return [::Boolean] # If set to true, external network access to and from container will be # blocked. The container will use the default internal network # 'goog-internal'. # @!attribute [rw] username # @return [::String] # Optional username for logging in to a docker registry. If username # matches `projects/*/secrets/*/versions/*` then Batch will read the # username from the Secret Manager. # @!attribute [rw] password # @return [::String] # Optional password for logging in to a docker registry. If password # matches `projects/*/secrets/*/versions/*` then Batch will read the # password from the Secret Manager; class Container include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Script runnable. # @!attribute [rw] path # @return [::String] # Script file path on the host VM. # @!attribute [rw] text # @return [::String] # Shell script text. class Script include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Barrier runnable blocks until all tasks in a taskgroup reach it. # @!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 end |
#timeout ⇒ ::Google::Protobuf::Duration
Returns Timeout for this Runnable.
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 138 class Runnable include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Container runnable. # @!attribute [rw] image_uri # @return [::String] # The URI to pull the container image from. # @!attribute [rw] commands # @return [::Array<::String>] # Overrides the `CMD` specified in the container. If there is an ENTRYPOINT # (either in the container image or with the entrypoint field below) then # commands are appended as arguments to the ENTRYPOINT. # @!attribute [rw] entrypoint # @return [::String] # 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 docker run's --volume option, # e.g. /foo:/bar, or /foo:/bar:ro # @!attribute [rw] options # @return [::String] # Arbitrary additional options to include in the "docker run" command when # running this container, e.g. "--network host". # @!attribute [rw] block_external_network # @return [::Boolean] # If set to true, external network access to and from container will be # blocked. The container will use the default internal network # 'goog-internal'. # @!attribute [rw] username # @return [::String] # Optional username for logging in to a docker registry. If username # matches `projects/*/secrets/*/versions/*` then Batch will read the # username from the Secret Manager. # @!attribute [rw] password # @return [::String] # Optional password for logging in to a docker registry. If password # matches `projects/*/secrets/*/versions/*` then Batch will read the # password from the Secret Manager; class Container include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Script runnable. # @!attribute [rw] path # @return [::String] # Script file path on the host VM. # @!attribute [rw] text # @return [::String] # Shell script text. class Script include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Barrier runnable blocks until all tasks in a taskgroup reach it. # @!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 end |