APIM CLI simplify endpoint url configs

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

APIM CLI simplify endpoint url configs

Rukshan Premathunga
Hi All,

Currently CLI auto generate endpoints from defautl values and user have to edit it in order to work if endpoints are diffrent. As a solution we thought to provide urls as arguments for setup command.
But here we have 4 endpoints(store, publisher, admin and token) to get as arguments. But making all of them as  mandatory, user experience may get reduce, So we need to have a mechanism to derive them.

One option is to use one host for apps in same node(store, pub, admin). If it is changed, provide the optional arguments to override them.

So can you also share some idea please.

Thanks and Regards
-- 

Rukshan Chathuranga.
WSO2, Inc.
+94711822074

_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: APIM CLI simplify endpoint url configs

Nuwan Dias
I guess you are referring to the Microgateway CLI and not the APIM CLI.

On Mon, Jun 18, 2018 at 11:11 AM, Rukshan Premathunga <[hidden email]> wrote:
Hi All,

Currently CLI auto generate endpoints from defautl values and user have to edit it in order to work if endpoints are diffrent. As a solution we thought to provide urls as arguments for setup command.
But here we have 4 endpoints(store, publisher, admin and token) to get as arguments. But making all of them as  mandatory, user experience may get reduce, So we need to have a mechanism to derive them.

One option is to use one host for apps in same node(store, pub, admin). If it is changed, provide the optional arguments to override them.

So can you also share some idea please.

Thanks and Regards
-- 

Rukshan Chathuranga.
WSO2, Inc.
+94711822074



--
Nuwan Dias

Software Architect - WSO2, Inc. http://wso2.com
Phone : +94 777 775 729

_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: APIM CLI simplify endpoint url configs

Rukshan Premathunga
I guess you are referring to the Microgateway CLI and not the APIM CLI.
Yes. It should be Microgateway CLI 


On Mon, Jun 18, 2018 at 11:15 AM, Nuwan Dias <[hidden email]> wrote:
I guess you are referring to the Microgateway CLI and not the APIM CLI.

On Mon, Jun 18, 2018 at 11:11 AM, Rukshan Premathunga <[hidden email]> wrote:
Hi All,

Currently CLI auto generate endpoints from defautl values and user have to edit it in order to work if endpoints are diffrent. As a solution we thought to provide urls as arguments for setup command.
But here we have 4 endpoints(store, publisher, admin and token) to get as arguments. But making all of them as  mandatory, user experience may get reduce, So we need to have a mechanism to derive them.

One option is to use one host for apps in same node(store, pub, admin). If it is changed, provide the optional arguments to override them.

So can you also share some idea please.

Thanks and Regards
-- 

Rukshan Chathuranga.
WSO2, Inc.
+94711822074



--
Nuwan Dias

Software Architect - WSO2, Inc. http://wso2.com
Phone : +94 777 775 729



--
Rukshan Chathuranga.
Software Engineer.
WSO2, Inc.
+94711822074

_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: [Dev] APIM CLI simplify endpoint url configs

Dinusha Dissanayake
Hi Rukshan,

Would we need to consider here the uploading endpoint of the analytics data files as well?
Currently we are planing to include it in conf file.

Thanks,
DinushaD.

On Mon, Jun 18, 2018 at 2:37 PM, Rukshan Premathunga <[hidden email]> wrote:
Hi,

Here the additional details user need to provide as argument when setup CLI tool.
  • Publisher Endpoint
  • Registration Endpoint
  • Admin Endpoint
  • Token Endpoint
  • Trust Store path
  • Trust Store password

From them, Publisher, Registration, Admin and Token endpoints hostname can be same. In such cases we can introduce a command argument  --URL.  If URL is provided those urls are derived from that. In case if those apps are in diffrent host, user need to edit them in default config file. Since this a one time task and not likely to change much, i think it is fine.
Since all of these configs are mandatory we maintain some default values. When user enter setup command, if those configs are not provided, prompt user to enter values. If user didn't input any values default values are use. Once all the setup execution is complete succesfully, user input save to the config file and use next time onward.

Here  the few examples flow, ex:1 show setup command with all the mandatory arguments and ex: 2 show without mandatory arguments. Hence ex:2 prompt them from user.

1)
$ ./micro-gw setup --user amuser --password pass --label account --url https://localhost:9443/ --path /home/user/workspace --truststore path/to/truststore --truststorePass password
$ Completed

