Saturday, April 11, 2015

Pattern 2 : Source Control

Source control is essential for all cloud development projects, not just team environments.


  • Treat automation scripts as source code and version them together with your application code.
  • Never check in secrets (sensitive data such as credentials) to a source code repository.
    • Azure lets you download files that contain publish settings in order to automate the creation of publish profiles. These files include user names and passwords that are authorized to manage your Azure services. If you use this method to create publish profiles, and if you check in these files to source control, anyone with access to your repository can see those user names and passwords. You can safely store the password in the publish profile itself because it's encrypted and it's in a .pubxml.user file that by default is not included in source control
  • Structure your source control to enable a clean "dev-ops" workflow


Saturday, April 4, 2015

AZURE RESOURCE MANAGER

AZURE RESOURCE MANAGER FOR VISUAL STUDIO

The Azure Resource Manager 2.5 for Visual Studio enables you to:
·       Create an application using the Azure Gallery templates.
·       Create and edit Azure Resource Manager deployment templates (for example a web site with a database) and parameter files (for example you can have different settings for development, staging and production).
·       Create resource groups and deploy templates into these to simplify the creation of resources.
The Azure Resource Manager enables you to create reusable deployment templates that declaratively describe the resources that make up your application (for example an Azure Website and a SQL Azure database). This simplifies the process of creating complex environments for development, testing and production in a repeatable manner. And it provides a unified way to manage and monitor the resources that make up an application from the Azure preview portal.
You are able to create an application using the Azure Gallery Templates and define and manage your Azure resources using JSON templates. This makes it easier for you to quickly setup the environment you need to Dev/Test your application in Azure. The two key features are the Visual Studio integration with the Azure Gallery and the ability to create and edit Azure Resource Manager deployment templates.

Configure Azure PowerShell

  1. Install the Azure PowerShell console. For instructions, see How to install and configure Azure PowerShell.
    This customized console is configured to work with your Azure subscription. The Azure module is installed in the Program Files directory and is automatically imported on every use of the Azure PowerShell console.
    If you prefer to work in a different host program, such as Windows PowerShell ISE, be sure to use the Import-Module cmdlet to import the Azure module or use a command in the Azure module to trigger automatic importing of the module.
  2. Start Azure PowerShell with the Run as administrator option.
  3. Run the Set-ExecutionPolicy cmdlet to set the Azure PowerShell execution policy to RemoteSigned. Enter Y (for Yes) to complete the policy change.
    PS C:\> Set-ExecutionPolicy RemoteSigned
    This setting enables you to run local scripts that aren't digitally signed. (You can also set the execution policy to Unrestricted, which would eliminate the need for the unblock step later, but this is not recommended for security reasons.)
  4. Run the Add-AzureAccount cmdlet to set up PowerShell with credentials for your account.
    PS C:\> Add-AzureAccount
    These credentials expire after a period of time and you have to re-run the Add-AzureAccount cmdlet. As this e-book is being written, the time limit before credentials expire is 12 hours.
  5. If you have multiple subscriptions, use the Select-AzureSubscription cmdlet to specify the subscription you want to create the test environment in.
  6. Import a management certificate for the same Azure subscription by using the Get-AzurePublishSettingsFile and Import-AzurePublishSettingsFile cmdlets. The first of these cmdlets downloads a certificate file, and in the second one you specify the location of that file in order to import it. Important:  Keep the downloaded file in a safe location or delete it when you're done with it, because it contains a certificate that can be used to manage your Azure services.
    PS C:\> Get-AzurePublishSettingsFile
    PS C:\> Import-AzurePublishSettingsFile ""
    The certificate is used for a REST API call that detects the development machine's IP address in order to set a firewall rule on the SQL Database server.

Pattern 1 : Automate Everything

It's uniquely important for cloud development because you can easily automate many tasks that are difficult or impossible to automate in an on-premises environment. For example, you can set up whole test environments, including new web server and back-end virtual machines (VMs), databases, blob storage (file storage), queues, etc.

- Scripting your actions helps to be effective, quick and consistent.
- Much more things can be automated
- Have the scripts generated for you.

Learn about Azure Resource Manager

You can write scripts using Windows PowerShell, or you can use an open source framework such as Chef or Puppet. It has a .NET management API in case you want to write code instead of script.

Azure has a feature that enables you to store settings and connection strings that automatically override what is returned to the application when it reads the appSettings or connectionStrings collections in the Web.config file

New Azure Portal

The new portal allows each user to transform the portal home page (called the Startboard) into their own customized dashboard.

Simplified Resource Management. Rather than managing standalone resources such as Azure App Service Web Apps, Visual Studio Projects or databases, customers can now create, manage and analyze their entire application as a single resource group in a unified, customized experience, greatly reducing complexity while enabling scale.

Visual Studio Online. Microsoft announced key enhancements through the Microsoft Azure Preview Portal. This includes Team Projects supporting greater agility for application lifecycle management and the lightweight editor code-named "Monaco" for modifying and committing Web project code changes without leaving Azure. Also included is Application Insights, an analytics solution that collects telemetry data such as availability, performance and usage information to track an application's health. Visual Studio integration enables developers to surface this data from new applications with a single click.

Resource group is a new concept in Azure that serves as the lifecycle boundary for all of its resources.

blade is opened. Blades are your entry point to discovering insights, performing actions and building applications. This particular blade collects input from you to create a new Web App.

When you create an application that consists of several resources working together (like in this example, a Web app + SQL), it is always created in its own resource group so that you can manage the lifecycle of all related assets

Windows Azure Pack

Tuesday, January 13, 2015

Quick commands

1. wmic os get osarchitecture (get OS architecture)