Skip to content

Commit 72545ac

Browse files
committed
Add documentation for manageiq:// methods
1 parent 48894b4 commit 72545ac

File tree

1 file changed

+80
-2
lines changed

1 file changed

+80
-2
lines changed

managing_providers/_topics/embedded_workflows.md

Lines changed: 80 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ You can create and use embedded workflows as needed to not only change parts of
159159

160160
Workflows must be authored in Amazon State Languages (ASL) format. As part of authoring a workflow, you (or your users) can build container images that are able to perform any tasks that are required in any language that you like. You can use these images during Task states in your workflows.
161161

162-
1. Define the code for the workflow. If your workflow requires the use of any credentials or parameters to be specified, ensure that they are passed in the code.
162+
* Define the code for the workflow. If your workflow requires the use of any credentials or parameters to be specified, ensure that they are passed in the code.
163163

164164
Within the workflow code, you need to specify the states that your workflow requires, including any next steps. For `Task` type steps in the workflow, a docker container is called. The container defines what happens for that Task state. For example, a docker container can run to clone a template. If your states require parameters or credentials, you can specify them in your state definitions.
165165

@@ -174,12 +174,90 @@ Workflows must be authored in Amazon State Languages (ASL) format. As part of au
174174
- ItemReader
175175
- ResultWriter
176176

177-
2. Build the docker containers that are required for the workflow.
177+
* Build the docker containers that are required for the workflow.
178178

179179
When you have the code for your task resource written, you need to bundle it into a docker image. You can bundle the code by creating a standard [Dockerfile](https://docs.docker.com/engine/reference/builder/) and building the image (https://docs.docker.com/engine/reference/commandline/build/). Then, you can push the image to a [registry](https://docs.docker.com/engine/reference/commandline/push/), which makes the image available to be used by {{ site.data.product.title_short }}. When you have pushed your images to an image registry, you can add the registry to {{ site.data.product.title_short }}.
180180

181181
Pull secrets for containers are used differently between appliances and the OpenShift Container Platform (OCP). These differences are outlined in the following sections.
182182

183+
* Use "builtin" runner methods from the ManageIQ Task Runner
184+
185+
In addition to the `docker://` runner which can run any container you want, there are also builtin runner methods for some common tasks like executing an http call or sending an email.
186+
187+
* `manageiq://http` - Execute any HTTP action
188+
189+
Parameters:
190+
* `Method` (required) - HTTP method name. Permitted values: `GET`, `POST`, `PUT`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS`, or `TRACE`
191+
* `Url` (required) - URL to execute the HTTP call to
192+
* `Headers` - Hash of unencoded HTTP request header key/value pairs.
193+
* `QueryParameters` - URI query unencoded key/value pairs.
194+
* `Body` - HTTP request body. Depending on Encoding this can be a String or a Hash of key/value pairs.
195+
* `Ssl` - SSL options
196+
* `Verify` - Boolean - Verify SSL certificate. Defaults to `true`
197+
* `VerifyHostname` - Boolean - Verify SSL certificate hostname. Defaults to `true`
198+
* `Hostname` - String - Server hostname for SNI.
199+
* `CaFile` - String - Path to a CA file in PEM format.
200+
* `CaPath` - String - Path to a CA directory.
201+
* `VerifyMode` - Integer - OpenSSL constant. `VERIFY_NONE` => 0, `VERIFY_PEER` => 1, `VERIFY_FAIL_IF_NO_PEER_CERT` => 2, `VERIFY_CLIENT_ONCE` => 4,
202+
* `VerifyDepth` - Integer - Maximum depth for the certificate chain validation.
203+
* `Version` - Integer - SSL Version.
204+
* `MinVersion` - Integer - Minimum SSL Version.
205+
* `MaxVersion` - Integer - Maximum SSL Version.
206+
* `Ciphers` - String - Ciphers supported.
207+
* `Proxy`
208+
* `Uri` - String - URI of the proxy.
209+
* `User` - String - User for the proxy.
210+
* `Password` - String - Password for the proxy
211+
* `Options`
212+
* `Timeout`
213+
* `ReadTimeout`
214+
* `OpenTimeout`
215+
* `WriteTimeout`
216+
* `Encoding` - String
217+
* `JSON` - JSON encodes the request and decodes the response
218+
219+
220+
* `manageiq://email` - Send an email using the configured SMTP server
221+
222+
Parameters:
223+
* `To` - Array of recipient email addresses, defaults to service requester email
224+
* `From` - Sender email address, defaults to smtp.from Setting
225+
* `Subject` - Email Subject string
226+
* `Cc` - Array of recipients to carbon-copy
227+
* `Bcc` - Array of recipients to blind-carbon-copy
228+
* `Body` - The body of the email
229+
* `Attachment` - A hash with the filename as the key and the content as the value
230+
231+
* `manageiq://embedded_ansible` - Execute an ansible playbook with EmbeddedAnsible
232+
233+
Identifying a playbook: You must identity a playbook by either:
234+
235+
`PlaybookId` - This is the database identifier of the `ConfigurationScript`
236+
237+
or
238+
239+
`RepositoryUrl`, `RepositoryBranch`, and `PlaybookName`
240+
241+
Parameters:
242+
* `RepositoryUrl` - URL of the configuration script source identifying the repository where the playbook resides
243+
* `RepositoryBranch` - Branch of the configuration script source where the playbook resides
244+
* `PlaybookName` - Name of the playbook
245+
* `PlaybookId` - Integer - Database ID of the `ConfigurationScript`
246+
* `Hosts` - Array - hostnames to target with the playbook
247+
* `ExtraVars` - Hash - key/value pairs that will be passed as extra_vars
248+
* `BecomeEnabled` - Boolean - If playbook should activate privilege escalation, defaults to false
249+
* `Timeout` - Integer - Minutes for how long to allow the playbook to run for
250+
* `Verbosity` - Integer - Ansible verbosity level 0-5
251+
* `CredentialId` - Integer - Database ID of an ansible credential
252+
* `CloudCredentialId` - Integer - Database ID of an ansible cloud credential
253+
* `NetworkCredentialId` - Integer - Database ID of an ansible network credential
254+
* `VaultCredentialId` - Integer - Database ID of an ansible vault credential
255+
256+
* `manageiq://provision_execute` - Execute an MiqProvision task
257+
258+
This can be used for a VM Provision Service Catalog item in place of automate. No explicit parameters are required, as state input is used as the provision options.
259+
260+
183261
#### Running an Embedded Workflow on Appliances
184262

185263
* On appliances, `podman` is used to execute the container so use [podman login](https://docs.podman.io/en/stable/markdown/podman-login.1.html) as the `manageiq` user.

0 commit comments

Comments
 (0)