Deploy Docker Image with AWS ECS (Part 2)

In Part 1 we uploaded a Docker image to AWS ECR. In this post, we will complete building the ECS Cluster and deploy the container image onto the cluster. Note: The lab I worked on was recreated. The container image was renamed from webfront to testweb. Before we start, you need to understand some ECS basic concepts. Task Definition A task definition describes one or more containers, their relationships, how they should be launched etc.
Read full post

Create a PowerShell Module

Recently I came across an issue on our Hyper-V Cluster. One of the VM was stuck in the “Stopping” state. I had to force the VM to shutdown by kill its process on the Hyper-V host. To do so, I first find out the VM’s GUID and then kill the process with the same GUID. Needless to say, the whole process can be achieved with the PowerShell commands below. \# Get the VM GUID and find the process with the GUID $VM \= Get-VM \-Name $VMName \-ErrorAction Stop $VMGUID \= $VM.
Read full post

Build a PDC in Azure with DSC

There are a lot ARM templates out there can do this. But in this post, we will go through the nitty gritty of using DSC to automate the PDC setup. Before we begin, I assume you already know what DSC is and does. Otherwise, check it out here. First, let’s build a new VM in Azure with these PowerShell commands. In this case, the VM will have direct Internet and can be accessed via Internet directly.
Read full post

Install AWS CLI on WSL Ubuntu

Within Windows command prompt, AWS CLI does not provide autocomplete feature. According to AWS document, the feature is only available on “Unix-like systems”. Luckily we have WSL (Windows Subsystem for Linux)on Windows 10. We can simply run AWS CLI from the WSL with autocomplete provided natively. Problem solved! Here are the steps I took to get AWS CLI installed on my WSL Ubuntu. Before we install AWS CLI package itself, we need to get Python package manager pip installed first.
Read full post

Deploy Docker Image with AWS ECS (Part 1)

One of the things I have been working on is to help our developers to containerize their applications and deploy them to AWS ECS. In this post, I will walk through the steps to upload a Docker image to AWS ECR (Elastic Container Repository). As the first step, we need to provision the ECR with CloudFormation template. Below is a simple CFN template written in YAML. AWSTemplateFormatVersion: "2010-09-09" Description: \> Play stack Parameters: RepoName: Default: tomrepo Description: ECR Repoistory Name Type: String \# required ConstraintDescription: must be a name Resources: myrepo: Type: AWS::ECR::Repository Properties: RepositoryName: !
Read full post