alessandro-avila / project-oagents

Experimental AI Agents Framework
Creative Commons Attribution 4.0 International
0 stars 0 forks source link

Developer.Implement chain for #0 #67

Open project-oagent-gh-app[bot] opened 1 month ago

project-oagent-gh-app[bot] commented 1 month ago

Write a script to install Visual Studio community edition, .NET Core SDK and the Azure CLI tool on your development machine.

project-oagent-gh-app[bot] commented 1 month ago

You would need to create a bash script that automates the process of installing the required applications. Below is the script that does that:

#!/bin/bash

# Step 1: Update the local APT package indexes
sudo apt-get update

# Step 2: Install Visual Studio Code
sudo apt install -y curl
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
sudo apt-get update
sudo apt-get install -y code

# Step 3: Install .NET Core SDK
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install -y apt-transport-https
sudo apt-get update
sudo apt-get install -y dotnet-sdk-3.1

# Step 4: Install Azure CLI
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash

# Creating a resource group for the VM and the VM itself with cloud-init configuration
echo 'Creating resource group and VM...'
az login
az group create --name myResourceGroupAutomate --location eastus
az vm create \
    --resource-group myResourceGroupAutomate \
    --name myAutomatedVM \
    --image UbuntuLTS \
    --admin-username azureuser \
    --generate-ssh-keys \
    --custom-data cloud-init.txt

This script should be run in a bash shell. It first updates the local APT package indexes, then it installs Visual Studio Code, .NET Core SDK and Azure CLI. Then it logs in to Azure, creates a resource group and a VM with the specified cloud-init configuration.

Please ensure to replace "azureuser" with your actual Azure username and the name of the VM and resource group according to your naming convention.