2)
$ ./micro-gw setup --user amuser --password pass --label account  --path /home/user/workspace
$ Enter truststore [ default path/to/truststore  ] : different/path/to/truststore 
$ Enter truststorePass [ use default? ] : password
$ Completed


Any suggestions?

Thanks and Regards



On Mon, Jun 18, 2018 at 11:18 AM, Rukshan Premathunga <[hidden email]> wrote:
I guess you are referring to the Microgateway CLI and not the APIM CLI.
Yes. It should be Microgateway CLI 


On Mon, Jun 18, 2018 at 11:15 AM, Nuwan Dias <[hidden email]> wrote:
I guess you are referring to the Microgateway CLI and not the APIM CLI.

On Mon, Jun 18, 2018 at 11:11 AM, Rukshan Premathunga <[hidden email]> wrote:
Hi All,

Currently CLI auto generate endpoints from defautl values and user have to edit it in order to work if endpoints are diffrent. As a solution we thought to provide urls as arguments for setup command.
But here we have 4 endpoints(store, publisher, admin and token) to get as arguments. But making all of them as  mandatory, user experience may get reduce, So we need to have a mechanism to derive them.

One option is to use one host for apps in same node(store, pub, admin). If it is changed, provide the optional arguments to override them.

So can you also share some idea please.

Thanks and Regards
-- 

Rukshan Chathuranga.
WSO2, Inc.
+94711822074



--
Nuwan Dias

Software Architect - WSO2, Inc. http://wso2.com
Phone : +94 777 775 729



--
Rukshan Chathuranga.
Software Engineer.
WSO2, Inc.
+94711822074



--
Rukshan Chathuranga.
Software Engineer.
WSO2, Inc.
+94711822074

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev




--
Dinusha Dissanayake
Software Engineer
WSO2 Inc 
Mobile: +94712939439


_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: [Dev] APIM CLI simplify endpoint url configs

Harsha Kumara-2


On Mon, Jun 18, 2018 at 3:04 PM Dinusha Dissanayake <[hidden email]> wrote:
Hi Rukshan,

Would we need to consider here the uploading endpoint of the analytics data files as well?
Currently we are planing to include it in conf file.
This configuration holds the values which required for the CLI. The file uploading endpoint is something that should used at runtime. Hence I don't think we need to include it here. 

Thanks,
DinushaD.

On Mon, Jun 18, 2018 at 2:37 PM, Rukshan Premathunga <[hidden email]> wrote:
Hi,

Here the additional details user need to provide as argument when setup CLI tool.
  • Publisher Endpoint
  • Registration Endpoint
  • Admin Endpoint
  • Token Endpoint
  • Trust Store path
  • Trust Store password

From them, Publisher, Registration, Admin and Token endpoints hostname can be same. In such cases we can introduce a command argument  --URL.  If URL is provided those urls are derived from that. In case if those apps are in diffrent host, user need to edit them in default config file. Since this a one time task and not likely to change much, i think it is fine.
Since all of these configs are mandatory we maintain some default values. When user enter setup command, if those configs are not provided, prompt user to enter values. If user didn't input any values default values are use. Once all the setup execution is complete succesfully, user input save to the config file and use next time onward.

Here  the few examples flow, ex:1 show setup command with all the mandatory arguments and ex: 2 show without mandatory arguments. Hence ex:2 prompt them from user.

1)
$ ./micro-gw setup --user amuser --password pass --label account --url https://localhost:9443/ --path /home/user/workspace --truststore path/to/truststore --truststorePass password
$ Completed

2)
$ ./micro-gw setup --user amuser --password pass --label account  --path /home/user/workspace
$ Enter truststore [ default path/to/truststore  ] : different/path/to/truststore 
$ Enter truststorePass [ use default? ] : password
$ Completed


Any suggestions?

Thanks and Regards



On Mon, Jun 18, 2018 at 11:18 AM, Rukshan Premathunga <[hidden email]> wrote:
I guess you are referring to the Microgateway CLI and not the APIM CLI.
Yes. It should be Microgateway CLI 


On Mon, Jun 18, 2018 at 11:15 AM, Nuwan Dias <[hidden email]> wrote:
I guess you are referring to the Microgateway CLI and not the APIM CLI.

On Mon, Jun 18, 2018 at 11:11 AM, Rukshan Premathunga <[hidden email]> wrote:
Hi All,

Currently CLI auto generate endpoints from defautl values and user have to edit it in order to work if endpoints are diffrent. As a solution we thought to provide urls as arguments for setup command.
But here we have 4 endpoints(store, publisher, admin and token) to get as arguments. But making all of them as  mandatory, user experience may get reduce, So we need to have a mechanism to derive them.

One option is to use one host for apps in same node(store, pub, admin). If it is changed, provide the optional arguments to override them.

So can you also share some idea please.

Thanks and Regards
-- 

Rukshan Chathuranga.
WSO2, Inc.
+94711822074



--
Nuwan Dias

Software Architect - WSO2, Inc. http://wso2.com
Phone : +94 777 775 729



--
Rukshan Chathuranga.
Software Engineer.
WSO2, Inc.
+94711822074



--
Rukshan Chathuranga.
Software Engineer.
WSO2, Inc.
+94711822074

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev




--
Dinusha Dissanayake
Software Engineer
WSO2 Inc 
Mobile: +94712939439

_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture


--
Harsha Kumara
Associate Technical Lead, WSO2 Inc.
Mobile: +94775505618
Blog:harshcreationz.blogspot.com

_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: [Dev] APIM CLI simplify endpoint url configs

Isuru Haththotuwa
In reply to this post by Rukshan Premathunga


On Mon, Jun 18, 2018 at 2:37 PM, Rukshan Premathunga <[hidden email]> wrote:
Hi,

Here the additional details user need to provide as argument when setup CLI tool.
  • Publisher Endpoint
  • Registration Endpoint
  • Admin Endpoint
  • Token Endpoint
  • Trust Store path
  • Trust Store password

From them, Publisher, Registration, Admin and Token endpoints hostname can be same. In such cases we can introduce a command argument  --URL.  If URL is provided those urls are derived from that. In case if those apps are in diffrent host, user need to edit them in default config file. Since this a one time task and not likely to change much, i think it is fine.
Since all of these configs are mandatory we maintain some default values. When user enter setup command, if those configs are not provided, prompt user to enter values. If user didn't input any values default values are use. Once all the setup execution is complete succesfully, user input save to the config file and use next time onward.

Here  the few examples flow, ex:1 show setup command with all the mandatory arguments and ex: 2 show without mandatory arguments. Hence ex:2 prompt them from user.

1)
$ ./micro-gw setup --user amuser --password pass --label account --url https://localhost:9443/ --path /home/user/workspace --truststore path/to/truststore --truststorePass password
$ Completed

2)
$ ./micro-gw setup --user amuser --password pass --label account  --path /home/user/workspace
$ Enter truststore [ default path/to/truststore  ] : different/path/to/truststore 
$ Enter truststorePass [ use default? ] : password
$ Completed


Any suggestions?
From an automation perspective, option #1 is better. And IMHO its better if we can provide CLI level support for all three endpoints (publisher, dcr and admin).

How about using a single CLI arguments (ex.: --apim-base-url) for the simple case of using an all in one APIM, and using different CLI arguments to pass publisher, dcr and admin endpoints if this is a distributed setup?

For an example, when using an single APIM instance:
./micro-gw setup --user amuser --password pass --label account --apim-base-url https://localhost:9443/ --path /home/user/workspace

When a distributed setup is used:
./micro-gw setup --user amuser --password pass --label account --publisher-url https://pub.apim.com/publisher --dcr-url https://admin.apim.com/client-reg --admin-url https://admin.apim.com/admin --path /home/user/workspace


Thanks and Regards



On Mon, Jun 18, 2018 at 11:18 AM, Rukshan Premathunga <[hidden email]> wrote:
I guess you are referring to the Microgateway CLI and not the APIM CLI.
Yes. It should be Microgateway CLI 


On Mon, Jun 18, 2018 at 11:15 AM, Nuwan Dias <[hidden email]> wrote:
I guess you are referring to the Microgateway CLI and not the APIM CLI.

On Mon, Jun 18, 2018 at 11:11 AM, Rukshan Premathunga <[hidden email]> wrote:
Hi All,

Currently CLI auto generate endpoints from defautl values and user have to edit it in order to work if endpoints are diffrent. As a solution we thought to provide urls as arguments for setup command.
But here we have 4 endpoints(store, publisher, admin and token) to get as arguments. But making all of them as  mandatory, user experience may get reduce, So we need to have a mechanism to derive them.

One option is to use one host for apps in same node(store, pub, admin). If it is changed, provide the optional arguments to override them.

So can you also share some idea please.

Thanks and Regards
-- 

Rukshan Chathuranga.
WSO2, Inc.
+94711822074



--
Nuwan Dias

Software Architect - WSO2, Inc. http://wso2.com
Phone : +94 777 775 729



--
Rukshan Chathuranga.
Software Engineer.
WSO2, Inc.
+94711822074



--
Rukshan Chathuranga.
Software Engineer.
WSO2, Inc.
+94711822074

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev




--
Thanks and Regards,

Isuru H.
+94 716 358 048



_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: [Dev] APIM CLI simplify endpoint url configs

Harsha Kumara-2


On Mon, Jun 18, 2018 at 5:26 PM Isuru Haththotuwa <[hidden email]> wrote:


On Mon, Jun 18, 2018 at 2:37 PM, Rukshan Premathunga <[hidden email]> wrote:
Hi,

Here the additional details user need to provide as argument when setup CLI tool.
  • Publisher Endpoint
  • Registration Endpoint
  • Admin Endpoint
  • Token Endpoint
  • Trust Store path
  • Trust Store password

From them, Publisher, Registration, Admin and Token endpoints hostname can be same. In such cases we can introduce a command argument  --URL.  If URL is provided those urls are derived from that. In case if those apps are in diffrent host, user need to edit them in default config file. Since this a one time task and not likely to change much, i think it is fine.
Since all of these configs are mandatory we maintain some default values. When user enter setup command, if those configs are not provided, prompt user to enter values. If user didn't input any values default values are use. Once all the setup execution is complete succesfully, user input save to the config file and use next time onward.

Here  the few examples flow, ex:1 show setup command with all the mandatory arguments and ex: 2 show without mandatory arguments. Hence ex:2 prompt them from user.

1)
$ ./micro-gw setup --user amuser --password pass --label account --url https://localhost:9443/ --path /home/user/workspace --truststore path/to/truststore --truststorePass password
$ Completed

2)
$ ./micro-gw setup --user amuser --password pass --label account  --path /home/user/workspace
$ Enter truststore [ default path/to/truststore  ] : different/path/to/truststore 
$ Enter truststorePass [ use default? ] : password
$ Completed


Any suggestions?
From an automation perspective, option #1 is better. And IMHO its better if we can provide CLI level support for all three endpoints (publisher, dcr and admin).

How about using a single CLI arguments (ex.: --apim-base-url) for the simple case of using an all in one APIM, and using different CLI arguments to pass publisher, dcr and admin endpoints if this is a distributed setup?

For an example, when using an single APIM instance:
./micro-gw setup --user amuser --password pass --label account --apim-base-url https://localhost:9443/ --path /home/user/workspace
+1 for base-url and I don't think we need apim prefix. 

When a distributed setup is used:
./micro-gw setup --user amuser --password pass --label account --publisher-url https://pub.apim.com/publisher --dcr-url https://admin.apim.com/client-reg --admin-url https://admin.apim.com/admin --path /home/user/workspace


Thanks and Regards



On Mon, Jun 18, 2018 at 11:18 AM, Rukshan Premathunga <[hidden email]> wrote:
I guess you are referring to the Microgateway CLI and not the APIM CLI.
Yes. It should be Microgateway CLI 


On Mon, Jun 18, 2018 at 11:15 AM, Nuwan Dias <[hidden email]> wrote:
I guess you are referring to the Microgateway CLI and not the APIM CLI.

On Mon, Jun 18, 2018 at 11:11 AM, Rukshan Premathunga <[hidden email]> wrote:
Hi All,

Currently CLI auto generate endpoints from defautl values and user have to edit it in order to work if endpoints are diffrent. As a solution we thought to provide urls as arguments for setup command.
But here we have 4 endpoints(store, publisher, admin and token) to get as arguments. But making all of them as  mandatory, user experience may get reduce, So we need to have a mechanism to derive them.

One option is to use one host for apps in same node(store, pub, admin). If it is changed, provide the optional arguments to override them.

So can you also share some idea please.

Thanks and Regards
-- 

Rukshan Chathuranga.
WSO2, Inc.
+94711822074



--
Nuwan Dias

Software Architect - WSO2, Inc. http://wso2.com
Phone : +94 777 775 729



--
Rukshan Chathuranga.
Software Engineer.
WSO2, Inc.
+94711822074



--
Rukshan Chathuranga.
Software Engineer.
WSO2, Inc.
+94711822074

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev




--
Thanks and Regards,

Isuru H.
+94 716 358 048


_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture


--
Harsha Kumara
Associate Technical Lead, WSO2 Inc.
Mobile: +94775505618
Blog:harshcreationz.blogspot.com

_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: [Dev] APIM CLI simplify endpoint url configs

Rukshan Premathunga


On Tue, Jun 19, 2018 at 9:15 AM, Harsha Kumara <[hidden email]> wrote:


On Mon, Jun 18, 2018 at 5:26 PM Isuru Haththotuwa <[hidden email]> wrote:


On Mon, Jun 18, 2018 at 2:37 PM, Rukshan Premathunga <[hidden email]> wrote:
Hi,

Here the additional details user need to provide as argument when setup CLI tool.
  • Publisher Endpoint
  • Registration Endpoint
  • Admin Endpoint
  • Token Endpoint
  • Trust Store path
  • Trust Store password

From them, Publisher, Registration, Admin and Token endpoints hostname can be same. In such cases we can introduce a command argument  --URL.  If URL is provided those urls are derived from that. In case if those apps are in diffrent host, user need to edit them in default config file. Since this a one time task and not likely to change much, i think it is fine.
Since all of these configs are mandatory we maintain some default values. When user enter setup command, if those configs are not provided, prompt user to enter values. If user didn't input any values default values are use. Once all the setup execution is complete succesfully, user input save to the config file and use next time onward.

Here  the few examples flow, ex:1 show setup command with all the mandatory arguments and ex: 2 show without mandatory arguments. Hence ex:2 prompt them from user.

1)
$ ./micro-gw setup --user amuser --password pass --label account --url https://localhost:9443/ --path /home/user/workspace --truststore path/to/truststore --truststorePass password
$ Completed

2)
$ ./micro-gw setup --user amuser --password pass --label account  --path /home/user/workspace
$ Enter truststore [ default path/to/truststore  ] : different/path/to/truststore 
$ Enter truststorePass [ use default? ] : password
$ Completed


Any suggestions?
From an automation perspective, option #1 is better. And IMHO its better if we can provide CLI level support for all three endpoints (publisher, dcr and admin).
Actually idea is to provide the both options.  #2 is when mandatory args not provided.

How about using a single CLI arguments (ex.: --apim-base-url) for the simple case of using an all in one APIM, and using different CLI arguments to pass publisher, dcr and admin endpoints if this is a distributed setup?
Most of the time some  admin and publisher urls may similar. But there can be some edge cases where user have diffrent host for diffrent apps and diffrent context path for them when it fronted with LB. So it seems it is hard to manage it in code and best option is to edit the config when necessary. 

For an example, when using an single APIM instance:
./micro-gw setup --user amuser --password pass --label account --apim-base-url https://localhost:9443/ --path /home/user/workspace
+1 for base-url and I don't think we need apim prefix. 
+1 

When a distributed setup is used:
./micro-gw setup --user amuser --password pass --label account --publisher-url https://pub.apim.com/publisher --dcr-url https://admin.apim.com/client-reg --admin-url https://admin.apim.com/admin --path /home/user/workspace


Thanks and Regards



On Mon, Jun 18, 2018 at 11:18 AM, Rukshan Premathunga <[hidden email]> wrote:
I guess you are referring to the Microgateway CLI and not the APIM CLI.
Yes. It should be Microgateway CLI 


On Mon, Jun 18, 2018 at 11:15 AM, Nuwan Dias <[hidden email]> wrote:
I guess you are referring to the Microgateway CLI and not the APIM CLI.

On Mon, Jun 18, 2018 at 11:11 AM, Rukshan Premathunga <[hidden email]> wrote:
Hi All,

Currently CLI auto generate endpoints from defautl values and user have to edit it in order to work if endpoints are diffrent. As a solution we thought to provide urls as arguments for setup command.
But here we have 4 endpoints(store, publisher, admin and token) to get as arguments. But making all of them as  mandatory, user experience may get reduce, So we need to have a mechanism to derive them.

One option is to use one host for apps in same node(store, pub, admin). If it is changed, provide the optional arguments to override them.

So can you also share some idea please.

Thanks and Regards
-- 

Rukshan Chathuranga.
WSO2, Inc.
+94711822074



--
Nuwan Dias

Software Architect - WSO2, Inc. http://wso2.com
Phone : +94 777 775 729



--
Rukshan Chathuranga.
Software Engineer.
WSO2, Inc.
+94711822074



--
Rukshan Chathuranga.
Software Engineer.
WSO2, Inc.
+94711822074

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev




--
Thanks and Regards,

Isuru H.
+94 716 358 048


_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture


--
Harsha Kumara
Associate Technical Lead, WSO2 Inc.
Mobile: +94775505618
Blog:harshcreationz.blogspot.com



--
Rukshan Chathuranga.
Software Engineer.
WSO2, Inc.
+94711822074

_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture