• No results found

Manage hosting plans CHAPTER 1 51EXAM TIP

In document Oops, page not found. (Page 71-81)

Migrating websites between hosting plans

Objective 1.5: Manage hosting plans CHAPTER 1 51EXAM TIP

When moving a website to a new web hosting plan, the new plan must be in the same region and resource group as the plan it is currently in.

Thought experiment

Managing web hosting plans for a website

In this thought experiment, apply what you've learned about this objective. You can ind answers to these questions in the ”Answers” section at the end of this chapter.

You are the IT Administrator for Contoso. The development team has asked you to create a website environment for a new website they have been working on. They have been using the Free tier to build a minimum viable product for the site and are ready to engage a few select customers to get their early feedback. The only ad-ditional feature they need at the moment is a custom domain without SSL support.

They aren't concerned about availability of the site at this time.

Shortly after the site is deployed, the development team will be iterating quickly (several times a day) to implement features, ix bugs, and other things captured during customer feedback. Therefore, they will also need a way to quickly and easily test changes internally before making them available for the customer to review.

You need to provide a solution at a minimum cost.

1. Which web hosting plan would you choose for the development team?

2. How will you support the rapid pace for deployments that the development team will need?

Objective summary

Web hosting plans are a way to group together capacity and features that can be shared by multiple websites.

Web hosting plans are available as Free, Shared, Basic, and Standard plans. Each plan offers unique capacity and feature settings.

The Basic and Standard plans can be scaled up such that all website instances have the same instance size, which can be Small, Medium, and Large. This translates into three Basic plans and three Standard plans that you can choose from which are B1, B2, B3, and S1, S2, and S3.

As a website's features and capacity requirements evolve, the website can be migrated to a different web hosting plan that meets the website's requirements.

52 CHAPTER 1 Implement Websites

Objective review

Answer the following questions to test your knowledge of the information in this objective.

You can ind the answers to these questions and explanations of why each answer choice is correct or incorrect in the ”Answers” section at the end of this chapter.

1. Which web hosting plan would be appropriate for a website requiring SSL for a custom domain, 3 GB of memory, and a minimum of two instances?

A. Standard (S2) B. Basic (B3) C. Shared D. Basic (B2)

2. Which web hosting plans can you conigure a speciic instance size for all websites in the web hosting plan? (Choose all that apply.)

A. Standard B. Shared C. Basic D. Free

Answers CHAPTER 1 53

Answers

This section contains the solutions to the thought experiments and answers to the objective review questions in this chapter.

Objective 1.1: Thought experiment

1. Using the management portal, create a new Azure website using the Website + SQL template. This will provide you with options to create a SQL database. As a result, the SQL database and the Azure website will also be in the same resource group.

A. When creating the SQL database, select the option to allow Azure Services to connect to it so that the Website will be able to access the database.

B. Create an Azure Storage account in the same resource group as the Website and SQL database to support the requirement for storing document iles.

C. Conigure the Website for Standard Mode to enable adding additional deployment slots.

D. Add a deployment slot for ”dev” and another deployment slot for ”qa.”

2. Yes, the location is something you should take into consideration when creating the resources in your resource group. Use the West Europe location when creating the Website, Storage account, and SQL database.

Objective 1.1: Review

1. Correct answer: B

A. Incorrect: Publish-AzureWebsite is the cmdlet used to publish the web application (or code) into a deployment slot of the website.

B. Correct: New-AzureWebsite is the cmdlet used to create a new Azure website. At a minimum, you need to specify the location for the website and a unique DNS name.

C. Incorrect: New-AzureWebsiteJob is the cmdlet used to create a WebJob.

D. Incorrect: Set-AzureWebsite is the cmdlet used to set website properties, such as application settings, connection strings, framework versions, and more.

2. Correct answers: B, C, and D

A. Incorrect: Recurring is not a valid task type.

B. Correct: On-Demand is a valid task type.

C. Correct: Scheduled is a valid task type.

D. Correct: Continuous is a valid task type.

54 CHAPTER 1 Implement Websites 3. Correct answer: C

A. Incorrect: Autoscale is used to scale the number of standard instances of a website up and down.

B. Incorrect: SSL is used to encrypt trafic on the wire.

C. Correct: Always-On is recommended for continuously running WebJobs.

D. Incorrect: Backup is a feature to back up the website contents and databases to Azure Blob Storage.

4. Correct answer: A

A. Correct: Switch-AzureWebsiteSlot is the cmdlet used to swap deployment slots. If a website has only 1 additional deployment slot (additional to the production deploy-ment slot), it is not necessary to specify the Slot2 parameter. If there are more than 2 deployment slots, it is necessary to specify Slot1 and Slot2 parameters.

B. Incorrect: Get-AzureWebsite is the cmdlet used to get a list of the websites in the current subscription or coniguration settings for a speciied website.

C. Incorrect: Restart-AzureWebsite is the cmdlet used to stop and then restart a speciied website.

D. Incorrect: Show-AzureWebsite is the cmdlet you can use to launch a browser and navigate to the URL of a speciied website.

Objective 1.2: Thought experiment

1. Because your requirements indicate that your solution must work for sub-domains, you will need to obtain either a wildcard certiicate or a certiicate with subject alternate name (SAN) identifying all of the domains.

2. The steps required to deliver the solution are as follows:

A. Conigure the website for Standard mode if it is not already conigured.

B. Obtain an SSL certiicate that is signed from a certiicate authority (CA).

C. Upload the Public Information Exchange (.pfx) ile to Azure using the management portal. The SSL settings blade provides the user interface to upload the certiicate for the website.

D. Conigure the SSL binding. Because you only have to be concerned with newer browsers, you should choose the SNI SSL option. If you had to support browsers older than what was speciied in the requirements, you could use IP-based SSL.

Answers CHAPTER 1 55

Objective 1.2: Review

1. Correct answers: A, C

A. Correct: Connection strings can be retrieved at runtime as environment variables.

The environment variable name will have a preix of SQLAZURECONNSTR_, SQLCONNSTR_, MYSQLCONNSTR_, or CUSTOMCONNSTR_.

B. Incorrect: Handler mappings is not a setting that can be retrieved at runtime as an environment variable. The handler mapping is used to deine a custom processing script for a particular ile extension.

C. Correct: Application settings can be retrieved at runtime as environment variables.

The environment variable name will have a name starting with APPSETTING_.

D. Incorrect: The .NET Framework version is a coniguration setting in the site set-tings and is not something you deine. You can only change its value.

2. Correct answer: D

A. Incorrect: Enable-AzureTraficManagerProile is used to enable an existing Trafic Manager proile that was previously disabled.

B. Incorrect: Set-AzureTraficManagerEndpoint is used to update the properties of an existing Trafic Manager endpoint.

C. Incorrect: Set-AzureTraficManagerProile is used to update the properties of an existing Trafic Manager proile. However, after updating the proile to include the new endpoint, this cmdlet would have to be called to update the proile in Azure.

D. Correct: Add-AzureTraficManagerEndpoint adds a new endpoint to a Trafic Manager proile. The result of this cmdlet is piped into (or passed as a parameter) to the Set-AzureTraficMaanagerProile cmdlet to apply the change in Azure.

3. Correct answer: C

A. Incorrect: Round Robin will result in trafic being evenly distributed across all available endpoints, regardless of performance for the user.

B. Incorrect: Failover will result in all trafic being routed to a primary endpoint, with backup endpoints on standby in case the primary goes down.

C. Correct: The Performance method will determine the closest endpoint to the user with the lowest latency.

D. Incorrect: CDN is a Content Delivery Network and is generally used for serving up static iles to users in regions around the world. Although this is a very useful service to improve performance for users, it is not a valid Trafic Manager load balancing method.

56 CHAPTER 1 Implement Websites 4. Correct answers: A, B, D

A. Correct: Windows is supported by the xplat-cli tools.

B. Correct: Mac operating system is supported by the xplat-cli tools.

C. Incorrect: Azure is not a client operating system.

D. Correct: Linux is supported by the xplat-cli tools.

Objective 1.3: Thought experiment

1. Because the complaints are intermittent and largely around the speed of website responses, you should conigure endpoint monitoring with web test from locations in the US, Europe, and locations where Contoso has high customer density. You might also choose to set up performance counter monitoring for HTTP Client Errors, and HTTP Server Errors. This may help validate the complaints from users that requests sometimes result in an error. As an added measure, you may conigure an alert based on response time to notify you or other administrators when slow responses are being detected by the monitoring service.

Objective 1.3: Review

1. Correct answers: B, C, D

A. Incorrect: Application diagnostics is the other category of diagnostic logs. It is used to capture logging from the application.

B. Correct: Web server logging is part of site diagnostics. It contains all requests to the website in W3C extended log ile format.

C. Correct: Detailed error messages is part of site diagnostics. It contains error infor-mation for requests that result in an HTTP 400 code or higher.

D. Correct: Failed request tracing is part of site diagnostics. It contains information about failed requests to the website and also traces from the IIS components that were involved in processing the request. The Freb.xsl ile is present in the same folder to enhance the viewing experience of the failed request log.

