#Code

First things first, #notadeveloper. I cannot stress this enough, I am not trained to write code, neither am I employed to do so. However, I do enjoy writing code, I find a lot of satisfaction in hitting the run button and watching something I wrote come alive. Previously I have posted many tweets and blog entries of my coding adventures over the years. My crowing achievement to date is probably the PHP/MySQL based “Asset Management” system, a glorified inventory list ability to Assign to a person, and add a list of repairs or reinstalls against the items. It automated a part of my job I disliked, and quite frankly that is exactly what I love about code. Almost all of the scripts I have written over the years have had the primary purpose of automating repetitive tasks any sysadmin can do with their eyes closed, mostly this has been silent install scripts and updaters.

Fast forward on a little from my sysadmin days, and to the brave new world (for me) of ERP. My primary day job is planning, coordinating and performing installations of ERP software into all sorts of manufacturing and distribution companies. Some are small, many are large, so the nature of, the deployments can vary slightly. That’s generally the bit I’m good at; sizing and planning the system to meet size and expectations of the end users. What we found over the last 2 years is that whilst deployments vary slightly, there is a bulk of work that is virtually the same every time round, certainly in process if not inputs, however we found that amongst the team; time, accuracy and experience could vary, significantly in some cases. Therefore a colleague of mine, with vastly more years experience in product and process went to the efforts to write an automation tool, a set of PowerShell scripts and XML files used to automate the bulk of the installation process. Roll on a few months and instantly accuracy and time were improving, which in turn was improving everyone’s experience. Gone were the days of random (user) errors and here are the days of productivity and valid errors which have much, much more context!

 

So let’s get techy on this and roll on a little further in time; following a few changes, ownership of the tool is now with me. And with a potentially different future ahead, it may only be a short term thing (it may also be long term!), so with this in mind, I sought help of people who know what they are doing, exceptionally smart developers in this case. After a couple of remote session the following has occurred:

Task 1 – Get the code secured. We can’t have something this crucial to our process hiding on a random VM with no backups.

Solution –  Git based code repository, in this case Visual Studio Team Services (VSTS)

 

Task 2 – Get the additional features into the code, but fully tested before deploying.

Solution – Branch off. Currently running with 2 branches, one for immediate fixes/quick additions, and one for next revision which will do far more than just  installing (Shhhh it’s Top Secret)

 

Task 3 – Get the code tidied up, to some form of best practices etc.

Solution – VSTS Build running PowerShell scripts with Pester and PowerShell Script Analyzer to validate all PowerShell scripts against a set of generally accepted best practice rules.

 

Task 4 – Packaging. No one wants to manually build a zip file, upload it to a SharePoint site and email out a notification for every small fix that goes in

Solution  – NuGet and Chocolatey via a VSTS Package Feed.

 

Since this became my problem, three versions of the tooling have been released, packaging only got tested this week so isn’t the primary deployment method yet, but now we have it as a capability there will be many more versions, but that just wont matter as they will always have whatever is the latest in the master branch!

 

Ok so that all explains my random tweets from evenings and weekends over the last month or so, fortunately I’ve had some incredible guidance from some very skilled and friendly development colleagues. Without those guys, I wouldn’t be anywhere with all this other than a whole load of files and folders on one machine with no backups!

 

I’d also like to give back to the community a little, so I plan to have some scripts that I write for more generic tasks uploaded to a public facing Git at https://github.com/jaward916 further to that I have below added a list of all the bookmarks I’ve been building up, especially the ones around Tasks 3 and 4, which has been the key functionality I’ve explored and implemented in the last week.

 

I stress once again, I am not a developer, please do not laugh at my code, or my very basic explanations of the tools and processes, I am learning for fun, but developing to make everyone’s lives a little easier in my world!

 

Bookmarks for VSTS

Tip of the Week 2 – SQL Versions & EOL

Have you ever wondered whether you’re definitely on the latest patch of SQL?

I found a site a few years ago which I use at least once a week, every week.

In SSMS when you view a server’s properties you will see a version number e.g. 11.0.5058.0 which to most of us doesn’t mean a lot. On the face of it you can tell its v11 of the software, and you suspect it’s not the GA release due to the 5058 part, but in reality how does this translate to the year and service pack?

The answer is: http://sqlserverbuilds.blogspot.co.uk/ which provides a nice little table as below.

The best thing is that this site seems to be kept up to date all the time and further down the page you will see all sub-versions/ Cumulative updates and release dates, with hyperlinks to release notes.

I find this info very useful when debugging performance issues, especially with 2008R2/2012 so I can check the customer is on the latest patch of the version they have. Also with Microsoft’s changes to extended life of these products over the last few years, some patches are supported and others aren’t. To check what is/isn’t supported it’s worth browsing (and bookmarking) this link: https://support.microsoft.com/en-us/lifecycle/search/

The Product Lifecycle page at Microsoft is fully searchable for all MS products, and will tell you which patches are supported and which ones may already be out of support. e.g. for SQL Server 2012 you’re fine if on SP4, for SP3 you only have 8 months left, SP2 down is already out of support:

If you ask me we should all be on SQL 2016, but I fully understand the reasons we hold back, whether due to licensing costs, downtime issues, 3rd party support or other issues.

SQL Server Tip of the Week – Winter Break

Unlike the Premier League, I will take a winter break from the SQL Tips,

Most likely I will use the break to build up the quality and quantity of content for an awesome 2018.

On that note I’ll leave you with this link to get your systems ready for the weather… 

https://wateroxconsulting.com/archives/prepare-for-winter/ 

 

Thanks for visiting!

All Tech Photos Over Last 6 Years

For those unaware I am starting a new Infrastructure role in January 2016 and I am very excited about it (if a little nervous)!

In the meantime as I’ve had a nice 2 week Christmas break after leaving the last role, I have managed to collate all my work related/ IT/ Techie photos from the last 6 years of working at IBM, BMS, Redsumo and Magna Interiors/ Grupo Antolin, and here is the link to see all those pics (I’m working on a gallery for this post but the link is good for now)

https://goo.gl/photos/spjo7D3pkqJiGMuM9

 

 

If you need a photo to be removed, please contact me, but they are all my pictures over the last few years, taken on a variety of phones from Blackberry Curves up to my latest LG G4!