Category: Uncategorized

  • Deploy a storage account by using deploy/vm-postgres.bicep

    Run the following command on your local machine:

    BashCopy

    az deployment group create \
        --resource-group 240900-linux-postgres \
        --template-file deploy/vm-postgres.bicep \
        --parameters \
            deployVm=false \
            deployPostgres=false \
            deployStorage=true
    

    Add the current user to the Storage Blob Data Owner role

    BashCopy

    STORAGE_ACCOUNT_ID=$(az storage account list \
        --resource-group 240900-linux-postgres \
        --query '[0].id' \
        -o tsv)
    
    USER_ID=$(az ad signed-in-user show \
        --query id \
        -o tsv)
    
    az role assignment create \
        --role "Storage Blob Data Owner" \
        --assignee $USER_ID \
        --scope $STORAGE_ACCOUNT_ID
  • Explore and run Linux and PostgreSQL workloads

    In this unit, you will:

    • Deploy an Azure Blob Storage account by using a Bicep template.
    • Create a Blob Storage container.
    • Migrate images to the Blob Storage account.
    • Upload tailwind.sql to the Blob Storage account.
    • Connect to the Azure virtual machine by using the Azure CLI.
    • Download the file from the storage account.
    • Connect to the PostgreSQL server by using psql and import a SQL file.
    • Run the application interactively via the command line.
    • Confirm that the application runs correctly.
  • Workload and data

    Our workload is an application that’s written in Go and works with data inside PostgreSQL. Our data is an open dataset that enables you to explore the power of the Postgres platform and related extensions.

    Though this application could easily be run within a container, the stakeholders chose not to do so at this stage. Building a container, deploying to a container platform, or using container orchestration is currently out of scope. But migration to containers might be a logical future step.

    The GitHub repository that’s associated with this module provides an application and the related data for you. You learn how to prepare your application and export your data to reach a similar state to this sample application. You can also use the sample application as a template for a greenfield deployment

  • Migrate Linux and PostgreSQL workloads

    This module guides you through the migration of an existing workload from an on-premises or cloud environment to Azure. It covers the migration of the compute to an Azure virtual machine (VM) and the data to Azure Database for PostgreSQL. The application is a cloud-agnostic sample that’s a stand-in for any real-world application that’s prepared for migration to the cloud.

    In this unit, you explore the value of making the following transitions with the benefit of a full suite of security and identity controls that Azure provides:

    • Shifting from a self-hosted environment (such as from a self-managed database) to a fully managed database offering
    • Shifting from bare-metal compute to cloud-hosted VMs

    You also explore the benefits of managing resources in the cloud from a cost and performance perspective. And you learn how to precisely calculate and manage costs before and after deployment, along with how to optimize performance from both a compute and a data perspective.

  • Create an image classification client application

    After you’ve trained an image classification model, you can use the Azure AI Custom Vision SDK to develop a client application that submits new images to be classified.

    C#Copy

    using System;
    using System.IO;
    using Microsoft.Azure.CognitiveServices.Vision.CustomVision.Prediction;
    
    // Authenticate a client for the prediction API
    CustomVisionPredictionClient prediction_client = new CustomVisionPredictionClient(new ApiKeyServiceClientCredentials("<YOUR_PREDICTION_RESOURCE_KEY>"))
    {
        Endpoint = "<YOUR_PREDICTION_RESOURCE_ENDPOINT>"
    };
    
    // Get classification predictions for an image
    MemoryStream image_data = new MemoryStream(File.ReadAllBytes("<PATH_TO_IMAGE_FILE>"));
    var result = prediction_client.ClassifyImage("<YOUR_PROJECT_ID>",
                                                 "<YOUR_PUBLISHED_MODEL_NAME>",
                                                 image_data);
    
    // Process predictions
    foreach (var prediction in result.Predictions)
    {
        if (prediction.Probability > 0.5)
        {
            Console.WriteLine($"{prediction.TagName} ({prediction.Probability})");
        }
    }
  • Training an image classification model

    To train an image classification model with the Azure AI Custom Vision service, you can use the Azure AI Custom Vision portal, the Azure AI Custom Vision REST API or SDK, or a combination of both approaches.

    In most cases, you’ll typically use the Azure AI Custom Vision portal to train your model.

    Screenshot of the Azure AI Custom Vision portal.

    The portal provides a graphical interface that you can use to:

    1. Create an image classification project for your model and associate it with a training resource.
    2. Upload images, assigning class label tags to them.
    3. Review and edit tagged images.
    4. Train and evaluate a classification model.
    5. Test a trained model.
    6. Publish a trained model to a prediction resource.
  • Train an image classification model

    Image classification is a computer vision technique in which a model is trained to predict a class label for an image based on its contents. Usually, the class label relates to the main subject of the image.

    For example, the following images have been classified based on the type of fruit they contain.

    Photographs of fruit classified as Apple, Banana, and Orange.

    Models can be trained for multiclass classification (in other words, there are multiple classes, but each image can belong to only one class) or multilabel classification (in other words, an image might be associated with multiple labels).

  • Azure AI Custom Vision

    The Azure AI Custom Vision service enables you to build your own computer vision models for image classification or object detection.

    To use the Custom Vision service to create a solution, you need two Custom Vision resources in your Azure subscription:

    • An Azure AI Custom Vision training resource – used to train a custom model based on your own training images.
    • An Azure AI Custom Vision prediction resource – used to generate predictions from new images based on your trained model.

    When you provision the Azure AI Custom Vision service in an Azure subscription, you can choose to create one or both of these resources. This separation of training and prediction provides flexibility. For example, you can use a training resource in one region to train your model using your own image data; and then deploy one or more prediction resources in other regions to support computer vision applications that need to use your model.

    Each resource has its own unique endpoint and authentication keys; which are used by client applications to connect and authenticate to the service.

  • Enhance browser security with Microsoft Defender Application Guard

    Microsoft Defender Application Guard (Application Guard) is designed to help prevent old and newly emerging attacks to help keep employees productive. Using a unique hardware isolation approach, the goal is to destroy the playbook that attackers use by making current attack methods obsolete.

    Designed for Windows 10 and Microsoft Edge, Application Guard helps to isolate enterprise-defined untrusted sites, protecting your company while your employees browse the Internet. As an enterprise administrator, you define your trusted web sites, cloud resources, and internal networks. Everything not on your list is considered untrusted.

    If an employee goes to an untrusted site through either Microsoft Edge or Internet Explorer, Microsoft Edge opens the site in an isolated Hyper-V-enabled container, which is separate from the host operating system. This container isolation means that if the untrusted site turns out to be malicious, the host PC is protected, and the attacker can’t get to your enterprise data. For example, this approach makes the isolated container anonymous, so an attacker can’t get to your employee’s enterprise credentials.

    Hardware isolation of Microsoft Edge with Windows Defender Application Guard
  • Site analysis

    Microsoft Defender SmartScreen determines whether a site is potentially malicious by:

    • Analyzing visited webpages for indications of suspicious behavior.
    • Checking the visited sites against a dynamic record of reported phishing sites.