Microservice Fetch remote config Laravel - laravel

We have have bunch of micro services. On a monthly basis we are adding more. Each service has its own secret. Once the a new service deploys we have a Laravel command that registers the service in the service registry.
In that call, we want to reply the credentials for all other microservices. But, how do we dynamically replace a config file? (Normal Laravel Config structure).
An explanation of how somebody would do it is fine, coding, we can do ;) Just looking for some guidance on what is the best approach.
Thanks!

Related

How to talk with ABP API from windows service

This is what I would like to build. A hosted web/api project built on APB where tenants can use the web application to define "Scan Definitions" that run inside their network. A scan definition would just contain a target IP Address to be scanned with WMI. They would download and install a windows service that would run periodically in their network. The service would communicate with the APB web API to retrieve scan definitions, then run the scan and upload the resulting scan data into the APB web API. Then the users would be able to view that scan data within the web app.
My question is with the CORS access in place, how can I make it so that the windows service is allowed to talk with the API. Also what is the best way to authenticate the service with api such that the service would know which tenant it should be using so that it pulls down the correct scan definitions and uploads the data to the correct tenant as well.
Thanks in advance for any help or guidance.
I was able to get a service up and running by following the abp sample found here: https://github.com/aspnetboilerplate/aspnetboilerplate-samples/tree/master/ConsoleRemoteWebApiCall/CallApiFromConsole
I still have things to work through, but it's gotten me to a spot where I can access the api from a console application

How to wire one/two or more microservice in the TwirpQL Server?

I'm using the GraphQL server which is most-often a gateway that bundles all my different microservices created using gqlgen.
I want to make a switch to the TwirpQL server as I was following the official documentation of TwirpQL. I believe it wants me to wrap every microservice inside it so there will be multiple GraphQL layers one for every microservice.
I don't want to expose the other microservices as Graphql, but rather "just" create one entry point for all the requests and later send them to the respected microservice accordingly.
Can anyone please enlighten me on the correct usage?
Thanks.

How to get instances configuration deployed in Ali cloud?

Our customer using Alibaba cloud to deploy their application. They rented dozens of VMs/instances. We are asked to using API to get instance configuration (i.e. number of core, memory, network bandwidth, SSD, disk type, zone and etc) by program. We have found Ali open APIs in github./1/
Could someone point out which exact API could we call to get instance configuration?
/1/ https://github.com/aliyun/aliyun-openapi-java-sdk/
You can use the DescribeInstanceAttribute API. I feel it's very helpful to use the APIExplorer to debug APIs. You don't need to install SDKs, CLIs, write any code, and configure access keys etc. Just login your Alibaba Cloud account, fill in some inputs, and click the Send Request. Everything is there!

Jhipster frontend microservice

I am using Jhipster and really like it.
Instead of generating my microservice frontend integrated inside the gateway, I would like to generate a separate frontend microservice.
Instead of having gateway -> µservice-backend, I would have gateway -> µservice-frontend -> µservice-backend
My use case :
userA has a physical device devicev1. userA logs in on the gateway. He can see the application for the devicev1.
userB has a physical device devicev2 (different features than v1). userB logs in on the gateway. He can see the application for the devicev2. (the backend is a different µservice for v1 and v2)
userC is using a virtual device. He will see and use again another frontend + backend
Some researches :
I understand this is a hard to maintain feature because we would have to inject the "µservice-frontend" module inside the gateway. (And now there is Angular + React).
The question was asked in 2016 :
https://groups.google.com/forum/#!msg/jhipster-dev/8VfS2ma_lX0/NySAdWJhEgAJ
https://github.com/jhipster/generator-jhipster/issues/3667
I suppose I can still do it by generating a "client only" application and link it separately (rewrite the url), but I loose all the monitoring/registry/security jhipster stack.
Sooo, I won't do it and keep everything in my gateway.
I could also have multiple gateways, but I was more willing to have load-on-demand modules, in the same application.
More than one gateway in jhipster
To keep it clean, I can create different angular modules for my load-on-demand part. I can use git mono-repo to separate each version in separated repository and compose before compiling. They are a lot of solutions, but I would like to use a more µservice way.
Any solution or architectural good practice?
Thank you

Modify the url of my cloud service

How to change the url of windows azure application which is in cloud?
modify the url from xxx.cloudapp.net to yyy.cloudapp.net
thanks for your helps
You can't do that! The only way is to create new cloud service and deploy your package there.
Please note that creating cloud service is nothing else but reserving the DNS name (XXX.cloudapp.net). You are not being charged for creating cloud services. You are only charged for when you deploy something on those cloud services. So you can create as many as you wish (well, I think there is some soft limit on the number of cloud services you can create, so delete the ones you are not planning to use).
When you go for production I highly suggest you to use your own custom domain (i.e. www.mycomany.com). For this, please follow the instructions here.

Resources