Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment #825

Open
31 of 41 tasks
Vishwas1 opened this issue Jan 23, 2022 · 0 comments
Open
31 of 41 tasks

Deployment #825

Vishwas1 opened this issue Jan 23, 2022 · 0 comments
Assignees

Comments

@Vishwas1
Copy link
Collaborator

Vishwas1 commented Jan 23, 2022

Steps of deployment process in production

Pr-requisite

  • Figure out ENV vars for Frontend
  • Figure out ENV vars for Backend
  • Add database models if any in the prod server

Backend

  • Add database models if any in the prod server
  • Make sure all codes are pushed in stage and develop branches
  • Make sure to update the <version_no> in package.json file.
  • Create a new branch <version_no> from stage
  • SSH into the AWS EC2
  • Clean up logs
    • Clean pm2 logs pm2 flush
    • Clean nginx logs sudo rm -rf /var/logs/nginx
  • cd into src/hyperfyre-backend
  • git checkout <version_no>
  • Update ENV variable if required
  • yarn
  • Run the build yarn build
  • Delete log files rm -rf /tmp/hyperfyre-backend.log
  • pm2 delete all
  • cd src/hyperfyre-backend
  • pm2 start 'yarn start' --name hf-api-server:3004
  • pm2 start 'yarn healthCheck' --name hf-health-checker
  • pm2 start 'yarn start:mail' --name hf-mail-worker
  • pm2 start 'yarn start:webpush' --name hf-webpush-worker
  • Check the logs of all services by pm2 l && pm2 logs <process_ID>

Frontend

  • Make sure all codes are pushed in stage and develop branches
  • Make sure to update the <version_no> in package.json file.
  • Create a new branch <version_no> from stage
  • Take a pull of the branch <version_no> in your local machine
  • git checkout <version_no> && npm i
  • Update ENV variable if required in local. Make sure you update VUE_APP_VERSION in ENV
  • Run the build npm run build
  • Login into AWS console and navigate to S3 services
  • Click on app.fyre.hypersign.id bucket
  • Now copy all files from /hyperfyre-frontend/dist folder and upload on S3/
  • Now that all the files have been uploaded to S3, we need to add invalidation in cloudfront. So navigate to Cloudfront service.
  • Click on app.fyre.hypersign.id alternate domain -> go to invaliadation and create object paths as /*

Post Deployment steps

  • Do end to end testing of the application using test tools or manual test
  • Create release from branch <version_no> in backend
  • Create release from branch <version_no> in frontend
  • Merge branch <version_no> to master in backend
  • Merge branch <version_no> to master in frontend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants