Skip to content

Instantly share code, notes, and snippets.

View sdolgin's full-sized avatar
🏖️
Working from the beach

Saul Dolgin sdolgin

🏖️
Working from the beach
View GitHub Profile

Hardware Requirements

This guide covers the minimum and recommended hardware specifications for hosting OpenClaw across different deployment scenarios. OpenClaw is designed to be lightweight—the Gateway itself is a Node.js process that proxies messages to cloud-hosted LLMs—but resource needs scale with enabled features, concurrent sessions, and sandboxing configuration.

Quick Reference

Scenario CPU RAM Storage Network
Minimal (headless gateway) 1 vCPU 512MB 1GB 1 Mbps
Standard (gateway + channels) 1-2 vCPU 1-2GB 5GB 5 Mbps
# This script demonstrates how to restore all the Azure VMs in a Recovery Services Vault to their original location
# VMs are stopped before starting the restore since they cannot be restored while running
# To speed up the process, the restores are run in parallel using PowerShell jobs
# The vault and cache storage account must be in the same region
# Define variables
$resourceGroup = "rg-webservers"
$recoveryServicesVault = "rsv-vmbackup"
$cacheStorageAccount = "unique626872"
$cacheStorageAccountResourceGroup = "rg-webservers"
@sdolgin
sdolgin / GetAppGWHealthyHostCount.ps1
Created May 2, 2024 20:57
Sample PS Script to retrieve the Application Gateway metrics from an Azure VM (using managed identity)
# Login using the VM's Managed Identity
Connect-AzAccount -Identity
# Variables
$resourceId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-appgw-demo-ne/providers/Microsoft.Network/applicationGateways/appgw-demo"
$metricName = "HealthyHostCount"
$startTime = (Get-Date).AddMinutes(-5) # Last 5 minutes
$endTime = Get-Date
$timeGrain = New-TimeSpan -Minutes 1 # 1 minute granularity
@sdolgin
sdolgin / query.md
Created April 16, 2024 13:05
ARG query to list VMs with OS details

Run the following command in Azure Resource Graph:

// List VMs with OS details
resources
| where type =~ 'Microsoft.Compute/virtualMachines'
| extend osType = parse_json(properties.storageProfile.osDisk.osType)
| extend publisher = parse_json(properties.storageProfile.imageReference.publisher)
| extend exactVersion = parse_json(prop
@sdolgin
sdolgin / GetAzureRoleAssignments.ps1
Last active December 28, 2023 17:42
Azure Role Assignment Export
param (
[string]$usernames
)
# Split the usernames into an array
$usernamesArray = $usernames -split ','
# Function to get role assignments
function Get-RoleAssignments {
param (
@sdolgin
sdolgin / logic-failover.json
Created December 4, 2023 01:35
Logic App - ASR Recovery Plan Failover
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"Recovery_Plan_Failover": {
"inputs": {
"authentication": {
"type": "ManagedServiceIdentity"
},
"body": {
@sdolgin
sdolgin / failover-recovery-plan.ps1
Created September 28, 2023 18:40
ASR Failover Script Examples
# Import the Azure Recovery Services module
# This module contains the cmdlets required for Azure Site Recovery operations.
Import-Module Az.RecoveryServices
# Login to Azure Account
# This will prompt you to login to your Azure account.
Connect-AzAccount
# Set the Recovery Services Vault Context
# Replace 'YourResourceGroup' and 'YourVaultName' with the actual Resource Group and Vault Name.
@sdolgin
sdolgin / orphaned-alerts.md
Last active July 5, 2023 18:09
Resource Graph Query to find orphaned alert rules

The following KQL query can be used in Azure Resource Graph Explorer to identify alert rules that have an invalid scope:

resources
| where type =~ 'microsoft.insights/metricAlerts' or type =~ 'microsoft.insights/scheduledQueryRules'
| extend scopes = properties.scopes
| mv-expand scopes 
| project name, resourceGroup, subscriptionId, location, properties, scopeId = toupper(tostring(scopes))
| join kind=leftouter (
    resources