This repository contains robust bash scripts to automate the deployment and management of standard Devops tools (Jenkins, Tomcat, SonarQube, and PostgreSQL) on a fresh Linux server (e.g., Ubuntu on AWS EC2).
- A Linux server (Ubuntu 22.04+ recommended)
- Minimum Specifications: For SonarQube, your server MUST have at least 2GB RAM (e.g.,
t3.small). An instance likem7i-flex.large(8GB RAM) is highly recommended. - Sudo privileges
This is the main installation manager. You can use it to pick and choose which tools you want to install.
- Clone this repository to your server:
git clone https://github.com/SuhasLingam/devops.git cd devops - Make the scripts executable:
chmod +x *.sh - Run the installer:
./install_services.sh
- An interactive menu will appear. Type the number corresponding to the tool you want to install and press Enter.
Note on SonarQube: If you choose Option 3 (SonarQube & PostgreSQL), ensure that the
sonarqube.shfile is located in the exact same directory where you are running the command.
Once your tools are installed, you can easily stop, start, or check the status of all of them simultaneously using the management script.
- Make the management script executable:
chmod +x manage_services.sh
- Run the manager:
./manage_services.sh
- Use the interactive menu to
Start all services,Stop all services, orCheck status.
After installation and startup, access your tools at these default ports:
- Jenkins:
http://<your-server-ip>:8080 - Tomcat:
http://<your-server-ip>:8085(Changed from default 8080 to prevent conflict with Jenkins) - SonarQube:
http://<your-server-ip>:9000(Default Login:admin/admin)
This script automates the Master-Node architecture for Ansible on AWS Ubuntu instances.
- On the Node instances:
- Run
chmod +x ansible_setup.sh - Run
./ansible_setup.shand choose Option 2 (Node).
- Run
- On the Master instance:
- Run
chmod +x ansible_setup.sh - Run
./ansible_setup.shand choose Option 1 (Master). - Enter the number of nodes and their Private IPs when prompted.
- The script will install Ansible, configure hosts, and establish trust with the nodes.
- Run
- Verify Connection:
- Switch to the devops user:
su - devops - Test connectivity:
ansible all -m ping
- Switch to the devops user: