This is service registry server based on Spring Cloud Config, Netflix and Eureka

Overview

Servicec Discovery and Registry

This is service registry, based on Spring Cloud Netflix, Eureka and Spring Cloud Config.

Full documentation is available on the Ausloans documentation for microservices.

Running locally

To run the cloned repository;

  • For development run ./mvnw -Pdev,webapp to just start in development or run ./mvnw and run npm install && npm start for hot reload of client side code.
  • For production profile run ./mvnw -Pprod

Build Docker Image

To build a Docker image of your application using Jib connecting to the local Docker daemon:

  • NPM: npm run java:docker, on Apple Silicon: npm run java:docker:arm64
  • Maven: ./mvnw package -Pprod verify jib:dockerBuild --offline
  • Gradle: gradlew -Pprod bootJar jibDockerBuild --offline

To build a Docker image of your application without Docker and push it directly into your Docker registry, run:

  • Maven: ./mvnw package -Pprod verify jib:build -Djib.to.image=<dockerhub-username>/<artifact-id>
  • Gradle: ./gradlew -Pprod bootJar jib -Djib.to.image=<dockerhub-username>/<artifact-id>

Deploy to Heroku

Click this button to deploy your own instance of the registry:

Deploy to Heroku

There are a few limitations when deploying to Heroku.

  • The registry will only work with [native configuration]#spring-cloud-config (and not Git config).
  • The registry service cannot be scaled up to multiple dynos to provide redundancy. You must deploy multiple applications (i.e. click the button more than once). This is because Eureka requires distinct URLs to synchronize in-memory state between instances.

HashiCorp Vault Integration

Development Mode

Service-registry default integration uses a vault server with an in-memory backend. The data shall not be persisted and shall require you to configure secrets after every restart. The in-memory configuration provides an easy way to test out the integration and later switch to the recommended server mode.

  • Start vault server docker container:
docker-compose -f src/main/docker/vault.yml up -d
  • The default configured root token is jhipster-registry. We shall use the default secrets engine backend mounted on the secrets path. Configure secrets using either of ui, cli or http.
  • Create a new secret sub-path Service-registry/dev and add the following secret in JSON format. Here Service-registry refers to the application name and dev refers to the development profile. Do follow the same convention to configure secrets of other applications.
{
  "spring.security.user.password": "admin123!"
}
  • Start Service-registry server in development mode using the following command (skipping execution of test cases):
./mvnw -DskipTests
  • After successful start, open http://localhost:8761/ in a browser. You shall require entering a new password as provided in the above vault configuration.

Server Mode

Service-registry also provides configuration to use the native file system as the persistent backend.

  • Uncomment the following configurations in vault.yml. You can refer config.hcl to view provided vault server configurations:
command: server
volumes:
  - ./vault-config/config:/vault/config
  - ./vault-config/logs:/vault/logs
  - ./vault-config/data:/vault/file
  • Start vault server docker container:
docker-compose -f src/main/docker/vault.yml up -d
  • Open vault server ui to initialize master key shares. In this guide, we shall enter 1 as the number of key shares and 1 as the key threshold value. Do refer to vault documentation for recommended configuration. Note down the initial root token and the key and keep it at a safe place. You shall require the key to unseal the vault server after a restart.
  • Enable secret engine backend kv and use secret as the mount path.
  • Create a new secret sub-path Service-registry/dev and add the following secrets in JSON format. Here Service-registry refers to the application name and dev refers to the development profile. Do follow the same convention to configure secrets of other applications.
{
  "spring.security.user.password": "admin123!"
}
  • In this guide, we shall use the token authentication mechanism to retrieve secrets from the vault server. Update bootstrap.yml to specify root token in place of default dev token.
vault:
  authentication: token
  token: Service-registry # In server mode, provide a token having read access on secrets
  • Start Service Registry server in development mode using the following command (skipping execution of test cases):
./mvnw -DskipTests
  • After successful start, you shall require entering a new password as provided in vault.

Creating Docker Image

mvnw package -Pprod verify jib:build -Djib.to.image=dailyfx/data2ml-service-registry-server:v7.4.0 -Djib.to.auth.username=dailyfx -Djib.to.auth.password=******** -DskipTests

Commit to github

Run the following command in console:

git init
git add .
git commit -m “message here”
git branch -M main
git remote add origin https://github.com/nuruzzaman/data2ml-service-registry-server.git
git push -u origin main
You might also like...

This is a Netflix clone where you can watch movies or series

This is a Netflix clone where you can watch movies or series

Netlfix Clone This is a Netflix clone where you can watch movies or series. Visit Now 🚀 Things I Implemented SignIn/SignUp Movie/Series Filter Watch

Dec 1, 2022

Netflix clone, React Advance, scrimba course

Netflix clone, React Advance, scrimba course

Final Project from React Advance in Scrimba, excellent and complex work, features like redirection, HOC's, Hooks, Firebase to authenticated, styled-components and more...

Feb 9, 2022

Projeto criado com intenção de se parecer com a Netflix

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

Dec 19, 2022

Frontend of Banjoflix, A Full Netflix Clone!

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

Oct 25, 2022

A site where you can watch Naruto. Inspired by Netflix.

A Mini Netflix clone built with Solid.js, Astro and deployed on Netlify. 😄 I'm using Directus as a headless CMS here, though, I'm using the free vers

Sep 5, 2022

RESTful service to provide API linting as-a-service

API Linting Service Prerequisites / general idea General idea behind this API implementation is to provide an API as a service based on the awesome sp

Mar 14, 2022

Very simple full-stack application using React, Java Spring Boot, and PostgreSQL

Very simple full-stack application using React, Java Spring Boot, and PostgreSQL. The API was built following the N-Tier architecture. The goal was to explore and learn more in-depth the development of APIs, the use of Docker and deploying with AWS.

Apr 23, 2022

In game dev, generative art, and creative coding, sine is a ubiquitous function that is often used as a spring-like oscillator for a given parameter.

In game dev, generative art, and creative coding, sine is a ubiquitous function that is often used as a spring-like oscillator for a given parameter.

In game dev, generative art, and creative coding, sine is a ubiquitous function that is often used as a spring-like oscillator for a given parameter.

Feb 22, 2022

Quick and easy spring animation. Works with other animation libraries (gsap, animejs, framer motion, motion one, @okikio/animate, etc...) or the Web Animation API (WAAPI).

Quick and easy spring animation. Works with other animation libraries (gsap, animejs, framer motion, motion one, @okikio/animate, etc...)  or the Web Animation API (WAAPI).

spring-easing NPM | Github | Docs | Licence Quick and easy spring animations. Works with other animation libraries (gsap, animejs, @okikio/animate, mo

Dec 14, 2022
Owner
Mohammad Nuruzzaman
Data and Decision Science
Mohammad Nuruzzaman
An OAuth2 Authorization Server,Based on Spring Authorization Server

?? id-server 一个基于Spring Authorization Server的开源的授权服务器。 概念 一些概念 OAuth2Client 客户端指的是OAuth2 Client,但又不单单是一个OAuth2 Client,连id server本身都是一个客户端。 role 角色必须依附

felord.cn 351 Dec 30, 2022
TypeScript plugin for service-to-service (aka. "functionless") cloud integrations.

Functionless λ< Functionless is a TypeScript plugin that transforms TypeScript code into Service-to-Service (aka. "functionless") integrations, such a

sam 303 Jan 2, 2023
This experimental library patches the global custom elements registry to allow re-defining or reload a custom element.

Redefine Custom Elements This experimental library patches the global custom elements registry to allow re-defining a custom element. Based on the spe

Caridy Patiño 21 Dec 11, 2022
npm registry proxy with on-the-fly filtering

npm-registry-firewall ?? ?? ?? npm registry proxy with on-the-fly filtering Key Features Restricts access to remote packages by predicate: name org ve

Anton Golub 48 Dec 16, 2022
Cosmos chain registry ⚛️

chain-registry The npm package for the Official Cosmos chain registry npm install chain-registry example import { assets, chains, ibc } from 'chain-r

Cosmology 19 Dec 8, 2022
A simple web server exposing Hetzner cloud instances for consumption by the Prometheus HTTP service discovery.

Prometheus: Hetzner Service Discovery A server to provide automatic node discovery for Hetzner Cloud to Prometheus via HTTP service discovery. In cont

Matchory GmbH 1 Oct 10, 2022
Service Installer for VMware Tanzu is a one-click automation solution that enables VMware field engineers to easily and rapidly install, configure, and operate VMware Tanzu services across a variety of cloud infrastructures.

Service Installer for VMware Tanzu Service Installer for VMware Tanzu seeks to provide a one-click automation solution to enable our VMware engineers

VMware Tanzu 42 Dec 1, 2022
An AWS Cloud Native application using CDK that defines a Serverless Event Driven application for interacting with Twitter and utilising Machine Learning / AI as a Service.

AWS Serverless Event Driven Twitter Bot An AWS Cloud Native application using CDK (Written in TypeScript) that defines a Serverless Event Driven appli

null 4 Dec 18, 2022
Automatically skip Netflix intros, recaps, and next episode prompts ⚡⌛

netflix-skipper Automatically skip Netflix intros, recaps, and next episode prompts ⚡ ⌛ Don't waste any more time waiting or clicking on intros, recap

Ran Ribenzaft 20 Dec 24, 2022
Simply Netflix clone using ReactJS. It fetches the data from TMDB API

NETFLIX CLONE This project is a simply front end clone of Netflix. It was created with React. It uses The MovieDB Api to search for movies and display

null 14 Dec 9, 2022