You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-functions/start-stop-vms/deploy.md
+12-8Lines changed: 12 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,32 +1,36 @@
1
1
---
2
-
title: Deploy Start/Stop VMs v2
2
+
title: Deploy Start/Stop VMs v2 to an Azure subscription
3
3
description: This article tells how to deploy the Start/Stop VMs v2 feature for your Azure VMs in your Azure subscription.
4
4
services: azure-functions
5
5
ms.subservice: start-stop-vms
6
6
ms.date: 06/08/2022
7
-
ms.topic: conceptual
7
+
ms.topic: how-to
8
8
ms.custon: subject-rbac-steps
9
9
---
10
10
11
-
# Deploy Start/Stop VMs v2
11
+
# Deploy Start/Stop VMs v2 to an Azure subscription
12
12
13
-
Perform the steps in this topic in sequence to install the Start/Stop VMs v2 feature. After completing the setup process, configure the schedules to customize it to your requirements.
13
+
Perform the steps in this article in sequence to install the Start/Stop VMs v2 feature. After completing the setup process, configure the schedules to customize it to your requirements.
14
14
15
15
## Permissions considerations
16
-
Please keep the following in mind before and during deployment:
17
-
+ The solution allows those with appropriate role-based access control (RBAC) permissions on the Start/Stop v2 deployment to add, remove, and manage schedules for virtual machines under the scope of the Start/Stop v2. This behavior is by design. In practice, this means a user who doesn't have direct RBAC permission on a virtual machine could still create start, stop, and autostop operations on that virtual machine when they have the RBAC permission to modify the Start/Stop v2 solution managing it.
16
+
17
+
Keep the following considerations in mind before and during deployment:
18
+
19
+
+ The solution allows users with appropriate role-based access control (RBAC) permissions on the Start/Stop v2 deployment to add, remove, and manage schedules for virtual machines under the scope of the Start/Stop VMs v2 instance. This behavior is by design. In practice, this means a user who doesn't have explicit permissions on a virtual machine could still create start, stop, and autostop operations on that virtual machine when they have the permission to modify the Start/Stop v2 solution managing the virtual machine.
20
+
18
21
+ Any users with access to the Start/Stop v2 solution could uncover cost, savings, operation history, and other data that is stored in the Application Insights instance used by the Start/Stop v2 application.
22
+
19
23
+ When managing a Start/Stop v2 solution, you should consider the permissions of users to the Start/Stop v2 solution, particularly when whey don't have permission to directly modify the target virtual machines.
24
+
20
25
## Deploy feature
21
26
22
-
The deployment is initiated from the Start/Stop VMs v2 GitHub organization[here](https://github.com/microsoft/startstopv2-deployments/blob/main/README.md). While this feature is intended to manage all of your VMs in your subscription across all resource groups from a single deployment within the subscription, you can install another instance of it based on the operations model or requirements of your organization. It also can be configured to centrally manage VMs across multiple subscriptions.
27
+
The deployment is initiated from the [Start/Stop VMs v2 GitHub organization](https://github.com/microsoft/startstopv2-deployments/blob/main/README.md). While this feature is intended to manage all of your VMs in your subscription across all resource groups from a single deployment within the subscription, you can install another instance of it based on the operations model or requirements of your organization. It also can be configured to centrally manage VMs across multiple subscriptions.
23
28
24
29
To simplify management and removal, we recommend you deploy Start/Stop VMs v2 to a dedicated resource group.
25
30
26
31
> [!NOTE]
27
32
> Currently this solution does not support specifying an existing Storage account or Application Insights resource.
28
33
29
-
30
34
> [!NOTE]
31
35
> The naming format for the function app and storage account has changed. To guarantee global uniqueness, a random and unique string is now appended to the names of these resource.
Copy file name to clipboardExpand all lines: articles/azure-functions/start-stop-vms/overview.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,17 +4,17 @@ description: This article describes version two of the Start/Stop VMs feature, w
4
4
ms.topic: conceptual
5
5
ms.service: azure-functions
6
6
ms.subservice: start-stop-vms
7
-
ms.date: 06/08/2022
7
+
ms.date: 09/23/2022
8
8
---
9
9
10
10
# Start/Stop VMs v2 overview
11
11
12
-
The Start/Stop VMs v2 feature starts or stops Azure virtual machines (VMs) across multiple subscriptions. It starts or stops Azure VMs on user-defined schedules, provides insights through [Azure Application Insights](../../azure-monitor/app/app-insights-overview.md), and send optional notifications by using [action groups](../../azure-monitor/alerts/action-groups.md). The feature can manage both Azure Resource Manager VMs and classic VMs for most scenarios.
12
+
The Start/Stop VMs v2 feature starts or stops Azure Virtual Machines instances across multiple subscriptions. It starts or stops virtual machines on user-defined schedules, provides insights through [Azure Application Insights](../../azure-monitor/app/app-insights-overview.md), and send optional notifications by using [action groups](../../azure-monitor/alerts/action-groups.md). For most scenarios, Start/Stop VMs can manage virtual machines deployed and managed both by Azure Resource Manager and by Azure Service Manager (classic), which is [deprecated](../../virtual-machines/classic-vm-deprecation.md).
13
13
14
-
This new version of Start/Stop VMs v2 provides a decentralized low-cost automation option for customers who want to optimize their VM costs. It offers all of the same functionality as the [original version](../../automation/automation-solution-vm-management.md) available with Azure Automation, but it is designed to take advantage of newer technology in Azure.
14
+
This new version of Start/Stop VMs v2 provides a decentralized low-cost automation option for customers who want to optimize their VM costs. It offers all of the same functionality as the [original version](../../automation/automation-solution-vm-management.md) available with Azure Automation, but it's designed to take advantage of newer technology in Azure.
15
15
16
16
> [!NOTE]
17
-
> We've added a plan (**AZ - Availability Zone**) to our Start/Stop V2 solution to enable a high-availability offering. You can now choose between Consumption and Availability Zone plans before you start your deployment. In most cases, the monthly cost of the Availability Zone plan is higher when compared to the Consumption plan.
17
+
> We've added a plan (**AZ - Availability Zone**) to our Start/Stop MVs v2 solution to enable a high-availability offering. You can now choose between Consumption and Availability Zone plans before you start your deployment. In most cases, the monthly cost of the Availability Zone plan is higher when compared to the Consumption plan.
18
18
19
19
> [!NOTE]
20
20
> Automatic updating functionality was introduced on April 28th, 2022. This new auto update feature helps you stay on the latest version of the solution. This feature is enabled by default when you perform a new installation.
@@ -26,11 +26,11 @@ Start/Stop VMs v2 is redesigned and it doesn't depend on Azure Automation or Azu
26
26
27
27
A managed identity is created in Azure Active Directory (Azure AD) for this Azure Functions application and allows Start/Stop VMs v2 to easily access other Azure AD-protected resources, such as the logic apps and Azure VMs. For more about managed identities in Azure AD, see [Managed identities for Azure resources](../../active-directory/managed-identities-azure-resources/overview.md).
28
28
29
-
An HTTP trigger endpoint function is created to support the schedule and sequence scenarios included with the feature, as shown in the following table.
29
+
An HTTP trigger function endpoint is created to support the schedule and sequence scenarios included with the feature, as shown in the following table.
30
30
31
31
|Name |Trigger |Description |
32
32
|-----|--------|------------|
33
-
|Scheduled |HTTP |This function is for both scheduled and sequenced scenario (differentiated by the payload schema). It is the entry point function called from the Logic App and takes the payload to process the VM start or stop operation. |
33
+
|Scheduled |HTTP |This function is for both scheduled and sequenced scenario (differentiated by the payload schema). It's the entry point function called from the Logic App and takes the payload to process the VM start or stop operation. |
34
34
|AutoStop |HTTP |This function supports the **AutoStop** scenario, which is the entry point function that is called from Logic App.|
35
35
|AutoStopVM |HTTP |This function is triggered automatically by the VM alert when the alert condition is true.|
36
36
|VirtualMachineRequestOrchestrator |Queue |This function gets the payload information from the **Scheduled** function and orchestrates the VM start and stop requests.|
@@ -51,9 +51,9 @@ The queue-based trigger functions are required in support of this feature. All t
51
51
52
52
-**Scheduled** - Start and stop actions are based on a schedule you specify against Azure Resource Manager and classic VMs. **ststv2_vms_Scheduled_start** and **ststv2_vms_Scheduled_stop** configure the scheduled start and stop.
53
53
54
-
-**Sequenced** - Start and stop actions are based on a schedule targeting VMs with pre-defined sequencing tags. Only two named tags are supported - **sequencestart** and **sequencestop**. **ststv2_vms_Sequenced_start** and **ststv2_vms_Sequenced_stop** configure the sequenced start and stop.
54
+
-**Sequenced** - Start and stop actions are based on a schedule targeting VMs with pre-defined sequencing tags. Only two named tags are supported - `sequencestart` and `sequencestop`. **ststv2_vms_Sequenced_start** and **ststv2_vms_Sequenced_stop** configure the sequenced start and stop.
55
55
56
-
The proper way to use the sequence functionality is to create a tag named **sequencestart** on each VM you wish to be started in a sequence. The tag value needs to be an integer ranging from 1 to N for each VM in the respective scope. The tag is optional and if not present, the VM simply won't participate in the sequencing. The same criteria applies to stopping VMs with only the tag name being different and use **sequencestop** in this case. You have to configure both the tags in each VM to get start and stop action. If two or more VMs share the same tag value, those VMs would be started or stopped at the same time.
56
+
The proper way to use the sequence functionality is to create a tag named `sequencestart` on each VM you wish to be started in a sequence. The tag value needs to be an integer ranging from 1 to N for each VM in the respective scope. The tag is optional and if not present, the VM simply won't participate in the sequencing. The same criteria applies to stopping VMs with only the tag name being different and use `sequencestop` in this case. You have to configure both the tags in each VM to get start and stop action. If two or more VMs share the same tag value, those VMs would be started or stopped at the same time.
57
57
58
58
For example, the following table shows that both start and stop actions are processed in ascending order by the value of the tag.
59
59
@@ -72,7 +72,7 @@ An Azure Storage account, which is required by Functions, is also used by Start/
72
72
73
73
- Uses Azure Queue Storage to support the Azure Functions queue-based triggers.
74
74
75
-
All telemetry data, that is trace logs from the function app execution, is sent to your connected Application Insights instance. You can view the telemetry data stored in Application Insights from a set of pre-defined visualizations presented in a shared [Azure dashboard](../../azure-portal/azure-portal-dashboards.md).
75
+
All trace logging data from the function app execution is sent to your connected Application Insights instance. You can view the telemetry data stored in Application Insights from a set of pre-defined visualizations presented in a shared [Azure dashboard](../../azure-portal/azure-portal-dashboards.md).
76
76
77
77
:::image type="content" source="media/overview/shared-dashboard-sml.png" alt-text="Start/Stop VMs shared status dashboard":::
78
78
@@ -98,7 +98,7 @@ You can also specify a list of VMs to exclude and it will ignore them from the a
98
98
99
99
### VMList
100
100
101
-
Specifying a list of VMs can be used when you need to perform the start and stop action on a specific set of virtual machines, and across multiple subscriptions. This option does not support specifying a list of VMs to exclude.
101
+
Specifying a list of VMs can be used when you need to perform the start and stop action on a specific set of virtual machines, and across multiple subscriptions. This option doesn't support specifying a list of VMs to exclude.
title: Adding preactions to schedules in Start/Stop VMs v2 (Azure)
3
+
description: This article shows you how to add a preaction to your Start/Stop VMs v2 schedules.
4
+
services: azure-functions
5
+
ms.subservice: start-stop-vms
6
+
ms.date: 09/21/2022
7
+
ms.topic: how-to
8
+
---
9
+
10
+
# Adding pre-actions to schedules in Start/Stop VMs v2
11
+
12
+
Pre-actions are a set of actions in Start/Stop VMs v2 that execute before scheduled start or stop actions. Some scenarios for using pre-actions before a start or stop action include:
13
+
14
+
- Create a backup of an Azure SQL Database.
15
+
- Send a message to Azure Application Insights.
16
+
- Call an external API.
17
+
18
+
Because Start/Stop VMs v2 uses [Azure Logic Apps](../../logic-apps/logic-apps-overview.md) to manage its schedules, it's easy to add one or more pre-actions before the main action. To learn more about Logic Apps, see the [Logic Apps documentation](../../logic-apps/logic-apps-overview.md).
19
+
20
+
This article describes how to use the Logic Apps Designer in the Azure portal to add an HTTP request pre-action to an existing scheduled start action in Start/Stop VMs v2. In your implementation, the pre-action can be any action supported by Logic Apps.
21
+
22
+
> [!NOTE]
23
+
> At this time, Start/Stop VMs v2 only supports pre-actions, which are run before the execution of the main action. Because Log Apps runs Start/Stop VMs v2 actions asynchronously, there's currently no way to trigger a post-action that occurs after the main action completes.
24
+
25
+
## Prerequisites
26
+
27
+
You must first complete the steps in [Deploy Start/Stop VMs v2 to an Azure subscription][deployment article], or else complete a default deployment from the [Start Stop V2 Deployments GitHub repository](https://github.com/microsoft/startstopv2-deployments). Logic app and action names are based on the ones in a default deployment of Start/Stop VMs v2.
28
+
29
+
## Create an HTTP request pre-action
30
+
31
+
The steps in this section require the `ststv2_vms_Scheduled_start` logic app that was created and deployed when you completed the [deployment article]. However, the same basic process is used for all scheduled actions.
32
+
33
+
1. In the [Azure portal](https://portal.azure.com), search for and navigate to the resource group you created when you deployed Start/Stop VMs v2.
34
+
35
+
1. In the resource group, choose the logic app named `ststv2_vms_Scheduled_start`, which represents the default scheduled start action.
36
+
37
+
1. In **Overview** page of the logic app, select **Edit**.
38
+
39
+
1. In the Logic Apps Designer page, select **Function-Try** and then select **Add an action**.
40
+
41
+
:::image type="content" source="./media/pre-actions/add-action-button.png" alt-text="Screenshot of the Logic Apps designer showing Add an Action button location.":::
42
+
43
+
5. Choose **HTTP**, select the HTTP **Method**, and add the **URL**. This HTTP request will be the pre-action for the scheduled start action, after you change the action order in **Function-Try**. You can also configure the HTTP action at a later time.
44
+
45
+
6. Drag the **Scheduled** action below the new **HTTP** action in the **Function-Try** step. The pre-action must come before the scheduled action in the step. Your app should now look like the following example:
46
+
47
+
:::image type="content" source="./media/pre-actions/pre-action-configured.png" alt-text="Screenshot of the Logic Apps designer showing the actions in the correct order.":::
48
+
49
+
At this point, you've defined a pre-action that's run before the start action scheduled by `ststv2_vms_Scheduled_start`.
50
+
51
+
## Next steps
52
+
53
+
If you have issues working with Start/Stop VMs v2, see the [Troubleshoot Guide](troubleshoot.md). For more assistance, you can also create an issue in the [Start Stop V2 Deployments GitHub repository](https://github.com/microsoft/startstopv2-deployments/issues).
0 commit comments