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 #69

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

Here's a bash script that will handle the requirements given:

#!/bin/bash
# Create a configuration file for cloud-init
echo "#cloud-config
package_upgrade: true
packages:  
- nginx" > cloud-init.txt

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

# Now we can create the resource group and the VM
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

# 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

# Install Visual Studio Code
sudo apt update
sudo apt install -y software-properties-common apt-transport-https wget
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
sudo apt update
sudo apt install -y code

This script starts by creating a text file for cloud-init that will update the system and install Nginx on boot. It then downloads and installs the Azure CLI, creates the resource group, and creates the VM.

After the Azure related tasks, the script downloads and installs the .NET Core SDK and Visual Studio Code.