Azure Functions

So I have really gotten into Azure Functions of late and reading about some very clever usages of them, more on that later in another blog post coming soon.

I have also just completed a demo order pipeline using Azure Functions which I learned about from a Pluralsight course by Mark Heath called Azure Functions Fundamentals (highly recommended).

During this you build an order pipeline so you use Postman to send an example order in JSON to your azure function(s) which does a number of things, over the course you’ll add an order to Azure Table Storage, add the order to an Azure Storage Queue, generate a license file using Azure Blob Storage and the generate an email and send the license file using SendGrid a 3rd party email provider.

Then you can use the Azure Table Storage Explorer tool to look into what you’ve managed to create within your tables in Azure Storage.

What I like about this Pluralsight course is that I’m learning and also getting to see great demos of how to go about creating azure functions and using them for real scenarios all be it the code isn’t obviously production ready but its all about the learning at the moment.

I haven’t finished this course yet but I will soon and more blog posts will follow, off the back of this course I am hoping to do a talk on FaaS and Azure Functions at work this coming March.


Tags:


What have I learned so far with Azure?

So I have been getting my hands on Azure recently and just wanted to blog about what I have learned so far so here goes (condensed version as wanting to get back to learning way more)

 

App Service Plans

  • What the different levels are Basic, Standard and Premium and what the differences are.
  • App service plans govern how you pay for it
  • Scale out – beef up the VM or the server
  • Scale up – run more than one instance etc.
  • You can have staging environments and automated backups
  • Consumption plan – only pay for what u use

What is Serverless?

  • There are still servers of course – you delegate the management of them to third party offerings
  • Use third party Paas wherever possible (for example documentDB)
  • Run your custom code on Azure Functions
    – respond to events
    – let the framework work out how many servers you need
    – Functions as a Service (FaaS)

Benefits of Azure functions?

  • Rapid and simple development module
  • Code it within the portal
  • Eliminate boilerplate
  • Extremely reach feature set
  • CI, Kudu, Easy Auth, Certs, Custom Domains, Settings etc. all included
  • Cost effective pricing – only pay for what you use
  • No servers to maintain
  • Automatic scaling

Next up is Azure Functions…

 

 

 


Tags:


Azure Learning plan

It’s time I got stuck into a learning plan and I’ve decided to start with Azure, something I really want to get my hands on more and use day to day.

My Azure Learning plan looks like this:-

Section 1: Basics of Cloud Computing and Azure Overview
In this section we will see what is cloud computing and its acronyms concepts. At the end, the video provide an overview on Microsoft Azure.
• The Course Overview
• Cloud Computing Acronyms and Concepts
• Microsoft Azure Overview
1.1 The Course Overview
This video will an overview on the entire course
1.2 Cloud Computing Acronyms and Concepts
In this video, we are going to take a look at several Cloud Computing Acronyms and Concepts.
• Understand Private Cloud, Public Cloud, and Hybrid Cloud
• Get to know IaaS, PaaS, SaaS, DRaaS, and BaaS
• Describe several cloud computing characteristics (Scalability, High Availability, Cost, Pay per use,…)
1.3 Microsoft Azure Overview
This video gives a high-level overview of the Microsoft Azure public cloud platform.
• Know the concepts of the Microsoft Azure datacentre’s
• Get an overview of Microsoft Azure components and Services
• Understand the different Azure platforms, Azure Service Manager, and Azure Resource Manager

Section 2: Introducing Azure Subscriptions
This section introduces us to the Azure subscriptions and helps us to deploy an Azure trial subscription.
• Azure Subscriptions
• Deploying an Azure Trial Subscription
2.1 Azure Subscriptions
This video will an overview on the entire course
2.2 Deploying an Azure Trial Subscription
In this video, we are going to take a look at what it takes to deploy an Azure trial subscription.
• Get free trial subscription details
• Know the description of ‘other’ free Azure resources that you can use without a cost
• Watch a walk through demo on how to set up your trial Azure environment

Section 3: Introduction to Microsoft Azure Management Portals
In this section we will be exploring Azure portals also further the videos explains Azure Management tools in detail.
• Exploring the Azure Portals
• Azure Management Tools
3.1 Exploring the Azure Portals
This video will an overview on the entire course.
• Understand what lists are
• See when lists are used
• Learn how to perform data manipulation with lists

3.2 Azure Management Tools
In this video, we are going to take a look at the main differences between the Azure Classic Portal and the Azure Resource Manager Portal.
• Explore the Azure Classic Portal
• Explore the Azure Resource Manager Portal
• Watch a demo on Azure portals

Section 4: Implementing an Azure Virtual Machine Architecture
This section defines the architectural design of the Azure VM and how to deploy it.
• Azure VM Architectural Design
• Deploying Your First Azure Virtual Machine
• Deploying a More Complex Azure VM Architecture
• Handling Azure VM High Availability
4.1 Azure VM Architectural Design
In this video, we are going to take a look at the following: (a) Azure Resource Groups (b)Azure Virtual Network (c)Azure Storage Azure Virtual Machines.
• Get to know what are Resource Groups and how to architect them
• Understand the different Azure Storage accounts and their characteristics, and the highlights of Azure VNets
• Know the Azure Virtual Machine sizes and different images available today
4.2 Deploying Your First Azure Virtual Machine
In this section, we are going to take a look at Azure Virtual machines, going through different aspects of the creation process, deployment, and management.
• Take a walk through of what settings and parameters are required for successful deployment of an Azure VM
• Get to know what are the key Azure Virtual Machine requirements (Basics, VM size, settings and optional features)
• Understand how to deploy and manage your first Azure VM: demo walk through
4.3 Deploying a More Complex Azure VM Architecture
This video has three main sections, helping you in understanding how to deploy more complex Azure VM architectures. It will make clear most of the deployment process in Azure relies on automation and scripts.
• Explain the Azure MarketPlace templates
• Uncover the GitHub Azure QuickStart templates
• Use Visual Studio to automate your Azure VM architecture deployment process
4.4 Handling Azure VM High Availability
In this video, we discuss two prime features of Azure public cloud, allowing for a high available Azure VM architecture.
• Explain Azure Virtual Machine High Availability SLAs
• Get to know what are Azure Availability Sets and why to use them
• Demo walk through configuring Azure Availability Sets

Section 5: Azure Resource Manager (ARM) Templates
In this section we will learn what Azure Resources are and how to create customized ARM templates.
• Deploying Azure Resources from Community Templates
• Creating Your Own Customized ARM Templates
• Automating Azure VM Deployment Using Configuration Management
5.1 Deploying Azure Resources from Community Templates

In this video, you will learn the following: (a) The structure of an ARM template (b) Deployment from GitHub QuickStart Templates Deployment from Azure QuickStart Templates on azure.com
• Know what is the purpose of an Azure ARM template, and how is it structured
• Understand the key aspects of deployment of Azure Resources from the GitHub published QuickStart Templates
• Learn the key aspects of deploying Azure Resources from the Azure.com templates gallery
5.2 Creating Your Own Customized ARM Templates
This video is all about learning to build your own customized Azure ARM templates from Visual Studio
• Get an overview of the creation process in Visual Studio
• Demo walk through on how to create an Azure ARM template out of Visual Studio
• Deploy Azure Resources using automation
5.3 Automating Azure VM Deployment Using Configuration Management
In this video, we are going to take a look at what Azure VM Configuration Management means, discussing several of these Configuration Management tools, describing PowerShell DSC, Azure VM Extensions, and highlighting Chef and Puppet
• Learn the different definitions of Configuration Management and several well-known Configuration Management tools
• Get an overview of PowerShell DSC and VM Extensions in general and observe a demo on PowerShell DSC
• Do a walk through of Chef and Puppet

Section 6: Implementing Azure Identity
This section gives detailed explanation on deploying, creating and integrating Azure directory.
• Deploying Azure Active Directory
• Integrating On-Premises Active Directory with Azure AD
• Advanced Features of Azure Active Directory
• Integrating Azure AD with SaaS Applications
• Azure Active Directory Application Proxy
6.1 Deploying Azure Active Directory
This video is all about Azure Active Directory; starting from what exactly Azure Active Directory is, you’ll learn about the different versions and SKUs; we’ll quickly touch on Azure AD Domain Services, B2B, and B2C and close this video with a deployment walk through.
• Get to know what is Azure Active Directory
• Understand the Azure Active Directory versions, SKUs, and the differences between them
• Get an overview of Azure AD Domain Services, B2B, and B2C scenarios
6.2 Integrating On-Premises Active Directory with Azure AD
This video clearly teaches you how to establish a hybrid Azure identity solution, integrating cloud with on-premises Active Directory.
• Get to know what is the Azure AD Connect tool and how to use it.
• Understand what is Active Directory Federation Services (ADFS)
• Watch a demo on AD Connect in action
6.3 Advanced Features of Azure Active Directory
In this video, I’ll discuss several advanced features of Azure Active Directory
• Understand Multi-Factor Authentication (MFA)
• Know the company branding
• Get know what is advanced reporting
6.4 Integrating Azure AD with SaaS Applications
In this video, we are going to take a look at the current issue with using multiple identities and where Azure Active Directory can be of help.
• Understand the challenges with SaaS applications and authentication handling
• Get to know the use of Azure Active Directory help in optimization and streamlining cloud authentication and identity
• Understand what is the Azure Access Panel and how to enable and use it
6.5 Integrating Azure AD with SaaS Applications
In this video, we are going to take a look at the current issue with using multiple identities and where Azure Active Directory can be of help.
• Understand the challenges with SaaS applications and authentication handling
• Get to know the use of Azure Active Directory help in optimization and streamlining cloud authentication and identity
• Understand what is the Azure Access Panel and how to enable and use it

Section 7: Azure Monitoring and Diagnostics
In this section we will learn about Azure monitoring and operation management suite, also we will explore Azure application insights.
• Azure Built-In Monitoring
• Operations Management Suite
7.1 Azure Built-In Monitoring
In this video, we are going to take a look at several concepts around Azure monitoring and diagnostics
• Get to know the built-in monitoring features Azure provides
• Understand Azure Service Health and Azure Boot Diagnostics
• Learn how to configure alert notifications and customize your monitoring
7.2 Operations Management Suite
Even with several built-in monitoring and diagnostics features, Azure is sometimes limited in output, especially in a hybrid or enterprise oriented environment. That’s where Operations Management Suite (OMS) comes to the rescue!
• Understand what is Operations Management Suite (OMS) and how to deploy it
• Extend Operations Management Suite with Solution Packs
• Use OMS Log Search and Log Analytics

Section 8: Azure Disaster Recovery Solutions
This section gives thorough explanation on Implementing Azure for Azure VMs. The section also further explains the concept Azure Site Recovery (ASR)
• Implementing Azure Backup for Azure VMs
• Implementing Azure Backup (Hybrid)
• Azure Site Recovery (ASR) in Hyper-V and Non-Hyper-V Scenarios
8.1 Implementing Azure Backup for Azure VMs
Backup is still a vital point in providing a system’s high availability and disaster recovery, even when running as a public cloud virtual machine. While the Azure platform provides excellent uptime compared to most on-premises datacenters, one should not forget to take backup into account.
• Understand why we use backups for Azure Virtual Machines
• Know how to configure Azure Backups of Azure VMs, as well as how to restore an Azure VM
• Demo walk through the backup and restore operation
8.2 Implementing Azure Backup (Hybrid)
This video will teach you all about using Azure backup in a hybrid topology setup, mainly using Azure Backup solution as a target for your on-premises backups.
• Get to know what does it take to use Azure as a backup target
• Deploy Azure Backup (agent-based) and deploy Azure Backup Server
• Watch a demo on implementing Azure backup in a hybrid scenario
8.3 Azure Site Recovery (ASR) in Hyper-V and Non-Hyper-V Scenarios
Azure Site Recovery (ASR) provides organizations with a true disaster/recovery solution for VM workloads, no matter where they are running. Using an intelligent “write change” replication, an async copy of your VMs are available in Azure and provide RPO/RTO of minutes instead of hours in most other DR solutions.
• Understand what is Azure Site Recovery (ASR)
• Deploy ASR for Hyper-V workloads
• Deploy ASR for non-Hyper-V workloads (Amazon AWS, VMware, Azure Classic VMs, and physical servers)

Section 9: Creating and Managing SQL Services in Azure
This section explores on creating and deploying SQL Azure. At the end, the section gives an overview on managing the SQL server and databases running in Azure.
• Deploying SQL VM Solutions
• Creating a SQL Azure DB Solution (PaaS)
• Managing SQL Server and Databases Running in Azure
• SQL Database (Backup and Restore)
9.1 Deploying SQL VM Solutions
This video is oriented around using the Azure infrastructure (IaaS) platform, to deploy Virtual Machines running SQL Server.
• Know what SQL Server VM Solutions can be deployed in Azure
• Understand how to deploy SQL Server VM solutions from an Azure ARM template
• Watch a demo on how to deploy SQL Server VM from a template in the Azure Portal
9.2 Creating a SQL Azure DB Solution (PaaS)
This video explains the core concepts of using SQL Azure hosted databases, relying on the PaaS aspect of Azure platform. Hosting SQL databases in Azure gives you a lot of flexibility and scalability out of the box, which makes it an ideal candidate for public cloud.
• Understand what are the main differences between SQL Server VM and SQL Azure
• Deploy a SQL Azure database solution
• Explain Azure SQL Database Tiers
9.3 Managing SQL Server and Databases Running in Azure

This video combines the management aspect of SQL databases, irrelevant from where they are running (on-premises, in-Azure VMs, or in-Azure PaaS)
• Learn how to manage SQL Server VM solutions running in Azure
• Learn what it takes to manage your SQL Azure hosted databases
• Demo
9.4 SQL Database (Backup and Restore)
This video details the flexibility of using Azure for storing your SQL database backups.
• Get to know how to integrate SQL Server VM Solutions’ backups with Azure
• Understand how to manage SQL Azure database backups
• Watch a demo on SQL backup and restore with the help of Azure platform services

Section 10: Implementing Azure Web Apps
In this section, we will see an overview on Azure Web Apps and plans. Further, we will learn building scalable Web App Solutions.
• Azure Web Apps and Plans – An Overview
• Deploying Web Apps
• Configuring Azure Web Apps Settings
• Azure Web Apps Monitoring and Diagnostics
• Building Scalable Web App Solutions
10.1 Azure Web Apps and Plans – An Overview
This video is part of a larger section, in which you’ll learn about Azure platform services. The key components you’ll see are Web Apps, Mobile Apps, and Logic Apps. This first video focuses on Azure Web Apps and how to deploy and manage them.
• Get an overview of Azure Web Apps and Web Apps Services
• Understand why we use Azure Web Apps
• Get to know the different Azure Web Apps plans available today
10.2 Deploying Web Apps
In this video, we are going to take a look at what it takes to deploy Azure Web Apps.
• Learn to deploy Azure Web Apps from the Azure Portal
• Learn to deploy Azure Web Apps from Visual Studio
• Learn the different ways to publish Web App content
10.3 Configuring Azure Web Apps Settings
This video is all about the configuration settings of an Azure Web App (and thus all other Azure App services if you want).
• Configure the Web Apps general settings
• Configure Web Apps authentication and authorization
• Perform Web Apps backups and manage SSL certificates
10.4 Azure Web Apps Monitoring and Diagnostics
We already discussed Azure monitoring and diagnostics in a previous video; but this one is specifically around Azure App Services monitoring
• Monitor Azure App Services from the Azure Resource Manager Portal
• Use specific monitoring and diagnostics for Azure Web Apps
• Uncover Azure Application Insights
10.5 Building Scalable Web App Solutions
Deploying Azure Web Apps shouldn’t always be that hard. But for most enterprises the challenge is keeping up with performance, which is a huge business driver for migrating your web applications to a public cloud platform such as Azure.
• Use Staging and Production deployment slots (Continuous Integration/(CI))
• Use Continuous Deployment (CD)
• Explain the scaling features per App Tier

Section 11: Azure Platform-as-a-Service (PaaS) Components
This section introduces us to the Azure Paas Solutions, Azure queue storage and table storage and finally Azure Machine Learning.
• Introduction to Azure PaaS Solutions
• Azure Queue Storage and Table Storage
• Introduction to Azure Machine Learning
• Azure Non-SQL Database Solutions and Cache
• Azure IOT Solutions and Components
• Azure Security Center
11.1 Introduction to Azure PaaS Solutions
In this video, we will highlight several of the common Azure PaaS components, which basically means stepping away from managing the underlying infrastructure side of the Azure datacenters.
• Get to know what is PaaS and how to describe it
• Get an overview of Microsoft Azure PaaS Services and components
• Explain PaaS characteristics
11.2 Azure Queue Storage and Table Storage
This video will teach you all about using Azure Storage Account components, specifically around application integration.
• Understand the Azure queue storage
• Know the Azure table storage
• Secure the storage account integration from your applications
11.3 Introduction to Azure Machine Learning
Azure Machine Learning (ML) allows organizations to run high density, high volume based calculations and predictions. It is often used in an industrial or scientific context.
• Understand why to use Machine Learning
• Understand Azure solutions enabling data science
• Get to know the Azure Machine Learning process and algorithms
11.4 Azure Non-SQL Database Solutions and Cache
We already discussed SQL database on Azure in a previous video. But SQL Server is not the only database technology available on Azure, as you will learn from this video.
• Get an overview of DocumentDB and MongoDB as non-SQL database solutions
• Get an introduction to MySQL and how to use it within Azure
• Get an overview of Redis Cache and how to use it
11.5 Azure IOT Solutions and Components
IOT (short for Internet of Things) is becoming a very important topic in the IT space, and basically in about any industrial segment. By connecting devices to the Internet, they become ‘smarter.’ In this video, I’ll describe the different aspects of IOT, and how it relates to Azure.
• Get to know why is Internet of Things (IOT) a big thing, and about IOT devices
• Understand the Azure IOT reference architecture
• Know the Azure Event Hub, IOT Hub, and Azure Stream Analytics
11.6 Azure Security Center
In this last video, I’ll talk about Azure security features, and more specifically about the “Azure Security Center.” This is a centralized dashboard, giving you real-detailed information and views on all-things security in your Azure environment.
• Get to know what is Azure Security Center
• Deploy Azure Security Center
• Watch a demo on using Azure Security Center

Time to get stuck in….



New Job Role

In November last year I was given the chance to change my job role from a developer to become the teams SRE (Site Reliability Engineer) – this meant less time coding and I had to think about this, do I really want to do this as I do love writing code.

Taking a look at the direction the world of web development was heading I had to think do I really want to give up on time coding and look for another challenge, and boy do I enjoy a new challenge.

At this time I was a .Net Developer writing C# and had been doing that for a long time, we were using AngularJS and doing the Agile thing with sprint ceremonies and what not. I really like AngularJS, writing API’s and tying it all together in our sprint work – but something just wasn’t quite right.

Like most companies and teams within companies we had some technical debt to pay back and if you know me well I do love a good moan when things aren’t how they should be.

So now I have the opportunity to fix things, and I think this is my best skill if I’m honest, finding bugs and fixing them or taking something that works and making it better – better is a matter of opinion obviously.

Moving back to my new role, it’s a devops/sre role with my own kanban board and list of stuff to work on with which itself will be mean a number of different things to get my teeth into, work for the rest of 2017 at least.

Some of the things I will get my teeth into this year include improving our build pipeline, database deployments, metrics on a number of things including builds, code quality and the like.

We have some good metrics already and I’d like to add some tools I’ve used in the past which include @OctopusDeploy and @Raygunio

At work I’m an application security champion which means I have to make sure our code is secure and passes all of the security measure in place at work which I thoroughly enjoy – so lots to get stuck into.

Heres to a productive 2017 and we shall see how far I get with some big changes ahead.



What I hope to learn in first quarter of 2017

So for the first 3 months of 2107 I’m planning on learning as much @Docker as I can.

So far I have it installed on my Mac pulled down some different images and played around with Jenkins Blue Ocean and read some online articles, just some very basic stuff.

My goals for between now and end of March is as follows:-

  • Get used to the commands and try them out and see what is available
  • Read up on stuff like Swarm and the other Docker stuff which at this point I know nothing about
  • Create some basic containers and see whats possible

I have some stuff I’d like to try out and see what’s possible, how easy it is and the end goal is to have done a talk at work in February on Docker and to have learned as much as possible each week whenever possible.

I am going to be using the following links, shout out if I am missing some invaluable content, be it blogs, books or training etc.

That’s it for now, let me know if I’ve missed a great resource.

Thanks
Gregor, @gregor_suttie



My company’s 2 day hackathon

Last week at work we did an offsite hackathon over 2 days offsite at Skillsmatter which is in Central London, the idea was to get offsite and brainstorm ideas around how we can benefit our users and add more value to the product we work on.

The hackathon included everyone from the team including UX designers, QA testers, Developers and Product Owners, and we had a clear vision which was our goal for the 2 days.

I had never been to a hackathon or anything like it before and I wont go into too much detail but the following is what we did for 2 days, how we went about it and perhaps you can take some ideas from it and do your own similar thing at your company or with your team.

hackathon

Ground Rules

Define some grounds rules at the start and try to respect them over the 2 days.

Day 1

  • No electronics allowed (i.e. mobiles or Ipad’s), except your laptop.
  • No ideas are silly.
  • Only one person speaks at anytime.
  • Elmos – Enough Lets Move On (if one person talks for too long).
  • HiPPO (highest paid person’s opinion, highest paid person in the office) – everyone’s opinion has same value and weight, bosses don’t make the decisions.
  • Parking Lot – area where some ideas aren’t thrown out but places on this part of the whiteboard for later on future discussions perhaps.

After we set some ground rules we split into teams and individually wrote down all of our ideas for ways to try to meet our vision and then we discussed and grouped them into similar types. From there we decided we had 3 ideas which we then whittled down to 2, we split into teams and started with some sprint planning in each team.

After we planned out our ideas we then started work using small 1.5 hour sprints, each sprint ending with a sprint retrospective and show and tell to the other team, here we gave feedback to the other team and discussed the good and the bad and the potential with each idea etc.

Day 1 lasted from 8:30 am to around about 6pm I think it was and it was a pretty long day but super awesome fun.

Day 2

Day 2 started again with some sprint planning, figuring out what we wanted to achieve and splitting out tasks for each person in the team to have something to work on and something to produce at the end of the sprint. Some people worked on the UI design, developers worked on the code, testers wrote some test and wire frames were also created by the Product Owners and some of the designers too.

I’ll skip to the most important part of the 2 days and what I personally took away from the 2 day workshop/hackathon.

What did we produce

After the 2 days we came away with 2 separate pieces of work which met our vision and will definitely improve our product, we had working code, it was tested, it looked pretty good and with a couple of days work would be production ready.

Lessons Learnt

  • Working in a different way to our normal 2 week sprints was awesome, having everyone in the team, all together, working around a table, throwing ideas out, dismissing some and getting instant feedback resulted in rapid feature creation from start to finish, in 1.5 days of actually doing the work we had something not far off production ready.
  • Instant Feedback – Feedback from everyone right there and then was key to delivering something we all thought worked, and would benefit our end users.
  • Every single person had a voice, every single person had their own ideas and collaborating together to pull the best parts of these ideas together was something which we don’t always get to do.
  • Offsite – being away from work and not having the disruptions of email/meetings/phonecall’s in a nice big building with areas to go eat and relax for a bit helped a lot.
  • Writing down all the ideas, being able to group them together and see the most popular ideas helped drive the towards picking the ideas to work on.
  • Being able to have everyone at the same level and not have the boss have the final say was quite an interesting take on it and one which I think everyone welcomed.
  • This will hopefully change the way we do larger pieces of work going forward in our sprints, getting everyone together and brain storming ideas, designs and getting instant feedback and rapid development so that we can take a piece of work and deliver more over 1 sprint rather than breaking the same piece of work over say 2 sprints.

Summary
I’d recommend your team try something like this, keep it organised, keep it simple, everyone is equal in the room, set ground rules, have a vision or a goal your all attempting to try to reach and have fun, the best part of the 2 days it was fun, we were discussing it all week afterwards and every single person loved it.

We covered a lot more than this but I don’t want to bore people with all the details – if you want to ask me anything about this post add a comment.

Thanks
Gregor




MSWebDay – What I took away from it

Today, Feb 16th, I attended MSWebdevday ran by Microsoft in Glasgow which was an event covering all things web related from Microsoft, the speakers were @christosmatskas, @thebeebs and @martinkearn and was an all day event.

The Schedule for the day covered various topics and it was great to learn so many new things and get my first glimpse at some new technologies, I always love learning something new, and I even sat next to the illustrious Gary Ewan Park, someone who I have chatted to a few times on twitter but not every managed to meet.

Ok so lets cover the actual event:-

The first talk was by on What’s New in ASP.Net Core 1.0 and was a tour of the new features, how to get it, how to use it, whats new, whats no longer there and he also talked about how you can just take the files and drop them into a folder when deploying, there’s no gac, you can just deploy the Core files in a folder alongside your code, this is very neat, its cross-platform, and it means you could have the same site running under different version of Core going forward should you choose to or need to have this.

The second Talk was Building with JavaScript Task Runners, this was mainly about how to get gulp, how to set it up and how to run some tasks to minify your css, javascript files and all that good stuff, how to add it into Visual Studio as a build step after you compile your code, showed an example gulp file and lots more.

The third talk was Entity Framework Core 1.0, and covered EF and how to use it, how to use code first and also mentioned EF6 how its improved greatly from previous versions and why you should choose this version at the moment whilst EF Core 1.0 is still being worked on and has the tooling added to it for the Core 1.0 release.

The fourth talk was APIs: the cogs behind the machine and this talk was about api’s and mainly web api and how in Core 1.0 there is no MVC and WebAPI its just one thing now and your controller is an API controller, so no need for MVC and WebAPI there is just the controllers now which kind of merge both together.

The fifth talk was Dev Ops in Azure and this covered deploying your website to Azure, making changes, showing the changes, getting the publisher file for using in side Visual Studio and publishing your changes from Visual Studio using Git int his example to deploy your changes from within VS up to the new Azure portal.

The sixth talk was Hitchhikers Guide to JavaScript, this talk focused on ECMAScript and the future of JavaScript and basically how a lot more code that we write will be JavaScript and we saw examples of the features coming in the next few years etc.

The seventh talk was Web Performance and how to check your websites performance using tools like YSlow and Google Page Speed etc and then how to go about making it make far less requests, cache JavaScript, enable IIS features and how to optimise images etc to make your website perform much faster that it currently does.

The eight talk was Single Page Applications and was about KnockoutJS and Angular, talking about Angular 2 and how it makes use of TypeScript and showed code covering KnockoutJS and AngularJS.

The ninth talk was about Hybrid Web Apps and how you can create application that can appear as Windows 8/10 tiles, make use of Microsoft Office and showed some very neat stuff using ManifoldJS which is itself very cool stuff.

Other stuff mentioned
I wrote some notes during the talks (should have taken a lot more) but a couple of things I need to look at are listed below:-

Summary
The event was great, full days learning, a lot of content covered, great speakers and good turn out. Spoke to some guys I chat to on twitter and all in all an awesome day spent learning some new stuff. There was a lot of content, I’ve missed half of it I’m sure so take a look at the slides on the site at MSWebdevday.

Dear Microsoft can we have some more of these days please? – especially Azure and Core related content.



Technical Debt in your team

technicaldebtOn twitter recently I read a few people talking about technical debt and how it occurs and how to best tackle it, so here is my view on said subject.

Technical Debt

Technical debt comes in many forms, shapes and sizes and almost every team/developer is aware of technical debt within your company.

Over the years I’ve worked in several companies most of which knew they had a fair bit of technical debt and did very little about it, sometimes nothing, so here are a few examples and how to go about fixing your technical debt:-

We didn’t write it
So the developers who wrote the code have all left, ok then task a couple of current developer to report on this project and ask them to give your team a heads up on the state of the code base and there suggestions for removing this as technical debt, either get people up to speed with the code base, document the current state of the code base and perhaps even find out if its worth re-writing but by all means do something with this technical debt.

Don’t let it mount up over time, It’ll be like the cupboard or the attic in the house where you put all the stuff you don’t want look at and that is not where you want to get to.

If the code is apart of your projects then your team owns that code, no one else does, it’s not an excuse.

The code is written using old technology
Same as above, then document it, offer suggestions to get it up to newer technologies and task people with doing something about it, don’t let it remain in the state it currently is.

The code has no tests
Same as before, get a developer up to speed with it and write unit tests, refactor the code and document they’re findings, it won remain technical debt for very long

Summary
I realise that some technical debt there is just nothing you can do, maybe you don’t have the source code for it or you don’t have any developers who know the language well enough to update the application, perhaps no one in your team knows how it’s supposed to work. The thing here is to try your very best to do something with your technical debt and as a team talk about it, work at decreasing the amount of technical debt your team owns, take actions to fix, document, rewrite or whatever but do something about it now, don’t let time drag on and just let it grow.

Don’t start on new features unless they are critical and fix your technical debt, it could make the next persons job a lot easier and that can only be a good thing.

Document your solutions, the number of times I have started looking at code and asked what does this do and no one in the team can answer the question is quite scary, that should never be the case in my opinion.



Tips for Deploying your .Net project

Over the last 20 years I’ve seen many a deployment, some good, some bad and the ugly, life’s too short for manual/long deployments.

Here is what I recommend

If you have manual steps in your deployments then stop it, now, no seriously, you can deploy with zero manual steps (clicking deploy doesn’t count).

What to do instead

Get yourself TeamCity, yes TeamCity, Jenkins is ok but you get what you pay for, trust me Jenkins isn’t TeamCity. Ok now that you have an excellent build server, you’ll want to script your builds, for this I liked using psake along with PowerShell, honestly people who don’t know PowerShell are missing out, its awesome.

So get your scripts together and kick the builds off from TeamCity using psake.

Unit Test your PowerShell Scripts

Using Pester you can unit test your PowerShell scripts, thus realising that their fragile or poorly written or just large function which are hard to test, well do yourself a favour and use pester to unit test them.
Pester also gives you code coverage for your PowerShell scripts

Deploy your app

To deploy any .Net app use Octopus Deploy, its easy, its painless, it deploys with error handling, rollback using transactions, and you can do blue/green deployments, if you want to deploy a previous release, one click, deploy to multiple environments, any previous version etc. all in one click.

Summary
To summarise, no more manual steps, no copying files, manually unzipping files, creating folders etc, – no need to do that, and leads to human error, highly recommend each of those tools.



Continuous Deployments for SQL Server – Part 4

Ok so we have seen in parts 1, 2, and 3 how to go about adding your database to source control, as well as comparing the schema and the data held within our SQL Server databases.

Its time to go about releasing changes made from one database to another (again think of you deploying changes from UAT to Production). There are several ways to go about releasing the changes, here are two of them:-

  • Script the schema and data changes as 2 separate scripts, which you can easily combine yourself.
  • Use Redgate SQL Packager and even create an .exe to run which will allow us to update the database.

Ok so let me demo how to go about using option two using Redgate SQL Packager which comes with the Redgate SQL Toolbelt.

Start up SQL Packager and you’ll see this start-up screen:-

packager1

I want to package an upgrade to a database so I have selected that option already, the next screen shows this:-
packager2

Above I have chosen my Database server and the database I want to use as the source and the target database (one we want to update).

Below shows the database objects I wish to package and apply on the target database.

packager3

Below shows the tables whose data I want to package and apply to the new database.

packager4

Below shows me the script that has been generated for me, first tab is the schema script, second tab is the data script and the third tab is for any warnings.

packager5

And the last screen gives us a choice to either package the change as a .exe, package it as a c# project, launch the script in SQL Query Analyser or Save the script for further inspection.

packager6

Choose option 1, run the exe and your database updates are complete, that’s all there is to it, any issues found the changes will be rolled back as they are transactional, leaving your database in tact.

Once complete, just run SQL Compare and SQL Data Compare and you can verify all is good – and viola, you’ve just updated production with schema and database changes, and you’ve been given a few different ways to do using RedGate SQL Toolbelt.