Build Azure

In the early days of Microsoft Azure, back in 2010 when it was called Windows Azure, Microsoft had announced plans to make the Azure services available to be run / hosted in on-premises datacenter. Shortly after the announcement they released Azure Pack which wasn’t quite what we had all hoped for. Then about 2 years ago, Microsoft started talking about “Azure in your datacenter” again! The started talking about this new product offering called Azure Stack. We’ve seen a couple technical previews of Azure Stack so far, but not much in the way of a GA (Generally Available) release. That is until now. This week, Microsoft announced that in coordination with hardware OEMs you can now order Azure Stack integrated system hardware, with the first systems beginning to ship in September. There is also some pricing information, and an Azure Stack Development Kit (ASDK) being made available.

This is an…

View original post 291 more words

So this week Visual Studio Team Services build and release saved me and my team.

At our company we have configured an on premise continuous integration server along with build agents using TeamCity which is a product from JetBrains. TeamCity Professional is actually a free application that allows you to run 3 build agents. The only cost is the associated hardware and Windows licensing. I fell in love with TeamCity years ago when I set it up at our company and it’s been a very stable and a versatile CI server since. However this week I ran into some issues with our TeamCity server and the fact that it was on premise only added to the problem. Let me explain.

Our build server physical infrastructure is actually located offsite from our office (along with other dev/qa servers), so when I say on premise I really means its dedicated hardware that we own and not up in the cloud. The situation we ran into is that our TeamCity server didn’t restart properly and was unavailable by remote access by the ITOPS team, this meant someone had to go to the offsite location and reboot the server. Now you might be wondering, why don’t you have a backup…a good question and something I’ll be looking into.

What made matters worse is that we we’re nearing the end of a regression cycle and we wanted to deploy later this week. So having our build server drop off the grid was just bad timing and it meant DEV and QA were in a holding pattern while we waited for our build server to be brought back up and hopefully it was ok and not corrupted or worse.

While we waited for our build server to be restarted I started thinking about worse case scenarios like what if our build server is dead and we need to rebuild or restore from a backup (and what do you know it was out of date). None of these options can be done quickly and they require unplanned resources from the ITOPS team and myself.

Having already explored Visual Studio Team Services (VSTS) build and release services for my personal development and that of our Live .NET logging tool ReflectInsight, I knew I could easily and quickly get one of our applications setup in that continuous integration pipeline. You will actually be shocked at how quickly I got things going.

Our current build process typically builds the solution, runs unit tests, creates a nuget package and then finally publishes the nuget package to an internal nuget repository that is part of TeamCity. We then have an automated deployment service called Octopus Deploy that picks up this package and can then deploy to any of our QA and/or production systems. Since our TeamCity server is offline, I would need to publish the nuget package to another destination for the time being. I decided to create an Azure Storage account and then copy the nuget package there. I could then pull the nuget package down and manually upload to our Octopus Deploy server.

To get started I headed over to my Visual Studio Team Services account I had setup with my MSDN subscription and I then created a new project to contain my builds. I then clicked on the Build & Release tab and then clicked on the New button to create a new build definition:

image

I then clicked on the ASP.NET (PREVIEW) featured template:

image

I then configured the Get sources task to point to our GitHub repository and then I added in the last two steps for generating a NuGet package and to copy the generated NuGet package to an Azure Storage account:

image

I wont go into detail for each of these build tasks as their pretty straight forward, but after I had everything setup and tested, I looked at the clock and it was under 15 min from start to finish. That is something I could never have done in our existing on premise build infrastructure and it now looks like I have my backup solution.

One of the nice things about using the hosted agent in VSTS is that it’s located in Azure and its a service that is managed by the Azure team. This means I spend more time focusing on developing my applications and less time worrying about managing the associated build infrastructure and what happens if a server goes down, performing backups, restores and that all hands on deck feeling when your infrastructure goes down at the worse possible time.

Enjoy!

References

TeamCity

Visual Studio Team Services

Azure Storage Explorer

Octopus Deploy

This post will guide you on how to build an Angular 4 app using Visual Studio Team Services and then deploy it to an Azure App Service instance.

So let’s review what we’ll need before we begin:

  1. You will be required to have an active Visual Studio Team Services account. If you don’t have one you can signup for free here.
  2. You will also need to have an active Azure subscription. If you don’t have one you can signup for a free trial here.

Now that we have met the requirements, let’s get started.

Create a new build definition

We will start by signing into your Visual Studio Team Services account and then navigating to the Build & Release tab from the top navigation links to create a build. From here we will click on the New button to define a new build definition.

image

Next you will choose a template to use for your build. There are a lot of build templates so take a look at what’s available and choose what is most appropriate for your needs. If you don’t see what you want, you can always choose the empty template which is what I’m going to do now and then add the necessary build tasks that make sense for you.

image

After selecting the empty template you will want to name your build definition, connect your source code repository (Github, Visual Studio Team Services, other) and then start adding build tasks:

image

Click on the Get sources link on the left side to wire up your source code for the build. In this demo I’m connecting to my personal Github repository:

image

Now that we have our source code wired up, you’re ready to start defining your build tasks.

Defining your build process tasks

Now that we have our build definition configured to our source repository, it’s time to start adding build process tasks. To do this we click on the Add Task button from the left which will then present a listing of available build tasks (some of which are in preview):

image

In this post I want to build an Angular app, so I will need to use an npm build task. Using the search box I will type in npm and the listing will then filter out to only show me any npm build tasks. At this time there is one, so I will click on it and then the Add button to add it to my build process:

image

This will be the configuration for our npm install task:

image

Next we will need to add another npm build task for running the Angular CLI build command ng build. This will be the configuration for our npm run task:

image

At this point our build is installing all necessary npm packages and then running an npm command to build the Angular app. Once the app is built, I like to archive the build artifacts in a ZIP file. This will be our configuration for our archive files build task:

image

Finally we will deploy our app to an Azure App Service instance. To do this you will want to have your Azure App Service already pre-configured. You can checkout this post for details on creating an Azure App Service.

This will be our configuration for our Azure App Service Deployment build task. There are 3 settings you need to set:

  1. Select you Azure subscription
  2. Select your App Service name
  3. Select the package or folder you wish to deploy

image

Here is a review of the build tasks we created above:

image

Queue a new build

Once we have our build process defined we can kick off a new build by clicking on the Queue button on the top toolbar:

image

This will being up the queue build modal where you can define the agent queue to use, the branch to build or a specific commit along with defining build variables, etc. I will select the Hosted agent queue and my master branch. I will then click on the Queue button to initiate the build:

image

For more information on the differences between the hosted agents, checkout this link for further details.

You should now notice that your build is now queued:

image

Viewing your build process

You can click on your build at anytime and see detailed output for what is happening during the build process along with view and/or download detailed log files:

image

Voila, our build is now finished:

image

Visual Studio Team Services build can also be configured to send out an email when builds succeed and/or fail:

image 

Now that I have a successful build, lets browse and take a look at our deployed Angular app: http://blog-angular-deployment.azurewebsites.net/ .

Wrap up

I hope this post helps your build and deploy your Angular apps to Azure. As you can see it’s very straight forward to setup and requires no build infrastructure on your end to make it happen.

Enjoy!

References

Azure free trial

Visual Studio Team Services

Build and release tasks

Hosted agents

Angular

Angular CLI

El Bruno

Hello!

A few days ago I was asked about an easy way to create audio files to be used as datasets in Custom Speech Service (CRIS). As I mentioned in a previous post, the audio files must have special features, so it is important to create them correctly.

Note: the files are WAVs files, mono and another pair of details makes it not easy to create them in a single step.

Although there are several ways to create these files, this is the one I use and it works.

  • To record the audio I use an app that comes by default in Windows: Voice Recorder

Clipboard02

  • I guess I don’t need to explain how the app works. Just press the microphone button. Nor do we expect many options in the Settings section.

Clipboard03

  • Once we have recorded a session, we can access the list of recordings. If we see the record path…

View original post 186 more words

Build Azure

DocumentDB has been around for awhile now in Microsoft Azure. It’s a Document based, NoSQL database in the cloud. There’s been tons of advancements to the service over time, including MongoDB API support so you can use it in place of MongoDB for existing code bases. It’s always been called “DocumentDB” since initial release of the service, but for a time it was labeled as “NoSQL (DocumentDB)” in the Azure Portal. It seems there was some indication that Microsoft wasn’t happy with the name they first chose.

