### Start WebSphere Installation Manager Source: https://learn.microsoft.com/en-us/azure/developer/java/migration/migrate-websphere-to-azure-vm-manually Navigate to the WebSphere Installation Manager directory and launch the executable to begin the installation process. ```bash cd /datadrive/IBM/InstallationManager/V1.9/eclipse/ ./IBMIM ``` -------------------------------- ### Install Go SDK Package Source: https://learn.microsoft.com/en-us/azure/developer/azure-mcp-server/how-to/github-copilot-sdk Use this command to get the Go SDK package for GitHub Copilot. ```bash go get github.com/github/copilot-sdk/go ``` -------------------------------- ### Install Azure Identity Client Library Source: https://learn.microsoft.com/en-us/azure/developer/javascript/core/configure-local-development-environment Install the `@azure/identity` package to handle authentication with Azure services. This is an example; install other Azure client libraries as needed. ```bash npm install @azure/identity ``` -------------------------------- ### Example Logging Output Configuration Source: https://learn.microsoft.com/en-us/azure/developer/python/sdk/azure-sdk-logging This example demonstrates a comprehensive logging setup, including setting DEBUG level for the root 'azure' logger and the 'azure.storage.blob' logger, and registering a stream handler to direct output to stdout. ```Python import logging import os import sys import uuid from azure.core import exceptions from azure.identity import DefaultAzureCredential from azure.storage.blob import BlobClient logger = logging.getLogger("azure") logger.setLevel(logging.DEBUG) # Set the logging level for the azure.storage.blob library logger = logging.getLogger("azure.storage.blob") logger.setLevel(logging.DEBUG) # Direct logging output to stdout. Without adding a handler, ``` -------------------------------- ### Download and Prepare Sample Application Source: https://learn.microsoft.com/en-us/azure/developer/java/migration/migrate-weblogic-to-aks-with-keda-scaler-based-on-prometheus-metrics Use these bash commands to download a prebuilt sample application and expand it into a directory for use in the tutorial. Ensure you have a base directory set up to contain all generated files. ```Bash export BASE_DIR=$PWD/wlsaks mkdir $BASE_DIR && cd $BASE_DIR curl -L -o testwebapp.war https://aka.ms/wls-aks-testwebapp unzip -d testwebapp testwebapp.war ``` -------------------------------- ### Install Azure Compute Management Library for Go Source: https://learn.microsoft.com/en-us/azure/developer/go/management-libraries Use the `go get` command to install the `armcompute` package. This is typically done during project setup for dependency management. ```bash go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute ``` -------------------------------- ### Full Example: Authenticate and Create Virtual Machines Client in Go Source: https://learn.microsoft.com/en-us/azure/developer/go/management-libraries A complete example demonstrating how to set up authentication with DefaultAzureCredential and then create a client for managing Azure virtual machines. ```go package main import ( "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { // handle error } client, err := armcompute.NewVirtualMachinesClient("", cred, nil) if err != nil { // handle error } } ``` -------------------------------- ### Quarkus Dev Mode Output Example Source: https://learn.microsoft.com/en-us/azure/developer/java/ee/deploy-java-quarkus-app This is an example of the output you can expect when Quarkus dev mode starts, showing application version, startup time, active profile, and installed features. ```text __ ____ __ _____ ___ __ ____ ______ --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \ --\___\_\____/_/ |_/_/|_/_/|_|\____/___/ INFO [io.quarkus] (Quarkus Main Thread) quarkus-todo-demo-app-aca 1.0.0-SNAPSHOT on JVM (powered by Quarkus 3.2.0.Final) started in 14.826s. Listening on: http://localhost:8080 INFO [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated. INFO [io.quarkus] (Quarkus Main Thread) Installed features: [agroal, cdi, hibernate-orm, hibernate-validator, jdbc-postgresql, narayana-jta, resteasy-reactive, resteasy-reactive-jackson, smallrye-context-propagation, vertx] -- Tests paused Press [e] to edit command line args (currently ''), [r] to resume testing, [o] Toggle test output, [:] for the terminal, [h] for more options> ``` -------------------------------- ### Launch Oracle Configuration Wizard Source: https://learn.microsoft.com/en-us/azure/developer/java/migration/migrate-weblogic-to-azure-vm-manually Execute the configuration script to start the Oracle Configuration Wizard for domain setup. Ensure the path to the script is correct for your Oracle installation. ```bash bash /u01/app/wls/install/oracle/middleware/oracle_home/oracle_common/common/bin/config.sh ``` -------------------------------- ### Create Project Directory and Navigate Source: https://learn.microsoft.com/en-us/azure/developer/python/get-started-app-chat-template Set up a new project directory for your intelligent application and change into it. This is the initial step for local development setup. ```bash mkdir my-intelligent-app cd my-intelligent-app ``` -------------------------------- ### Initialize the hello-azd starter template Source: https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/extensions/quickstart-ai-extension Use this command to initialize the `hello-azd` starter template for the quickstart. You can also use your own template. ```bash azd init -t hello-azd ``` -------------------------------- ### Jib Extension Installation Confirmation Source: https://learn.microsoft.com/en-us/azure/developer/java/ee/deploy-java-quarkus-app This is an example output confirming the successful installation of the `quarkus-container-image-jib` extension. ```text [SUCCESS] ✅ Extension io.quarkus:quarkus-container-image-jib has been installed ``` -------------------------------- ### Initialize a new project with a template Source: https://learn.microsoft.com/en-us/azure/developer/python/get-started-app-chat-private-endpoint Use this command to initialize a new project using the 'azure-search-openai-demo' template. This command downloads the necessary files and sets up the project structure. ```bash azd init -t azure-search-openai-demo ``` -------------------------------- ### MySQL Extension Installation Prompt Source: https://learn.microsoft.com/en-us/azure/developer/java/ee/how-to-configure-passwordless-datasource Example output when the 'rdbms-connect' extension is required and prompts for installation. ```output The command requires the extension rdbms-connect. Do you want to install it now? The command will continue to run after the extension is installed. (Y/n): y Run 'az config set extension.use_dynamic_install=yes_without_prompt' to allow installing extensions without prompt. This extension depends on gcc, libpq-dev, python3-dev and they will be installed first. [sudo] password for user: ``` -------------------------------- ### Initialize Azure project with Azure Developer CLI Source: https://learn.microsoft.com/en-us/azure/developer/ai/get-started-securing-your-ai-app Use the 'azd init' command to download the GitHub repository for the OpenAI chat app quickstart to your local computer. ```bash azd init -t openai-chat-app-quickstart ``` -------------------------------- ### Download, Build, and Package Sample App Source: https://learn.microsoft.com/en-us/azure/developer/java/migration/migrate-websphere-to-vms-with-ha-dr Use these commands to obtain the sample application, build it, and create the deployable EAR package. Ensure you are in the correct directory after cloning. ```bash git clone https://github.com/Azure-Samples/websphere-cafe cd websphere-cafe git checkout 20240326 mvn clean package ``` -------------------------------- ### Install the demo extension Source: https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/extensions/quickstart-ai-extension Install the `microsoft.azd.demo` extension from the official registry to access its features and examples. ```bash azd extension install microsoft.azd.demo ``` -------------------------------- ### Application Output Example Source: https://learn.microsoft.com/en-us/azure/developer/java/spring-framework/using-storage-queue-in-spring-applications This is an example of the logs produced by the Spring Boot application after it has been started and has processed messages. ```output Send message id: ... Received message: Hello world ``` -------------------------------- ### Application Startup Log Example Source: https://learn.microsoft.com/en-us/azure/developer/java/spring-framework/configure-spring-data-jdbc-with-azure-sql-server Observe these logs during application startup to confirm data insertion into the Azure SQL Database. ```shell 2023-02-01 10:22:36.701 DEBUG 7948 --- [main] o.s.jdbc.core.JdbcTemplate : Executing prepared SQL statement [INSERT INTO todo (description, details, done) VALUES (?, ?, ?)] com.example.demo.Todo@4bdb04c8 ``` -------------------------------- ### Create the main application file Source: https://learn.microsoft.com/en-us/azure/developer/go/deploy-azure-resource-manager-template Use the touch command to create the main.go file for your application. ```bash touch main.go ``` -------------------------------- ### Instruct model to use Python code interpreter with Azure OpenAI Assistants Source: https://learn.microsoft.com/en-us/azure/developer/python/azure-ai-for-python-developers Quickstart to instruct a model to use the built-in Python code interpreter to solve math problems step by step. This example provides a starting point to use your own AI assistants accessed through custom instructions. ```python import os from openai import AzureOpenAI client = AzureOpenAI( api_key=os.environ.get("AZURE_OPENAI_KEY"), api_version="2023-05-15", base_url=os.environ.get("AZURE_OPENAI_ENDPOINT"), ) thread = client.beta.threads.create() message = client.beta.threads.messages.create( thread_id=thread.id, role="user", content="Solve the following math problem: 2 + 2" ) run = client.beta.threads.runs.create( thread_id=thread.id, assistant_id="YOUR_ASSISTANT_ID", instructions="Please address the user directly. Your response should be thoughtful and comprehensive." ) while run.status != "completed": run = client.beta.threads.runs.retrieve(thread_id=thread.id, run_id=run.id) print(run.status) messages = client.beta.threads.messages.list(thread_id=thread.id) print(messages) ``` -------------------------------- ### Initialize a project from a template Source: https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/configure-template-sources Use this command to start a new project by initializing it with a template from the displayed list. Provide the repository path of the desired template. ```bash azd init --template ``` -------------------------------- ### Install rdbms-connect Extension Prompt Source: https://learn.microsoft.com/en-us/azure/developer/java/ee/how-to-configure-passwordless-datasource-websphere Example output when the 'rdbms-connect' extension is required and prompts for installation. Press 'y' to continue. ```output The command requires the extension rdbms-connect. Do you want to install it now? The command will continue to run after the extension is installed. (Y/n): y Run 'az config set extension.use_dynamic_install=yes_without_prompt' to allow installing extensions without prompt. This extension depends on gcc, libpq-dev, python3-dev and they will be installed first. [sudo] password for user: ``` -------------------------------- ### Clone starter repository Source: https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/start-with-app-code Clone the sample repository to follow along with the steps using a pre-configured application. ```bash git clone https://github.com/Azure-Samples/msdocs-python-flask-webapp-quickstart ``` -------------------------------- ### Testcontainers Setup for Azure Queue Storage Source: https://learn.microsoft.com/en-us/azure/developer/java/spring-framework/testcontainers-support This setup uses Azurite container for testing Azure Queue Storage. Ensure the container is started before tests run. ```java private QueueClient queueClient; @BeforeAll public static void setup() { AZURITE_CONTAINER.start(); } @Test public void test() { String message = "Hello World!"; this.queueClient.create(); this.queueClient.sendMessage(message); assertThat(this.queueClient.receiveMessage().getBody().toString()).isEqualTo(message); } } ``` -------------------------------- ### Create .env file from sample Source: https://learn.microsoft.com/en-us/azure/developer/javascript/ai/get-started-app-chat-evaluations Initialize the .env file by copying the .env.sample file. This file will store environment-specific configuration values. ```bash cp .env.sample .env ``` -------------------------------- ### Install Azure MCP Server in Windsurf Source: https://learn.microsoft.com/en-us/azure/developer/azure-mcp-server/get-started/tools/windsurf Update the `mcp_config.json` file to manually install the Azure MCP Server. This configuration specifies the command and arguments to start the server. ```json { "mcpServers": { "Azure MCP Server": { "command": "npx", "args": [ "-y", "@azure/mcp@latest", "server", "start" ] } } } ``` -------------------------------- ### Application Log Output Example Source: https://learn.microsoft.com/en-us/azure/developer/java/spring-framework/configure-spring-cloud-stream-binder-java-app-kafka-azure-event-hub This is an example of the application log output when messages are processed. It shows the Kafka version, commit ID, start time, and a confirmation of a received message. ```text Kafka version: 3.0.1 Kafka commitId: 62abe01bee039651 Kafka startTimeMs: 1622616433956 New message received: 'Hello World' ``` -------------------------------- ### Start the Sample Application Source: https://learn.microsoft.com/en-us/azure/developer/java/spring-framework/configure-spring-data-apache-cassandra-with-cosmos-db Run the packaged Spring Data Cassandra application using the Java command. ```shell java -jar target/spring-data-cassandra-on-azure-0.1.0-SNAPSHOT.jar ``` -------------------------------- ### Example Log Output Source: https://learn.microsoft.com/en-us/azure/developer/java/fundamentals/java-diagnostic-tools-java-diagnostic-agent-quickstart This is an example of the output you can expect after adding logging around a function and calling the relevant endpoint. It shows the start and end times, and the total duration of the function execution. ```text ===== START ===== Method: updateInformation Start Time: 2024-12-12T07:37:55.404107848Z Done with the validation Done with the DB access Done with the data filtering ===== END ===== Method: updateInformation End Time: 2024-12-12T07:37:55.404316940Z Total Time: 0 milliseconds ``` -------------------------------- ### Clone and prepare the sample application (Bash) Source: https://learn.microsoft.com/en-us/azure/developer/java/ee/deploy-java-liberty-app-aca Use this command to clone the sample application repository and check out the correct branch for this guide. ```bash git clone https://github.com/Azure-Samples/open-liberty-on-aca.git cd open-liberty-on-aca export BASE_DIR=$PWD git checkout 20250327 ``` -------------------------------- ### Install Node Manager Windows Service Source: https://learn.microsoft.com/en-us/azure/developer/java/migration/migrate-weblogic-to-azure-vm-manually Use this command to install the WebLogic Node Manager as a Windows service on both the administration and managed server VMs. This allows Node Manager to start automatically. ```batch installNodeMgrSvc.cmd ``` -------------------------------- ### Authenticate and create an azblob client in Go Source: https://learn.microsoft.com/en-us/azure/developer/go/sdk/authentication/local-development-dev-accounts This example demonstrates importing necessary packages, creating an Azure credential using `DefaultAzureCredential` (or other specific credentials), and then initializing an `azblob.Client` with the credential and storage account URL. ```go import ( "context" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/storage/azblob" ) const ( account = "https://.blob.core.windows.net/" containerName = "sample-container" blobName = "sample-blob" sampleFile = "path/to/sample/file" ) func main() { // create a credential cred, err := azidentity.NewDefaultAzureCredential(nil) // or cred, err := azidentity.NewAzureCLICredential(nil) // or cred, err := azidentity.NewAzureDeveloperCLICredential(nil) // or cred, err := azidentity.NewAzurePowerShellCredential(nil) if err != nil { // TODO: handle error } // create a client for the specified storage account client, err := azblob.NewClient(account, cred, nil) if err != nil { // TODO: handle error } // TODO: perform some action with the azblob Client // _, err = client.DownloadFile(context.TODO(), , , , ) } ``` -------------------------------- ### Navigate to the project directory Source: https://learn.microsoft.com/en-us/azure/developer/ai/how-to/extract-entities-using-structured-outputs Change into the newly created project directory. ```bash cd my-structured-output-app ``` -------------------------------- ### Initialize Foundry Project with Starter Template Source: https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/extensions/azure-ai-foundry-extension Use this command to initialize a new project with the `azd-ai-starter-basic` template in an empty folder. Specify the template and desired Azure region. The command clones template files, creates directory structure, generates `azure.yaml`, and sets up environment variables. ```Bash azd init -t Azure-Samples/azd-ai-starter-basic --location northcentralus ``` -------------------------------- ### App Dependencies in requirements.txt Source: https://learn.microsoft.com/en-us/azure/developer/python/walkthrough-tutorial-authentication-05 List of Python libraries required for the application. These are installed during deployment or local setup. ```text flask requests azure.identity azure.keyvault.secrets azure.storage.queue ``` -------------------------------- ### Clone Sample Application Source: https://learn.microsoft.com/en-us/azure/developer/java/ee/liberty-on-aro Clone the sample application from GitHub and navigate to the project directory. This sets up the necessary files for deployment. ```bash git clone https://github.com/Azure-Samples/open-liberty-on-aro.git cd open-liberty-on-aro export BASE_DIR=$PWD git checkout 20250429 cd ${BASE_DIR}/3-integration/connect-db/mysql ``` -------------------------------- ### Build the Sample Application with Maven Source: https://learn.microsoft.com/en-us/azure/developer/java/spring-framework/configure-spring-data-mongodb-with-cosmos-db Use this Maven command to build the application and skip tests. Ensure you are in the application's directory containing the pom.xml file. ```shell mvn clean package -DskipTests ``` -------------------------------- ### Get MongoDB server version Source: https://learn.microsoft.com/en-us/azure/developer/python/tutorial-containerize-deploy-python-web-app-azure-02 Retrieves only the version of the MongoDB server installed on the system. Requires closing and reopening the MongoDB shell. ```bash mongosh --quiet --exec 'db.version()' ``` -------------------------------- ### Service Bus Application Output Source: https://learn.microsoft.com/en-us/azure/developer/java/spring-framework/using-service-bus-in-spring-applications Example output demonstrating a message being sent, the processor starting, a message being processed, and the processor stopping. ```text Sent a message to the queue Starting the processor ... Processing message. Id: 6f405435200047069a3caf80893a80bc, Sequence #: 1. Contents: Hello, World! Stopping and closing the processor ``` -------------------------------- ### Clone Sample Project using Git Source: https://learn.microsoft.com/en-us/azure/developer/java/spring-framework/configure-spring-data-apache-cassandra-with-cosmos-db Clone the sample project from GitHub to get started with the Spring Data Cassandra application. ```shell git clone https://github.com/Azure-Samples/spring-data-cassandra-on-azure.git ``` -------------------------------- ### Start Oracle Configuration Wizard Source: https://learn.microsoft.com/en-us/azure/developer/java/migration/migrate-weblogic-to-azure-vm-manually Use this command to launch the Oracle Configuration Wizard on Windows to begin domain configuration. ```bash cd C:\Oracle\Middleware\Oracle_Home\oracle_common\common\bin config.cmd ``` -------------------------------- ### Initialize and deploy the React + Node.js + MongoDB template with azd Source: https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/full-stack-templates This example shows how to initialize a project using the `todo-nodejs-mongo` template and then deploy it to Azure. ```bash azd init --template todo-nodejs-mongo azd up ``` -------------------------------- ### Vitest Boilerplate Code Source: https://learn.microsoft.com/en-us/azure/developer/javascript/sdk/test-sdk-integration Boilerplate code for unit tests using Vitest. This example demonstrates the basic structure with setup and teardown functions. ```typescript import { describe, it, beforeEach, afterEach, expect, vi } from 'vitest'; describe('boilerplate', () => { beforeEach(() => { // Setup required before each test }); afterEach(() => { // Cleanup required after each test }); it('should if ', async () => { // Arrange // - set up the test data and the expected result // Act // - call the function to test // Assert // - check the state: result returned from function // - check the behavior: dependency function calls }); }); ``` -------------------------------- ### Secure parameter in Bicep Source: https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/pipeline-advanced-features Example of a secure parameter in a Bicep file. `azd` prompts for values during setup and saves them as pipeline secrets for CI/CD runs. ```bicep @secure() param BlobStorageConnection string ``` -------------------------------- ### Install Go Azure Identity client library Source: https://learn.microsoft.com/en-us/azure/developer/ai/keyless-connections Use this command to install the Go Azure Identity SDK. Ensure you are using the latest version. ```Bash go get -u github.com/Azure/azure-sdk-for-go/sdk/azidentity ``` -------------------------------- ### Define Packer Build and Provisioning Source: https://learn.microsoft.com/en-us/azure/developer/terraform/create-vm-scaleset-network-disks-using-packer-hcl Specifies the build process, including the source image and provisioners to run on the image. This example updates packages and installs Nginx. ```hcl build { sources = ["source.azure-arm.builder"] provisioner "shell" { execute_command = "chmod +x {{ .Path }}; {{ .Vars }} sudo -E sh '{{ .Path }}'" inline = [ "apt-get update", "apt-get upgrade -y", "apt-get -y install nginx", "/usr/sbin/waagent -force -deprovision+user && export HISTSIZE=0 && sync", ] } } ``` -------------------------------- ### Install Azure SDK for Go Source: https://learn.microsoft.com/en-us/azure/developer/go/azure-sdk-authentication-managed-identity Install the `azidentity` module for Go applications to enable Azure authentication. ```bash go get github.com/Azure/azure-sdk-for-go/sdk/azidentity ```