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

>
>
> On Mon, Jun 18, 2018 at 5:26 PM Isuru Haththotuwa <[email protected]> wrote:
>
>>
>>
>> On Mon, Jun 18, 2018 at 2:37 PM, Rukshan Premathunga <[email protected]>
>> 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 *url* [ default https://localhost:9443/ ] :
>>> https://apim.wso2.com:9443/
>>> $ 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
>> <https://localhost:9443/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 <[email protected]>
>>> 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 <[email protected]> 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 <
>>>>> [email protected]> 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
>>>>> email : [email protected]
>>>>> Phone : +94 777 775 729
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Rukshan Chathuranga.
>>>> Software Engineer.
>>>> WSO2, Inc.
>>>> +94711822074
>>>>
>>>
>>>
>>>
>>> --
>>> Rukshan Chathuranga.
>>> Software Engineer.
>>> WSO2, Inc.
>>> +94711822074
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Thanks and Regards,
>>
>> Isuru H.
>> +94 716 358 048* <http://wso2.com/>*
>>
>>
>> _______________________________________________
>> Architecture mailing list
>> [email protected]
>> 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
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to