Skip to content

sagar-18/ansible-nodejs-deploy-proj

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

ansible-nodejs-deploy-proj

Setting up Nodejs Application using ansible

OS: Ubuntu 22 (Control Node)

Step 1: Update OS

sudo apt update

Step 2: Install Ansible

sudo apt install ansible

Step 3: Check if it is installed

sudo ansible --version

Screenshot 2023-04-27 at 11 35 41 AM

Step 4: Generate an SSH key pair on the control node

ssh-keygen

Step 5: Copy the public key from control to the host server

ssh-copy-id usernameofhost@ipaddressofhostserver

Step 6: Test the SSH connection

You can test the SSH connection from the control node to the host server using the following command:

ssh hostuser@host_ip_address

Screenshot 2023-04-27 at 11 46 43 AM

Step 7: Create the inventory file

sudo vim /etc/ansible/hosts and add hosts ip address - e.g. 164.92.249.174

Screenshot 2023-04-27 at 11 55 08 AM

Step 8: Create the playbook file

Screenshot 2023-04-27 at 4 24 58 PM

Step 9: Run this playbook file now Command: sudo ansible-playbook -i /etc/ansible/inventory deploy_task_manager.yml

Screenshot 2023-04-27 at 4 19 29 PM

Step 10:

Screenshot 2023-04-27 at 4 23 24 PM

APP IS LIVE ON HOST NODE:

Screenshot 2023-04-27 at 4 19 53 PM

About

Setting up Nodejs Application using ansible

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published