|
| 1 | +# Provision VM Service Small Medium Large Example |
| 2 | + |
| 3 | +This example shows creating a provisioning dialog that modifies provisioning parameters. |
| 4 | + |
| 5 | +## Architecture |
| 6 | + |
| 7 | +- `provision-vm-small-med-large.asl`: This workflow is run for every vm provisioned and is responsible for modifying the vm size. This is the ManageIQ Service's Provisioning Entry Point. |
| 8 | + |
| 9 | +Set the ManageIQ provisioning service entry point to this script. For example, this workflow is run for every provisioned Virtual Machine (VM), and modifies the VM size. |
| 10 | + |
| 11 | +## Add a Workflow Repository |
| 12 | + |
| 13 | +1. **Click Automation** > **Embedded Workflows** > **Repositories**. |
| 14 | +2. **Click Configuration** > **Add new Repository**. |
| 15 | +3. Provide the `Name` and `URL` for the repository: |
| 16 | + - **Name**: Local name to identify this repository. For example, `Example Workflows`. |
| 17 | + - **Url**: Git repository URL. For example, `https://github.com/ManageIQ/workflows-examples`. |
| 18 | +4. Click **Save**. |
| 19 | + |
| 20 | +## Create a Provisioning Dialog |
| 21 | + |
| 22 | +1. Click **Automation** > **Embedded Automate** > **Customization**. |
| 23 | +2. Click **Service Dialogs** > **All Dialogs**. |
| 24 | +3. Click **Configuration** > **Add a new Dialog**. |
| 25 | +4. Provide a `Name` and `Description` for the dialog: |
| 26 | + - **Name**: Name used in the Service Catalog. For example, `sm-med-lg dialog`. |
| 27 | + - **Description**: More information. For example, `Dialog choosing vm size`. |
| 28 | +5. Add a text box named **vm_name**. |
| 29 | +6. Add a dropdown named **size**. |
| 30 | +7. Click the edit pencil icon for the **size** dropdown. |
| 31 | +8. Under **Options** > **Entries** enter the dropdown values: |
| 32 | + - Change the first entry: |
| 33 | + - For **Name** field, enter **Large**. |
| 34 | + - For **Value** field, enter **large**. |
| 35 | + - Change the second entry: |
| 36 | + - For **Name** field, enter **Medium**. |
| 37 | + - For **Value** field, enter **medium**. |
| 38 | + - Change the third entry: |
| 39 | + - For **Name** field, enter **Small**. |
| 40 | + - For **Value** field, enter **small**. |
| 41 | +9. Click **Save**. |
| 42 | + |
| 43 | +## Create a Service Catalog Item |
| 44 | + |
| 45 | +1. Click **Service** > **Catalogs**. |
| 46 | +2. Click **Catalogs** > **All Catalogs**. |
| 47 | +3. Click **Configuration** > **Add a New Catalog**. |
| 48 | +4. Provide a `Name` and `Description`: |
| 49 | + - **Name**: Name displayed in the catalog. For example, `Provision Vm`. |
| 50 | + - **Description**: More information. For example, `Provisioning Vm by size`. |
| 51 | +5. Click **Save**. |
| 52 | +6. Click **Catalog Items** > **All Catalog Items** > **Provisioning**. |
| 53 | +7. Click **Configuration** > **Add a New Catalog Item**. |
| 54 | + - 8. **Catalog Item Type**: The functionality of this catalog item. Choose `VmWare`. |
| 55 | +9. Under the **Basic Information** tab, provide the default VM values: |
| 56 | + - **Name**: Name displayed in the catalog. For example, `Provision Vm with Size`. |
| 57 | + - **Description**: More information. For example, `Provision a vm choosing size`. |
| 58 | + - **Display in Catalog**: Check to display this catalog item. |
| 59 | + - **Catalog**: Organization concept. For example, `My Company/Provisioning`. |
| 60 | + - **Dialog**: The dialog created above. For example, `sm-med-lg dialog`. |
| 61 | + - **Provisioning Entry Point**: |
| 62 | + - For **endpoint type**, choose **Embedded Workflow**. |
| 63 | + - For the **endpoint value** choose the workflow chosen above. For example, `provision-vm-small-med-large.asl`. |
| 64 | +17. Under the **Request Info** > **Catalog** tab enter the following values: |
| 65 | + - **VM Name**: Name that will be overwritten by the **VM name** in the dialog. Enter anything here. |
| 66 | +20. Under the **Environment** tab, choose an appropriate **Host** and **Datastore**: |
| 67 | + - **Host**: Host that runs the VM. |
| 68 | + - **Datastore**: Disk that stores the VM. |
| 69 | +22. Under the **Networking** tab, choose an appropriate **Network Adapter**. |
| 70 | +24. Click **Add**. |
| 71 | + |
| 72 | +## Provisioning a Virtual Machine |
| 73 | + |
| 74 | +1. Click **Services** > **Catalogs** > **Service Catalogs**. |
| 75 | +2. Click **Order** under the newly created service, **Vm with Size**. |
| 76 | +3. Provide the following fields: |
| 77 | + - **VM name**: Name for the newly created vm. For example `demo-1`. |
| 78 | + - **size**: The desired vm size. For example, **small**. |
| 79 | +1. Click **Submit** |
0 commit comments