Repo for LADOT MDS implementation for contribution to the Open Mobility Foundation. It represents what is currently up and running for Los Angeles production MDS as well as new features under development. Includes the following:
- A current LADOT implementation of all MDS endpoints
- AWS production bindings (aws-lambda)
- Development versions of mds-audit, mds-policy, and mds-compliance
- MDS logging (mds-logger), daily metrics (mds-daily) and Google sheet reporting app for technical compliance.
- PostgreSQL
- Redis
- Yarn
If you haven't installed PostegreSQL and Redis you can install them with homebrew on macOS
brew install postgresql
brew install redis
Make sure they are running before you run the tests
brew services start postgresql
brew services start redis
If you encounter the following error:
FATAL: database โ<user>โ does not exist
The following command should fix your issue
createdb -h localhost
Install Lerna
yarn global add lerna
Install all packages. Uses Yarn workspaces.
yarn install
Now you can work with each package
cd packages/mds-audit
yarn test
yarn start
You can also run all tests from the project root with
yarn test
This repository is a monorepo and uses Lerna for working with its packages.
Run all test suites at once
lerna run test
Run all tests suites sequentially
lerna run test --concurrency 1
Run tests for a particular package
lerna run test --scope mds-audit
Clean all dependencies
lerna run clean
Format all files
lerna run prettier
- Select the
Node.js Express Server
debug configuration - Select the file that implements the Node/Express server for a package (typically
server.ts
) in the Explorer panel - Press
F5
- Select the
Node.js: Mocha Tests
debug configuration - Select any one of the files in a package's test folder
- Press
F5
MDS can be provisioned to a Kubernetes cluster as follows:
- Install and configure Docker Desktop
preferences / advanced
: cpus:6, memory:8G, swap:1Gpreferences / kubernetes
: enabled kubernetes
- Add
kubectl
to your PATH environment, e.g. for OSX:export PATH=/Applications/Docker.app/Contents/Resources/bin:${PATH}
- Configure active kubernetes cluster
kubectl config set-context docker-desktop
Lastly, build and deploy MDS to your kubernetes cluster:
./bin/install bootstrap build install:mds test:integration
To cleanup the MDS cluster consider:
./bin/install uninstall
For a complete listing of available operations consider:
./bin/install
See CONTRIBUTING.md