Skip to content

voleche09/ansible_nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Node Js deployed using ansible

This is a sample project of how you can deploy a node JS application using ansible and vagrant.

This will install the following on a CentOS 7 VM

  • Node.js
  • Express
  • A sample of the node js app

Getting Started

You will need to install the following

Installing

To get the project running download the project.

Open the terminal and cd to the project (directory containing the README.md and Vagrantfile)

cd [project name]

Build virtual machine by running command below

vagrant up

If an error occurs when running vagrant up or if you have changed anything on the playbook after running vagrant up you can run the command below

vagrant provision

Note: vagrant provision is only ran after errors that may occur after vagrant up has been ran or if you have changed the playbook.

Edit your host file Follow link to see how to by adding the line

192.168.60.4 nodejs.test

This allows you to connect to the vm using a test hostname rather than the ip

Open your browser and access link http://nodejs.test/

To shutdown or kill vm

To shutdown the VM run the following command on the project directory

vagrant halt

To kill or destroy the VM run the following command on the project directory

vagrant destroy

Authors

License

This project is licensed under the CC0 1.0 Universal Creative Commons License - see the LICENSE.md file for details

Acknowledgments

About

A sample project of deploying node js using ansible

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published