Thursday, September 30, 2021

How to upload Docker Images into Azure Container Registry using Azure Pipelines | Automate Docker builds using Azure Pipelines | Upload Docker Image into Azure Container Registry (ACR)

We will learn how to build Docker image and upload the Docker images into Azure Container Registry(ACR) using Azure Build pipelines.

Pre-requisites:

1. ACR is setup in Azure cloud. (see below for the steps)
2. Already created Azure DevOps dashboard in 
3. Dockerfile created along with the application source code

How to Create Azure Container Registry?

First Create Resource Group

Make sure you are login to Azure portal first.

az login

Execute below command to create a resource group in Azure portal.

az group create --name myResourceGroup --location southcentralus

Run the below command to create your own private container registry using Azure Container Registry (ACR).

az acr create --resource-group myResourceGroup --name myacrrepo31 --sku Standard --location southcentralus

You can login to Azure portal to see the ACR repo.


How to create a Azure Build Pipeline

1. Login into your Azure DevOps dashboard
2. Click on Pipelines.

3. Click on New Pipeline

4. Click on use the classic editor
Enter your repo name and branch name where you have stored your source code along with Dockerfile

Click on Continue. Now choose the template by typing Docker, Select Docker container and Apply.
 

Now pipeline is created with two tasks already. Now we need to customize it.

Let's modify Build an image task. Choose azure subscription and enter Microsoft credentials and select ACR repo from the drop down


Select Push an image task and select Azure subscription and select ACR repo from the drop down


Add a task for Copying YAML file, enter the Kubernetes deployment YAML file

Add Publish artifact task


Now click Save + Queue and run to start Building the pipeline



Once the build is completed, you should be able to see the Docker images under 
Services --> Repositories


Please watch the above steps in YouTube Channel:

Tuesday, September 14, 2021

Install kubectl on Mac OS | How to install kubectl in MAC OS

Kubernetes uses a command line utility called kubectl for communicating with the cluster API server. It is tool for controlling Kubernetes clusters.  

Kubectl is installable on a variety of Linux platforms, macOS and Windows.

How to install Kubectl in MAC OS

Kubectl can be installed in Mac OS by using Homebrew:

Run the update first and install

brew update && brew install kubectl 
or 
brew install kubernetes-cli

To check the version of Kubernetes CLI

kubernetes version --client

=

Install Azure CLI in Mac OS| How to setup Azure CLI in Mac OS | How to Install Azure CLI in Apple Laptop

The Azure command-line interface (Azure CLI) is a set of commands used to create and manage Azure resources. The Azure CLI is available across Azure services and is designed to get you working quickly with Azure, with an emphasis on automation. Azure CLI is Microsoft's cross-platform command-line experience for managing Azure resources.

Azure CLI can be installed in Mac OS by using Homebrew:

Run the update first

brew update && brew install azure-cli

To check the version of Azure CLI

az version


Run the Azure CLI with the az command. To sign in, use the az login command.

az login

Wednesday, September 1, 2021

How to install Terraform on Red Hat Linux | TerraForm Installation on Red Hat Linux

Terraform is an infrastructure as a code tool used for provisioning infrastructure on most of the cloud platforms. 

  • Open source
  • Can setup entire infrastructure by writing Terraform scripts/templates. 
  • Based on declarative model
  • Uses Hashi Corp Language(HCL) which is JSON format

You can watch this on YouTube channel:

Please find steps for installing Terraform On Enterprise Red Hat Linux.

Create a working directory
sudo mkdir -p /opt/terraform
cd /opt/terraform

Install wget utility
sudo yum install wget -y

Download Terraform from Hasicorp website
sudo wget https://releases.hashicorp.com/terraform/1.0.5/terraform_1.0.5_linux_amd64.zip

Install unzip utility
sudo yum install unzip -y

Unzip Terraform Zip file
sudo unzip terraform_1.0.5_linux_amd64.zip

Add terraform to PATH
sudo mv /opt/terraform/terraform /usr/bin/

terraform -version

Terraform v1.0.5
on linux_amd64

this should show version of Terraform.

DevSecOps Bootcamp Dec 2024 Schedule | DevSecOps & AWS Azure Cloud Coaching by Coach AK | DevSecOps and Cloud Computing Online Classes

Lot of new topics covered like GitHub Actions, GitHub Advanced Security, Helm, Prometheus and Grafana..) The DevOps requirements in the IT m...