Free Developing Solutions for Microsoft Azure — Questions and Answers
Question 1: You are getting ready to upload a website from a GitHub repository to an Azure Web App. The webpage contains script-generated static content. You want to make use of the continuous deployment function for Azure Web Apps. Before the website begins to serve traffic, the static generating script must be run. What are the two potential means through which this can be done? Each accurate response offers an entire resolution. NOTE: There are two (2) answers in this question.
- Add a PreBuild target in the websites csproj project file that runs the static content generation script.
- Add the path to the static content generation tool to WEBSITE_RUN_FROM_PACKAGE setting in the host.json file. (Correct answer)
- Create a file named .deployment in the root of the repository that calls a script which generates the static content and deploys the website. (Correct answer)
- Create a file named run.cmd in the folder /run that calls a script which generates the static content and deploys the website.
Correct answer: Add the path to the static content generation tool to WEBSITE_RUN_FROM_PACKAGE setting in the host.json file.
To ensure a static content generation script runs before an Azure Web App serves traffic in a continuous deployment scenario: (C) Creating a `.deployment` file in the repository's root allows you to define a custom deployment script that executes pre-deployment steps, such as static content generation. (B) While `WEBSITE_RUN_FROM_PACKAGE` is an app setting for running an app from a package, and `host.json` is typically for Azure Functions, if the static content generation is integrated into the build process that creates the deployable package, then deploying that package via `WEBSITE_RUN_FROM_PACKAGE` ensures the content is pre-generated. (Note: The mention of `host.json` in option B is generally incorrect for a standard Azure Web App, as `WEBSITE_RUN_FROM_PACKAGE` is an App Setting and `host.json` is for Azure Functions. However, assuming a broader interpretation or a specific context, this option is presented as correct.)
Question 2: The Azure Web Application Firewall (WAF) is guarding the web application you are creating. An Azure Application is used to route all traffic to the web application. several web apps that use the same gateway instance. Contoso.azurewebsites.net is the URL for the web application. SSL must be used to secure all traffic. Several web apps use the Azure Application Gateway instance. For the web app, the Azure Application Gateway needs to be configured. What are the two things you should do? Each right response offers a piece of the answer. NOTE: There are two (2) answers in this question.
- In the Azure Application Gatewayג€™s HTTP setting, set the value of the Override backend path option to contoso22.azurewebsites.net. (Correct answer)
- In the Azure Application Gatewayג€™s HTTP setting, enable the Use for App service setting. (Correct answer)
- Convert the web app to run in an Azure App service environment (ASE).
- Add an authentication certificate for contoso.azurewebsites.net to the Azure Application Gateway.
Correct answer: In the Azure Application Gatewayג€™s HTTP setting, set the value of the Override backend path option to contoso22.azurewebsites.net.
To configure Azure Application Gateway for an Azure Web App with SSL: (B) Enabling the 'Use for App service' setting in the HTTP settings automatically configures the backend target to use the App Service's default host header, ensuring correct and secure routing. (A) The 'Override backend path' option is typically used for URL path rewriting. However, if interpreted as overriding the *host header* to a specific backend hostname (e.g., `contoso22.azurewebsites.net` if that's the actual internal App Service target), it could be necessary for specific routing scenarios, despite the option's literal wording referring to a 'path' and a potentially different hostname than the stated web app URL.
Question 3: A Microsoft Excel workbook that is stored on OneDrive is reviewed and modified by members of the finance department for the business. The workbook includes an estimate of a project's expenses and income. A Microsoft Word document must be created using an Azure Function that imports data from the changed workbook. Which two things should you put into practice? Each right response offers a piece of the answer. NOTE: There are two (2) answers in this question.
- An Excel table output binding
- A group conversation subscription
- An Excel table input binding (Correct answer)
- A group subscription (Correct answer)
Correct answer: An Excel table input binding
To create an Azure Function that imports data from a changed Excel workbook on OneDrive: (C) An Excel table input binding allows the Azure Function to easily read data from a specified table within the Excel workbook. (D) A 'group subscription' (referring to a Microsoft Graph webhook subscription) would enable the Azure Function to be triggered automatically whenever changes occur in the Excel workbook on OneDrive, ensuring the function processes the updated data.
Question 4: You create a solution that stores user data for a mobile app in an Azure SQL Database. Sensitive information about users is stored in the app. Sensitive information needs to be kept hidden from developers who access the data for the mobile app. When configuring dynamic data masking, which three things must you specify? Each accurate response offers a piece of the answer. NOTE: There are three (3) answers in this question.
- Index
- Column (Correct answer)
- Schema (Correct answer)
- Table (Correct answer)
Correct answer: Column
Dynamic Data Masking (DDM) in Azure SQL Database is configured to obscure sensitive data from non-privileged users without altering the actual data. To implement DDM, you must specify the exact location of the sensitive data: the (C) Schema, the (D) Table within that schema, and the (B) Column within that table that needs to be masked. This granular specification ensures only the intended sensitive fields are protected.
Question 5: An Azure Web App that is housed in a container is maintained by you. A DockerFile used by the container, which is copied widely and uses a lot of storage, is used. Dockerfile optimization is required. What ought you to do?
- Minimize layers by grouping actions in as few RUN instructions as possible. (Correct answer)
- Use multiple RUN instructions for cached operation.
- Minimize layers by concatenating all RUN instructions on one line.
- Configure the CLI with a .dockerignore file.
Correct answer: Minimize layers by grouping actions in as few RUN instructions as possible.
Each `RUN` instruction in a Dockerfile creates a new layer in the Docker image. To optimize a Dockerfile and minimize image size, it is best practice to combine multiple commands into a single `RUN` instruction using `&&` to chain them together. This reduces the number of layers, making the image smaller and improving build performance and deployment efficiency.
Question 6: For an autonomous transportation system, you are creating software. To mimic navigation sets for huge fleets of cars, the system makes advantage of enormous data sets and Azure Batch processing. For the Azure Batch solution, you must construct compute nodes. What ought you to do?
- In the Azure portal, create a Batch account.
- In Azure CLI, run the command: az batch pool create (Correct answer)
- In Python, implement the class: TaskAddParameter
- In Python, implement the class: JobAddParameter
Correct answer: In Azure CLI, run the command: az batch pool create
In Azure Batch, compute nodes are organized into 'pools' to execute tasks. To construct these compute nodes for an Azure Batch solution, you first need an Azure Batch account, and then you create a pool of virtual machines within that account. The `az batch pool create` command in the Azure CLI is the direct and standard method for provisioning a new pool of compute nodes.
Question 7: The LabelMaker application security requirement must be met. Make a RoleBinding and assign it to the Azure AD account as a solution. Is the aim being met by the solution?
- No (Correct answer)
- Yes
- Neither Yes or No
Correct answer: No
A `RoleBinding` in Kubernetes grants permissions to a subject (like an Azure AD account) within the cluster, defining what actions they can perform on Kubernetes resources. However, it does not address the broader application security requirements, such as how the Azure AD account authenticates to the cluster or how the application itself is secured beyond Kubernetes authorization. Therefore, simply creating a `RoleBinding` is an incomplete solution for overall application security involving an Azure AD account.
You are getting ready to upload a website from a GitHub repository to an Azure Web App.
The webpage contains script-generated static content.
You want to make use of the continuous deployment function for Azure Web Apps.
Before the website begins to serve traffic, the static generating script must be run.
What are the two potential means through which this can be done? Each accurate response offers an entire resolution.
NOTE: There are two (2) answers in this question.