🚀 Database Installations

Setup MySQL on Amazon Linux 2 & Ubuntu Instances

📌 MySQL Database on Amazon Linux 2 Instance

sudo yum update -y
sudo yum install -y mariadb-server
sudo systemctl start mariadb
sudo systemctl enable mariadb
sudo mysql_secure_installation
sudo systemctl status mariadb
                        

📌 MySQL Database Configuration

# To configure MySQL
vi /etc/my.cnf
bind-address=0.0.0.0

# Restart MariaDB service
sudo systemctl restart mariadb

# To give grant access
mysql -u root -p

# Grant privileges to root
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '1234' WITH GRANT OPTION;
FLUSH PRIVILEGES;
                    

📌 MySQL Database on Ubuntu Instance

sudo apt update
sudo apt install -y mysql-server
sudo systemctl start mysql
sudo systemctl enable mysql
sudo mysql_secure_installation
sudo systemctl status mysql
                        

🚀 Docker Installation

Setup Docker on Amazon Linux 2

📌 Docker Installation Steps

sudo yum update -y
sudo yum install -y docker
sudo systemctl enable docker
sudo systemctl start docker
sudo systemctl status docker
docker --version
sudo yum install -y git
# Install Docker Compose
sudo curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version
                        

🚀 Ansible Installation

Setup Ansible on Amazon Linux 2

Ansible Master node

curl -sL https://raw.githubusercontent.com/sakit333/ansible_insta/refs/heads/main/master_ansible_node.sh | bash
                        
Run this only in Master Node
After this need to do manual steps to add Worker Nodes

Ansible Worker nodes

curl -sL https://raw.githubusercontent.com/sakit333/ansible_insta/refs/heads/main/worker_ansible_node.sh | bash
                        
Run this in all the worker nodes

KubeAdm Cluster Installation

Setup Kubeadm Cluster on Ubuntu 24.04

Kube Master node

curl -sL https://raw.githubusercontent.com/sakit333/kubernetes-v1.30.10-cluster-kubeadmdm/refs/heads/main/master_kube.sh | bash
                        
Run this only in Master Node
After this need to do manual steps to add Worker Nodes

Kube Worker nodes

curl -sL https://raw.githubusercontent.com/sakit333/kubernetes-v1.30.10-cluster-kubeadmdm/refs/heads/main/sak_worker_kube.sh | bash
                        
Run this in all the worker nodes

🚀 Nexus Repository Setup

Add Nexus Repositories and Distribution Management

📌 Nexus Repositories in pom.xml

<repositories>
    <repository>
        <id>nexus-releases</id>
        <name>maven-releases</name>
        <url>http://localhost:8081/repository/maven-releases/</url>
    </repository>
    <repository>
        <id>nexus-snapshots</id>
        <name>maven-snapshots</name>
        <url>http://localhost:8081/repository/maven-snapshots/</url>
    </repository>
</repositories>
                          
<distributionManagement>
    <repository>
        <id>nexus-releases</id>
        <url>http://localhost:8081/repository/maven-releases/</url>
    </repository>
    <snapshotRepository>
        <id>nexus-snapshots</id>
        <url>http://localhost:8081/repository/maven-snapshots/</url>
    </snapshotRepository>
</distributionManagement>
                        

📌 Nexus Settings.xml

<settings>
    <servers>
        <server>
            <id>nexus-releases</id>
            <username>admin</username>
            <password>admin</password>
        </server>
        <server>
            <id>nexus-snapshots</id>
            <username>admin</username>
            <password>admin</password>
        </server>
    </servers>
</settings>