Today, we wake up in the morning to updates that have been made to the Azure Portal where DocumentDB is no longer there. Well, it actually is there, but has undergone renaming / rebranding. From this day forward, DocumentDB will no longer be called DocumentDB. Instead we will call this NoSQL, Document based database service….. Azure Cosmos DB.

From this day forward, DocumentDB…

View original post 388 more words

The following are a few tips for managing your Azure subscription. Start by navigating to the Subscription blade and then click on a Subscription you wish to manage:

image

From here you have a clear overview of your Subscription ID and the current spending with a breakdown by resource.

Renaming your subscription

To rename your Subscription, in my case I want to change it from “BizSpark-$70” to “MSDN-Professional-$70” as that is a new MSDN subscription I purchased and changing the name properly reflects that subscription and the Azure credits associated with it.

To rename the Subscription, click on the Subscription name:

image

You can now enter in a new Subscription name and when you’re done click on the Save button. The subscription name change can take up to 10 minutes to be reflected on the Azure portal.

image

After the subscription has successfully been renamed, you’ll receive an alert:

image

Configuring email invoices

The Azure portal recently allowed you to opt in and configure email invoices. This means instead of receiving an email each month that your invoice is ready which required you to login to the Azure portal, now you can have the invoice emailed to you instead, which is awesome!

If you haven’t already setup email invoices, from the Azure Subscription blade, click on Invoices:

image

From the Invoices blade, you can now click on the Invoices button and then from here you can opt-in and configure it:

image

If you already opted in, you can review your current configuration and also configure the list of recipients (maybe you want the invoice sent to your accounting department also). When done, click the Done button at the bottom:

image

Enjoy!

Resources

Azure Portal

There is a new release of SQL Server Management Studio (SSMS) now available – version 17.0. It feels like yesterday when SSMS 16 was released (June 2016). I’m not going to complain as it’s refreshing to see such the constant updates to SSMS now that it’s not tied in with the database engine installer.

To get the latest version, head to the download page and install the web-installer. SSMS 17 will install side-by side with previous versions of SSMS.

This latest release includes a lot of new functionality, namely with support for connecting to SQL Server on Linux. Please see the full SSMS changelog for a complete listing of enhancements and bug fixes. Sadly this release still doesn’t support the Dark theme. Hopefully this is something they add in a future release.

Installing SSMS 17:

sshot-280

Updated splash screen:

image

SSMS 17 icons have been updated to be consistent with VS Shell provided icons and support High DPI resolutions:

sshot-284

One of the nice additions to this release is the inclusion of “Presentation Mode”. There are 3 new tasks available via the Quick Launch (Ctr-Q):

  • PresentOn – Turns on presentation mode where the editor and environment fonts are larger
  • PresentEdit – Allows you to edit the presentation font sizes
  • RestoreDefaultFonts – Reverts back to the default settings

If you  are familiar with these commands in Visual Studio then you will  notice that there is currently no PresentOff command. Use RestoreDefaultFonts to turn off Presentation Mode.

Enjoy!

References

Download SSMS
Download SQL Server Data Tools (SSDT)
SSMS Changelog
SSMS Release Notes

Ken Cenerelli

My life in software development

scomfaq.wordpress.com/

Things about System Center and Cloud...

Build HoloLens

All about HoloLens

DevDays®

For web designers and cloud developers

Build Azure

All about the Microsoft Cloud

vishal patel

Software Developer, Windows 8 and Windows Phone Enthusiast

SQL with Manoj

SQL Server (TSQL) Programming, DB concepts, Tips & Tricks with >400 articles... comments welcome!!!

dragablz.wordpress.com/

Dragable, tearable, dockable WPF TabControl. Open source to boot.

Adrian Hall

Because Developers are Awesome

Ratish Philip's Blog

Another adventure in code...

codematrix

Application Architecture at it's best

One Unicorn

Thoughts from one member of the Entity Framework team...

Rachel Lim's Blog

Simplifying programming into something I can understand

.NET Developer's Blog

Software Development, Flying and Life

The Flying Maverick

Software Development, Flying and Life

Hiking Photography

Beautiful photos of hiking and other outdoor adventures.

paint.net blog

The best free image and photo editor. By Rick Brewster.

Learning by Shipping

products, development, management...

Nassau Boy's Trading Thoughts

Never Mind the Noise in the Market, Just Mind the Price of the Fish

%d bloggers like this: