1. Zhang JX
  2. PowerServer
  3. Friday, 18 August 2023 03:21 AM UTC

Dear all,

I am deploying cloudApp to deferent application service for high avalibility and load balance consideration, questions:

1. is there a way to get the [App Name] from the Project Application screen? if yes, then i will be able to set the JWT authentication URL to corresponding server.   ==> refer to below f_authorization function scripts

2. To deploy to different Web API service server, is it just to change the apprun.json "web_api" value in PB2022R2 version? ==> 1 deployment or have to create different project and do multiple deployment?

How to do it in PB2022 MR1900? noticed that there is no apprun.json file available there.

{
"deployment_urls": {
"launcher": "CloudAppPublisher/CloudAppInstall 22.0",
"runtime": "CloudAppPublisher/runtime/22.1.0.2819",
"web_api": "https://***.****websites.net/"
}
}

Best Regargs and thanks.

JX

 

Zhang JX Accepted Answer Pending Moderation
  1. Friday, 18 August 2023 14:07 PM UTC
  2. PowerServer
  3. # 1

Thanks Mike for your reply.

I am using built-in JWT authentication service, which will authenticate by API call to WebAPI.

The reason to deploy one for each is to avoid downtime when deploying WebApi service which acting as main JWT authentication service.

Yes, currently I am creating multiple CloudProject to deploy the WebApi service one by one - just that, time consuming (1 hour ++ each frown

 

Regards, JX

 

Comment
  1. mike S
  2. Friday, 18 August 2023 14:15 PM UTC
look into using containers for the webapi deployment. It will save you loads of time. are you using azure or aws or similar?



There is documentation on how to use an 'external' jwt, which by pulling out the code that appeon generates for you, you can build yourself.
  1. Helpful
  1. Zhang JX
  2. Friday, 18 August 2023 14:35 PM UTC
We are using Azure AppService.

Will try, thank you Mike.



JX
  1. Helpful
  1. mike S
  2. Friday, 18 August 2023 15:21 PM UTC
look into the azure container app service: https://learn.microsoft.com/en-us/azure/container-apps/overview

its easier to manage then using the regular container services



you can have it scale to zero (you will need to have a heatbeat in your PS app otherwise the container could shutdown when you have an active user) which saves you money when it isn't being used.

  1. Helpful
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Friday, 18 August 2023 13:39 PM UTC
  2. PowerServer
  3. # 2

1. "JWT authentication URL to corresponding server."

IMO, it is better to have the JWT authentication as a single server/service rather than one for each PS webapi server.

 i didnt' read fully what you are asking.  I'm not 100% sure what you are trying to do with this.

 

2. If you deploy the ps webapi to containers, then you use a container registry to deploy to and the containers all pull from that when they start up.

If you use something else (IIS for example), you may want to consider writing your own deployment processing for the webapis if you are doing a lot of them.  Deploying just the webapis to multiple servers is something you would need to figure out in snapdev.  If you want to deploy the entire application to each server, then you setup multiple projects - and then you don't have to switch the webapi server at runtime since whatever you setup in the project is correct.  

 

 

 

 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.