Skip to content

iliasschem/automate-server-provisioning-and-node-app-deployment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Automate-server-provisioning-and-node-app-deployment

This repos aims to give a simple example of how to automate a server provisioning and node app deployment using Ansible

Dependencies

Steps to start the project

  • Build you server, run:
docker-compose up -d
  • Try to connect to the server with ssh:
ssh root@localhost

root password: root

  • In 'DevOps/devops/create-user/public-keys' create a new file 'firstName.lastName.pub'

  • Add your public key:

ssh-keygen -t rsa
cat ~/.ssh/id_rsa.pub

copy and past the result to your file 'firstName.lastName.pub'.

  • To create the user 'superUser', run command:
yarn create:user

Vault password 'hello'

  • Start provisioning your server:
yarn provision
  • To deploy your application:
yarn deploy
  • To connect to your server:
ssh superUser@localhost

Now you are connected to the server. You can check if you application is deployed.

More info

  • To encrypt you password using Ansible vault, run:
 ansible-vault encrypt_string '***Password***'

in our case we encrypt the superUser password, you can find the result in 'DevOps/devops/create-user/vars/main.yml' the vault password used is 'hello'

About

Automate server provisioning and node app deployment using Docker and Ansible

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published