-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Let's say we need to add a new endpoint, most of the time this will require updates in all three layers:
- Experience Layer
- Process Layer
- System Layer
A common scenario arises when a developer has created a pull request for one layer (example: System Layer), but must wait for it to be deployed before testing the changes on the next layer (example: Process Layer).
By running multiple projects locally, we can unblock the developer and test connected layers more thoroughly.
Let's say we want to run jfc-global-client-exp-api
& jfc-global-order-proc-api
at the same time, follow these steps:
- Update
jfc-global-client-exp-api/src/main/resources/properties/{ENV}-properties.yaml
orderProcApi:
- host: "jfc-global-order-proc-apse1-dev.sg-s1.cloudhub.io"
+ host: "localhost"
- basePath: "/"
+ basePath: ""
timeout: "60000"
retry:
maxNumber: "1"
intervalInMs: "3000"
- Update
jfc-global-client-exp-api/src/main/resources/properties/common-properties.yaml
orderProcApi:
- protocol: "HTTPS"
+ protocol: "HTTP"
- Update
jfc-global-client-exp-api/src/main/mule/common/global.xml
<http:request-config
name="ORDER_PROC_API_HTTP_Request_configuration"
doc:name="HTTP Request configuration">
<http:request-connection
- protocol="${orderProcApi.protocol}" host="${orderProcApi.host}"
- tlsContext="${tlsContextConfig}" />
+ protocol="${orderProcApi.protocol}" host="${orderProcApi.host} port="8083" />
</http:request-config>
- Update
jfc-global-order-proc-api/src/main/resources/properties/{ENV}-properties.yaml
httpsListener:
- port: "8082"
+ port: "8083"
- Update
protocol
toHTTP
and removetlsContext=HTTPS_TLS_config
injfc-global-order-proc-api/src/main/mule/order-proc-api.xml
<http:listener-config
name="order-proc-api-httpListenerConfig">
<http:listener-connection
host="${httpsListener.host}" port="${httpsListener.port}"
- protocol="HTTPS" tlsContext="HTTPS_TLS_config" />
+ protocol="HTTP" />
</http:listener-config>
If the project has not yet been refactored to APIKit, then update
jfc-global-product-proc-api/src/main/mule/common/global.xml
instead.
Set-up a new run configuration by clicking "Run" → "Run Configurations..." from the top menu:
assets/images/Run-Multiple-Projects-Locally/Anypoint-Studio-Run-Multiple-Projects-Locally.png
Don't forget to set up your environment key before applying!
Let's say you want to run more than two projects, to include jfc-global-cx-sys-api
for example.
Then you must apply the same steps as mentioned above.