Skip to content

Karan96Kaushik/AnsibleScripts

Repository files navigation

sx-ansible-playbook

Overview

Execution

  1. hosts need to be setup in the host file & .ssh/config
  2. run using the following command ansible-playbook -i hosts bare-metal-setup.yml -vv

Bare metal setup

  1. Install Git
  2. Install NPM
  3. Install N (version manager)
  4. Install NodeJS
  5. Install ZSH
  6. Install Oh-my-zsh

Application setup - API

  1. Install PM2
  2. Copies SSH Keys
  3. Copies Env vars
  4. Copies AWS Credentials
  5. Clones API
  6. Installs npm packages
  7. Starts applications using PM2
  8. Runs wget /ping test on localhost

Application setup - APP

  1. Install & setup NGINX (serving path root as /home/ubuntu/sx-app-build)
  2. Copies SSH Keys
  3. Clones APP
  4. Copies .env file to sx-app directory
  5. Installs npm packages
  6. Builds and copies app files to sx-app-build directory
  7. Runs wget /index.html test on localhost

Env Update - API

  1. Copies Env vars (.profile) to server
  2. Update single env var in .profile on the server - Optional
  3. Source .profile & restart api
  4. Runs wget /ping test on localhost

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages