- hosts need to be setup in the
host
file &.ssh/config
- run using the following command
ansible-playbook -i hosts bare-metal-setup.yml -vv
- Install Git
- Install NPM
- Install N (version manager)
- Install NodeJS
- Install ZSH
- Install Oh-my-zsh
- Install PM2
- Copies SSH Keys
- Copies Env vars
- Copies AWS Credentials
- Clones API
- Installs npm packages
- Starts applications using PM2
- Runs wget /ping test on localhost
- Install & setup NGINX (serving path root as /home/ubuntu/sx-app-build)
- Copies SSH Keys
- Clones APP
- Copies .env file to sx-app directory
- Installs npm packages
- Builds and copies app files to sx-app-build directory
- Runs wget /index.html test on localhost
- Copies Env vars (.profile) to server
- Update single env var in .profile on the server - Optional
- Source .profile & restart api
- Runs wget /ping test on localhost