Skip to main content

Posts

Use Azure DevOps to queue a Jenkins job

There are SO many CICD platforms. It's pretty hard to figure out which one to use and which one will be right for you. That's why a lot of organizations use two. Just as an example: you can use Azure DevOps to queue an Octopus Deploy release. The primary reason is because simply, different CICD tools give different features and functions. Some do continuous integration better, some do continuous delivery better, some have better plugins, some have better test features, some maintain artifacts better.. the list goes on and on.


I have used a few CICD tools together. Azure DevOps/Jenkins, Jenkins/GitLabCI, and Azure DevOps/Octopus Deploy. In my experience it all depends on your use-case. Sometimes it may not be relevant to use two together. For example, I personally like the power that you get from the Azure DevOps PowerShell task over the Jenkins PowerShell plugin, so in that case I would use Azure DevOps to deploy PowerShell, but use Jenkins to build my artifact. 
What will you…

Working with GitHub new CLI

GitHub has officially released their GitHub CLI beta which is written in Golang! This is truly a game-changer for anyone using GitHub actions for professional or personal purposes. It has never been easier to interact with GitHub at a programmatic level. GitHub CLI allows you to do anything from clone repositories to create branches to interact with PRs.


GitHub CLI Tutorial In this tutorial we will take a programmatic look first-hand on how to interact with the GitHub CLI. We will customize our workflow with an existing repository. I will be using my PwshDocker module that I created and can be found here
Github HUB Installation will depend on the Operating System you are running. All installation methods can be found here. In my case, I will be installing on Windows using the chocolatey Windows package manager.

Installing Github HUB
If you're using Windows, you will run choco install hub at the terminal. If you are using OS X, you will run brew install hub at the terminal.

To co…

What will DevOps be in 2020?

DevOps was not "coined" until 2009, but it has been around for a very long time. It was discussed in 2006, but before that it didn't have a name. What was DevOps supposed to be or why was it coined in the first place?



There are many ideas around what DevOps is supposed to be in 2020. There were also many ideas on what it was supposed to be in 2019, 2018, 2017,2016, 2015, etc etc.

What was DevOps supposed to be? (In my humble opinion) First and foremost, DevOps was never supposed to be a title. We weren't supposed to have DevOps Engineers or DevOps Architects. The biggest reason why it started was because Devs and Operations did not work together. There were hundreds of old-school change management meetings, people throwing work over the fence, throwing their hands up, and saying "not my problem". It was a way to bring everyone together. Not just "Devs" or "Ops" either. This included security practitioners, storage admins, compliance offi…

Deploy an Atlassian Bamboo CICD server in Docker

Spinning up an instance or virtual machine may not always be necessary. Using a Docker container to replace an instance or VM is a saver on not only time, but resources. Having the ability to manage your entire Continuous Integration and Continuous Delivery (CICD) platform right from a container is ideal because you don't have to worry about spinning up extra resources. In your development environment, you can easily spin up Bamboo to test features and get started.

PrerequistiesAn understanding of DockerDocker installed on the operating system you're using. Installation instructions can be found hereDocker version 19.03.5 or aboveVisual Studio Code which can be installed here Preparing the environment Switching to Linux containers If you are on Windows, you will need to use Linux containers. The bamboo-server Docker image is built in Linux, so it can only be used with Linux containers. The difference between Windows images and Linux images is what operating system the Docker i…

Creating a DB using the .NET SQLConnection class in PowerShell

Lately I've been working a lot more with databases. It's been quite fun and extremely interesting to me. SQL is an amazing programming language in itself. The ability to understand databases is an invaluable task. How your data gets stored, how your columns get created, how the data flows through your applications into your database, and the list goes on and on.

The primary database I work with at the moment is Microsoft SQL. Having the ability to run T-SQL queries in PowerShell is a must-have for me. There is a PowerShell module called the SQL Server PowerShell Module that comes with rich cmdlets and features. I was curious to look a little deeper under the hood and see how I could interact with SQL using .NET.

Today we're going to do just that. Let's get started.


Prerequisites  1. SQL Express. This is actually an incredibly easy pre-req. SQL Express is a free version of Microsoft SQL Server that you can easily install on your Windows 10 machine. To install SQL Expres…

Popular posts from this blog

Run PowerShell code with Ansible on a Windows Host

Ansible is one of the Configuration Manager kings in the game. With it's easy-to-understand syntax and even easier to use modules, Ansible is certainly a go-to when you're picking what Configuration Management you want to use for your organization. Your question may be "but Ansible is typically on Linux and what happens when I'm in a Windows environment?". Luckily I'm here to tell you that Ansible will still work! I was pleasantly surprised with how easy it is to use Ansible on Windows with a little WinRM magic. Let's get started.

Pre-requisites for this post:
1) WinRM set up to connect to your Windows host from Ansible
2) Ansible set up for Windows Remote Management
3) SSH access to the Ansible host
4) Proper firewall rules to allow WinRM (port 5985) access from your Ansible host to your Windows host
5) Hosts file set up in Ansible that has your IP or hostname of your Windows Server.
6) At least one Linux host running Ansible and one Windows Server host …

Running PowerShell commands in a Dockerfile

As Docker continues to grow we are starting to see the containerization engine more and more on Windows. With the need for containers on Windows, we also need the same automation we get in Linux with Dockerfiles. Today we're going to create a Dockerfile that runs PowerShell cmdlets.
Prerequisites; 1. Docker for Windows
2. A code editor (VSCode preferred)

Let's go ahead and get our Dockerfile set up. Below is the Dockerfile I used for this post.

As you can see from the below, this is a tiny Dockerfile. What this will do install is install the IIS Windows Feature and create a new file in C:\ called config

from mcr.microsoft.com/windows/servercore:1903 MAINTAINER Michael Levan RUN powershell -Command Install-WindowsFeature -Name Web-Server RUN powershell -Command New-Item -Type File -Path C:\ -Name config
Next let's create a running container out of our image. First we'll need to run docker image ls to get our Image ID. Then we'll create a new container by running docker ru…

Using Azure DevOps and Terraform to deploy infrastructure

Terraform has been gaining more and more traction throughout 2019. With version 0.12, it gained even more traction. With it's bracket-based syntax and large library of providers (providers are what APIs you can hit. Azure, AWS, etc.), it provides a plethora of options for automating your infrastructure.

This example will be a very basic example of using Terraform, but if you would like something more sophisticated (building a certain piece of infrastructure, tfvars, Terraform variables, Terraform state, etc.) please feel free to reach out and ask.

Pre-requisites 1. An Azure DevOps account
2. A repo that's ready to commit your Terraform code and YAML pipeline to. I'm using Azure Repos.
3. The Terraform extension in Azure DevOps. For directions please visit: https://docs.microsoft.com/en-us/azure/devops/marketplace/install-extension?view=azure-devops&tabs=browser
4. An Azure DevOps project that you have access to.
5. A storage account to hold your Terraform state.


provider…