Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/ahmed-bahaa/ansible
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmed-bahaa committed Mar 26, 2019
2 parents a9d0049 + e90d93f commit eea5f75
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 6 deletions.
37 changes: 37 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.provider :virtualbox do |v|
v.memory = 1024
end

config.vm.define "master" do |master|
master.vm.hostname = "master-server"
master.vm.network :private_network, ip: "192.168.10.10"
end

config.vm.define "nginx" do |nginx|
nginx.vm.hostname = "nginx"
nginx.vm.network :private_network, ip: "192.168.10.11"
nginx.vm.network "forwarded_port", guest:80,host:9996

end

config.vm.define "node" do |node|
node.vm.hostname = "nodeapp"
node.vm.network :private_network, ip: "192.168.10.12"
node.vm.network "forwarded_port", guest:80,host:9997

end

config.vm.define "angular" do |angular|
angular.vm.hostname = "angularapp"
angular.vm.network :private_network, ip: "192.168.10.13"
angular.vm.network "forwarded_port", guest:80,host:9998
end

config.vm.define "mongo" do |mongo|
mongo.vm.hostname = "mongodb"
mongo.vm.network :private_network, ip: "192.168.10.14"
mongo.vm.network "forwarded_port", guest:27017,host:9999
end
end
28 changes: 22 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
# Nodejs Deployment
## this playbook will help deploy the following:
## Nginx as reverse proxy
## Mongodb
## Nodejs server
## Angularjs
# Ansible Nodejs Deployment
**this playbook will help deploy the following:**
* Nginx as reverse proxy
* Mongodb
* Nodejs server
* Angularjs

### prerequisite
_centos7_
### Installation
* setup your environment using vagrant file which contains:
* master
* nginx server
* nodejs server
* angular server
* mongodb server
* install master ssh key on the remaining servers
* install ansible
* clone my playbook

### Running the Playbook
`$ ansible-playbook -i inventory main-play.yml`

0 comments on commit eea5f75

Please sign in to comment.