-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/ahmed-bahaa/ansible
- Loading branch information
Showing
2 changed files
with
59 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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` |