entity generation in gateway app of jhipster - jhipster

I am using entity sub generator to generate entities in my jhipster gateway app by giving path of microservice app.
but looks like I have to run sub generator for every entity in microservice . is there any way that it can read all the .json file and in micro service and generate all the entities ?

I personally do as following :
Copy repository ".jhipster" from the microservice repository into the Gateway repository
Generate the gateway with the following command:
yo jhipster --with-entities

If you create your entities with jdl-studio you can specify microservices for them like in the doc.
microservice * with mysuperjhipsterapp except C
microservice C with myotherjhipsterapp
You can then generate the entitites with jhipster import-jdl my_file.jdl in both the gateway and the microservice.
You can skip entities from the gateway or the microservice by using this options in your jdl file:
skipClient for A
skipServer for B

Related

Azure - Deploy Node app with worker, API and front end in a monorepo

I have a monorepo which contains, an API, a React webapp and a worker.
I want to deploy this into Azure (first time doing so), however am unsure about the procedure I need to follow.
I've created an App Service - however do I need to create multiple app services for each of the 3 pieces (api, worker and front end)? I've seen deployment slots - is it in here I specify how to run each of them e.g. npm run api, npm run worker, cd front->npm run front
If I have to create 3 separate app services, as all my code is in a monorepo, when I update something will I have to deploy to each of the 3 app services?
Thanks.
Yes you can use multiple slots per same app plan, if you want to save costs and understands your apps computing needs here
To control the CI/CD pipelines, use repo path filters (include/exclude) in each build pipeline to work only if specific app changed like here

Azure App Service : How to Swap Anular-config.json variables in Deployment Slots?

I have created one web application in angular and backend api is build in asp.net core.
Now my clients wants to manage two deployment slots :
1.Staging
2.Production
My Requirement is when client perform swap operation from staging->production , at that I need to change one variable which is placed in /assets/config.json(in angular application).
Basically I am placing my base-url in /assets/config.json file and when angular app is loading ,in app_initializer, i am using this base url from config.json and i am performing web api call to fetch appliation specific configuration for azure active directory.
Now base-url is different for both environments.
I have placed other app configuration variables in "configuration" section in azure app service.
But now when client swap from staging to production at that time I need to change "baseurl" but i am not able to get any provision in azure configuration section for this.
If anyone knows than please help me

JHipster Registry could not show client applications metrics

I created new JHipster microservice application for demo purpose. I used JHipster Registry version 4.1.1 and create a new UAA application.
Both applications started without error.
I want to show UAA application metrics in Registry Dashboard (Administration -> Metrics) but it cannot display and logout JHipster Registry automatically.
There is a log line in UAA application:
Enter: com.mycompany.repository.CustomAuditEventRepository.add() with argument[s] = [AuditEvent [timestamp=2019-03-19T19:35:08.979Z, principal=access-token, type=AUTHENTICATION_FAILURE, data={type=org.springframework.security.authentication.BadCredentialsException, message=Cannot convert access token to JSON}]]
Please let me know how to fix this problem.
When using the UAA architecture for microservices, the JHipster Registry needs to run with the uaa profile to properly manage the registered services. Otherwise, it expects the services to use JWT by default.
The gateway's docker-compose file for the registry (src/main/docker/jhipster-registry.yml) comes preconfigured with the uaa profile. If you launch the JHipster Registry some other way (such as a git clone or WAR file), make sure it includes the uaa profile.

Service fabric. Deploy multiple applications with different configurations

Im trying get three or more applications running with Service Fabric. They would all use same api services, only difference would be that each of them would get configurations from different storages. What would be the right way to pass the correct connection string without using environment variables?
Add your configuration parameters for each SF application under the application's ApplicationPackageRoot/ApplicationManifest.xml file, then specify the parameters in the "ApplicationParameters" folder for your publish profiles. More info on this approach can be found here: https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-manage-multiple-environment-app-configuration

Endpoint name in project deployed on Azure Service Fabric

I'm using Service Fabric as a container for deploying existing executables.
I intend to spawn a listener on the endpoint configured at deployment time, is it possible to get the endpoint settings somehow from the context? I know that using the Stateful/stateless/actor boilerplate type of projects allow the retrieval of CodePackageActivationContext, but how about a basic console project deployed as an exe?
Thanks
You should be able to retrieve the activation context using FabricRuntime.GetActivationContext()

Resources