QE Processes - JU-DEV-Bootcamps/ERAS GitHub Wiki

Purpose

Explain how QE work is done day-to-day

🚀 Deployment Process

Standardize QE responsibilities during deployment of changes to Development environment

Requirements:

  1. Have installed Ubuntu
  2. Have Installed DBeaver

Database Configuration

Process to configure the Database locally for development environment:

  1. Have installed DBeaver 26.0.1 and open it

  2. Create a new Connection with name postgres and the following configuration 5.1 Select PostgreSQL 5.2 Set Main tab Host 127.0.0.1 Database: postgress Username: eras_user Password: eras_password Show all databases: Checked 5.3 Set SSH tab Host/IP: 10.24.80.173 User Name: ubuntu Authentication Method: Public Key Private Key: [Search for test_act.pem to open key for dev environment]

  3. Create a new database for with name:eras_db

Deployment steps (step-by-step):

  1. Open Github and Navigate to ERAS Project Dashboard https://github.com/orgs/JU-DEV-Bootcamps/projects/2

  2. Check that Ready for 'Testing > testing' column display any item(s)

  3. Verify that there are pull requests pending to be deployed

  4. Open DBeaver

  5. Recreate eras_db.Delete eras_db and recreate it with the same name(This steps is done only if Data is corrupted or DB changes)

  6. Ubuntu should be already installed

  7. Open file explorer and type \wsl$

  8. Navigate to \wsl.localhost\Ubuntu\home\lenny

  9. Copy the test_act.pem key to this folder

  10. Open Ubuntu terminal 6.1 Set Permissions:
    Chmod 600 test_act.pem 6.2 Connect to the Dev environment:
    ssh -i test_act.pem [email protected] 6.3 List the containers: docker ps 6.4 Stop docker containers of both Frontend and Backend docker stop ==> Frontend docker stop ==> Backend 6.5 Clean the containers stopped docker system prune

  11. Go back to GitHub

  12. Navigate to Repositories and search for ERAS: https://github.com/JU-DEV-Bootcamps/ERAS

  13. Click on Actions

  14. Select Deploy process on runner https://github.com/JU-DEV-Bootcamps/ERAS/actions/workflows/stage_deploy_runner.yml

  15. Expand 'Run Workflow' dropdown and set development branch Use Workflow from: develop Select the environment: develop

  16. Click Run Workflow

  17. Wait until deployment is completed successfully 12-20 mins approximately

  18. Open the development environment and verify it works as expected

If any issues: If deployment failed, inform to Technical Lead

Process to generate a new Key to be approved

  1. Navigate ERAS main repository https://github.com/JU-DEV-Bootcamps/ERAS
  2. Navigate to User navigation settings(top right section) > Settings
  3. Click on Developer settings
  4. Expand Personal access tokens
  5. Select Tokens(classic)
  6. Click 'Generate new token' > Generate New token (Fine-grained, repo-spoke)
  7. Configure token Name: [Token name]
  • Description: e.g.: Eras Key to deploy Backend and Frontend
  • Expiration: 30 days(! not possible to generate for more days)
  • Repository access: All repositories
  • Resource owner: JU-DEV-Bootcamps
  • Set permission: Actions Read and write Variables Read-only Administration Read-only Artifact metadata Read-only Attestations Read-only Codespaces Read and write Codespaces lifecycle admin Read and write Codespaces metadata Read-only Codespaces secrets Read and write Contents Read-only Dependabot secrets Read-only Deployments Read and write Discussions Read-only Environments Read-only Issues Read-only Merge queues Read-only Metadata Read-only Pages Read-only Pull requests Read-only Secret scanning alert dismissal requests Read-only Repository security advisories Read-only Custom properties Read-only Webhooks Read-only Secret scanning alerts Read-only Secret scanning push protection bypass requests Read-only Secrets Read-only Code scanning alerts Read and write Commit statuses Read-only Dependabot alerts Read-only Workflows Read and write
  1. Click "Generate token"
  2. Send request for approval to Technical lead(Marcel)
  3. Once approved, 'copy the personal access token'. If needed regenerate the token for the key and copy it
  4. Navigate to Settings page of Main repository https://github.com/JU-DEV-Bootcamps/ERAS/settings
  5. Select 'Secret and variables'> Actions
  6. Search in the 'Repository secrets' for PAT_TOKEN
  7. Click on edit of PAT_TOKEN item and paste the token generated, then click on 'Update secret'