Using Open Live Writer for writing blogs

Writing blog has always been one of my favorite hobby. I had been using Windows Live Writer for posting my ideas, thoughts and sharing my experience to the outside world. Recently I came around with another writer called Open Live Writer which can also be used for writing blogs. It is almost similar to Windows Live Writer. As a coder and blogger, I would like to share my experience of how you can get this writer and how you can embed your code snippet to your post.

The writer can be downloaded from the location. Once you download the writer, you will be asked to configure it to connect to your blog account. In my case I am using WordPress as my blog account. Once you have installed the writer, you need download the Source Code Snippet plugin from the following location. Thanks to the following link https://richhewlett.com/wlwsourcecodeplugin/live-writer-plugin-download/ from where I got the instruction of downloading the plugin and configuring it. Once you download the plugin, you need to unzip the plugin folder and copy the contents to any of your local directory folder.

image

Now you need to open your registry and follow the path HKEY_CURRENT_USER\Software\OpenLiveWriter\PluginAssemblies where you need to add a Key: SyntaxHighlight_WordPressCom_OLWPlugIn_V2.0.0 and Value: C:\OLWPlugin\SyntaxHighlight_WordPressCom_OLWPlugIn.dll. The value will be the folder path where the plugin files resides.

image

Next open the configuration file OpenLiveWriter.exe.config from the following location C:\Users\UserName\AppData\Local\OpenLiveWriter\app-0.6.2 and update the configuration file by adding <loadFromRemoteSources enabled=”true” /> at the runtime section.

image Once you complete this process, close the writer and reopen it. You will be able to view the Source Code Snippet plugin in the writer utility.

image

Hope this helps to all my fellow bloggers.

OctoWatch–a mobile app to monitor Octopus deployments

Check out the new open source native app that helps you to keep track of state of Octopus deployments on your machines. Here is the link to iTune for this app. This app has been build with React Native and TypeScript.

Here is the GitHub Url for the source code to OctoWatch https://github.com/OctopusDeploy/OctoWatch. Note that is only an iOS app.

Access Team City from Windows VM deployed in Azure through Public IP

There might be a situation where you are planning to have your DevOps Continuous Integration and Deployment processes to be implemented from a VM having Windows OS you have provisioned in Azure. This post mainly emphasize on how you can access your Team City from one of the VM commissioned in Azure through Public IP. Since I am not dealing with how to setup the Team City, hence I will skip the setup process and rather focus on the access over public IP. Please go through the step-by-step instructions.

Step 1: Add Inbound rules to the server firewall for allowing communications

Login to the VM and then access the Windows Firewall . Create a new Inbound rule.

image

Select Protocol and Ports and specify port 80 where the rule applies. The port 80 is the port that has been configured for your localhost when you had setup Team City which goes like http://localhost/login.html. You can assign any other port that you had configured with.

image

image

Select Allow Connection from the Action pane

image

Rest continue with the default option for the Profile and then provide a name for this Rule you have created and finish to add the new rule.

Step 2: Configure the Azure VM from the Azure Portal

Login to the portal and select the VM that you have created and select the IP address.

image

Provide a DNS name and assign to Static IP

image

Select the Network Security Group <VM_Name>.nsg assigned for the VM in order to allow traffic for port 80. Select the Inbound Security Rules and Add a rule.

image

While adding the rule, add the name of the rule, ensure that you have selected HTTP for Service and Action is Allow.

image

Once the rule is added, Redeploy the VM.

image

That’s it. Now you can provide the Team City URL http://<dns-name>/login.html and you will be able to view the Team City Login page through Internet.

Global Azure Boot Camp 2017, Austin TX

Here are some of the boot camp session and training videos from Global Azure Boot Camp 2017 that was held in Austin, Texas.  Thanks to my friend Shawn Weisfeld @Technical Evangelist at Microsoft who had helped me to organize this boot camp at Microsoft campus along with an awesome setup of streaming and recording this videos at UserGroup.tv. Shawn is the founder of UserGroup.tv.

