Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README #12

Open
aprajshekhar opened this issue Nov 16, 2023 · 6 comments
Open

Update README #12

aprajshekhar opened this issue Nov 16, 2023 · 6 comments
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@aprajshekhar
Copy link
Member

Is your suggestion related to code documentation or product documentation problem

README is out of date.

Describe your suggestion

README describes steps that are out of date. This has to be updated to reflect current state.

@aprajshekhar aprajshekhar added documentation Improvements or additions to documentation good first issue Good for newcomers labels Nov 16, 2023
@SamuelVch
Copy link

Can I work on this?

@aprajshekhar
Copy link
Member Author

Can I work on this?

@SamuelVch Yes. Also, have a look at https://github.com/gamedoora/gamedoora-config-server for the config values used. Thanks!

cc: @devang98

@SamuelVch
Copy link

Perfect, thank you!

@SamuelVch
Copy link

Hi @aprajshekhar, I'm not sure I understand the changes I need to make to the README.

If I have understood correctly, there is no longer an "application-local.yaml" file instead we use an "application.properties" file for the local version.

For the version with Spring Boot Configuration Serve, we need to modify the files in the "sample/configs" folder to define our properties.

Thanks for your help!

@picksitquick
Copy link
Contributor

Hi @SamuelVch

Here's an overview of how our application runs and what changes we have made in gateway:

  • Each microservice actually uses a config server to run, which it uses the port which we run at the config servers and then point this application to this config server, it helps in managing all microservice and it's properties separately and also defining common properties used among all microservices.
    Please refer: https://www.baeldung.com/spring-cloud-configuration for more info.

  • We clone the microservice and the config-server, Application-local.yaml is basically a file which we create locally on our system and use it in the .properties file of config-server by giving the path to it, and then spring automatically picks it up, and add properties which are needed apart from the common properties coming from the config-server. The properties file within sample/configs is how we make a new file and add properties with specific naming conventions.

Coming to how our Gateways work:

  • Any request coming from Frontend goes to this gateway, our gateway consists of filters which performs several checks and based on that it re-routes them to respective services.

  • The change here is, we only want to run our application which have Key-cloak configuration setup, we have made our own SSO using Key-cloak, we add these properties of key-cloak in our local application.properties.

  • So now to run the application locally we need to follow these step:

  • clone gateway application locally

  • clone config-server

  • Create a realm on Key-cloak and make a client and get necessary details such as url, username, client, etc.

  • generate a token for you client in Key-cloak

  • refer: https://www.baeldung.com/spring-boot-keycloak for more info.

Along with this:

  • setup a database locally which you can use and add the details in the local .properties file.
  • Create a file locally and add configurations related to Key-cloak in .properties file.
  • In order to test it, send a curl request to the microservice application and add necessary details in the header of the request such as username, password, token, and if everything checks our you should receive appropriate response, or else you will get an error.

Please feel free to reach out to me if you need any further help/clarification.

SamuelVch pushed a commit to SamuelVch/gamedoora-gateway that referenced this issue Dec 17, 2023
@SamuelVch
Copy link

Hello @picksitquick

Could I have some feedback on the pull request I made for this issue?

Thanks in advance,

Samuel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants