Arity is a technology company that analyzes billions of miles of driving data to generate insights and scores that help our partners better evaluate risk and revolutionize driver safety, connectivity and value.
At Arity, we believe in using the best tech tools. We also believe in helping the technical community grow, and we decided to put together a reference application to help our developers and you learn the latest tech tools and techniques. The below application is designed to showcase many tech tools we use in the most simplistic manner possible. The app is designed to show/teach the tools and provide a simple app you can copy and enhance.
Currently this app showcases the following technologies: Spring Boot, REST, ZUUL, SSO, Redis, Swagger, Hystrix, Turbine, Graphite, DropWizard, DropWizard Metrics, Docker, Docker Compose, Maven, AngularJS, ReactJS, Eureka
Pre-requisites
- You must have a working Docker environment running locally.
For Windows (prior to V10 with Hyper-V support) or Mac environments, you must use a docker machine locally. Make sure you have a docker machine running at 192.168.99.100. For Windows Pro or Enterprise with Hyper-V support, a docker-machine is not needed and docker services use 'localhost'. You must run and build under profile name 'localDocker'.
- You MUST start the app/microservices in specific order.
- If your using IntelliJ, you must turn on Annotation Processors via menu option Preferences > Build, Execution, Deployment > Compiler > Annotation Processors.
Contributors: Sherjeel Ghouse, Scott Kramer, Dan Mohnen, Derek Ashmore
Contributing Process: We would love you to contribute to this reference application! Please keep in mind at all times the project mission making this application simplistic and easy to learn from.
Things you can add to the project...
- Config Server
- Convert to Gradle Project.
- oWasp JSON libraries
- PIT testing; Unit Test
- Jenkins using Docker and CI Integration
- JMeter or Selenium
- RestEasy
- Spring Config
- oAuth
- Splunk or elastic search or kibanna
- Flyway
- PCF Deployment?
- Rest Assured
- Artifactory
- Spring Sleuth
- Add React
- Deploy scripts to Docker & AWS
- Zipkin
- Jest & Enzyme? Not sure if we will add Mock MVC, influxDB, CollectD, Archaius, PCF, Spring Integration, RabbitMQ, Connection Pooling, Kafka, Netflix Ribbon
-
START DOCKER CONTAINERS
a. Failure to start Docker first will cause errors.
b.At command/terminal prompt (in base project directory): docker-compose up -
BUILD ALL PROJECTS
a. At command/terminal prompt (in base project directory): mvn clean package
Errors? fail to build? - make sure you have redis running on 192.168.99.100:6379 via command line docker ps -a -
START GATEWAY APPLICATION
a. In your IDE (IntelliJ or Eclipse/STS), right click on "gateway" Microservice Project, src/ main/ java/ demo/ GatewayApplication Run As Spring Boot Application -
START SERVICE-REGISTRY APPLICATION
a. In your IDE (IntelliJ or Eclipse/STS), right click on "service-registry" Microservice Project, src/ main/ java/ demo/ ServiceRegistryApplication Run As Spring Boot Application -
Start Other Services
a. In your IDE (IntelliJ or Eclipse/STS), right click on EACH Microservice Project
b. deviceservice/src/main/java/demo/DeviceServiceApplication Run As Spring Boot Application
c. deviceui/src/main/java/demo/DeviceUiApplication Run As Spring Boot Application
d. hystrixdashboard/src/main/java/demo/HystrixDashboardApplication Run As Spring Boot Application
e. admin-ui/src/main/java/demo/AdminUIApplication Run As Dropwizard Application
- TEST USER INTERFACE
Go to http://localhost:8080/
Login user/user or admin/admin
Click 'Device' button
Add a device and click Submit
Click 'Admin' button
Click [refresh] to display health of one of the services listed
- TEST HYSTRIX
Go to http://localhost:8686/hystrix
Enter stream http://localhost:8080/hystrix.stream
Click Monitor button
Test a failure Go to http://localhost:8080/epicfail/1
- TEST TURBINE
Go to localhost:8686/hystrix
Enter stream
http://localhost:8686/turbine.stream?cluster=SAMPLE-HYSTRIX-AGGREGATE
Click Monitor button
Test a failure Go to http://localhost:8080/epicfail/1
- TEST DROPWIZARD CONSOLE METRICS
Go to console for device-ui
- TEST GRAPHITE
Go to http://192.168.99.100:8780 login: guest/guest