Demystifying .NET Core SDK versions

Marco Mansi

Last night I was developing some code in .NET Core for the Dutch Azure Meetup and I was (again) encountering versioning problems and unexpected behavior.

I found this blog post which describes in some way the same problem I had.

Update 13-01-2017: I found this blog which also describes very well the issue.

What the blog post says is that if you use:

dotnet new

and you want use a specific version of .NET Core SDK you should add a global.json file (before executing the “dotnet new” command) like this:

{
 "sdk": {
 "version": "1.0.0-preview2-003121"
 }
}

The SDK’s in Windows are installed in the Program Files folder (or Program Files (x86) if you have a 32bit Windows) so let’s take a look there:

 Read more

Remove locks from Azure resources

pgroenewegen@xpirit.com

In my previous blog post Lock Azure resources to prevent accidental deletion, I showed how to add a lock to a resource with an ARM template to protect it from accidental deletion. When you want to delete the resource, you first need to remove the lock. A lock cannot be removed with an ARM template. To remove the lock you can use:

 Read more

Lock Azure resources to prevent accidental deletion

pgroenewegen@xpirit.com

In some cases you want to protect critical resources from accidental deletion. Some examples are a storage account with source data for processing, a Key Vault with disk encryption keys, or another key component in your infrastructure. When losing some resources that are key in your infrastructure, recovery can be dramatic. Resource Manager locks will enable you to protect these critical resources from deletion.

 Read more

Created an open source VSTS build & release task for Sitecore.Ship

Geert van der Cruijsen

At my current customer we’re implementing an Azure environment which also contains a Sitecore application. We’re using VSTS to for all aspects of the application development lifecycle from agile planning to source control and automated builds & releases. In the release pipeline we can use the out of the box Azure web deploy build steps to deploy our code to our web app which is a Sitecore instance. The next step is to be able to also deploy the Sitecore content we created as code using TDS to our Sitecore Site.

Sitecore.Ship is an open source project which makes it easy to deploy Sitecore .Update files to your Sitecore Instance. It is created by Kevin Obee and it can be found here on Github

in our Build we build our TDS projects using MSBuild to generate .Update files which we can then deploy in our release pipeline to Sitecore. There was one problem however which was that there was no build task to do this. Since my role at my current client is supporting all the development teams in improving their continuous delivery process i decided to create a task to make their life easier.

sitecoreship

Sitecore.Ship build task

You can download the build task now in the VSTS marketplace.

To be able to upload your .update files using Sitecore.Ship you have to install Sitecore.Ship on your Sitecore instance first. when you’ve done that don’t forget to whitelist the IP address of your build server in the web.config so Sitecore.Ship will allow your build server to do the deployment.

After that add my Sitecore Ship VSTS task to your workflow, select the .update file and the URL of your Sitecore site and you’re done.

The task works for both VSTS and TFS 2015/2017 and works for your sitecore site hosted on prem or in Azure.

2

Open Source

Of course this VSTS task is open source and the source can be found here on Github

the tasks is uploading the sitecore packages through powershell. even if you are not using powershell you might want to use this piece of powershell if you want to upload things to Sitecore using Sitecore.Ship manually. The script is quite basic setting up a httpclient that sends the files to Sitecore through http Post.

If you want to run the powershell script manually you have to replace to 2 lines that retrieve the parameters from the build task to parameters that are sent to the script.

This is the first VSTS build task i’ve created so please let me know if you like it or if you have feedback in improving this task by leaving a comment here or on Github.

also check out one of the many other VSTS build tasks made by my colleagues from Xpirit

Happy deploying!

Geert van der Cruijsen

The post Created an open source VSTS build & release task for Sitecore.Ship appeared first on Mobile First Cloud First.

Matching strings in Scala

Arnout Engelen

Over December I had a lot of fun doing the Advent of Code coding challenges with some colleagues.

Many of those, such as day 21, require interpreting some kind of string input. While normally I'd probably marshall those strings into case classes before processing, in this case that seemed like overkill: a quick pattern-match should be sufficient.

It turns out there's a couple of ways to approach that, which is also a good excuse to look under the hood and see which Scala concepts they're built on.

 Read more

A Guide to Generating Boring Code with Node

wvenema@xebia.com

Writing boring code is not fun. Especially if that code is just a derivative of some data. You should generate it instead! A great example is to generate your HTTP client code from an API definition. This is actually very easy to do with a recent node version and requires almost no extra dependencies. In this post I will show you how to take a JSON schema definition and generate some validation logic from that.

Read more

The Best New Years Resolution: Agile Product Management

Chris Lukassen

Agile Product Management is grounded in the Jobs to be done theory and Lean startup principles. In my book “The Product Samurai” I described how you can effectively apply these techniques to be a better Product Manager, but what I didn’t’ cover was why not everybody is doing this already?

Making up for that, and unveiling the seed conditions for the next level of Product Management, I am pleased to give you the best new years resolution: Agile Product Management

 Read more

Being An Agile Security Officer: Security Stakeholdership mindset

Dave van Stein

This is the second part in my blog series about 'being an agile security officer'. In this blog I will focus on the mindset of security stakeholdership in Agile and DevOps environments.

In the Agile world the Product Owner is the person who translates business and customer desires into work items (user stories) for the teams. The actual desires and requirements however are provided by stakeholders. Stakeholders are usually representatives of the business and end-users; in the new world security officers should start taking up the role of security stakeholders. The Product Owner usually has multiple stakeholders to take into consideration. As a security stakeholder you have to 'compete' with other stakeholders for the most valuable changes. It has become, more than ever, important to be able to translate your requirements into actual value.

 Read more

Enterprise Azure ARM Templates

Lately I’ve given many workshops to all kinds of customers of my employer Xpirit about the automatic deployment of Azure resources. Mainly with VSTS.

I noticed customers would like to have ready to use ARM Templates.

resource-groupOf course there are the valuable Azure Quickstart templates (or via the portal)  which I use a lot. Sometimes these templates offer a complete solution. Mainly I use these templates to have, as the name tells, a quick start, for creating ARM templates fast.

Another way to get the ARM Template you wish is to download it after creating a resource through the Azure portal. These generated ARM Templates are nice for a reference, but are too generic. To use these templates in your automatic deployment pipeline you will have some work to do.

Besides this, I create ARM Templates a lot lately. For demo’s and for the Dutch Azure Meetup. I would like to reuse the templates easier myself and offer these templates to the community.

For these reasons I decided to start collecting the ARM Templates I have used to create resources in Azure. You can find the ARM Templates here. The templates are meant to be used right away.

For now ARM templates can be used per Resource type. You can use two types of ARM templates for the same resource.

One standard version where the user of the template decides what the name of the created resource will be.

Most enterprises I’ve visited don’t want to think about the way resources are named in Azure, but wants a consistent way of naming. When it’s possible to pass a name to a resource, they will end up with all kinds of naming conventions. For this reason the ARM templates are offered with a namingconvention also. This version of the Enterprise ARM templates passes metadata to tags of the resources also.

Solve 401 (Unauthorized) error when restoring packages using VSTS Package Management and .NET Core

Marco Mansi

For the quick answer jump directly to the conclusion

Yesterday I was setting up the build for an ASP .NET Core (Web API) application I wrote, this application was using a package from the VSTS Package Management repository.

To setup this build I was using the new dotnet Core tooling (in preview) which is available when creating a new Build Definition:

 Read more