<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/"><channel><title>2019 on Funky Si's Blog (Dev)</title><link>https://blog-dev.funkysi1701.com/2019/</link><description>Recent content in 2019 on Funky Si's Blog (Dev)</description><generator>Hugo -- gohugo.io</generator><language>en-gb</language><managingEditor>funkysi1701@gmail.com (Simon Foster)</managingEditor><webMaster>funkysi1701@gmail.com (Simon Foster)</webMaster><lastBuildDate>Thu, 08 Aug 2019 20:00:45 +0000</lastBuildDate><atom:link href="https://blog-dev.funkysi1701.com/2019/index.xml" rel="self" type="application/rss+xml"/><item><title>Picard is back!</title><link>https://blog-dev.funkysi1701.com/posts/2019/picard-is-back/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Thu, 08 Aug 2019 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2019/picard-is-back/</guid><category term="StarTrek">StarTrek</category><category term="Picard">Picard</category><category term="PatrickStewart">PatrickStewart</category><media:content medium="image" type="image/jpeg" url="https://blog-dev.funkysi1701.com/images/2018/08/download.jpg"/><description>&lt;p&gt;It has just been announced at the annual Star Trek Las Vegas (&lt;a href="https://twitter.com/hashtag/STLV" target="_blank" rel="noopener noreferrer"&gt;#STLV&lt;/a&gt;
) convention that Patrick Stewart is going to return to his role as Jean-Luc Picard in a new TV Show.&lt;/p&gt;
&lt;iframe title="YouTube video: Patrick Stewart on the return of Jean-Luc Picard" type="text/html" width="662" height="373" src="https://www.youtube.com/embed/aCKQp1sGVRQ?version=3&amp;amp;rel=1&amp;amp;fs=1&amp;amp;autohide=2&amp;amp;showsearch=0&amp;amp;showinfo=1&amp;amp;iv_load_policy=1&amp;amp;wmode=transparent" allowfullscreen="true" style="border:0;"&gt;&lt;/iframe&gt;
&lt;p&gt;Few other details have been announced other than the TV show will take place 20 years after the film Star Trek: Nemesis and will feature the character of Jean-Luc Picard.&lt;/p&gt;
&lt;p&gt;Lets run though a few things I would like to see from this new show.&lt;/p&gt;
&lt;h2 id="low-on-action"&gt;Low on Action&lt;a class="anchor ms-1" href="#low-on-action" aria-label="Permalink: Low on Action"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Star Trek: Discovery is a great show and has brought Star Trek back to our TV shows. However it is an action show, it zooms along so fast and with so much action I would appreciate a show that can takes its time a bit more.&lt;/p&gt;
&lt;p&gt;I want a show that can show Picard carefully considering some moral issue and making a decision. Something we were used to seeing on TNG.&lt;/p&gt;
&lt;h2 id="feature-picards-excellent-speeches"&gt;Feature Picard’s excellent speeches&lt;a class="anchor ms-1" href="#feature-picards-excellent-speeches" aria-label="Permalink: Feature Picard’s excellent speeches"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;One of the best features I can think of Jean-Luc Picard is his ability to make speeches about one issue or other.&lt;/p&gt;
&lt;p&gt;Lets look at a few examples:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Insurection&lt;/strong&gt; : Picard speaks about the forced relocation of a group of people.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;How many people does it take, Admiral, before it becomes wrong? Hmm? A thousand, fifty thousand, a million? How many people does it take, Admiral?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;First&lt;/strong&gt; &lt;strong&gt;Contact&lt;/strong&gt; : Picard is hell bent on revenge for what the Borg have done to him and refuses to destroy the Enterprise to save his crew.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“I will not sacrifice the Enterprise. We’ve made too many compromises already. Too many retreats. They invade our space and we fall back. They assimilate entire worlds, and we fall back. Not again! The line must be drawn here, …this far, no further! And I will make them pay for what they’ve done.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Measure of a Man&lt;/strong&gt; : Picard argues for the rights of Data.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“You see, he’s met two of your three criteria for sentience, so what if he meets the third. Consciousness in even the smallest degree. What is he then? I don’t know. Do you? (to Riker) Do you? (to Phillipa) Do you? Well, that’s the question you have to answer. Your Honour, the courtroom is a crucible. In it we burn away irrelevancies until we are left with a pure product, the truth for all time. Now, sooner or later, this man or others like him will succeed in replicating Commander Data. And the decision you reach here today will determine how we will regard this creation of our genius. It will reveal the kind of a people we are, what he is destined to be. It will reach far beyond this courtroom and this one android. It could significantly redefine the boundaries of personal liberty and freedom, expanding them for some, savagely curtailing them for others. Are you prepared to condemn him and all who come after him to servitude and slavery? Your Honour, Starfleet was founded to seek out new life. Well, there it sits. Waiting. You wanted a chance to make law. Well, here it is. Make a good one.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="ask-important-questions"&gt;Ask important questions&lt;a class="anchor ms-1" href="#ask-important-questions" aria-label="Permalink: Ask important questions"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;We live in uncertain times. There are lots of pressures on today’s world and we need to acknowledge these. Picard is an excellent character to use to ask important questions of the day.&lt;/p&gt;
&lt;p&gt;What does it mean to be human?&lt;br&gt;
How should we treat people that are different to us?&lt;br&gt;
How should we react to extremism?&lt;/p&gt;
&lt;h2 id="deal-with-his-age"&gt;Deal with his age&lt;a class="anchor ms-1" href="#deal-with-his-age" aria-label="Permalink: Deal with his age"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In the last episode of TNG a future version of Picard is shown 25 years into the future. This is a similar time period so it will be interesting to compare the two. Have Picard look back on his life and ask questions about his life choices.&lt;/p&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="Picard" src="https://blog-dev.funkysi1701.com/images/2018/08/all-good-things.jpg" loading="lazy"
width="320" height="320"
/&gt;
&lt;/p&gt;
&lt;h2 id="be-consistent-with-his-past"&gt;Be consistent with his past&lt;a class="anchor ms-1" href="#be-consistent-with-his-past" aria-label="Permalink: Be consistent with his past"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Picard is a well known character. So writers please don’t change him. I want a character we know, not a character that looks like Picard but acts in a way contrary to what we would expect.&lt;/p&gt;
&lt;p&gt;Picard has a history we know, he served on the stargazer and of course the Enterprise, he has an artificial heart, he was assimiliated by the Borg. All&lt;/p&gt;
&lt;h2 id="reference-50-years-of-star-trek"&gt;Reference 50 years of Star Trek&lt;a class="anchor ms-1" href="#reference-50-years-of-star-trek" aria-label="Permalink: Reference 50 years of Star Trek"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Discovery and Enterprise are TV shows which have a problem. There is Trek going on after them which imposes a few rules on what can and can’t be done.&lt;/p&gt;
&lt;p&gt;This is a TV Show that will take place after every other Trek TV and Film and can do whatever the creators want. This gives freedom, but it also gives the responsibility to reference what has gone before.&lt;/p&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="Picard" src="https://blog-dev.funkysi1701.com/images/2018/08/download.jpg" loading="lazy"
width="275" height="183"
/&gt;
&lt;/p&gt;
&lt;p&gt;The 2009 Star Trek film features the destruction of Romulus and Spock travelling back in time. How about Picard dealing with surviving Romulans helping rebuild their society, continuing the work that Spock started in the TNG episode Unification.&lt;/p&gt;
&lt;p&gt;I look forward to finding out what the Star Trek production team has in store for us. If they have Patrick Stewart convinced I am sure it is going to be good.&lt;/p&gt;
&lt;p&gt;Did you know you can track episodes from TNG and Picard in &lt;a href="https://www.episodeatlas.com/" target="_blank" rel="noopener noreferrer"&gt;Episode Atlas&lt;/a&gt;
.&lt;/p&gt;</description></item><item><title>Create Azure resources via Terraform</title><link>https://blog-dev.funkysi1701.com/posts/2019/infrastructure-as-code-creating-azure-resources-with-terraform/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Sat, 11 May 2019 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2019/infrastructure-as-code-creating-azure-resources-with-terraform/</guid><category term="Azure">Azure</category><category term="Infrastructure">Infrastructure</category><category term="Terrafrom">Terrafrom</category><category term="DevOps">DevOps</category><description>&lt;p&gt;Terraform is a way to script the creation of Azure Resources. By scripting the creation of your resources you can run them again and again and be certain that everything is configured exactly the same as the script has specified. No more forgetting to tick the tick box, if it’s in your script then it will be deployed with exactly the same configuration.&lt;/p&gt;
&lt;p&gt;The process of executing a terraform script follows this basic process.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;terraform init&lt;/strong&gt; – Initialises the terraform directory
&lt;strong&gt;terraform plan&lt;/strong&gt; – generates and displays what will be executed
&lt;strong&gt;terraform apply&lt;/strong&gt; – applies the terraform script to your Azure subscription
&lt;strong&gt;terraform destroy&lt;/strong&gt; – deletes your Azure resource that were created in the previous step&lt;/p&gt;
&lt;p&gt;Lets look at how you might execute a terraform script from your build or release pipeline.&lt;/p&gt;
&lt;p&gt;I am executing my terraform scripts from my release pipeline and as I don’t want to check binaries into my source code I am going to add a bit of plumbing to get things in the right places. The terraform binary can be obtained from &lt;a href="https://www.terraform.io/downloads.html" target="_blank" rel="noopener noreferrer"&gt;https://www.terraform.io/downloads.html&lt;/a&gt;
.&lt;/p&gt;
&lt;p&gt;To start with I am executing a Powershell script to download the terraform binary, this is in the form of a zip file, so i need to download and unzip it.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-powershell" data-lang="powershell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;#Download&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;$url = &lt;span style="color:#e6db74"&gt;&amp;#34;https://releases.hashicorp.com/terraform/0.11.13/terraform_0.11.13_windows_amd64.zip&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;$output = &lt;span style="color:#e6db74"&gt;&amp;#34;terraform.zip&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;(New-Object System.Net.WebClient).DownloadFile($url, $output)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;#Unzip&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Add-Type -AssemblyName System.IO.Compression.FileSystem
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[&lt;span style="color:#66d9ef"&gt;System.IO.Compression.ZipFile&lt;/span&gt;]::ExtractToDirectory($output, Get-Location)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now that I have the terraform binaries I can just run Azure Cli and execute the terraform commands above.&lt;/p&gt;
&lt;p&gt;Now it is time to look at the the terraform script. This particular script creates a resource group, an app service plan and a webapp.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;# Configure the Microsoft Azure Provider
provider &amp;#34;azurerm&amp;#34; {
subscription_id = &amp;#34;&amp;#34;
client_id = &amp;#34;&amp;#34;
client_secret = &amp;#34;&amp;#34;
tenant_id = &amp;#34;&amp;#34;
}
resource &amp;#34;azurerm_resource_group&amp;#34; &amp;#34;rg&amp;#34; {
name = &amp;#34;resource-group&amp;#34;
location = &amp;#34;northeurope&amp;#34;
}
resource &amp;#34;azurerm_app_service_plan&amp;#34; &amp;#34;plan&amp;#34; {
name = &amp;#34;planname&amp;#34;
location = &amp;#34;${azurerm_resource_group.rg.location}&amp;#34;
resource_group_name = &amp;#34;${azurerm_resource_group.rg.name}&amp;#34;
sku {
tier = &amp;#34;Standard&amp;#34;
size = &amp;#34;S1&amp;#34;
}
}
resource &amp;#34;azurerm_app_service&amp;#34; &amp;#34;webapp&amp;#34; {
name = &amp;#34;example-app-service&amp;#34;
location = &amp;#34;${azurerm_resource_group.rg.location}&amp;#34;
resource_group_name = &amp;#34;${azurerm_resource_group.rg.name}&amp;#34;
app_service_plan_id = &amp;#34;${azurerm_app_service_plan.plan.id}&amp;#34;
}
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;There are four guids that you need to fill in from your azure subscription and to find these you need to run a few commands from Azure Cli. Check out
&lt;a href="https://learn.microsoft.com/en-us/azure/virtual-machines/linux/terraform-install-configure" target="_blank" rel="noopener noreferrer"&gt;https://learn.microsoft.com/en-us/azure/virtual-machines/linux/terraform-install-configure&lt;/a&gt;
for more detail on these commands.&lt;/p&gt;
&lt;p&gt;Run these either from Azure Cloud Shell or from Powershell command prompt after Azure Cli has been installed.&lt;/p&gt;
&lt;p&gt;az login – to login to azure a browser window will open up.&lt;/p&gt;
&lt;p&gt;az account show –query &amp;ldquo;{subscriptionId:id, tenantId:tenantId}&amp;rdquo;
This will show you your subscription id.&lt;/p&gt;
&lt;p&gt;az account set –subscription=&amp;quot;${SUBSCRIPTION_ID}&amp;quot;
Where ${SUBSCRIPTION_ID} is the subscription id you found in the last step.&lt;/p&gt;
&lt;p&gt;az ad sp create-for-rbac –role=&amp;ldquo;Contributor&amp;rdquo; –scopes=&amp;quot;/subscriptions/${SUBSCRIPTION_ID}&amp;quot;
Where ${SUBSCRIPTION_ID} is the subscription id you found in the last step and assumes you have permission to the subscription.&lt;/p&gt;
&lt;p&gt;This last command will about a series of Guids which you need to fill in at the top of your terraform file appId = client_id, password = client_secret, tenant = tenant_id and subscription_id you already have.&lt;/p&gt;
&lt;p&gt;This just gives you a taste of what you can do with terraform. Looking at the &lt;a href="https://docs.microsoft.com/en-us/azure/terraform/" target="_blank" rel="noopener noreferrer"&gt;Azure Terraform docs&lt;/a&gt;
there are loads of different resources you can create and even a &lt;a href="https://github.com/terraform-providers/terraform-provider-azurerm" target="_blank" rel="noopener noreferrer"&gt;github repo&lt;/a&gt;
with some samples.&lt;/p&gt;</description></item><item><title>Gated Release</title><link>https://blog-dev.funkysi1701.com/posts/2019/gated-release/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Fri, 05 Apr 2019 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2019/gated-release/</guid><category term="Azure">Azure</category><category term="API">API</category><category term="ApplicationInsights">ApplicationInsights</category><category term="DevOps">DevOps</category><media:content medium="image" type="image/png" url="https://blog-dev.funkysi1701.com/images/2019/04/image.png"/><description>&lt;p&gt;Automated releases of software are great but how can we add an element of feedback so only good releases go live.&lt;/p&gt;
&lt;p&gt;I have been using Azure DevOps to release my PwnedPass android app to the Google Play Store for a while now. There are options to deploy to the alpha, Beta or Production tracks and even to set % of users to target. For the full range of options check out the Google Play &lt;a href="https://marketplace.visualstudio.com/items?itemName=ms-vsclient.google-play" target="_blank" rel="noopener noreferrer"&gt;extension&lt;/a&gt;
for Azure DevOps.&lt;/p&gt;
&lt;p&gt;My release starts by publishing to 10% of users on the production track, my next step makes use of the increase rollout option to increase this %, you can have as many of these additional steps as you want until you reach 100% of your users.&lt;/p&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="Image" src="https://blog-dev.funkysi1701.com/images/2019/04/image.png" loading="lazy"
width="1540" height="271"
/&gt;
&lt;/p&gt;
&lt;p&gt;Now if you run this release now it will just run through each of the steps one after the other. Now of course you can add a pre or post approval to your pipeline but this just adds a manual dependency to your release. Whoever does the approving needs to check things are working before approving or worse just approves regardless.&lt;/p&gt;
&lt;p&gt;Azure DevOps has the concept of &lt;a href="https://learn.microsoft.com/en-us/azure/devops/pipelines/release/deploy-using-approvals?view=azure-devops" target="_blank" rel="noopener noreferrer"&gt;gated releases&lt;/a&gt;
which allows you to add automated checks before or after a release happens. These automated checks can be any of the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;An Azure Function&lt;/li&gt;
&lt;li&gt;A Rest API call&lt;/li&gt;
&lt;li&gt;Azure Monitor Alert&lt;/li&gt;
&lt;li&gt;Query Work Items&lt;/li&gt;
&lt;li&gt;Security and Compliance Assessment&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We are going to make use of the Azure Monitor Alert, to create an alert from your Application Insights data and only continue the rollout if no failures are detected.&lt;/p&gt;
&lt;p&gt;Open up your application insights resource in the Azure portal and look in alerts. Click add new alert rule.&lt;/p&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="Image" src="https://blog-dev.funkysi1701.com/images/2019/04/image-1.png" loading="lazy"
width="1616" height="1347"
/&gt;
&lt;/p&gt;
&lt;p&gt;Select your application insights resource in Resource, In Condition choose a condition to check, I chose Failed Requests, so every time a failure is registered in my API I can stop the deployment. The exact criteria you want to use is entirely up to you.&lt;/p&gt;
&lt;p&gt;Create an action group, I just set my alert to send an email to myself but there are other alert actions you may want to try. Give your alert a name and description and click save.&lt;/p&gt;
&lt;p&gt;Now all we need to do is make Azure DevOps make use of this alert. In your release pipeline select the pre-deployment conditions of your second step and open up the Gates section.&lt;/p&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="Image" src="https://blog-dev.funkysi1701.com/images/2019/04/image-2.png" loading="lazy"
width="1107" height="833"
/&gt;
&lt;/p&gt;
&lt;p&gt;Choose a suitable time to evaluate, I have been using something long like 12 or 24 hours so if there are problems there is time for it to be noticed. Choose Version 1 of the task (I was not able to get it to work with Version 0)&lt;/p&gt;
&lt;p&gt;Now select your Azure subscription and Resource Group and leave the rest of the settings as they are. Now your Deployment will stop and analyse application insights for any Failed requests and will halt if it finds any.&lt;/p&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="Image" src="https://blog-dev.funkysi1701.com/images/2019/04/image-3.png" loading="lazy"
width="1748" height="232"
/&gt;
&lt;/p&gt;
&lt;p&gt;I am still testing this out but it will take a few days to figure out if this what I want due to the large time scales involved. I feel this is going to be an improvement of manually approving release steps.&lt;/p&gt;</description></item><item><title>Documenting your API</title><link>https://blog-dev.funkysi1701.com/posts/2019/documenting-your-api/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Wed, 27 Mar 2019 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2019/documenting-your-api/</guid><category term="Swagger">Swagger</category><category term="API">API</category><media:content medium="image" type="image/png" url="https://blog-dev.funkysi1701.com/images/2019/03/image-3.png"/><description>&lt;p&gt;So you have created a super API that does something amazing. How do you document it so people will use it?&lt;/p&gt;
&lt;p&gt;One way of easily documenting your API is to install the Swashbuckle package.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;Install-Package Swashbuckle.AspNetCore
Install-Package Swashbuckle.AspNetCore.Swagger
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Then in you startup.cs add the following lines&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-csharp" data-lang="csharp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;//In ConfigureServices&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;services.AddSwaggerGen(c =&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; c.SwaggerDoc(&lt;span style="color:#e6db74"&gt;&amp;#34;v1&amp;#34;&lt;/span&gt;, &lt;span style="color:#66d9ef"&gt;new&lt;/span&gt; Info { Title = &lt;span style="color:#e6db74"&gt;&amp;#34;API&amp;#34;&lt;/span&gt;, Version = &lt;span style="color:#e6db74"&gt;&amp;#34;v1&amp;#34;&lt;/span&gt;, Description = &lt;span style="color:#e6db74"&gt;&amp;#34;An API Description&amp;#34;&lt;/span&gt; });
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; c.IncludeXmlComments(&lt;span style="color:#66d9ef"&gt;string&lt;/span&gt;.Format(&lt;span style="color:#e6db74"&gt;@&amp;#34;{0}\API.xml&amp;#34;&lt;/span&gt;, System.AppDomain.CurrentDomain.BaseDirectory));
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;});
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;//In Configure&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;app.UseSwagger();
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;app.UseSwaggerUI(c =&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; c.SwaggerEndpoint(&lt;span style="color:#e6db74"&gt;&amp;#34;/swagger/v1/swagger.json&amp;#34;&lt;/span&gt;, &lt;span style="color:#e6db74"&gt;&amp;#34;API V1&amp;#34;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; c.RoutePrefix = &lt;span style="color:#66d9ef"&gt;string&lt;/span&gt;.Empty;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;});
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now when you browse to your API you will see the swagger documentation system.&lt;/p&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="Image" src="https://blog-dev.funkysi1701.com/images/2019/03/image-3.png" loading="lazy"
width="883" height="602"
/&gt;
&lt;/p&gt;
&lt;p&gt;The RoutePrefix setting controls the path in which swagger will display. I have my docs at the root, but you might want them under the /docs or similar path.&lt;/p&gt;
&lt;p&gt;The IncludeXmlComments setting from the ConfigureServices method allows you to load in any XML comments you have added to methods. For this to work you need to enable a setting to your build.&lt;/p&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="Image" src="https://blog-dev.funkysi1701.com/images/2019/03/image-4.png" loading="lazy"
width="997" height="822"
/&gt;
&lt;/p&gt;
&lt;p&gt;The XML documentation file must be ticked and contain a path. Everytime you do a build, a XML file will be generated which contains all the comment blocks you have added to your code.&lt;/p&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="Image" src="https://blog-dev.funkysi1701.com/images/2019/03/image-5.png" loading="lazy"
width="610" height="184"
/&gt;
&lt;/p&gt;
&lt;p&gt;Swagger will then use this XML documentation file to produce lovely looking documentation without you having to do anything extra.&lt;/p&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="Image" src="https://blog-dev.funkysi1701.com/images/2019/03/image-6.png" loading="lazy"
width="1796" height="705"
/&gt;
&lt;/p&gt;</description></item><item><title>Azure Key Vault</title><link>https://blog-dev.funkysi1701.com/posts/2019/azure-key-vault/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Tue, 19 Mar 2019 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2019/azure-key-vault/</guid><category term="Website">Website</category><category term="Security">Security</category><category term="Azure">Azure</category><description>&lt;p&gt;&lt;a href="https://learn.microsoft.com/en-gb/azure/key-vault/" target="_blank" rel="noopener noreferrer"&gt;Azure Key Vault&lt;/a&gt;
is a secure way of storing your keys, certificates and secrets so your application can access everything it needs to but you don’t have them being stored insecurely anywhere such as in source control.&lt;/p&gt;
&lt;p&gt;I have been wanting to give Azure Key Vault a try for a while now as it can make use of Azure Active Directory to give your web app an identity so it can authenticate itself into the key vault to access secrets. Pretty clever but with a lot of moving parts a bit complex.&lt;/p&gt;
&lt;p&gt;For my example I am just going to connect to my Key Vault and get a secret and display it somewhere on a web page. This is of course not what you want to do as secrets are secret and shouldn’t be displayed just used to authenticate into whatever, however it is an easy way to prove I am connecting to the Key Vault and everything is working.&lt;/p&gt;
&lt;p&gt;Lets look at some code. I have a .net core application and to start with lets install three nuget packages.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-txt" data-lang="txt"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Microsoft.Azure.KeyVault
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Microsoft.Azure.Services.AppAuthentication
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Microsoft.Extensions.Configuration.AzureKeyVault
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I’ve not include version numbers as these will no doubt get updated over time but hopefully it will still work.&lt;/p&gt;
&lt;p&gt;Now in your Program.cs add the following code, replacing [KeyVaultName] with the name of your Key Vault.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-csharp" data-lang="csharp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;public&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;class&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;Program&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;public&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;static&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;void&lt;/span&gt; Main(&lt;span style="color:#66d9ef"&gt;string&lt;/span&gt;[] args)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; CreateWebHostBuilder(args).Build().Run();
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;public&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;static&lt;/span&gt; IWebHostBuilder CreateWebHostBuilder(&lt;span style="color:#66d9ef"&gt;string&lt;/span&gt;[] args) =&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; WebHost.CreateDefaultBuilder(args)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; .ConfigureAppConfiguration((context, config) =&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;var&lt;/span&gt; builtConfig = config.Build();
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;var&lt;/span&gt; azureServiceTokenProvider = &lt;span style="color:#66d9ef"&gt;new&lt;/span&gt; AzureServiceTokenProvider();
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;var&lt;/span&gt; keyVaultClient = &lt;span style="color:#66d9ef"&gt;new&lt;/span&gt; KeyVaultClient(
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;new&lt;/span&gt; KeyVaultClient.AuthenticationCallback(
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; azureServiceTokenProvider.KeyVaultTokenCallback));
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; config.AddAzureKeyVault(
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#e6db74"&gt;$&amp;#34;https://[KeyVaultName].vault.azure.net/&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; keyVaultClient,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;new&lt;/span&gt; DefaultKeyVaultSecretManager());
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; })
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; .UseApplicationInsights()
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; .UseStartup&amp;lt;Startup&amp;gt;();
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now all you need to do is look at your configuration to pull out secrets from your Azure Key Vault. If you have a secret called AppSecret then you can use the following code snippet to retrieve its value, assuming _configuration is an implementation of Microsoft.Extensions.Configuration.IConfiguration.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-txt" data-lang="txt"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;_configuration[&amp;#34;AppSecret&amp;#34;];
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now if you do all of this and run from an Azure Web App or run locally it will fail to pull anything from the Key Vault. You need to give your web app an identity and configure your key vault to allow access from that identity.&lt;/p&gt;
&lt;p&gt;Once my code has been deployed to an Azure Web App I get the following error.&lt;/p&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="Image" src="https://blog-dev.funkysi1701.com/images/2019/image.png" loading="lazy"
width="1102" height="486"
/&gt;
&lt;/p&gt;
&lt;p&gt;Lets look at fixing that, first lets give my web app an Identity. Open up the Azure portal and find the identity section of your web app and turn the setting on.&lt;/p&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="Image" src="https://blog-dev.funkysi1701.com/images/2019/image-1.png" loading="lazy"
width="1218" height="728"
/&gt;
&lt;/p&gt;
&lt;p&gt;Now you need to grant that identity permission to your key vault. In the portal open up Access Policies in your key vault and click add Policy, select the identity of your web app in the principal box and select the following settings to grant access to your secret.&lt;/p&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="Image" src="https://blog-dev.funkysi1701.com/images/2019/image-2.png" loading="lazy"
width="411" height="855"
/&gt;
&lt;/p&gt;
&lt;p&gt;Now you have a website that can pull secrets out of Key Vault but only that unique identity. Anyone who has access to your source code will not have access to your secrets, even if they push your code to a different Azure Web App.&lt;/p&gt;</description></item><item><title>Tech I want to learn more about</title><link>https://blog-dev.funkysi1701.com/posts/2019/technology-i-want-to-learn-more-about/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Tue, 05 Mar 2019 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2019/technology-i-want-to-learn-more-about/</guid><category term="C-Sharp">C-Sharp</category><category term="Azure">Azure</category><category term="Security">Security</category><description>&lt;p&gt;While at &lt;a href="https://www.funkysi1701.com/posts/2019/microsoft-ignite-the-tour-london" target="_blank" rel="noopener noreferrer"&gt;Microsoft Ignite&lt;/a&gt;
I heard about a lot of cool tech that I want to know more about. The best way to learn something is use it to solve a problem.&lt;/p&gt;
&lt;p&gt;So what can I build that is both useful and will let me play with some new tech?&lt;/p&gt;
&lt;p&gt;I have a Xamarin Forms app Pwned Pass that has over 500 downloads on Google Play and over 80 downloads on the Microsoft Store. This has given me a small user base that I can use to make use of whatever I build.&lt;/p&gt;
&lt;p&gt;My app makes use of the &lt;a href="https://haveibeenpwned.com/API/v3" target="_blank" rel="noopener noreferrer"&gt;HIBP API&lt;/a&gt;
created by Troy Hunt. I am going to build my own API, initially it will just make calls to the HIBP API. Building this will give me experience of building something with .net Core from design to deployment. I have made a start already on doing this, I have an empty .net core API project which deploys to an Azure web app using the build and release pipelines from Azure DevOps.&lt;/p&gt;
&lt;p&gt;You may be wondering why I am not making use of Azure Functions to build this API. Azure functions is certainly a great technology that is worth learning about. However I have done a little bit with them in the past and I don’t believe I would be able to learn all the things I want to if I used Azure Functions. My primary goal is learning and sharing that learning via this blog. It may well be I move to using Azure Functions later on.&lt;/p&gt;
&lt;p&gt;Another tech I am keen to learn more about is &lt;a href="https://learn.microsoft.com/en-gb/azure/key-vault/" target="_blank" rel="noopener noreferrer"&gt;Azure Key Vault&lt;/a&gt;
. This is a technology that allows the securing of keys, connection strings and certificates. I want my app to securely get keys and security information without any of it having to be committed to source code or shared insecurely.&lt;/p&gt;
&lt;p&gt;Monitoring my app is also a key learning from me. I use application insights already, but I would like to extend my understanding of this so telemetry can be fed back into the build and bad deployments stopped.&lt;/p&gt;
&lt;p&gt;Below is my complete list of learning and tech I want to touch on. It is a long list and I imagine it will get longer as I work through it. I want to regularly blog and share what I have been working on. I currently have a working build and release pipeline but nothing of note to build or release. I know Key Vault needs looking at early as the identity of the website in Azure is key to getting that tech working correctly.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Build API with .net core&lt;/li&gt;
&lt;li&gt;Add build and release pipeline&lt;/li&gt;
&lt;li&gt;Make use of Azure KeyVault for secrets, connection strings etc&lt;/li&gt;
&lt;li&gt;Plugin My Xamarin app to make use of it&lt;/li&gt;
&lt;li&gt;Monitor my API with Application Insights&lt;/li&gt;
&lt;li&gt;Secure it with CSPs and log this into &lt;a href="https://report-uri.com/" target="_blank" rel="noopener noreferrer"&gt;Report URI&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Consider building a web frontend to my API using a javascript library or framework. Maybe react but this can be decided later.&lt;/li&gt;
&lt;li&gt;Dockerize the API and add the creation of docker images to the build/release pipeline&lt;/li&gt;
&lt;/ol&gt;</description></item><item><title>Microsoft Ignite | The Tour – London</title><link>https://blog-dev.funkysi1701.com/posts/2019/microsoft-ignite-the-tour-london/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Tue, 26 Feb 2019 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2019/microsoft-ignite-the-tour-london/</guid><category term="Conference">Conference</category><category term="Azure">Azure</category><category term="Microsoft">Microsoft</category><category term="DevOps">DevOps</category><media:content medium="image" type="image/jpeg" url="https://blog-dev.funkysi1701.com/images/2019/02/D0UTj08XgAEo1YJ.jpg"/><description>&lt;p&gt;I have just spent the first day at the conference Microsoft Ignite | The Tour.
&lt;img class="img-fluid" alt="Alt Text" src="https://blog-dev.funkysi1701.com/images/2019/02/D0UTj08XgAEo1YJ.jpg" loading="lazy"
width="1534" height="1018"
/&gt;
The conference was free I just needed to arrange travel and accommodation. Microsoft have really looked after me and all the other guests, breakfast and lunch has been provided, I got a free t-shirt, coffee (or tea) all day plus a beer or glass of wine to end the day. And that’s before you collect any free stuff the vendors are giving away.&lt;/p&gt;
&lt;p&gt;The first session was Designing resilient cloud applications with &lt;a href="https://twitter.com/CodeMillMatt" target="_blank" rel="noopener noreferrer"&gt;Matt Soucoup&lt;/a&gt;
and talked about some cloud technologies like Azure key vault and serving static files from blob storage. Unfortunately this had a few technical issues with the demos. I think it was just connectivity with the MongoDB backend but this slightly spoiled the session. As this was the only technical problem I noticed all day I can let it pass.&lt;/p&gt;
&lt;p&gt;Next was a session on Azure DevOps mainly build and release pipelines called Deploying your application faster and safer with &lt;a href="https://twitter.com/bbenz" target="_blank" rel="noopener noreferrer"&gt;Brian Benz&lt;/a&gt;
. A lot of this I knew but good to reinforce I am doing things correctly.&lt;/p&gt;
&lt;p&gt;Next was a session on Application Insights called Detecting application anomalies with Telemetry with Matt Soucoup.&lt;/p&gt;
&lt;p&gt;Probably the most useful session was on Docker and Kubernetes called Integrate containers and Kubernetes into your Azure DevOps build and release model with &lt;a href="https://twitter.com/crad77" target="_blank" rel="noopener noreferrer"&gt;Marco De Sanctis&lt;/a&gt;
. Going to spend some time looking through the examples from this session.&lt;/p&gt;
&lt;p&gt;A session on Serverless covered Azure Functions, Azure Logic apps and the other Azure Serverless offerings. Investing in Serverless: less servers, more code with &lt;a href="https://twitter.com/simona_cotin" target="_blank" rel="noopener noreferrer"&gt;Simona Cotin&lt;/a&gt;
.&lt;/p&gt;
&lt;p&gt;Lastly was a panel discussion on the changes facing IT Pros and SysAdmins. What is the future of the IT Pro in a DevOps &amp;amp; Cloudy world? with &lt;a href="https://twitter.com/jenstirrup" target="_blank" rel="noopener noreferrer"&gt;Jennifer Stirrup&lt;/a&gt;
, &lt;a href="https://twitter.com/bakionur" target="_blank" rel="noopener noreferrer"&gt;Baki Onur Okutucu&lt;/a&gt;
, &lt;a href="https://twitter.com/AmyKateNicho" target="_blank" rel="noopener noreferrer"&gt;Amy Boyd&lt;/a&gt;
and &lt;a href="https://twitter.com/TheOpsMgr" target="_blank" rel="noopener noreferrer"&gt;Stephen Thair&lt;/a&gt;
. Should they learn to code, how should they make sure they keep up.&lt;/p&gt;
&lt;p&gt;Tomorrow I have a loads more sessions, including ones about mental health, Azure pipelines, more Kubernetes stuff and dealing with failure.&lt;/p&gt;</description></item><item><title>Yaml Builds on Azure DevOps</title><link>https://blog-dev.funkysi1701.com/posts/2019/yaml-builds-on-azure-devops/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Thu, 31 Jan 2019 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2019/yaml-builds-on-azure-devops/</guid><category term="CI">CI</category><category term="Build">Build</category><category term="Azure">Azure</category><category term="DevOps">DevOps</category><category term="AzureDevOps">AzureDevOps</category><description>&lt;p&gt;I have been using Azure DevOps (Or VSTS or VSO etc) for a while now and one of the great features is doing automatic builds with every check-in. This is more commonly known as a CI (continuous integration) build.&lt;/p&gt;
&lt;p&gt;More recently I have started playing about with creating my build using YAML files instead of using the web user interface to create my build.&lt;/p&gt;
&lt;h2 id="why"&gt;Why?&lt;a class="anchor ms-1" href="#why" aria-label="Permalink: Why?"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You may wonder why go to the effort of learning the YAML syntax when you can just create the build in Azure DevOps and then forget about it.&lt;/p&gt;
&lt;p&gt;Mostly it is because the build changes over time and you shouldn’t just forget about it. If something changes over time then you might want to version control it, or look at a previous version.&lt;/p&gt;
&lt;p&gt;Lets say you create a pull request that replaces a .net 4.7 web service with a .net core web service. If you have a CI build this PR will fail because it won’t build. If you change the build first any other builds going on will fail. What you want in this case is the build to be associated with that branch or PR. Any builds before you merge this change in will continue to work and any after this change will also work.&lt;/p&gt;
&lt;h2 id="how"&gt;How?&lt;a class="anchor ms-1" href="#how" aria-label="Permalink: How?"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;How do you get started with YAML builds? Well the first thing is to make sure that YAML builds are turned on, as I write this I believe they are still a feature you can turn on or off. Have a look in Preview features and make sure they are turned on.&lt;/p&gt;
&lt;p&gt;Next look at any of your existing builds and click the View YAML link. This will show you an example YAML file of your existing build. You could just save this as azure-pipelines.yml and checkin to the root of your project. You can also click the add new build pipeline option, this will give you some templates to start you off.&lt;/p&gt;
&lt;p&gt;The YAML file consists of a series of build steps usually called tasks, with a few settings before to configure things like parameters or build agents. Detailed docs about the syntax of the file can be found &lt;a href="https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&amp;amp;tabs=schema" target="_blank" rel="noopener noreferrer"&gt;here&lt;/a&gt;
.&lt;/p&gt;
&lt;p&gt;For my mobile app my YAML files consist of downloading nuget packages, building the solution, building specific projects with desired settings, running powershell or other scripts to set things up and finally publishing the results of the build as artifacts so that they can be used in any releases.&lt;/p&gt;
&lt;h2 id="secure-it"&gt;Secure It!&lt;a class="anchor ms-1" href="#secure-it" aria-label="Permalink: Secure It!"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Avoid committing passwords and secure keys into source control. I have found you can upload secure files via Azure DevOps and then add a download secure files step at the start of your build. This allows the secure file to be used during the build but the contents of the file can’t be viewed by anyone with access to the source code.&lt;/p&gt;
&lt;p&gt;I find it often takes a bit of thinking about how to achieve this, but it is usually possible to keep keys and secrets secure.&lt;/p&gt;</description></item><item><title>Pwned Pass Update</title><link>https://blog-dev.funkysi1701.com/posts/2019/pwned-pass-update/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Wed, 23 Jan 2019 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2019/pwned-pass-update/</guid><category term="Xamarin">Xamarin</category><category term="Android">Android</category><category term="PwnedPass">PwnedPass</category><media:content medium="image" type="image/png" url="https://blog-dev.funkysi1701.com/images/2019/01/image.png"/><description>&lt;p&gt;Its been a while since I first released Pwned Pass so lets have a look at where we are now.&lt;/p&gt;
&lt;p&gt;We are very close to 500 Downloads from Google Play and we have recently smashed past 100 active installs, peaking at 116 and even now we are still over 100. I have had 9 reviews (6 x 5*, 2 x 1 * and a 4 *) which averages out at 4 *
&lt;img class="img-fluid" alt="Alt Text" src="https://blog-dev.funkysi1701.com/images/2019/01/image.png" loading="lazy"
width="906" height="832"
/&gt;
Over Christmas I released a UWP version that can be found in the Microsoft Store. This has currently had 9 downloads and even had a download to Windows Mobile (someone out there still likes the platform!)
&lt;img class="img-fluid" alt="Alt Text" src="https://blog-dev.funkysi1701.com/images/2019/01/image-1.png" loading="lazy"
width="876" height="845"
/&gt;
I have a fairly smooth deployment process using Azure DevOps. After every check in of code a build runs which compiles the UWP and Android versions. The build also increments the version numbers that is required to deploy to either of the app stores.&lt;/p&gt;
&lt;p&gt;Every successful build of the master branch will kick off a release to the Beta track of Google Play. If I am happy I then release to 10% of the Production track, which can then be increased to 100% (or halted). The release to Microsoft Store happens after the Beta track of Google Play. Only reason for this order is that there isn’t a beta area for UWP apps so I want to quickly test change on android before rolling out for windows.&lt;/p&gt;
&lt;p&gt;All these steps require confirmation by me before proceeding and often don’t get further than the beta track.&lt;/p&gt;
&lt;p&gt;A further development is that I have open sourced the source code to &lt;a href=""&gt;github&lt;/a&gt;
do take a look if you are curious or want to contribute. With the purchase by Microsoft there are easy ways to connect github repositories to Azure DevOps. Once I create a Pull Request in github it creates a build in Azure DevOps and all the build and release steps can happen.&lt;/p&gt;
&lt;p&gt;I am still not 100% sure if I want to keep my bug and issue tracking in github or Azure DevOps as both have features for doing so.&lt;/p&gt;
&lt;p&gt;One future improvement I want to make is to automate the creation of screenshots. When I create a new feature and it gets checked in. I would like to automatically created screenshots of the key pages and submit them to the different app stores. Currently I am not sure if this is possible or how to go about it. I have some ideas to experiment with so we will see what I can do.&lt;/p&gt;</description></item><item><title>What I planned to achieve in 2019</title><link>https://blog-dev.funkysi1701.com/posts/2019/lets-see-what-2019-can-do/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Tue, 01 Jan 2019 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2019/lets-see-what-2019-can-do/</guid><category term="Goals">Goals</category><category term=""/><description>&lt;p&gt;This is my annual lets make some goals for the new year blog post. So in no particular order.&lt;/p&gt;
&lt;h2 id="improve-house"&gt;Improve House&lt;a class="anchor ms-1" href="#improve-house" aria-label="Permalink: Improve House"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I can’t outdo last years goal of buying a house but I can continue to make efforts to improve it. I was going to put something about decorating or doing something to our bedrooms, however today I spotted a hole in the roof so this may well absorb most of my home improvement budget.&lt;/p&gt;
&lt;h2 id="connect-with-local-area"&gt;Connect with local area&lt;a class="anchor ms-1" href="#connect-with-local-area" aria-label="Permalink: Connect with local area"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Since we moved in October we haven’t really connected with our local area yet. My only interaction with my neighbours was when my car blocked his drive!&lt;/p&gt;
&lt;p&gt;I am going to make efforts to change this in 2019. I don’t exactly know how yet, but I have some ideas. My son starts nursery and later school this year so could be one way to meet other parents and teachers. I want to connect with a local church, so far this hasn’t happened so need to make more effort with this. There are other local groups that put on child friendly events which would be good to attend.&lt;/p&gt;
&lt;h2 id="lightning-talk"&gt;Lightning Talk&lt;a class="anchor ms-1" href="#lightning-talk" aria-label="Permalink: Lightning Talk"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I failed last year to do this so it is back on my list. I know I must have stuff of value to share so going to try again on this.&lt;/p&gt;
&lt;p&gt;A lightning talk is a very short talk or presentation given at a conference or user group. I am not a natural public speaker so this is a step out of my comfort zone, however I am going to start small and see what happens.&lt;/p&gt;
&lt;p&gt;##Family Holiday
As always we Fosters are going to have a holiday in the summer and have some quality family time. I also want to take the boys to London for a weekend.&lt;/p&gt;
&lt;h2 id="blogging"&gt;Blogging&lt;a class="anchor ms-1" href="#blogging" aria-label="Permalink: Blogging"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This blog has taken a bit of a backseat in 2018 so I want to try and refocus it for 2019. My commitment is for 12 blog posts in 2019, that is one a month. It doesn’t sound like much but I know how easily life can get in the way.&lt;/p&gt;
&lt;p&gt;Having said that my log has had record views this year. 7159 views. However I believe this number to be incorrect and has been inflated by my app development and some of the automated processes taking place.&lt;/p&gt;
&lt;h2 id="routine"&gt;Routine&lt;a class="anchor ms-1" href="#routine" aria-label="Permalink: Routine"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Last goal is to try a get more of a routine going. With two small boys, one of which is starting school in September a routine is going to be essential and will allow all of us all a chance to get more things done.&lt;/p&gt;</description></item></channel></rss>