Skip to content

Commit aa98fb1

Browse files
committed
Added provisioning content
1 parent 9f2dd40 commit aa98fb1

File tree

2 files changed

+121
-0
lines changed

2 files changed

+121
-0
lines changed

provisioning_virtual_machines_and_hosts/_topics/catalogs_and_services.md

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,125 @@ Service methods have been split based on purpose.
372372

373373
7. Click **Save** or **Add** if you are adding this to a new instance.
374374

375+
### Provisioning Dialog
376+
377+
The following example shows how to create a Provisioning Dialog that modifies the parameters for provisioning a small, medium, or large service.
378+
379+
The `provision-vm-small-med-large.asl` workflow runs for every provisioned VM and is responsible for modifying the VM size. This workflow is the `<ManageIQ>` service Provisioning Entry Point.
380+
381+
You need to set the ManageIQ Provisioning service entry point to workflow script. For example, this workflow is run for every provisioned Virtual Machine (VM), and modifies the VM size.
382+
383+
Use the following sections and follow them in order to provision a VM service, create Provisioning Dialog and modify the paramaters.
384+
385+
#### Create a workflow (optional)
386+
387+
**Note**: If you want to use the existing `provision-vm-small-med-large.asl` workflow script without any changes, you can skip this section and proceed to `Add a Workflow Repository` section.
388+
389+
1. Fork `https://github.com/ManageIQ/workflows-examples` repository or create your own repository.
390+
2. Clone the repo locally by using the clone command:
391+
392+
```bash
393+
git clone https://github.com/<owner>/workflows-examples
394+
```
395+
Where `<owner>` is the owner of the repository.
396+
397+
3. Create a new branch:
398+
399+
```bash
400+
git checkout -b sm-md-lg
401+
```
402+
3. Create your own script or edit the existing script that is provided. The script used in this example is `provision-vm-small-med-large.asl`.
403+
4. Push code changes to your branch.
404+
405+
#### Add a Workflow Repository
406+
407+
Use the following steps to add a Workflow Repository.
408+
409+
1. Click **Automation** > **Embedded Workflows** > **Repositories**.
410+
2. Click **Configuration** > **Add new Repository**.
411+
3. Provide the **Name** and **URL** for the repository:
412+
- **Name**: Local name to identify this repository. For example, `Example Workflows`.
413+
- **Url**: Git repository URL. For example, `https://github.com/ManageIQ/workflows-examples`.
414+
- **SCM Branch**: Git repository branch name. For example, leave this field blank if you want to use the existing `provision-vm-small-med-large.asl` script blank or use a branch name like `sm-md-lg` if you have edited or created your own workflow script.
415+
4. Click **Save**.
416+
417+
#### Create a Provisioning Dialog
418+
419+
Use the following steps to create a Provisioning Dialog.
420+
421+
1. Click **Automation** > **Embedded Automate** > **Customization**.
422+
2. Click **Service Dialogs** > **All Dialogs**.
423+
3. Click **Configuration** > **Add a new Dialog**.
424+
4. Provide a **Name** and **Description** for the dialog:
425+
- **Name**: Name used in the Service Catalog. For example, `sm-med-lg dialog`.
426+
- **Description**: Description for the dialog. For example, `Dialog choosing vm size`.
427+
5. Add a text box named **vm_name**.
428+
6. Add a dropdown named **size**.
429+
7. Click the edit pencil icon for the **size** dropdown.
430+
8. Under **Options** > **Entries** enter the following values:
431+
- Enter the following for the first row:
432+
- For **Name** field, choose **Large**.
433+
- For **Value** field, choose **large**.
434+
- Enter the following for the second row:
435+
- For **Name** field, choose **Medium**.
436+
- For **Value** field, choose **medium**.
437+
- Enter the following for the third row:
438+
- For **Name** field, choose **Small**.
439+
- For **Value** field, choose **small**.
440+
9. Click **Save**.
441+
442+
#### Create a Service Catalog Item
443+
444+
Use the following steps to create a Service Catalog Item.
445+
446+
1. Click **Service** > **Catalogs**.
447+
2. Click **Catalogs** > **All Catalogs**.
448+
3. Click **Configuration** > **Add a New Catalog**.
449+
4. Provide a **Name** and **Description**:
450+
- **Name**: Name displayed in the catalog. For example, `Provision VM`.
451+
- **Description**: Desription of the catalog. For example, `Provisioning VM by size`.
452+
5. Click **Save**.
453+
6. Click **Catalog Items** > **All Catalog Items** > **Provisioning**.
454+
7. Click **Configuration** > **Add a New Catalog Item**.
455+
8. Provide a value for `Catalog Item Type`:
456+
- **Catalog Item Type**: The functionality of this catalog item. Choose **VmWare**.
457+
9. Under the **Basic Information** tab, provide the values for the following fields:
458+
- **Name**: Name displayed in the catalog. For example, `Provision VM with Size`.
459+
- **Description**: Description of the catalog. For example, `Provision a VM choosing size`.
460+
- **Display in Catalog**: Check to display this catalog item.
461+
- **Catalog**: Organization concept. For example, `My Company/Provisioning`.
462+
- **Dialog**: The dialog created previously. For example, `sm-med-lg dialog`.
463+
- **Provisioning Entry Point**:
464+
- For **endpoint type**, choose **Embedded Workflow**.
465+
- For the **endpoint value** choose the workflow script. For example, `provision-vm-small-med-large.asl`.
466+
17. Under the **Request Info** > **Catalog** tab enter the following values:
467+
- **VM Name**: Name that is overwritten by the **VM name** in the dialog. Enter anything here.
468+
20. Under the **Environment** tab, choose an appropriate **Host** and **Datastore**:
469+
- **Host**: Host that runs the VM.
470+
- **Datastore**: Disk that stores the VM.
471+
22. Under the **Networking** tab, choose an appropriate **Network Adapter**.
472+
24. Click **Add**.
473+
474+
#### Provisioning a Virtual Machine
475+
476+
1. Click **Services** > **Catalogs** > **Service Catalogs**.
477+
2. Click **Order** under the newly created service, **Vm with Size**.
478+
3. Provide the following fields:
479+
- **VM name**: Name for the newly created vm. For example `demo-1`.
480+
- **size**: The desired VM size. You can choose `small`, `medium` or `large`. For example, choose **small**.
481+
1. Click **Submit**
482+
483+
#### Iterate
484+
485+
If the provisioning did not go as planned use the following steps:
486+
487+
1. Edit the workflow script.
488+
2. Push code changes to your branch.
489+
3. Refresh the Workflow repository.
490+
4. You can follow the workflows link to view the version of the script is stored on the server.
491+
5. If you changed the script name, edit the Service Catalog Item that you previously created.
492+
6. Provision the Virtual Machine.
493+
375494
### Catalogs
376495

377496
Catalogs are used to create groups of virtual machines or instances for

scripting_actions/_topics/automate_examples1.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ initiated by:
1616

1717
All invocations of an automate model must enter through the
1818
`/System/Process` namespace.
19+
20+
You can use automation to create a Provisioning Dialog that modifies the provisioning parameters of a VM service. For more information, see [Example: Provisioning a VM service](../../provisioning_virtual_machines_and_hosts/_topics/catalogs_and_services.md#provisioning-dialog)

0 commit comments

Comments
 (0)