Team Members | Github Id | NUID |
---|---|---|
Suhas Pasricha | suhas1602 | 001434745 |
Puneet Tanwar | puneetneu | 001409671 |
Cyril Sebastian | cyrilsebastian1811 | 001448384 |
Shubham Sharma | shubh1646 | 001447366 |
This is the backend for the web application developed for CSYE 7374 course. We have used node.js and express.js to create REST API endpoints for a recipe management system. We are using PostgresQL for the database.
In order to run the application, navigate to the webapp folder and run "node index.js".
If running the application locally, create a .env file at the root of the project with the following variables
ENVIRONMENT = development
WEBAPP_PORT =
DB_USER =
DB_HOST_NAME =
DB_DATABASE_NAME =
DB_PASSWORD =
DB_PORT =
S3_BUCKET =
AWS_ACCESS_KEY_ID =
AWS_SECRET_ACCESS_KEY =
REDIS_HOST = 127.0.0.1
REDIS_PORT = 6379
REDIS_PASSWORD =
SENTINEL_PORT = 26379
- Create a private repository in dockerhub for webapp-backend images
- In Jenkins create 2 global credentials for dockerhub and github. The github password is a personal token created for jenkins.
- Add a webhook to the repository in github for the url 'https://<jenkins.domain_name>/github-webhook/' with scope as 'repo'
- Create a new pipeline project in jenkins with the following settings- a. Github project - b. Check option 'This project is parameterized'. Add the string parameters 'giturl' and 'registry' with values of git repository and dockerhub repository. Add a credentials parameter and pass the value of dockerhub credentials. c. Check 'GitHub hook trigger for GITScm polling' in 'Build Triggers' d. In 'Pipeline' choose Git and pass in the repository and credentials.
- You can also manually build the project with parameters.
- GitHub Integration
- Kubernetes CLI
- Kubernetes
- SSH Agent
- Generic Webhook Trigger
- dockerhub_credentials(type: Username and Password) --> Username: cyrilsebastian1811, Password: xxxxxxxxxx
- db_credentials(type: Username and Password) --> Username: team, Password: Qwerty123
- github-ssh(SSH) --> Username: github, Private Key(contents of cyril_work from local)
- kubernetes_credentials(Username and Password) --> Username: admin, Password: (~/.kube/config/users:password | base64 )
- Manage Jenkins -> Configure System -> Cloud -> Kubernetes:
Kubernetes server certificate key: (~/.kube/config/clusters:certificate-authority-data | base64decode )
Credentials: kubernetes_credentials
- Manage Jenkins -> Configure System -> Git plugin:
Global Config user.name Value: Jenkins
- Generic Webhook Trigger:
Token: Edxzaw1!
- GIT_URL --> git@github.com:cyrilsebastian1811/webapp-backend.git
- GIT_BRANCH --> a8
- HELM_CHART_GIT_URL --> git@github.com:cyrilsebastian1811/helm-charts.git
- HELM_CHART_GIT_BRANCH --> a8
- REPOSITORY --> cyrilsebastian1811/backend