Thursday, October 1, 2020

Install Azure CLI in Ubuntu 18.0.4 | How to setup Azure CLI in Ubuntu 18.0.4 |

Azure CLI can be installed by following below steps:

Run the update first
sudo apt-get update


sudo apt-get install ca-certificates curl apt-transport-https lsb-release gnupg

curl -sL https://packages.microsoft.com/keys/microsoft.asc |
    gpg --dearmor |
    sudo tee /etc/apt/trusted.gpg.d/microsoft.gpg > /dev/null


AZ_REPO=$(lsb_release -cs)
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" |
    sudo tee /etc/apt/sources.list.d/azure-cli.list


sudo apt-get update
sudo apt-get install azure-cli


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

az login

Tuesday, September 22, 2020

How to change default port number in Tomcat? | Change default port number in Tomcat | Change default port number in Tomcat

The default port number for Tomcat is 8080. It can be changed though by modifying the below properties file.

sudo vi /var/lib/tomcat9/conf/server.xml



 

 

 

Modify the desired port no in the above file. once you modify, you need to restart Tomcat service to take effect.

sudo service tomcat9 stop

sudo service tomcat9 start

sudo service tomcat9 status
Click here to see steps for how to install Tomcat9 on Ubuntu.

Thursday, September 17, 2020

How to create AKS cluster in the Azure portal | How to connect to AKS cluster in Azure Portal

 Azure Kubernetes Service (AKS)

AKS allows you to quickly deploy a production ready Kubernetes cluster in Azure, deploy and manage containerized applications more easily with a fully managed Kubernetes service. 

AKS reduces the complexity and operational overhead of managing Kubernetes by offloading much of that responsibility to Azure. As a hosted Kubernetes service, Azure handles critical tasks like health monitoring and maintenance for you. The Kubernetes masters are managed by Azure. You only manage and maintain the agent nodes. As a managed Kubernetes service, AKS is free - you only pay for the agent nodes within your clusters, not for the masters.

We will see how to create AKS cluster in portal Azure.

1. go to https://portal.azure.com/#home

2. Click on Kubernetes services


3. Click on Add Kubernetes Cluster

4. Click on Add Kubernetes Cluster
 Enter information below:
 
 

5. Enter node count as 2, choose standard size

6. Click on Create after making sure validations are passed:
 

This is will take at least 2 to 5 mins to create AKS clusters. If all goes well, you should be able to see the cluster.

Once it is created, go to Kubernetes Services, click on cluster name.

 
How to connect to AKS cluster using Azure CLI

Now click on the cluster name, click on connect.


Make sure you have Azure CLI is installed on your local machine in order to connect to AKS cluster.

Connect to Azure portal using Azure CLI first.

az login

Enter your Microsoft credentials

az account set --subscription subscription_id

az aks get-credentials --resource-group AKS-POC --name AKS-POC

# List all deployments in a specific namespace
kubectl get deployments --all-namespaces=true





# List all deployments in a specific namespace
kubectl get deployments --namespace kube-system
 
Please watch the above steps in YouTube video:

Monday, August 31, 2020

How to change default port number for SonarQube? | Change default port number in Sonarqube | SonarQube default port number change

The default port number for SonarQube is 9000. It can be changed though by modifying the below properties file.

$sonar_install-dir/conf/sonar.properties



 

 

Let's say you want to change from default port 9000 to 9095. you need to make changes in the above file and restart the service.

once you modify, you need to restart SonarQube service to take effect.

sudo systemctl stop sonar

sudo systemctl start sonar

sudo systemctl status sonar

Now you can access SonarQube in the new port 9095.

Note: Make sure you open the new port no in security firewall rules.
Please watch how to do this YouTube as well:
 


Tuesday, August 25, 2020

How to change default port number in Sonatype Nexus 3? | Change default port number in SonaType Nexus 3 | Change default port number in Nexus

The default port number for Sonatype Nexus is 8081. It can be changed though by modifying the below properties file.

$install-dir/etc/nexus-default.properties

Modify the desired port no in the above file. once you modify, you need to restart Nexus service to take effect.

sudo service nexus stop

sudo service nexus start

sudo service nexus status


 

Click here to see steps for how to install Nexus on Redhat.
Click here to see steps for how to install Nexus on Ubuntu.

Monday, August 24, 2020

Get Token request returned http error: 400 and server response when connecting to Azure

I'm having trouble accessing logs (or anything else) via az-cli.

i'm getting the below error:

 Get Token request returned http error: 400 and server response: {"error":"invalid_grant","error_description":"AADSTS50173: The provided grant has expired due to it being revoked}.

Root cause:

If you did not connect to your azure account for long time, you may get this error. or if you stopped and started azure VM, you may get into this issue.

Solution:

You need to login to Azure account using CLI.

1. az account clear
2. try az login using your latest password, the one you can login azure portal.