Saturday, October 9, 2021

Certificate verification failed: The certificate is NOT trusted | Jenkins installation Error Fix | Jenkins Installation on Ubuntu 18.0.4

Running sudo apt-get update on my AWS EC2 Ubuntu 18.04.01 LTS instance fails because Certificate verification failed: The certificate is NOT trusted.

Err:6 https://pkg.jenkins.io/debian-stable binary/ Release

Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate.  Could not handshake: Error in the certificate verification. [IP: 199.232.66.133 443]

Fix for the above error

You need to install certificates to overcome this error:

sudo apt install ca-certificates

sudo apt-get update

Now try installing Jenkins

sudo apt install jenkins -y



Friday, October 1, 2021

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

We will learn how to build Docker image and upload 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. We need to configure it.

Let's modify Build an image task.


Select Push an image task


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: