- Package Manager
- Mac (or Linux): homebrew
- Windows: chocolatey
- IDE (Below are recommendations)
- Node.js
- Brew installation command:
brew install node
- Chocolatey installation command:
choco install nodejs
- Brew installation command:
- Yarn
- Brew:
brew install yarn
- Choco:
choco install yarn
- Brew:
- Git
- Brew:
brew install git
- Choco:
choco install git.install
- Brew:
- MySQL
- Brew:
brew install mysql
- Choco:
choco install mysql
- Brew:
- Make sure Sean has added you to the GitLab
- Make an account on the GitLab if you haven't already
- Run
git clone <url>
where<url>
is the url of the GitLab project - This should download a copy of the project in a folder called
AffordableServerOSU
To continue getting set up, please follow additional documentation located in app and server directories.
In order to run the project successfully, you must build each component in the correct order based on the dependency tree:
This can be done quickly by running yarn build
in the root folder of the project.
Instructions for running the front-end can be found here.
Instructions for running the back-end can be found here.
This project is set up to use GitLab CI to ensure tests pass and track code coverage. To accomplish this, a GitLab Runner must be configured on a machine that will build and run the tests. To set up the runner:
- Download and install the runner for the appropriate system
- Install docker
- Register the runner in the GitLab web interface by going to Project Settings -> CI / CD -> Runners -> Set up a specific Runner manually
- Enter the appropriate URL/Token information when running
sudo gitlab-runner register
- Choose
docker
as the Runner executor (you must have Docker installed on the local machine) - Enter
ubuntu:latest
as the default image. - You may need to run
sudo gitlab-runner restart
if it doesn't automatically start.
- Contains all code related to the React front-end
- For additional information, please take a look at the README.md found in
app
- Contains types and classes used by the frontend, backend and client.
- Typescript-based client that simplifies using the Affordable Server API
- Used to make REST calls from the frontend to the server
- Used to run integration/end-to-end tests for the server
- Contains SQL files to initialize database and definitions for procedures
- Contains documentation created from past teams (probably not up to date)
- Contains all selenium related code
- Contains all code related to back-end
- For additional information, please take a look at the README.md found in
server
- Contains code to orchestrate the AWS and Kubernetes environment.
Installing and configuring the AWS CLI
choco install awscli
aws configure
Enter your access key and secret when prompted. When prompted in the region enter us-east-1
.
Authenticating against the registry
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin http://330259559134.dkr.ecr.us-east-1.amazonaws.com/affordhealth
Creating a new image repository
aws ecr create-repository --repository-name affordhealth/<image_name> --region us-east-1
Build the frontend image
cd app
yarn build:no-sourcemap
docker build -t http://330259559134.dkr.ecr.us-east-1.amazonaws.com/affordhealth/app:<YOUR TAG> .
Build the backend image
cd server
yarn compile
docker build -t http://330259559134.dkr.ecr.us-east-1.amazonaws.com/affordhealth/server:<YOUR TAG> -f Dockerfile ..
Build the database image
cd database
docker build -t http://330259559134.dkr.ecr.us-east-1.amazonaws.com/affordhealth/db:<YOUR TAG>
To configure Kubernetes using the AWS CLI run the following:
aws eks --region us-east-1 update-kubeconfig --name affordable-test
To test your connection run:
kubectl get nodes
To set the default namespace to affordable
run
kubectl config set-context --current --namespace=affordable
To test and debug the templates run:
helm install --dry-run --debug -f <VALUES_FILE> <RELEASE_NAME> .
To apply the configuration to the cluster run:
helm install -f <VALUES_FILE> <RELEASE_NAME> .
To get the different Helm releases in the cluster run:
helm ls
To delete a helm release run:
helm del <RELEASE_NAME>