Also my sincere thanks and gratitude to our local sponsors and contributor Clear Measure, Austin .NET User Group and my organization Sogeti USA LLC for helping me organize this event with eminent speakers, foods and beverages along with Microsoft global organizers.

Mostly I am thankful to the following eminent speakers and contributors for this boot camp

2017 Austin Global Azure Boot Camp Welcome Note

//player.vimeo.com/video/215095604

 

Azure Foundation

//player.vimeo.com/video/215097953

 

Making the Case for the ServiceBus

//player.vimeo.com/video/215098024

 

Making Teams Fly with Continuous Delivery to Azure

//player.vimeo.com/video/215094826

 

Introduction to Azure Security Center

//player.vimeo.com/video/215094742

 

Building Powerful intelligence using Cognitive Services

//player.vimeo.com/video/215095364

 

Big Data in Azure

//player.vimeo.com/video/215103496

 

2017 Austin Global Azure Bootcamp Closing Note

//player.vimeo.com/video/215102088

 

Enjoy the videos and happy Azure Learning

Build and Deploy Web Application and Web API as Azure Web App through VSO Continuous Integration

I thought to write this post which might help my fellow developers to know how to create a CI build for any web application or web API through Team Services of VSO. Just like in one of the post I have explained how we can create a NuGet package using CI build, this post might give more insight about building and deploying an web application directly to Azure using CI build. Let’s get through the steps involved.

Step 1: Install and configure Azure PowerShell

This step is highly important if you don’t have Azure PowerShell installed. The cmdlets of Azure PowerShell can be used to create/configure cloud apps/services, VM, virtual networks, etc. Download an install Azure PowerShell from this link.

Once installed open Windows PowerShell in administrative mode and run the following Azure PowerShell cmdlets to get details of your Azure subscription and resources available. Main that you need is your Subscription Name and Subscription Id.

Command to get Azure Account Information: Login-AzureRmAccount

image

Command to get Azure Resources available: Get-AzureRmResource

Command to get the Subscription Name and Id: Get-AzureRmSubscription

Command to get the Azure Publish Settings File: Get-AzurePublishSettingsFile

This command is important to get profile settings for publishing your web app in Azure. This will download the publish settings file along with the credentials in your local box.

SNAGHTML1b92cac

Step 2: Create New Service Endpoint in Team Services dashboard

This step will help us to register or add our Azure subscription to TFS. This is done only once and at collection level using the Service tab. Just select New Service Endpoint and select Azure Classic.

 

In Add New Azure Classic Connection choose Subscription Id and Subscription Name that you got from Azure Command Get-AzureRmSubscription. The Connection Name can be based on your preferred one. You can even open the downloaded Publish Settings file to get the Subscription Id and Subscription Name. Also from the file, copy the content of Management Certificate and paste it in place holder as shown below while creating the new Connection.

 

Now this service endpoint is ready to be used while publishing the azure web app.

Step 3: Configure the Build and Deployment properties of Team Project

Create the build definition file for the team project for which you want to instantiate the CI build at every check in process to source control. For that select Azure WebApp from the Deployment tab of Build Definition window.

 

As usual in Build definition created, update your Mapping information to point to source control repository of your solution in Repository Tab. Update your CI filter in Trigger tab to point to source control repository of your solution.

Next lets select the Build tab and select Azure Deployment. In details section, you need to select the new service endpoint created and select the Web App Name.

 

That’s all we need. Now you can queue the build to see how it works.

Build and Publish NuGet Package in Azure

Most of the time we would like to have our common library used by many applications. Integrating the library as a part of all the solutions is not ideal when the requirement is to have the common implementation used in various projects. NuGet helps us to create a separate package that can be used globally which serves the purpose of implementing the common functionality across all major solutions. Thinking on those lines, today I would like to share the idea of how we can achieve of building and publishing a library as a NuGet package using VSTS in Azure.

In one of my post I have already discussed about how we can create a NuGet repository in Azure. Lets have a look into a step-by-step process of how we can create a NuGet feed in Azure and publish the NuGet package for the library so that it is available in the feed.

Step 1: Create a NuGet Feed

VSO can be used to host a private NuGet feed and in order to do that first you need to install Package Management to VSO. It provides an extension that enables continuous delivery mechanism by hosting packages which will be available for consumption and usage by team, builds and releases. Once installed you can see a Package link against each Team project in your Team Services dashboard. If you already have the Package link, then don’t bother to install it again.

Once you have installed the Package Manager in VSO, you can then create a Feed using New feed which includes a Feed name and description for the feed.

Once done your feed is ready to upload packages.  You can also add the required permissions for those who you would like to authorize to upload packages into the feed.

Step 2: Create NuGet Packages of your Library

Once you are good with the feed, it is time for you to generate NuGet package for your library and publish it in your private hosted feed. In order to do that, add a NuGet project in your solution which contains the Library project.

Typically the structure would look like this which will also include the nuspec file for the library that you would like to create the package for.

Open the nuspec file and update the id, version, title, etc. along with project Uri of your NuGet repository. That Uri is not mandatory but it is better to keep it. Add the release path of the DLL and PDB file of the class library project whose package we want to create.

You can create more than one nuspec file which can be specific and related to multiple class library projects in your solution that can generate multiple NuGet packages to be hosted in NuGet repository. However it depends on your requirement.

Open the NuGet.config file and add the api key and package source for the NuGet package explorer. Again its not mandatory to do that as we are trying to automate the NuGet package development using VSO team service but for future reference purpose you can keep it.

That’s all you need to do. One more thing that you might have to do is open the NuGet project file in notepad or notepad++ and verify the settings of AfterBuild are same as below.

Step 3: Prepare your Build definition in Visual Studio Team Services

Select the team project in VSO which contains the library project and solution. Select the Build section and add a new Build definition for your library.

Select the build definition template Visual Studio.

While creating the Build definition, you would be prompted to select Continuous Integration (CI) build which means whenever you check in the code to source control, immediately this build will be triggered. It is a best option to do that when you have a requirement to create and deploy the NuGet package as soon as you check in your code to source control.

Once the Build definition is created for the team project, you will see the sequential order of how the build will happen through VSO. The steps involved are:

  1. Restore the NuGet version
  2. Build the Solution
  3. Test the Assemblies and execute the Test projects
  4. Publish the files and index the source code
  5. Copy the published files to artifacts staging directory
  6. Publish the artifacts and drop it to the server.

What we need to include is another step to to publish the NuGet package to the private hosted NuGet feed as soon as the solution build is complete which means in between Step 2 and 3.

In order to do that we need to add a build step of publishing the NuGet package to the feed. Select Add Tasks and add NuGet Publisher from all the listed tasks available.

Once added, drag the NuGet Publisher just after the Build Solution step so that once the project is successfully build, it will publish the generated NuGet.

Once done, lets review the following definitions Build, Repository, Variables and Triggers.

Build Definition Tab

Select Feed Type as Internal Feed and add the Internal Feed Url that we have created in our Step 1 in our NuGet publisher build step.

Repository Tab

Verify the mapping information of the server path to the source location of the project of Team explorer is correct. This can be validated in Repository tab of Build definition.

Variables Tab

Add a variable which will represent the API key to access the NuGet feed and authorize the user to upload the package. This is important as we don’t want any unauthorized user to upload anything to the private feed.

Trigger Build

Verify that CI build include the repository path of the solution from where the NuGet packages are going to get created.

That’s all and we are done. Its is time to validate and trigger a build to check if everything is working as per expectations.

Click on Queue build…. and verify how things are going.

Hope that this will help my fellow developers to Create and publish NuGet packages in Azure.