2. Correct answer: C

A. Incorrect: Get-AzureWebsiteLog is used to enable log streaming.

B. Incorrect: Enable-AzureWebsiteApplicationDiagnostic is used to enable application diagnostics and conigure logging level.

C. Correct: Save-AzureWebsiteLog is the cmdlet to download the log iles from Azure to your local computer.

D. Incorrect: Get-AzureWebsiteMetric is used to get detailed metrics for the website.

Answers CHAPTER 1 57 3. Correct answers: A, D

A. Correct: Application logs are available using the log-streaming service.

B. Incorrect: Failed request logs cannot be streamed. You must download these logs to view them.

C. Incorrect: Detailed error messages cannot be streamed. You must download these logs to view them.

D. Correct: Web server logs are available using the log-streaming service.

4. Correct answer: C

A. Incorrect: Zero to three is not correct. You must have at least one external website location.

B. Incorrect: Two or more is not correct. You could have one external website location but no more than three.

C. Correct: One to three external website locations is correct.

D. Incorrect: One to two external website locations is not correct. You can have up to three.

5. Correct answer: B

A. Incorrect: Website coniguration is part of the backup.

B. Correct: Website performance metrics is not part of an Azure website backup.

C. Incorrect: Website ile content is part of the backup.

D. Incorrect: Website databases (SQL database or MySQL) is part of the backup.

Objective 1.4: Thought experiment

1. The new version of the website requires 1 core and 2.5 GB of memory. Coniguring the website to run in Small mode meets the core requirement, but not the memory requirement. Setting the mode to Medium would be the most cost-effective solution that meets both requirements.

2. The marketing campaign for the new website release is a short-lived event and not an on-going recurring event. Also, you are not able to predict exactly when the ads will be run on television and radio. To handle these trafic spikes during the campaign, you should use a speciic data and time schedule that aligns with the campaign period.

After the schedule is deined you should conigure the number of running instances required during the campaign.

3. Another solution could be to autoscale the website based on CPU. However, autoscale does not happen instantly and so your website instances are not likely to scale fast enough to support the trafic spikes.

58 CHAPTER 1 Implement Websites

Objective 1.4: Review

1. Correct answer: B

A. Incorrect: Recurring schedule for weekday and weekend enables you to scale Monday through Friday and Saturday through Sunday.

B. Correct: Recurring schedule for day and night enables you to indicate the start and end time for your day, and scale on that schedule.

C. Incorrect: Speciic schedule with a start time in the morning and an end time in the evening enables you to scale up or down during that time period only. It doesn't give you an option to scale up and down.

D. Incorrect: Speciic schedule with a start time in the evening and an end time in the morning enables you to scale up or down during that time period only. It doesn't give you an option to scale up and down.

2. Correct answers: B, C, D

A. Incorrect: A0 (Shared core, 768 MB memory) is not a valid website instance size.

However, this is a valid size for a virtual machine.

B. Correct: Small (1 core, 1.75 GB memory) is a valid instance size setting.

C. Correct: Medium (2 cores, 3.5 GB memory) is a valid instance size setting.

D. Correct: Large (4 cores, 7 GB memory) is a valid instance size setting.

Objective 1.5: Thought experiment

1. The Shared web hosting plan would be the most cost-effective solution that offers the support for custom domains.

2. The development team will need the Staging deployments feature to support their rapid pace for deployments as they implement changes based on the customer feedback loop. This feature is available in the Standard tier only, so creating a new web hosting plan using the S1 pricing tier would be the most cost-effective approach.

When the development team needs this feature, you can migrate the website from the Shared plan to the S1 plan.

Objective 1.5: Review

1. Correct answer: D

A. Incorrect: Standard (S2) meets all the requirements for the website but is not the most cost-effective choice.

B. Incorrect: Basic (B3) meets all the requirements for the website but is not the most cost-effective choice.

C. Incorrect: Shared doesn't meet any of the requirements.

D. Correct: Basic (B2) meets all the requirements and is the most cost-effective choice.

Answers CHAPTER 1 59 2. Correct answers: A, C

A. Correct: Standard mode lets you deine the instance size, and is offered as S1, S2, and S3 for instance sizes Small, Medium, and Large.

B. Incorrect: Shared does not let you deine an instance size.

C. Correct: Basic mode lets you deine the instance size, and is offered as B1, B2, and B3 for instance sizes Small, Medium, and Large.

D. Incorrect: Free does not let you deine an instance size.

61

C H A P T E R 2

Implement virtual machines

In document Oops, page not found. (Page 71-81)