Giter VIP home page Giter VIP logo

eris's People

Contributors

kasramp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

eris's Issues

Use circuit breaker for third party integrations

Some of the third party services occasionally have outages, it will be good to use a circuit breaker and fall back to another service temporary if the default integration is inaccessible.
One example of circuit breaker is Hystrix but that's not maintained by Netflix anymore. Better to use other options.

Replace property utils test with a more meaningful test cases

Currently, setters in PropertyUtils.java file are used for Unit testing. A correct approach is to load the values from a test property file and then do the assertions. This means it might be a need to convert the tests to run with SpringExtension instead of MockitoExtension.

Setup Airbrake for your Java application

Step 1: Install

Install option 1: Maven

Add the javabrake dependency through your IDE or directly to your pom.xml file:

<dependency>
  <groupId>io.airbrake</groupId>
  <artifactId>javabrake</artifactId>
  <version>0.1.6</version>
</dependency>

Install option 2: Gradle

Add javabrake to your Gradle dependencies:

compile 'io.airbrake:javabrake:0.1.6'

Install option 3: Ivy

Add javabrake to your Ivy dependencies:

<dependency org='io.airbrake' name='javabrake' rev='0.1.6'>
  <artifact name='javabrake' ext='pom'></artifact>
</dependency>

Step 2: Configure

Import the javabrake library and copy the three configuration lines into your
app to send all uncaught exceptions to Airbrake:

(You can find your project API KEY with your project's settings)

// Import the library:
import io.airbrake.javabrake.Notifier;

public class ExampleApp {
  public static void main(String[] args) {

    // Copy configuration lines:
    int projectId = <Your project ID>;
    String projectKey = "<Your project API KEY>";
    Notifier notifier = new Notifier(projectId, projectKey);
  }
}

Example of reporting a caught exception:

try {
  int i = 1/0;
} catch (ArithmeticException e) {
  notifier.report(e);
}

Visit our official GitHub repo for advanced information and integrations like log4j, log4j2, and logback.

Rename health user and pass

Currently the property names defined for actuator username and password are prefixed with health. Change health.{username,password} to actuator.{username,password}.

Update the website

Update the website and add a section about how to run it using Docker as well as updating the readme file.

Add ACL support to Consul

Follow the guide: https://developer.hashicorp.com/consul/tutorials/security/access-control-setup-production#apply-individual-tokens-to-agents

Example,

{
 "acl_master_token": "YOUR_MASTER_TOKEN",
 ... // from the doc ,
  "service": {
    "name": "eris",
   "token": "UUID"
},
"acl": {
  "enabled": true,
  "default_policy": "deny",
  "enable_token_persistence": true,
  "tokens": {
    "agent":  "AGENT_UUID"
  }
 }
}

To generate a token,

$ consul acl token create -description "Eris weather API service" -service-identity "eris" -secret "UUID"

The service identity name should match the actual service name and it's case sensitive

As a maintainer, I want to be able to monitor the app health

Need to use Spring Actuator to be able to access the health endpoints. However, this endpoints should be secured. A basic approach is using environment variables and then later add the part for the database if needed.
Criteria:

  • Basic auth, salted password, for /actuator.
  • Response accordingly if an unauthorized entity tried to access, instead of redirecting to the white label page.
  • Write unit tests.

Change pipeline workflow

Rearrange the pipeline flow as:

  • On PR, tests should automatically run and (ideally) SonarQube should run and be able to deploy the branch to the develop environment
  • On develop branch, everything should remain as is except, publishing the artifact as -beta or -develop or as draft in GitHub and then automatically deploy the work to the staging environment. It should use different API keys than production
  • On master branch, everything should remain the same and deploy to production
  • Build docker image and publish it Docker.io

Replace Hystrix with Resilience4j

As Hystrix has been deprecated and remove from Spring Cloud, need to replace it with Resilience4j. So that spring-cloud-dependencies can be upgraded.

Allow CORS

Currently weather extension is unable to call the Eris due to CORS issue. Need to activate it.
This can be done either for a single endpoint /currentByIp or all.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.