SonarQube VM by Anarion Technologies
SonarQube is a leading open-source platform for continuous inspection of code quality, providing developers with tools to manage code quality and security comprehensively. It supports over 25 programming languages, making it a versatile choice for diverse development environments. SonarQube integrates seamlessly into your existing DevOps pipeline, ensuring that code quality checks are an integral part of your continuous integration and continuous delivery processes.
Features:
- Automatic Code Review: Detects bugs, vulnerabilities, and code smells in real-time, providing instant feedback to developers.
- Multi-language Support: Analyzes code in over 25 programming languages, including Java, C#, JavaScript, TypeScript, Python, and more.
- Quality Gates: Establishes thresholds for code quality, ensuring that only code meeting specified standards is allowed to proceed in the development pipeline.
- Security Vulnerabilities: Identifies security hotspots and vulnerabilities using the OWASP Top 10, CWE, and SANS standards.
- Technical Debt Management: Measures and tracks technical debt, helping teams understand and manage the cost of maintaining their codebase.
Ports:
- HTTP: 9000 (default port for accessing the SonarQube web interface)
- HTTPS: Customizable based on configuration for secure access
Login:
- Default Admin Credentials:
- Username: admin
- Password: admin
- It is highly recommended to change the default credentials upon first login to enhance security.
To subscribe to this product from Azure Marketplace and initiate an instance using the Azure compute service, follow these steps:
1. Navigate to Azure Marketplace and subscribe to the desired product.
2. Search for “virtual machines” and select “Virtual machines” under Services.
3. Click on “Add” in the Virtual machines page, which will lead you to the Create a virtual machine page.
4. In the Basics tab:
- Ensure the correct subscription is chosen under Project details.
- Opt for creating a new resource group by selecting “Create new resource group” and name it as “myResourceGroup.”
5. Under Instance details:
- Enter “myVM” as the Virtual machine name.
- Choose “East US” as the Region.
- Select “Ubuntu 18.04 LTS” as the Image.
- Leave other settings as default.
6. For Administrator account:
- Pick “SSH public key.”
- Provide your user name and paste your public key, ensuring no leading or trailing white spaces.
7. Under Inbound port rules > Public inbound ports:
- Choose “Allow selected ports.”
- Select “SSH (22)” and “HTTP (80)” from the drop-down.
8. Keep the remaining settings at their defaults and click on “Review + create” at the bottom of the page.
9. The “Create a virtual machine” page will display the details of the VM you’re about to create. Once ready, click on “Create.”
10. The deployment process will take a few minutes. Once it’s finished, proceed to the next section.
To connect to the virtual machine:
1. Access the overview page of your VM and click on “Connect.”
2. On the “Connect to virtual machine” page:
- Keep the default options for connecting via IP address over port 22.
- A connection command for logging in will be displayed. Click the button to copy the command. Here’s an example of what the SSH connection command looks like:
“`
ssh [email protected]
“`
3. Using the same bash shell that you used to generate your SSH key pair, you can either reopen the Cloud Shell by selecting >_ again
or going to https://shell.azure.com/bash.
4. Paste the SSH connection command into the shell to initiate an SSH session.
Usage/Deployment Instructions
Anarion Technologies – SonarQube
Note: Search product on Azure marketplace and click on “Get it now”
Click on Continue
Click on Create
Creating a Virtual Machine, enter or select appropriate values for zone, machine type, resource group and so on as per your choice.
After Process of Create Virtual Machine. You have got an Option Go to Resource Group Click Go to Resource Group
Copy the Public IP Address
Click on the Network Security Group: sonarqube-nsg
Click on Inbound Security Rule
Click on Add
Add Port
Destination Port Ranges Section* (where default value is 8080)
9000
Select Protocol as TCP
Option Action is to be Allow
Click on Add
Click on Refresh
Go back to the Resources Group
Copy the Public IP Address
Use the browser to access the application at http://”instance ip address:9000″
In case IP address in not Working SSH in your Virtual Machine and run these following
commands:
$ cd sonarqube
$ docker-compose up
Use the browser to access the application at http://”instance ip address:9000″
Login Page of Sonarqube
Default
Login Creds of SonarQube
Login: admin
Password: admin
SonarQube will prompt you to change your password.
SonarQube Homepage
Configuring SonarQube
After changing the password, you can configure SonarQube according to your project’s requirements. You can create projects, set up quality gates, and analyze code by following the on-screen instructions.
In order to stop SonarQube, run below command.
$ docker-compose stop sonarqube
Stopping sonarqube … done
$
To start sonarqube, run
$ docker-compose start sonarqube
Starting sonarqube ... done
$
To remove and uninstall sonarqube, run
$ docker-compose rm sonarqube
That’s all from this guide, I hope you have found it informative and
useful.
Thankyou!!