[APIM][C5] Multi Environment support with API difference for API Manager

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

[APIM][C5] Multi Environment support with API difference for API Manager

Renuka Fernando
Hi all,

We are planning to implement new feature "Multi-Environment Support"[1] for API Manager. The feature allows users to manage environments through one User Interfaces.

Inline images 1
Suppose there are three environments (i.e. three instance of API manager) currently running in an organization. Users of the API Manager have log into each environments and work with three different User Interfaces. The proposed feature allow one User Interface to handle all environments. User can switch environments and also enable new feature like API difference in environments.

This is the proposed design of multi-environment support for API manager.
Inline images 2

The UI service in the diagram may be a separate service for User Interface or another environment itself.

  1. Browser request login page for the app (publisher/store/admin) from UI service.
  2. Serve the page.
  3. Browser call the ConfigurationsAPI (org.wso2.carbon.apimgt.rest.api.configurations)[2] to get available environments.
  4. Read deployment.yaml that contains environments' details
    • Sample deployment.yaml
    • wso2.carbon.apimgt.environments:
        environmentName: Default
        environments:
        - host: dev.sample.com:9292
          loginTokenPath: /login/token
          label: Development
      
        - host: prod.sample.com:9292
          loginTokenPath: /login/token
          label: Production
  5. Serve environments' details as JSON.
    • Browser then render a list of environments.
  6. Send request with user credentials to the proper environment to login.
  7. The environment read its deployment.yaml to know the name of itself and set cookies with appending the name to the cookie name.


Appreciate any suggestions.
Thanks

Best regards

--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : +94 76 667 8752


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

Re: [APIM][C5] Multi Environment support with API difference for API Manager

Renuka Fernando
Hi all,

We are planning to implement new feature "Multi-Environment Support"[1] for API Manager. The feature allows users to manage environments through one User Interfaces.

Inline images 1
Suppose there are three environments (i.e. three instance of API manager) currently running in an organization. Users of the API Manager have log into each environments and work with three different User Interfaces. The proposed feature allow one User Interface to handle all environments. User can switch environments and also enable new feature like API difference in environments.

This is the proposed design of multi-environment support for API manager.
Inline images 2

The UI service in the diagram may be a separate service for User Interface or another environment itself.

  1. Browser request login page for the app (publisher/store/admin) from UI service.
  2. Serve the page.
  3. Browser call the ConfigurationsAPI (org.wso2.carbon.apimgt.rest.api.configurations)[2] to get available environments.
  4. Read deployment.yaml that contains environments' details
    • Sample deployment.yaml
    • wso2.carbon.apimgt.environments:
        environmentName: Default
        environments:
        - host: dev.sample.com:9292
          loginTokenPath: /login/token
          label: Development
      
        - host: prod.sample.com:9292
          loginTokenPath: /login/token
          label: Production
  5. Serve environments' details as JSON.
    • Browser then render a list of environments.
  6. Send request with user credentials to the proper environment to login.
  7. The environment read its deployment.yaml to know the name of itself and set cookies with appending the name to the cookie name.


Appreciate any suggestions.
Thanks

Best regards

On 6 November 2017 at 11:27, Renuka Fernando <[hidden email]> wrote:
Hi all,

We are planning to implement new feature "Multi-Environment Support"[1] for API Manager. The feature allows users to manage environments through one User Interfaces.

Inline images 1
Suppose there are three environments (i.e. three instance of API manager) currently running in an organization. Users of the API Manager have log into each environments and work with three different User Interfaces. The proposed feature allow one User Interface to handle all environments. User can switch environments and also enable new feature like API difference in environments.

This is the proposed design of multi-environment support for API manager.
Inline images 2

The UI service in the diagram may be a separate service for User Interface or another environment itself.

  1. Browser request login page for the app (publisher/store/admin) from UI service.
  2. Serve the page.
  3. Browser call the ConfigurationsAPI (org.wso2.carbon.apimgt.rest.api.configurations)[2] to get available environments.
  4. Read deployment.yaml that contains environments' details
    • Sample deployment.yaml
    • wso2.carbon.apimgt.environments:
        environmentName: Default
        environments:
        - host: dev.sample.com:9292
          loginTokenPath: /login/token
          label: Development
      
        - host: prod.sample.com:9292
          loginTokenPath: /login/token
          label: Production
  5. Serve environments' details as JSON.
    • Browser then render a list of environments.
  6. Send request with user credentials to the proper environment to login.
  7. The environment read its deployment.yaml to know the name of itself and set cookies with appending the name to the cookie name.


Appreciate any suggestions.
Thanks

Best regards

--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : <a href="tel:+94%2076%20667%208752" value="+94766678752" target="_blank">+94 76 667 8752




--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : +94 76 667 8752


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

Re: [APIM][C5] Multi Environment support with API difference for API Manager

Bhathiya Jayasekara
In reply to this post by Renuka Fernando
Hi Renuka,

On Mon, Nov 6, 2017 at 11:27 AM, Renuka Fernando <[hidden email]> wrote:
Hi all,

We are planning to implement new feature "Multi-Environment Support"[1] for API Manager. The feature allows users to manage environments through one User Interfaces.

Inline images 1
Suppose there are three environments (i.e. three instance of API manager) currently running in an organization. Users of the API Manager have log into each environments and work with three different User Interfaces. The proposed feature allow one User Interface to handle all environments. User can switch environments and also enable new feature like API difference in environments.

This is the proposed design of multi-environment support for API manager.
Inline images 2

The UI service in the diagram may be a separate service for User Interface or another environment itself.

  1. Browser request login page for the app (publisher/store/admin) from UI service.
  2. Serve the page.
  3. Browser call the ConfigurationsAPI (org.wso2.carbon.apimgt.rest.api.configurations)[2] to get available environments.
Since this API is a part of UI service (but not of core), we may need a different name to indicate that. 
  1. Read deployment.yaml that contains environments' details
    • Sample deployment.yaml
    • wso2.carbon.apimgt.environments:
        environmentName: Default
        environments:
        - host: dev.sample.com:9292
          loginTokenPath: /login/token
          label: Development

What's he dfference between environmentName and environments.label? (If environmentName represents the current environment, souldn't it be one of environments.labels?)

Thanks,
Bhathiya
  1. Serve environments' details as JSON.
    • Browser then render a list of environments.
  2. Send request with user credentials to the proper environment to login.
  3. The environment read its deployment.yaml to know the name of itself and set cookies with appending the name to the cookie name.


Appreciate any suggestions.
Thanks

Best regards

--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : <a href="tel:076%20667%208752" value="+94766678752" target="_blank">+94 76 667 8752




--
Bhathiya Jayasekara
Associate Technical Lead,
WSO2 inc., http://wso2.com

Phone: +94715478185

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

Re: [APIM][C5] Multi Environment support with API difference for API Manager

Chamin Dias
Hi Renuka,

Step 7 : "The environment read its deployment.yaml to know the name of itself and set cookies..."

So this means the environment name is taken from the environment itself. Is there any reason to exclude the environment in the provided yaml file?

Thanks.


On Mon, Nov 6, 2017 at 2:24 PM, Bhathiya Jayasekara <[hidden email]> wrote:
Hi Renuka,

On Mon, Nov 6, 2017 at 11:27 AM, Renuka Fernando <[hidden email]> wrote:
Hi all,

We are planning to implement new feature "Multi-Environment Support"[1] for API Manager. The feature allows users to manage environments through one User Interfaces.

Inline images 1
Suppose there are three environments (i.e. three instance of API manager) currently running in an organization. Users of the API Manager have log into each environments and work with three different User Interfaces. The proposed feature allow one User Interface to handle all environments. User can switch environments and also enable new feature like API difference in environments.

This is the proposed design of multi-environment support for API manager.
Inline images 2

The UI service in the diagram may be a separate service for User Interface or another environment itself.

  1. Browser request login page for the app (publisher/store/admin) from UI service.
  2. Serve the page.
  3. Browser call the ConfigurationsAPI (org.wso2.carbon.apimgt.rest.api.configurations)[2] to get available environments.
Since this API is a part of UI service (but not of core), we may need a different name to indicate that. 
  1. Read deployment.yaml that contains environments' details
    • Sample deployment.yaml
    • wso2.carbon.apimgt.environments:
        environmentName: Default
        environments:
        - host: dev.sample.com:9292
          loginTokenPath: /login/token
          label: Development

What's he dfference between environmentName and environments.label? (If environmentName represents the current environment, souldn't it be one of environments.labels?)

Thanks,
Bhathiya
  1. Serve environments' details as JSON.
    • Browser then render a list of environments.
  2. Send request with user credentials to the proper environment to login.
  3. The environment read its deployment.yaml to know the name of itself and set cookies with appending the name to the cookie name.


Appreciate any suggestions.
Thanks

Best regards

--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : <a href="tel:076%20667%208752" value="+94766678752" target="_blank">+94 76 667 8752




--
Bhathiya Jayasekara
Associate Technical Lead,
WSO2 inc., http://wso2.com

Phone: <a href="tel:+94%2071%20547%208185" value="+94715478185" target="_blank">+94715478185



--
Chamin Dias
Mobile : 0716097455


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

Re: [APIM][C5] Multi Environment support with API difference for API Manager

Pubudu Gunatilaka-2
Hi,

environmentName is used to keep the environment to itself. This is used when the server is setting up the cookies by appending the env name to the cookies. The env list is to populate the env list. 

Thank you!

On Mon, Nov 6, 2017 at 2:42 PM, Chamin Dias <[hidden email]> wrote:
Hi Renuka,

Step 7 : "The environment read its deployment.yaml to know the name of itself and set cookies..."

So this means the environment name is taken from the environment itself. Is there any reason to exclude the environment in the provided yaml file?

Thanks.


On Mon, Nov 6, 2017 at 2:24 PM, Bhathiya Jayasekara <[hidden email]> wrote:
Hi Renuka,

On Mon, Nov 6, 2017 at 11:27 AM, Renuka Fernando <[hidden email]> wrote:
Hi all,

We are planning to implement new feature "Multi-Environment Support"[1] for API Manager. The feature allows users to manage environments through one User Interfaces.

Inline images 1
Suppose there are three environments (i.e. three instance of API manager) currently running in an organization. Users of the API Manager have log into each environments and work with three different User Interfaces. The proposed feature allow one User Interface to handle all environments. User can switch environments and also enable new feature like API difference in environments.

This is the proposed design of multi-environment support for API manager.
Inline images 2

The UI service in the diagram may be a separate service for User Interface or another environment itself.

  1. Browser request login page for the app (publisher/store/admin) from UI service.
  2. Serve the page.
  3. Browser call the ConfigurationsAPI (org.wso2.carbon.apimgt.rest.api.configurations)[2] to get available environments.
Since this API is a part of UI service (but not of core), we may need a different name to indicate that. 
  1. Read deployment.yaml that contains environments' details
    • Sample deployment.yaml
    • wso2.carbon.apimgt.environments:
        environmentName: Default
        environments:
        - host: dev.sample.com:9292
          loginTokenPath: /login/token
          label: Development

What's he dfference between environmentName and environments.label? (If environmentName represents the current environment, souldn't it be one of environments.labels?)

Thanks,
Bhathiya
  1. Serve environments' details as JSON.
    • Browser then render a list of environments.
  2. Send request with user credentials to the proper environment to login.
  3. The environment read its deployment.yaml to know the name of itself and set cookies with appending the name to the cookie name.


Appreciate any suggestions.
Thanks

Best regards

--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : <a href="tel:076%20667%208752" value="+94766678752" target="_blank">+94 76 667 8752




--
Bhathiya Jayasekara
Associate Technical Lead,
WSO2 inc., http://wso2.com

Phone: <a href="tel:+94%2071%20547%208185" value="+94715478185" target="_blank">+94715478185



--
Chamin Dias
Mobile : 0716097455




--
Pubudu Gunatilaka
Committer and PMC Member - Apache Stratos
Senior Software Engineer 
WSO2, Inc.: http://wso2.com
mobile : <a href="tel:%2B94772207163" value="+94772207163" style="font-size:x-small;color:rgb(17,85,204)" target="_blank">+94774078049


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

Re: [APIM][C5] Multi Environment support with API difference for API Manager

Renuka Fernando
Hi,

The property environmentName is used to append environment name to cookie and label is used to list down environments in the login page.

Thank you

On 6 November 2017 at 15:34, Pubudu Gunatilaka <[hidden email]> wrote:
Hi,

environmentName is used to keep the environment to itself. This is used when the server is setting up the cookies by appending the env name to the cookies. The env list is to populate the env list. 

Thank you!

On Mon, Nov 6, 2017 at 2:42 PM, Chamin Dias <[hidden email]> wrote:
Hi Renuka,

Step 7 : "The environment read its deployment.yaml to know the name of itself and set cookies..."

So this means the environment name is taken from the environment itself. Is there any reason to exclude the environment in the provided yaml file?

Thanks.


On Mon, Nov 6, 2017 at 2:24 PM, Bhathiya Jayasekara <[hidden email]> wrote:
Hi Renuka,

On Mon, Nov 6, 2017 at 11:27 AM, Renuka Fernando <[hidden email]> wrote:
Hi all,

We are planning to implement new feature "Multi-Environment Support"[1] for API Manager. The feature allows users to manage environments through one User Interfaces.

Inline images 1
Suppose there are three environments (i.e. three instance of API manager) currently running in an organization. Users of the API Manager have log into each environments and work with three different User Interfaces. The proposed feature allow one User Interface to handle all environments. User can switch environments and also enable new feature like API difference in environments.

This is the proposed design of multi-environment support for API manager.
Inline images 2

The UI service in the diagram may be a separate service for User Interface or another environment itself.

  1. Browser request login page for the app (publisher/store/admin) from UI service.
  2. Serve the page.
  3. Browser call the ConfigurationsAPI (org.wso2.carbon.apimgt.rest.api.configurations)[2] to get available environments.
Since this API is a part of UI service (but not of core), we may need a different name to indicate that. 
  1. Read deployment.yaml that contains environments' details
    • Sample deployment.yaml
    • wso2.carbon.apimgt.environments:
        environmentName: Default
        environments:
        - host: dev.sample.com:9292
          loginTokenPath: /login/token
          label: Development

What's he dfference between environmentName and environments.label? (If environmentName represents the current environment, souldn't it be one of environments.labels?)

Thanks,
Bhathiya
  1. Serve environments' details as JSON.
    • Browser then render a list of environments.
  2. Send request with user credentials to the proper environment to login.
  3. The environment read its deployment.yaml to know the name of itself and set cookies with appending the name to the cookie name.


Appreciate any suggestions.
Thanks

Best regards

--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : <a href="tel:076%20667%208752" value="+94766678752" target="_blank">+94 76 667 8752




--
Bhathiya Jayasekara
Associate Technical Lead,
WSO2 inc., http://wso2.com

Phone: <a href="tel:+94%2071%20547%208185" value="+94715478185" target="_blank">+94715478185



--
Chamin Dias
Mobile : 0716097455




--
Pubudu Gunatilaka
Committer and PMC Member - Apache Stratos
Senior Software Engineer 
WSO2, Inc.: http://wso2.com
mobile : <a href="tel:%2B94772207163" value="+94772207163" style="font-size:x-small;color:rgb(17,85,204)" target="_blank">+94774078049




--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : +94 76 667 8752


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

Re: [APIM][C5] Multi Environment support with API difference for API Manager

Renuka Fernando
Hi,

Please find missing diagrams (inline images 1 and inline images 2) in my first reply (trimmed content).

Thank you

On 6 November 2017 at 16:24, Renuka Fernando <[hidden email]> wrote:
Hi,

The property environmentName is used to append environment name to cookie and label is used to list down environments in the login page.

Thank you

On 6 November 2017 at 15:34, Pubudu Gunatilaka <[hidden email]> wrote:
Hi,

environmentName is used to keep the environment to itself. This is used when the server is setting up the cookies by appending the env name to the cookies. The env list is to populate the env list. 

Thank you!

On Mon, Nov 6, 2017 at 2:42 PM, Chamin Dias <[hidden email]> wrote:
Hi Renuka,

Step 7 : "The environment read its deployment.yaml to know the name of itself and set cookies..."

So this means the environment name is taken from the environment itself. Is there any reason to exclude the environment in the provided yaml file?

Thanks.


On Mon, Nov 6, 2017 at 2:24 PM, Bhathiya Jayasekara <[hidden email]> wrote:
Hi Renuka,

On Mon, Nov 6, 2017 at 11:27 AM, Renuka Fernando <[hidden email]> wrote:
Hi all,

We are planning to implement new feature "Multi-Environment Support"[1] for API Manager. The feature allows users to manage environments through one User Interfaces.

Inline images 1
Suppose there are three environments (i.e. three instance of API manager) currently running in an organization. Users of the API Manager have log into each environments and work with three different User Interfaces. The proposed feature allow one User Interface to handle all environments. User can switch environments and also enable new feature like API difference in environments.

This is the proposed design of multi-environment support for API manager.
Inline images 2

The UI service in the diagram may be a separate service for User Interface or another environment itself.

  1. Browser request login page for the app (publisher/store/admin) from UI service.
  2. Serve the page.
  3. Browser call the ConfigurationsAPI (org.wso2.carbon.apimgt.rest.api.configurations)[2] to get available environments.
Since this API is a part of UI service (but not of core), we may need a different name to indicate that. 
  1. Read deployment.yaml that contains environments' details
    • Sample deployment.yaml
    • wso2.carbon.apimgt.environments:
        environmentName: Default
        environments:
        - host: dev.sample.com:9292
          loginTokenPath: /login/token
          label: Development

What's he dfference between environmentName and environments.label? (If environmentName represents the current environment, souldn't it be one of environments.labels?)

Thanks,
Bhathiya
  1. Serve environments' details as JSON.
    • Browser then render a list of environments.
  2. Send request with user credentials to the proper environment to login.
  3. The environment read its deployment.yaml to know the name of itself and set cookies with appending the name to the cookie name.


Appreciate any suggestions.
Thanks

Best regards

--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : <a href="tel:076%20667%208752" value="+94766678752" target="_blank">+94 76 667 8752




--
Bhathiya Jayasekara
Associate Technical Lead,
WSO2 inc., http://wso2.com

Phone: <a href="tel:+94%2071%20547%208185" value="+94715478185" target="_blank">+94715478185



--
Chamin Dias
Mobile : 0716097455




--
Pubudu Gunatilaka
Committer and PMC Member - Apache Stratos
Senior Software Engineer 
WSO2, Inc.: http://wso2.com
mobile : <a href="tel:%2B94772207163" value="+94772207163" style="font-size:x-small;color:rgb(17,85,204)" target="_blank">+94774078049




--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : <a href="tel:+94%2076%20667%208752" value="+94766678752" target="_blank">+94 76 667 8752




--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : +94 76 667 8752


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

Re: [APIM][C5] Multi Environment support with API difference for API Manager

Sanjeewa Malalgoda
In reply to this post by Renuka Fernando


On Mon, Nov 6, 2017 at 4:24 PM, Renuka Fernando <[hidden email]> wrote:
Hi,

The property environmentName is used to append environment name to cookie and label is used to list down environments in the login page.
Still it is not clear for me. If this is meta data related to all environments, then we should not use environment name here and use something else. 

Thanks,
sanjeewa.

Thank you

On 6 November 2017 at 15:34, Pubudu Gunatilaka <[hidden email]> wrote:
Hi,

environmentName is used to keep the environment to itself. This is used when the server is setting up the cookies by appending the env name to the cookies. The env list is to populate the env list. 

Thank you!

On Mon, Nov 6, 2017 at 2:42 PM, Chamin Dias <[hidden email]> wrote:
Hi Renuka,

Step 7 : "The environment read its deployment.yaml to know the name of itself and set cookies..."

So this means the environment name is taken from the environment itself. Is there any reason to exclude the environment in the provided yaml file?

Thanks.


On Mon, Nov 6, 2017 at 2:24 PM, Bhathiya Jayasekara <[hidden email]> wrote:
Hi Renuka,

On Mon, Nov 6, 2017 at 11:27 AM, Renuka Fernando <[hidden email]> wrote:
Hi all,

We are planning to implement new feature "Multi-Environment Support"[1] for API Manager. The feature allows users to manage environments through one User Interfaces.

Inline images 1
Suppose there are three environments (i.e. three instance of API manager) currently running in an organization. Users of the API Manager have log into each environments and work with three different User Interfaces. The proposed feature allow one User Interface to handle all environments. User can switch environments and also enable new feature like API difference in environments.

This is the proposed design of multi-environment support for API manager.
Inline images 2

The UI service in the diagram may be a separate service for User Interface or another environment itself.

  1. Browser request login page for the app (publisher/store/admin) from UI service.
  2. Serve the page.
  3. Browser call the ConfigurationsAPI (org.wso2.carbon.apimgt.rest.api.configurations)[2] to get available environments.
Since this API is a part of UI service (but not of core), we may need a different name to indicate that. 
  1. Read deployment.yaml that contains environments' details
    • Sample deployment.yaml
    • wso2.carbon.apimgt.environments:
        environmentName: Default
        environments:
        - host: dev.sample.com:9292
          loginTokenPath: /login/token
          label: Development

What's he dfference between environmentName and environments.label? (If environmentName represents the current environment, souldn't it be one of environments.labels?)

Thanks,
Bhathiya
  1. Serve environments' details as JSON.
    • Browser then render a list of environments.
  2. Send request with user credentials to the proper environment to login.
  3. The environment read its deployment.yaml to know the name of itself and set cookies with appending the name to the cookie name.


Appreciate any suggestions.
Thanks

Best regards

--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : <a href="tel:076%20667%208752" value="+94766678752" target="_blank">+94 76 667 8752




--
Bhathiya Jayasekara
Associate Technical Lead,
WSO2 inc., http://wso2.com

Phone: <a href="tel:+94%2071%20547%208185" value="+94715478185" target="_blank">+94715478185



--
Chamin Dias
Mobile : <a href="tel:071%20609%207455" value="+94716097455" target="_blank">0716097455




--
Pubudu Gunatilaka
Committer and PMC Member - Apache Stratos
Senior Software Engineer 
WSO2, Inc.: http://wso2.com
mobile : <a href="tel:%2B94772207163" value="+94772207163" style="font-size:x-small;color:rgb(17,85,204)" target="_blank">+94774078049




--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : <a href="tel:076%20667%208752" value="+94766678752" target="_blank">+94 76 667 8752




--

Sanjeewa Malalgoda
WSO2 Inc.
Mobile : +94713068779

blog :http://sanjeewamalalgoda.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: [APIM][C5] Multi Environment support with API difference for API Manager

Bhathiya Jayasekara
In reply to this post by Renuka Fernando
Hi Renuka,

On Mon, Nov 6, 2017 at 4:24 PM, Renuka Fernando <[hidden email]> wrote:
Hi,

The property environmentName is used to append environment name to cookie and label is used to list down environments in the login page.

Stil not clear to me either. Let me ask 2 direct questions. 

1) In your sample, you have 2 environments, development and production. But your environmentName is Default. What does that mean?  
2) In case of UI service running separately, what should be the value of environmentName? (I guess you don't need that in this case. Please confirm.)

Thanks,
Bhathiya
 

Thank you

On 6 November 2017 at 15:34, Pubudu Gunatilaka <[hidden email]> wrote:
Hi,

environmentName is used to keep the environment to itself. This is used when the server is setting up the cookies by appending the env name to the cookies. The env list is to populate the env list. 

Thank you!

On Mon, Nov 6, 2017 at 2:42 PM, Chamin Dias <[hidden email]> wrote:
Hi Renuka,

Step 7 : "The environment read its deployment.yaml to know the name of itself and set cookies..."

So this means the environment name is taken from the environment itself. Is there any reason to exclude the environment in the provided yaml file?

Thanks.


On Mon, Nov 6, 2017 at 2:24 PM, Bhathiya Jayasekara <[hidden email]> wrote:
Hi Renuka,

On Mon, Nov 6, 2017 at 11:27 AM, Renuka Fernando <[hidden email]> wrote:
Hi all,

We are planning to implement new feature "Multi-Environment Support"[1] for API Manager. The feature allows users to manage environments through one User Interfaces.

Inline images 1
Suppose there are three environments (i.e. three instance of API manager) currently running in an organization. Users of the API Manager have log into each environments and work with three different User Interfaces. The proposed feature allow one User Interface to handle all environments. User can switch environments and also enable new feature like API difference in environments.

This is the proposed design of multi-environment support for API manager.
Inline images 2

The UI service in the diagram may be a separate service for User Interface or another environment itself.

  1. Browser request login page for the app (publisher/store/admin) from UI service.
  2. Serve the page.
  3. Browser call the ConfigurationsAPI (org.wso2.carbon.apimgt.rest.api.configurations)[2] to get available environments.
Since this API is a part of UI service (but not of core), we may need a different name to indicate that. 
  1. Read deployment.yaml that contains environments' details
    • Sample deployment.yaml
    • wso2.carbon.apimgt.environments:
        environmentName: Default
        environments:
        - host: dev.sample.com:9292
          loginTokenPath: /login/token
          label: Development

What's he dfference between environmentName and environments.label? (If environmentName represents the current environment, souldn't it be one of environments.labels?)

Thanks,
Bhathiya
  1. Serve environments' details as JSON.
    • Browser then render a list of environments.
  2. Send request with user credentials to the proper environment to login.
  3. The environment read its deployment.yaml to know the name of itself and set cookies with appending the name to the cookie name.


Appreciate any suggestions.
Thanks

Best regards

--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : <a href="tel:076%20667%208752" value="+94766678752" target="_blank">+94 76 667 8752




--
Bhathiya Jayasekara
Associate Technical Lead,
WSO2 inc., http://wso2.com

Phone: <a href="tel:+94%2071%20547%208185" value="+94715478185" target="_blank">+94715478185



--
Chamin Dias
Mobile : <a href="tel:071%20609%207455" value="+94716097455" target="_blank">0716097455




--
Pubudu Gunatilaka
Committer and PMC Member - Apache Stratos
Senior Software Engineer 
WSO2, Inc.: http://wso2.com
mobile : <a href="tel:%2B94772207163" value="+94772207163" style="font-size:x-small;color:rgb(17,85,204)" target="_blank">+94774078049




--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : <a href="tel:076%20667%208752" value="+94766678752" target="_blank">+94 76 667 8752




--
Bhathiya Jayasekara
Associate Technical Lead,
WSO2 inc., http://wso2.com

Phone: +94715478185

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

Re: [APIM][C5] Multi Environment support with API difference for API Manager

Abimaran Kugathasan
In reply to this post by Sanjeewa Malalgoda
Hi Renuka,

Still, those two images aren't there in mails.

What do you mean by "enable new feature like API difference in environments"? Checking differences in APIs between environments? I think, this feature required only for Publisher.



On Mon, Nov 6, 2017 at 6:11 PM, Sanjeewa Malalgoda <[hidden email]> wrote:


On Mon, Nov 6, 2017 at 4:24 PM, Renuka Fernando <[hidden email]> wrote:
Hi,

The property environmentName is used to append environment name to cookie and label is used to list down environments in the login page.
Still it is not clear for me. If this is meta data related to all environments, then we should not use environment name here and use something else. 

Thanks,
sanjeewa.

Thank you

On 6 November 2017 at 15:34, Pubudu Gunatilaka <[hidden email]> wrote:
Hi,

environmentName is used to keep the environment to itself. This is used when the server is setting up the cookies by appending the env name to the cookies. The env list is to populate the env list. 

Thank you!

On Mon, Nov 6, 2017 at 2:42 PM, Chamin Dias <[hidden email]> wrote:
Hi Renuka,

Step 7 : "The environment read its deployment.yaml to know the name of itself and set cookies..."

So this means the environment name is taken from the environment itself. Is there any reason to exclude the environment in the provided yaml file?

Thanks.


On Mon, Nov 6, 2017 at 2:24 PM, Bhathiya Jayasekara <[hidden email]> wrote:
Hi Renuka,

On Mon, Nov 6, 2017 at 11:27 AM, Renuka Fernando <[hidden email]> wrote:
Hi all,

We are planning to implement new feature "Multi-Environment Support"[1] for API Manager. The feature allows users to manage environments through one User Interfaces.

Inline images 1
Suppose there are three environments (i.e. three instance of API manager) currently running in an organization. Users of the API Manager have log into each environments and work with three different User Interfaces. The proposed feature allow one User Interface to handle all environments. User can switch environments and also enable new feature like API difference in environments.

This is the proposed design of multi-environment support for API manager.
Inline images 2

The UI service in the diagram may be a separate service for User Interface or another environment itself.

  1. Browser request login page for the app (publisher/store/admin) from UI service.
  2. Serve the page.
  3. Browser call the ConfigurationsAPI (org.wso2.carbon.apimgt.rest.api.configurations)[2] to get available environments.
Since this API is a part of UI service (but not of core), we may need a different name to indicate that. 
  1. Read deployment.yaml that contains environments' details
    • Sample deployment.yaml
    • wso2.carbon.apimgt.environments:
        environmentName: Default
        environments:
        - host: dev.sample.com:9292
          loginTokenPath: /login/token
          label: Development

What's he dfference between environmentName and environments.label? (If environmentName represents the current environment, souldn't it be one of environments.labels?)

Thanks,
Bhathiya
  1. Serve environments' details as JSON.
    • Browser then render a list of environments.
  2. Send request with user credentials to the proper environment to login.
  3. The environment read its deployment.yaml to know the name of itself and set cookies with appending the name to the cookie name.


Appreciate any suggestions.
Thanks

Best regards

--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : <a href="tel:076%20667%208752" value="+94766678752" target="_blank">+94 76 667 8752




--
Bhathiya Jayasekara
Associate Technical Lead,
WSO2 inc., http://wso2.com

Phone: <a href="tel:+94%2071%20547%208185" value="+94715478185" target="_blank">+94715478185



--
Chamin Dias
Mobile : <a href="tel:071%20609%207455" value="+94716097455" target="_blank">0716097455




--
Pubudu Gunatilaka
Committer and PMC Member - Apache Stratos
Senior Software Engineer 
WSO2, Inc.: http://wso2.com
mobile : <a href="tel:%2B94772207163" value="+94772207163" style="font-size:x-small;color:rgb(17,85,204)" target="_blank">+94774078049




--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : <a href="tel:076%20667%208752" value="+94766678752" target="_blank">+94 76 667 8752




--

Sanjeewa Malalgoda
WSO2 Inc.
Mobile : <a href="tel:+94%2071%20306%208779" value="+94713068779" target="_blank">+94713068779

blog :http://sanjeewamalalgoda.blogspot.com/





--
Thanks
Abimaran Kugathasan
Senior Software Engineer - API Technologies

Mobile : +94 773922820

    


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

Re: [APIM][C5] Multi Environment support with API difference for API Manager

Bhathiya Jayasekara

On Mon, Nov 6, 2017 at 7:18 PM, Abimaran Kugathasan <[hidden email]> wrote:
Hi Renuka,

Still, those two images aren't there in mails.

Images are visible in the 2nd email.

Thanks,
Bhathiya
 

What do you mean by "enable new feature like API difference in environments"? Checking differences in APIs between environments? I think, this feature required only for Publisher.



On Mon, Nov 6, 2017 at 6:11 PM, Sanjeewa Malalgoda <[hidden email]> wrote:


On Mon, Nov 6, 2017 at 4:24 PM, Renuka Fernando <[hidden email]> wrote:
Hi,

The property environmentName is used to append environment name to cookie and label is used to list down environments in the login page.
Still it is not clear for me. If this is meta data related to all environments, then we should not use environment name here and use something else. 

Thanks,
sanjeewa.

Thank you

On 6 November 2017 at 15:34, Pubudu Gunatilaka <[hidden email]> wrote:
Hi,

environmentName is used to keep the environment to itself. This is used when the server is setting up the cookies by appending the env name to the cookies. The env list is to populate the env list. 

Thank you!

On Mon, Nov 6, 2017 at 2:42 PM, Chamin Dias <[hidden email]> wrote:
Hi Renuka,

Step 7 : "The environment read its deployment.yaml to know the name of itself and set cookies..."

So this means the environment name is taken from the environment itself. Is there any reason to exclude the environment in the provided yaml file?

Thanks.


On Mon, Nov 6, 2017 at 2:24 PM, Bhathiya Jayasekara <[hidden email]> wrote:
Hi Renuka,

On Mon, Nov 6, 2017 at 11:27 AM, Renuka Fernando <[hidden email]> wrote:
Hi all,

We are planning to implement new feature "Multi-Environment Support"[1] for API Manager. The feature allows users to manage environments through one User Interfaces.

Inline images 1
Suppose there are three environments (i.e. three instance of API manager) currently running in an organization. Users of the API Manager have log into each environments and work with three different User Interfaces. The proposed feature allow one User Interface to handle all environments. User can switch environments and also enable new feature like API difference in environments.

This is the proposed design of multi-environment support for API manager.
Inline images 2

The UI service in the diagram may be a separate service for User Interface or another environment itself.

  1. Browser request login page for the app (publisher/store/admin) from UI service.
  2. Serve the page.
  3. Browser call the ConfigurationsAPI (org.wso2.carbon.apimgt.rest.api.configurations)[2] to get available environments.
Since this API is a part of UI service (but not of core), we may need a different name to indicate that. 
  1. Read deployment.yaml that contains environments' details
    • Sample deployment.yaml
    • wso2.carbon.apimgt.environments:
        environmentName: Default
        environments:
        - host: dev.sample.com:9292
          loginTokenPath: /login/token
          label: Development

What's he dfference between environmentName and environments.label? (If environmentName represents the current environment, souldn't it be one of environments.labels?)

Thanks,
Bhathiya
  1. Serve environments' details as JSON.
    • Browser then render a list of environments.
  2. Send request with user credentials to the proper environment to login.
  3. The environment read its deployment.yaml to know the name of itself and set cookies with appending the name to the cookie name.


Appreciate any suggestions.
Thanks

Best regards

--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : <a href="tel:076%20667%208752" value="+94766678752" target="_blank">+94 76 667 8752




--
Bhathiya Jayasekara
Associate Technical Lead,
WSO2 inc., http://wso2.com

Phone: <a href="tel:+94%2071%20547%208185" value="+94715478185" target="_blank">+94715478185



--
Chamin Dias
Mobile : <a href="tel:071%20609%207455" value="+94716097455" target="_blank">0716097455




--
Pubudu Gunatilaka
Committer and PMC Member - Apache Stratos
Senior Software Engineer 
WSO2, Inc.: http://wso2.com
mobile : <a href="tel:%2B94772207163" value="+94772207163" style="font-size:x-small;color:rgb(17,85,204)" target="_blank">+94774078049




--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : <a href="tel:076%20667%208752" value="+94766678752" target="_blank">+94 76 667 8752




--

Sanjeewa Malalgoda
WSO2 Inc.
Mobile : <a href="tel:+94%2071%20306%208779" value="+94713068779" target="_blank">+94713068779

blog :http://sanjeewamalalgoda.blogspot.com/





--
Thanks
Abimaran Kugathasan
Senior Software Engineer - API Technologies

Mobile : <a href="tel:077%20392%202820" value="+94773922820" target="_blank">+94 773922820

    




--
Bhathiya Jayasekara
Associate Technical Lead,
WSO2 inc., http://wso2.com

Phone: +94715478185

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

Re: [APIM][C5] Multi Environment support with API difference for API Manager

Rajith Roshan
In reply to this post by Bhathiya Jayasekara
Hi,

On Mon, Nov 6, 2017 at 7:16 PM, Bhathiya Jayasekara <[hidden email]> wrote:
Hi Renuka,

On Mon, Nov 6, 2017 at 4:24 PM, Renuka Fernando <[hidden email]> wrote:
Hi,

The property environmentName is used to append environment name to cookie and label is used to list down environments in the login page.

Stil not clear to me either. Let me ask 2 direct questions. 

1) In your sample, you have 2 environments, development and production. But your environmentName is Default. What does that mean?  
What if there are no multiple environments in deployment.yaml. Then cookie names will not have any environment name append to it.   So to maintain consistency of cookie names I think its better to have a default value for environment.
But the name environment name can be confusing. As in your second question sometimes this might not be environment (just provide the UI).
2) In case of UI service running separately, what should be the value of environmentName? (I guess you don't need that in this case. Please confirm.)
Exactly this is one use case. UI can be served by separate node which is not a environment . This is where the environment list comes into play. User will have to definitely select either production or development here. Default value is never present to the UI. It is only for internal reference only.

I think overall there are some missing points in this design we need to clarify.
@KasunTe, @PubuduG, Could you please shed some light here since, you have closely followed the GSoc project.

Thanks,
Bhathiya
 

Thank you

On 6 November 2017 at 15:34, Pubudu Gunatilaka <[hidden email]> wrote:
Hi,

environmentName is used to keep the environment to itself. This is used when the server is setting up the cookies by appending the env name to the cookies. The env list is to populate the env list. 

Thank you!

On Mon, Nov 6, 2017 at 2:42 PM, Chamin Dias <[hidden email]> wrote:
Hi Renuka,

Step 7 : "The environment read its deployment.yaml to know the name of itself and set cookies..."

So this means the environment name is taken from the environment itself. Is there any reason to exclude the environment in the provided yaml file?

Thanks.


On Mon, Nov 6, 2017 at 2:24 PM, Bhathiya Jayasekara <[hidden email]> wrote:
Hi Renuka,

On Mon, Nov 6, 2017 at 11:27 AM, Renuka Fernando <[hidden email]> wrote:
Hi all,

We are planning to implement new feature "Multi-Environment Support"[1] for API Manager. The feature allows users to manage environments through one User Interfaces.

Inline images 1
Suppose there are three environments (i.e. three instance of API manager) currently running in an organization. Users of the API Manager have log into each environments and work with three different User Interfaces. The proposed feature allow one User Interface to handle all environments. User can switch environments and also enable new feature like API difference in environments.

This is the proposed design of multi-environment support for API manager.
Inline images 2

The UI service in the diagram may be a separate service for User Interface or another environment itself.

  1. Browser request login page for the app (publisher/store/admin) from UI service.
  2. Serve the page.
  3. Browser call the ConfigurationsAPI (org.wso2.carbon.apimgt.rest.api.configurations)[2] to get available environments.
Since this API is a part of UI service (but not of core), we may need a different name to indicate that. 
  1. Read deployment.yaml that contains environments' details
    • Sample deployment.yaml
    • wso2.carbon.apimgt.environments:
        environmentName: Default
        environments:
        - host: dev.sample.com:9292
          loginTokenPath: /login/token
          label: Development

What's he dfference between environmentName and environments.label? (If environmentName represents the current environment, souldn't it be one of environments.labels?)

Thanks,
Bhathiya
  1. Serve environments' details as JSON.
    • Browser then render a list of environments.
  2. Send request with user credentials to the proper environment to login.
  3. The environment read its deployment.yaml to know the name of itself and set cookies with appending the name to the cookie name.


Appreciate any suggestions.
Thanks

Best regards

--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : <a href="tel:076%20667%208752" value="+94766678752" target="_blank">+94 76 667 8752




--
Bhathiya Jayasekara
Associate Technical Lead,
WSO2 inc., http://wso2.com

Phone: <a href="tel:+94%2071%20547%208185" value="+94715478185" target="_blank">+94715478185



--
Chamin Dias
Mobile : <a href="tel:071%20609%207455" value="+94716097455" target="_blank">0716097455




--
Pubudu Gunatilaka
Committer and PMC Member - Apache Stratos
Senior Software Engineer 
WSO2, Inc.: http://wso2.com
mobile : <a href="tel:%2B94772207163" value="+94772207163" style="font-size:x-small;color:rgb(17,85,204)" target="_blank">+94774078049




--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : <a href="tel:076%20667%208752" value="+94766678752" target="_blank">+94 76 667 8752




--
Bhathiya Jayasekara
Associate Technical Lead,
WSO2 inc., http://wso2.com

Phone: <a href="tel:+94%2071%20547%208185" value="+94715478185" target="_blank">+94715478185



--
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: <a href="tel:%2B94-71-554-8430" value="+94715548430" target="_blank">+94-717-064-214

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

Re: [APIM][C5] Multi Environment support with API difference for API Manager

Rajith Roshan
In reply to this post by Abimaran Kugathasan
Hi 

On Mon, Nov 6, 2017 at 7:18 PM, Abimaran Kugathasan <[hidden email]> wrote:
Hi Renuka,

Still, those two images aren't there in mails.

What do you mean by "enable new feature like API difference in environments"? Checking differences in APIs between environments? I think, this feature required only for Publisher.
I think its to compare APIS in different APIs. I think using this feature user can be logged into multiple environments at once (By switching environment he logged into new environment without log out from already logged in environment). So this feature will  allow to bring APIS from different   environments, hence we can provide the capability of comparison (diff).




On Mon, Nov 6, 2017 at 6:11 PM, Sanjeewa Malalgoda <[hidden email]> wrote:


On Mon, Nov 6, 2017 at 4:24 PM, Renuka Fernando <[hidden email]> wrote:
Hi,

The property environmentName is used to append environment name to cookie and label is used to list down environments in the login page.
Still it is not clear for me. If this is meta data related to all environments, then we should not use environment name here and use something else. 

Thanks,
sanjeewa.

Thank you

On 6 November 2017 at 15:34, Pubudu Gunatilaka <[hidden email]> wrote:
Hi,

environmentName is used to keep the environment to itself. This is used when the server is setting up the cookies by appending the env name to the cookies. The env list is to populate the env list. 

Thank you!

On Mon, Nov 6, 2017 at 2:42 PM, Chamin Dias <[hidden email]> wrote:
Hi Renuka,

Step 7 : "The environment read its deployment.yaml to know the name of itself and set cookies..."

So this means the environment name is taken from the environment itself. Is there any reason to exclude the environment in the provided yaml file?

Thanks.


On Mon, Nov 6, 2017 at 2:24 PM, Bhathiya Jayasekara <[hidden email]> wrote:
Hi Renuka,

On Mon, Nov 6, 2017 at 11:27 AM, Renuka Fernando <[hidden email]> wrote:
Hi all,

We are planning to implement new feature "Multi-Environment Support"[1] for API Manager. The feature allows users to manage environments through one User Interfaces.

Inline images 1
Suppose there are three environments (i.e. three instance of API manager) currently running in an organization. Users of the API Manager have log into each environments and work with three different User Interfaces. The proposed feature allow one User Interface to handle all environments. User can switch environments and also enable new feature like API difference in environments.

This is the proposed design of multi-environment support for API manager.
Inline images 2

The UI service in the diagram may be a separate service for User Interface or another environment itself.

  1. Browser request login page for the app (publisher/store/admin) from UI service.
  2. Serve the page.
  3. Browser call the ConfigurationsAPI (org.wso2.carbon.apimgt.rest.api.configurations)[2] to get available environments.
Since this API is a part of UI service (but not of core), we may need a different name to indicate that. 
  1. Read deployment.yaml that contains environments' details
    • Sample deployment.yaml
    • wso2.carbon.apimgt.environments:
        environmentName: Default
        environments:
        - host: dev.sample.com:9292
          loginTokenPath: /login/token
          label: Development

What's he dfference between environmentName and environments.label? (If environmentName represents the current environment, souldn't it be one of environments.labels?)

Thanks,
Bhathiya
  1. Serve environments' details as JSON.
    • Browser then render a list of environments.
  2. Send request with user credentials to the proper environment to login.
  3. The environment read its deployment.yaml to know the name of itself and set cookies with appending the name to the cookie name.


Appreciate any suggestions.
Thanks

Best regards

--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : <a href="tel:076%20667%208752" value="+94766678752" target="_blank">+94 76 667 8752




--
Bhathiya Jayasekara
Associate Technical Lead,
WSO2 inc., http://wso2.com

Phone: <a href="tel:+94%2071%20547%208185" value="+94715478185" target="_blank">+94715478185



--
Chamin Dias
Mobile : <a href="tel:071%20609%207455" value="+94716097455" target="_blank">0716097455




--
Pubudu Gunatilaka
Committer and PMC Member - Apache Stratos
Senior Software Engineer 
WSO2, Inc.: http://wso2.com
mobile : <a href="tel:%2B94772207163" value="+94772207163" style="font-size:x-small;color:rgb(17,85,204)" target="_blank">+94774078049




--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : <a href="tel:076%20667%208752" value="+94766678752" target="_blank">+94 76 667 8752




--

Sanjeewa Malalgoda
WSO2 Inc.
Mobile : <a href="tel:+94%2071%20306%208779" value="+94713068779" target="_blank">+94713068779

blog :http://sanjeewamalalgoda.blogspot.com/





--
Thanks
Abimaran Kugathasan
Senior Software Engineer - API Technologies

Mobile : <a href="tel:+94%2077%20392%202820" value="+94773922820" target="_blank">+94 773922820

    




--
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: <a href="tel:%2B94-71-554-8430" value="+94715548430" target="_blank">+94-717-064-214

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

Re: [APIM][C5] Multi Environment support with API difference for API Manager

Chamalee De Silva
In reply to this post by Renuka Fernando
Hi Renuka, 

We are planning to implement new feature "Multi-Environment Support"[1] for API Manager. The feature allows users to manage environments through one User Interfaces.

Inline images 1
Suppose there are three environments (i.e. three instance of API manager) currently running in an organization. Users of the API Manager have log into each environments and work with three different User Interfaces. The proposed feature allow one User Interface to handle all environments. User can switch environments and also enable new feature like API difference in environments.

This is the proposed design of multi-environment support for API manager.
Inline images 2

The UI service in the diagram may be a separate service for User Interface or another environment itself.

  1. Browser request login page for the app (publisher/store/admin) from UI service.
  2. Serve the page.
  3. Browser call the ConfigurationsAPI (org.wso2.carbon.apimgt.rest.api.configurations)[2] to get available environments.
  4. Read deployment.yaml that contains environments' details
    • Sample deployment.yaml
    • wso2.carbon.apimgt.environments:
        environmentName: Default
        environments:
        - host: dev.sample.com:9292
          loginTokenPath: /login/token
          label: Development
      
        - host: prod.sample.com:9292
          loginTokenPath: /login/token
          label: Production
  5. Serve environments' details as JSON.
    • Browser then render a list of environments.
  6. Send request with user credentials to the proper environment to login.

I hope this means that this UI Service can be hosted even somewhere else outside these environments  or in one of any of these environment (e.g. dev_env). 
If so, when we click on one of the environments listed in the UI in step 5, 

Can't we do a redirection to the particular App of the corresponding environment (assume the publisher App of dev_env)  and hand over the login part to be handled through that app ?
I mean since it is already implemented do we need to handle step 6 through this feature ?



Thanks,
Chamalee

--
Thanks & Regards,

Chamalee De Silva

Software Engineer
WSO2 Inc. :http://wso2.com/

Office   :- <a href="tel:%2B94%2011%202145345" value="+94112145345" style="color:rgb(17,85,204)" target="_blank">+94 11 2145345
mobile  :- <a href="tel:%2B94%2077%202782039" value="+94772782039" style="color:rgb(17,85,204)" target="_blank">+94 71 4315942


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

Re: [APIM][C5] Multi Environment support with API difference for API Manager

Bhathiya Jayasekara
In reply to this post by Rajith Roshan
Hi Rajith,

On Mon, Nov 6, 2017 at 9:11 PM, Rajith Roshan <[hidden email]> wrote:
Hi,

On Mon, Nov 6, 2017 at 7:16 PM, Bhathiya Jayasekara <[hidden email]> wrote:
Hi Renuka,

On Mon, Nov 6, 2017 at 4:24 PM, Renuka Fernando <[hidden email]> wrote:
Hi,

The property environmentName is used to append environment name to cookie and label is used to list down environments in the login page.

Stil not clear to me either. Let me ask 2 direct questions. 

1) In your sample, you have 2 environments, development and production. But your environmentName is Default. What does that mean?  
What if there are no multiple environments in deployment.yaml. Then cookie names will not have any environment name append to it.   So to maintain consistency of cookie names I think its better to have a default value for environment.

Yes, it's fine to have a default value when there are no multiple environments. But my question is about when you have multiple environments. Shouldn't this environmentName be one of those environment labels? If not, I'm confused. 
 
But the name environment name can be confusing. As in your second question sometimes this might not be environment (just provide the UI).
2) In case of UI service running separately, what should be the value of environmentName? (I guess you don't need that in this case. Please confirm.)
Exactly this is one use case. UI can be served by separate node which is not a environment . This is where the environment list comes into play. User will have to definitely select either production or development here. Default value is never present to the UI. It is only for internal reference only.

What do we do with that internally? Why can't we just drop that, in this case?

Thanks,
Bhathiya
 

I think overall there are some missing points in this design we need to clarify.
@KasunTe, @PubuduG, Could you please shed some light here since, you have closely followed the GSoc project.

Thanks,
Bhathiya
 

Thank you

On 6 November 2017 at 15:34, Pubudu Gunatilaka <[hidden email]> wrote:
Hi,

environmentName is used to keep the environment to itself. This is used when the server is setting up the cookies by appending the env name to the cookies. The env list is to populate the env list. 

Thank you!

On Mon, Nov 6, 2017 at 2:42 PM, Chamin Dias <[hidden email]> wrote:
Hi Renuka,

Step 7 : "The environment read its deployment.yaml to know the name of itself and set cookies..."

So this means the environment name is taken from the environment itself. Is there any reason to exclude the environment in the provided yaml file?

Thanks.


On Mon, Nov 6, 2017 at 2:24 PM, Bhathiya Jayasekara <[hidden email]> wrote:
Hi Renuka,

On Mon, Nov 6, 2017 at 11:27 AM, Renuka Fernando <[hidden email]> wrote:
Hi all,

We are planning to implement new feature "Multi-Environment Support"[1] for API Manager. The feature allows users to manage environments through one User Interfaces.

Inline images 1
Suppose there are three environments (i.e. three instance of API manager) currently running in an organization. Users of the API Manager have log into each environments and work with three different User Interfaces. The proposed feature allow one User Interface to handle all environments. User can switch environments and also enable new feature like API difference in environments.

This is the proposed design of multi-environment support for API manager.
Inline images 2

The UI service in the diagram may be a separate service for User Interface or another environment itself.

  1. Browser request login page for the app (publisher/store/admin) from UI service.
  2. Serve the page.
  3. Browser call the ConfigurationsAPI (org.wso2.carbon.apimgt.rest.api.configurations)[2] to get available environments.
Since this API is a part of UI service (but not of core), we may need a different name to indicate that. 
  1. Read deployment.yaml that contains environments' details
    • Sample deployment.yaml
    • wso2.carbon.apimgt.environments:
        environmentName: Default
        environments:
        - host: dev.sample.com:9292
          loginTokenPath: /login/token
          label: Development

What's he dfference between environmentName and environments.label? (If environmentName represents the current environment, souldn't it be one of environments.labels?)

Thanks,
Bhathiya
  1. Serve environments' details as JSON.
    • Browser then render a list of environments.
  2. Send request with user credentials to the proper environment to login.
  3. The environment read its deployment.yaml to know the name of itself and set cookies with appending the name to the cookie name.


Appreciate any suggestions.
Thanks

Best regards

--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : <a href="tel:076%20667%208752" value="+94766678752" target="_blank">+94 76 667 8752




--
Bhathiya Jayasekara
Associate Technical Lead,
WSO2 inc., http://wso2.com

Phone: <a href="tel:+94%2071%20547%208185" value="+94715478185" target="_blank">+94715478185



--
Chamin Dias
Mobile : <a href="tel:071%20609%207455" value="+94716097455" target="_blank">0716097455




--
Pubudu Gunatilaka
Committer and PMC Member - Apache Stratos
Senior Software Engineer 
WSO2, Inc.: http://wso2.com
mobile : <a href="tel:%2B94772207163" value="+94772207163" style="font-size:x-small;color:rgb(17,85,204)" target="_blank">+94774078049




--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : <a href="tel:076%20667%208752" value="+94766678752" target="_blank">+94 76 667 8752




--
Bhathiya Jayasekara
Associate Technical Lead,
WSO2 inc., http://wso2.com

Phone: <a href="tel:+94%2071%20547%208185" value="+94715478185" target="_blank">+94715478185



--
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: <a href="tel:%2B94-71-554-8430" value="+94715548430" target="_blank">+94-717-064-214



--
Bhathiya Jayasekara
Associate Technical Lead,
WSO2 inc., http://wso2.com

Phone: +94715478185

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

Re: [APIM][C5] Multi Environment support with API difference for API Manager

Thilini Shanika
In reply to this post by Chamalee De Silva
Can't we do a redirection to the particular App of the corresponding environment (assume the publisher App of dev_env)  and hand over the login part to be handled through that app ?
I mean since it is already implemented do we need to handle step 6 through this feature ?

If we consider the behavior of the default environment,  initially the user will be authenticated and generated OAuth token will be used to connect to relevant REST API and populate the UI. The same concept is used while designing environment support feature. 

In this case, the UI component will be an independently hosted component and will be isolated from the rest of environments (eg : dev, staging etc). When the user requested to connect to a given environment (From UI component), the user will be authenticated against the environment and a token will be obtained from the key manager of that particular environment. The token will be used to connect to relevant APIM core REST APIs to retrieve API information and populate the UI. When the environment is switched, the user will be authenticated against the new environment and the underneath connections to REST APIs will be switched accordingly. In this way, one can seamlessly switch between different environments. Basically, the look and feel of the UI will be the same but only the content will be switched according to the connected environment. If redirection happens, the switching will not be seamless.  

On Mon, Nov 6, 2017 at 9:59 PM, Chamalee De Silva <[hidden email]> wrote:
Hi Renuka, 

We are planning to implement new feature "Multi-Environment Support"[1] for API Manager. The feature allows users to manage environments through one User Interfaces.

Inline images 1
Suppose there are three environments (i.e. three instance of API manager) currently running in an organization. Users of the API Manager have log into each environments and work with three different User Interfaces. The proposed feature allow one User Interface to handle all environments. User can switch environments and also enable new feature like API difference in environments.

This is the proposed design of multi-environment support for API manager.
Inline images 2

The UI service in the diagram may be a separate service for User Interface or another environment itself.

  1. Browser request login page for the app (publisher/store/admin) from UI service.
  2. Serve the page.
  3. Browser call the ConfigurationsAPI (org.wso2.carbon.apimgt.rest.api.configurations)[2] to get available environments.
  4. Read deployment.yaml that contains environments' details
    • Sample deployment.yaml
    • wso2.carbon.apimgt.environments:
        environmentName: Default
        environments:
        - host: dev.sample.com:9292
          loginTokenPath: /login/token
          label: Development
      
        - host: prod.sample.com:9292
          loginTokenPath: /login/token
          label: Production
  5. Serve environments' details as JSON.
    • Browser then render a list of environments.
  6. Send request with user credentials to the proper environment to login.

I hope this means that this UI Service can be hosted even somewhere else outside these environments  or in one of any of these environment (e.g. dev_env). 
If so, when we click on one of the environments listed in the UI in step 5, 

Can't we do a redirection to the particular App of the corresponding environment (assume the publisher App of dev_env)  and hand over the login part to be handled through that app ?
I mean since it is already implemented do we need to handle step 6 through this feature ?



Thanks,
Chamalee

--
Thanks & Regards,

Chamalee De Silva

Software Engineer
WSO2 Inc. :http://wso2.com/

Office   :- <a href="tel:%2B94%2011%202145345" value="+94112145345" style="color:rgb(17,85,204)" target="_blank">+94 11 2145345
mobile  :- <a href="tel:%2B94%2077%202782039" value="+94772782039" style="color:rgb(17,85,204)" target="_blank">+94 71 4315942




--
Thilini Shanika
Senior Software Engineer

WSO2, Inc.; http://wso2.com
20, Palmgrove Avenue, Colombo 3



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

Re: [APIM][C5] Multi Environment support with API difference for API Manager

Bhathiya Jayasekara

On Mon, Nov 6, 2017 at 11:19 PM, Thilini Shanika <[hidden email]> wrote:
Can't we do a redirection to the particular App of the corresponding environment (assume the publisher App of dev_env)  and hand over the login part to be handled through that app ?
I mean since it is already implemented do we need to handle step 6 through this feature ?

If we consider the behavior of the default environment,  initially the user will be authenticated and generated OAuth token will be used to connect to relevant REST API and populate the UI. The same concept is used while designing environment support feature. 

In this case, the UI component will be an independently hosted component and will be isolated from the rest of environments (eg : dev, staging etc). When the user requested to connect to a given environment (From UI component), the user will be authenticated against the environment and a token will be obtained from the key manager of that particular environment. The token will be used to connect to relevant APIM core REST APIs to retrieve API information and populate the UI. When the environment is switched, the user will be authenticated against the new environment and the underneath connections to REST APIs will be switched accordingly. In this way, one can seamlessly switch between different environments. Basically, the look and feel of the UI will be the same but only the content will be switched according to the connected environment. If redirection happens, the switching will not be seamless.  

Another problem with redirection is that we can't keep the environment selection drop down, unless we have an iframe or something. 

Thanks,
Bhathiya 
 

On Mon, Nov 6, 2017 at 9:59 PM, Chamalee De Silva <[hidden email]> wrote:
Hi Renuka, 

We are planning to implement new feature "Multi-Environment Support"[1] for API Manager. The feature allows users to manage environments through one User Interfaces.

Inline images 1
Suppose there are three environments (i.e. three instance of API manager) currently running in an organization. Users of the API Manager have log into each environments and work with three different User Interfaces. The proposed feature allow one User Interface to handle all environments. User can switch environments and also enable new feature like API difference in environments.

This is the proposed design of multi-environment support for API manager.
Inline images 2

The UI service in the diagram may be a separate service for User Interface or another environment itself.

  1. Browser request login page for the app (publisher/store/admin) from UI service.
  2. Serve the page.
  3. Browser call the ConfigurationsAPI (org.wso2.carbon.apimgt.rest.api.configurations)[2] to get available environments.
  4. Read deployment.yaml that contains environments' details
    • Sample deployment.yaml
    • wso2.carbon.apimgt.environments:
        environmentName: Default
        environments:
        - host: dev.sample.com:9292
          loginTokenPath: /login/token
          label: Development
      
        - host: prod.sample.com:9292
          loginTokenPath: /login/token
          label: Production
  5. Serve environments' details as JSON.
    • Browser then render a list of environments.
  6. Send request with user credentials to the proper environment to login.

I hope this means that this UI Service can be hosted even somewhere else outside these environments  or in one of any of these environment (e.g. dev_env). 
If so, when we click on one of the environments listed in the UI in step 5, 

Can't we do a redirection to the particular App of the corresponding environment (assume the publisher App of dev_env)  and hand over the login part to be handled through that app ?
I mean since it is already implemented do we need to handle step 6 through this feature ?



Thanks,
Chamalee

--
Thanks & Regards,

Chamalee De Silva

Software Engineer
WSO2 Inc. :http://wso2.com/

Office   :- <a href="tel:%2B94%2011%202145345" value="+94112145345" style="color:rgb(17,85,204)" target="_blank">+94 11 2145345
mobile  :- <a href="tel:%2B94%2077%202782039" value="+94772782039" style="color:rgb(17,85,204)" target="_blank">+94 71 4315942




--
Thilini Shanika
Senior Software Engineer

WSO2, Inc.; http://wso2.com
20, Palmgrove Avenue, Colombo 3





--
Bhathiya Jayasekara
Associate Technical Lead,
WSO2 inc., http://wso2.com

Phone: +94715478185

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

Re: [APIM][C5] Multi Environment support with API difference for API Manager

Renuka Fernando
In reply to this post by Bhathiya Jayasekara
Hi Bhathiya

On 6 November 2017 at 22:34, Bhathiya Jayasekara <[hidden email]> wrote:
Hi Rajith,

On Mon, Nov 6, 2017 at 9:11 PM, Rajith Roshan <[hidden email]> wrote:
Hi,

On Mon, Nov 6, 2017 at 7:16 PM, Bhathiya Jayasekara <[hidden email]> wrote:
Hi Renuka,

On Mon, Nov 6, 2017 at 4:24 PM, Renuka Fernando <[hidden email]> wrote:
Hi,

The property environmentName is used to append environment name to cookie and label is used to list down environments in the login page.

Stil not clear to me either. Let me ask 2 direct questions. 

1) In your sample, you have 2 environments, development and production. But your environmentName is Default. What does that mean?  
What if there are no multiple environments in deployment.yaml. Then cookie names will not have any environment name append to it.   So to maintain consistency of cookie names I think its better to have a default value for environment.

Yes, it's fine to have a default value when there are no multiple environments. But my question is about when you have multiple environments. Shouldn't this environmentName be one of those environment labels? If not, I'm confused. 

It is not necessary to environmentName be one of those environment labels. The property environmentName should be unique and that name was used to indicate that uniqueness.
In the design diagram I have shown the corresponding deployment.yaml file.

Figure 2: Design Diagram
Inline images 1

Table 1: Sample deployment.yaml files

UI Service

environment_1

environment_2

wso2.carbon.apimgt.environments:
  environmentName: Default
  environments:
  - host: dev.sample.com:9292
    loginTokenPath: /login/token
    label: Development

  - host: prod.sample.com:9292
    loginTokenPath: /login/token
    label: Production
wso2.carbon.apimgt.environments:
  environmentName: prod_env
wso2.carbon.apimgt.environments:
  environmentName: dev_env

  • For environment_1
    • environmentName is prod_env
    • label is Production
  1. When appending cookies environment_1 will use the name of the environment i.e. prod_env
  2. When displaying list of environments UI Service will use the labeled name Production

 
But the name environment name can be confusing. As in your second question sometimes this might not be environment (just provide the UI).
2) In case of UI service running separately, what should be the value of environmentName? (I guess you don't need that in this case. Please confirm.)
Exactly this is one use case. UI can be served by separate node which is not a environment . This is where the environment list comes into play. User will have to definitely select either production or development here. Default value is never present to the UI. It is only for internal reference only.

What do we do with that internally? Why can't we just drop that, in this case?

If the UI Service is not an environment itself the environmentName property is useless.
But if the UI Service is an environment,  environmentName is used to indicate the name of that environment.

If the property environmentName is not present in the deployment.yaml the default value is set to Default.
Default values in org.wso2.carbon.apimgt.rest.api.configurations.models.EnvironmentConfigurations java class[1]
@Configuration(namespace = "wso2.carbon.apimgt.environments", description = "Environment Configurations")
public class EnvironmentConfigurations {

    //Unique name for environment to set cookies by backend
    @Element(description = "Unique Environment-name")
    private String environmentName = "Default";

    @Element(description = "List of all Environments")
    private List<Environment> environments = Arrays.asList(new Environment());

    public String getEnvironmentName() {
        return environmentName;
    }

    public List<Environment> getEnvironments() {
        return environments;
    }
}
 

Thanks,
Renuka

Thanks,
Bhathiya
 

I think overall there are some missing points in this design we need to clarify.
@KasunTe, @PubuduG, Could you please shed some light here since, you have closely followed the GSoc project.

Thanks,
Bhathiya
 

Thank you

On 6 November 2017 at 15:34, Pubudu Gunatilaka <[hidden email]> wrote:
Hi,

environmentName is used to keep the environment to itself. This is used when the server is setting up the cookies by appending the env name to the cookies. The env list is to populate the env list. 

Thank you!

On Mon, Nov 6, 2017 at 2:42 PM, Chamin Dias <[hidden email]> wrote:
Hi Renuka,

Step 7 : "The environment read its deployment.yaml to know the name of itself and set cookies..."

So this means the environment name is taken from the environment itself. Is there any reason to exclude the environment in the provided yaml file?

Thanks.


On Mon, Nov 6, 2017 at 2:24 PM, Bhathiya Jayasekara <[hidden email]> wrote:
Hi Renuka,

On Mon, Nov 6, 2017 at 11:27 AM, Renuka Fernando <[hidden email]> wrote:
Hi all,

We are planning to implement new feature "Multi-Environment Support"[1] for API Manager. The feature allows users to manage environments through one User Interfaces.

Inline images 1
Suppose there are three environments (i.e. three instance of API manager) currently running in an organization. Users of the API Manager have log into each environments and work with three different User Interfaces. The proposed feature allow one User Interface to handle all environments. User can switch environments and also enable new feature like API difference in environments.

This is the proposed design of multi-environment support for API manager.
Inline images 2

The UI service in the diagram may be a separate service for User Interface or another environment itself.

  1. Browser request login page for the app (publisher/store/admin) from UI service.
  2. Serve the page.
  3. Browser call the ConfigurationsAPI (org.wso2.carbon.apimgt.rest.api.configurations)[2] to get available environments.
Since this API is a part of UI service (but not of core), we may need a different name to indicate that. 
  1. Read deployment.yaml that contains environments' details
    • Sample deployment.yaml
    • wso2.carbon.apimgt.environments:
        environmentName: Default
        environments:
        - host: dev.sample.com:9292
          loginTokenPath: /login/token
          label: Development

What's he dfference between environmentName and environments.label? (If environmentName represents the current environment, souldn't it be one of environments.labels?)

Thanks,
Bhathiya
  1. Serve environments' details as JSON.
    • Browser then render a list of environments.
  2. Send request with user credentials to the proper environment to login.
  3. The environment read its deployment.yaml to know the name of itself and set cookies with appending the name to the cookie name.


Appreciate any suggestions.
Thanks

Best regards

--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : <a href="tel:076%20667%208752" value="+94766678752" target="_blank">+94 76 667 8752




--
Bhathiya Jayasekara
Associate Technical Lead,
WSO2 inc., http://wso2.com

Phone: <a href="tel:+94%2071%20547%208185" value="+94715478185" target="_blank">+94715478185



--
Chamin Dias
Mobile : <a href="tel:071%20609%207455" value="+94716097455" target="_blank">0716097455




--
Pubudu Gunatilaka
Committer and PMC Member - Apache Stratos
Senior Software Engineer 
WSO2, Inc.: http://wso2.com
mobile : <a href="tel:%2B94772207163" value="+94772207163" style="font-size:x-small;color:rgb(17,85,204)" target="_blank">+94774078049




--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : <a href="tel:076%20667%208752" value="+94766678752" target="_blank">+94 76 667 8752




--
Bhathiya Jayasekara
Associate Technical Lead,
WSO2 inc., http://wso2.com

Phone: <a href="tel:+94%2071%20547%208185" value="+94715478185" target="_blank">+94715478185



--
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: <a href="tel:%2B94-71-554-8430" value="+94715548430" target="_blank">+94-717-064-214



--
Bhathiya Jayasekara
Associate Technical Lead,
WSO2 inc., http://wso2.com

Phone: <a href="tel:+94%2071%20547%208185" value="+94715478185" target="_blank">+94715478185



--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : +94 76 667 8752


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

Re: [APIM][C5] Multi Environment support with API difference for API Manager

Bhathiya Jayasekara
Hi Renuka,

On Tue, Nov 7, 2017 at 10:23 AM, Renuka Fernando <[hidden email]> wrote:
Hi Bhathiya

On 6 November 2017 at 22:34, Bhathiya Jayasekara <[hidden email]> wrote:
Hi Rajith,

On Mon, Nov 6, 2017 at 9:11 PM, Rajith Roshan <[hidden email]> wrote:
Hi,

On Mon, Nov 6, 2017 at 7:16 PM, Bhathiya Jayasekara <[hidden email]> wrote:
Hi Renuka,

On Mon, Nov 6, 2017 at 4:24 PM, Renuka Fernando <[hidden email]> wrote:
Hi,

The property environmentName is used to append environment name to cookie and label is used to list down environments in the login page.

Stil not clear to me either. Let me ask 2 direct questions. 

1) In your sample, you have 2 environments, development and production. But your environmentName is Default. What does that mean?  
What if there are no multiple environments in deployment.yaml. Then cookie names will not have any environment name append to it.   So to maintain consistency of cookie names I think its better to have a default value for environment.

Yes, it's fine to have a default value when there are no multiple environments. But my question is about when you have multiple environments. Shouldn't this environmentName be one of those environment labels? If not, I'm confused. 

It is not necessary to environmentName be one of those environment labels. The property environmentName should be unique and that name was used to indicate that uniqueness.

To reduced the confusion, it's good to have the same names for both label and names. Or we can simply get rid of Name and use label for both cases.   

Thanks,
Bhathiya
 
In the design diagram I have shown the corresponding deployment.yaml file.

Figure 2: Design Diagram
Inline images 1

Table 1: Sample deployment.yaml files

UI Service

environment_1

environment_2

wso2.carbon.apimgt.environments:
  environmentName: Default
  environments:
  - host: dev.sample.com:9292
    loginTokenPath: /login/token
    label: Development

  - host: prod.sample.com:9292
    loginTokenPath: /login/token
    label: Production
wso2.carbon.apimgt.environments:
  environmentName: prod_env
wso2.carbon.apimgt.environments:
  environmentName: dev_env

  • For environment_1
    • environmentName is prod_env
    • label is Production
  1. When appending cookies environment_1 will use the name of the environment i.e. prod_env
  2. When displaying list of environments UI Service will use the labeled name Production

 
But the name environment name can be confusing. As in your second question sometimes this might not be environment (just provide the UI).
2) In case of UI service running separately, what should be the value of environmentName? (I guess you don't need that in this case. Please confirm.)
Exactly this is one use case. UI can be served by separate node which is not a environment . This is where the environment list comes into play. User will have to definitely select either production or development here. Default value is never present to the UI. It is only for internal reference only.

What do we do with that internally? Why can't we just drop that, in this case?

If the UI Service is not an environment itself the environmentName property is useless. 
But if the UI Service is an environment,  environmentName is used to indicate the name of that environment.

If the property environmentName is not present in the deployment.yaml the default value is set to Default.
Default values in org.wso2.carbon.apimgt.rest.api.configurations.models.EnvironmentConfigurations java class[1]
@Configuration(namespace = "wso2.carbon.apimgt.environments", description = "Environment Configurations")
public class EnvironmentConfigurations {

    //Unique name for environment to set cookies by backend
    @Element(description = "Unique Environment-name")
    private String environmentName = "Default";

    @Element(description = "List of all Environments")
    private List<Environment> environments = Arrays.asList(new Environment());

    public String getEnvironmentName() {
        return environmentName;
    }

    public List<Environment> getEnvironments() {
        return environments;
    }
}
 

Thanks,
Renuka

Thanks,
Bhathiya
 

I think overall there are some missing points in this design we need to clarify.
@KasunTe, @PubuduG, Could you please shed some light here since, you have closely followed the GSoc project.

Thanks,
Bhathiya
 

Thank you

On 6 November 2017 at 15:34, Pubudu Gunatilaka <[hidden email]> wrote:
Hi,

environmentName is used to keep the environment to itself. This is used when the server is setting up the cookies by appending the env name to the cookies. The env list is to populate the env list. 

Thank you!

On Mon, Nov 6, 2017 at 2:42 PM, Chamin Dias <[hidden email]> wrote:
Hi Renuka,

Step 7 : "The environment read its deployment.yaml to know the name of itself and set cookies..."

So this means the environment name is taken from the environment itself. Is there any reason to exclude the environment in the provided yaml file?

Thanks.


On Mon, Nov 6, 2017 at 2:24 PM, Bhathiya Jayasekara <[hidden email]> wrote:
Hi Renuka,

On Mon, Nov 6, 2017 at 11:27 AM, Renuka Fernando <[hidden email]> wrote:
Hi all,

We are planning to implement new feature "Multi-Environment Support"[1] for API Manager. The feature allows users to manage environments through one User Interfaces.

Inline images 1
Suppose there are three environments (i.e. three instance of API manager) currently running in an organization. Users of the API Manager have log into each environments and work with three different User Interfaces. The proposed feature allow one User Interface to handle all environments. User can switch environments and also enable new feature like API difference in environments.

This is the proposed design of multi-environment support for API manager.
Inline images 2

The UI service in the diagram may be a separate service for User Interface or another environment itself.

  1. Browser request login page for the app (publisher/store/admin) from UI service.
  2. Serve the page.
  3. Browser call the ConfigurationsAPI (org.wso2.carbon.apimgt.rest.api.configurations)[2] to get available environments.
Since this API is a part of UI service (but not of core), we may need a different name to indicate that. 
  1. Read deployment.yaml that contains environments' details
    • Sample deployment.yaml
    • wso2.carbon.apimgt.environments:
        environmentName: Default
        environments:
        - host: dev.sample.com:9292
          loginTokenPath: /login/token
          label: Development

What's he dfference between environmentName and environments.label? (If environmentName represents the current environment, souldn't it be one of environments.labels?)

Thanks,
Bhathiya
  1. Serve environments' details as JSON.
    • Browser then render a list of environments.
  2. Send request with user credentials to the proper environment to login.
  3. The environment read its deployment.yaml to know the name of itself and set cookies with appending the name to the cookie name.


Appreciate any suggestions.
Thanks

Best regards

--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : <a href="tel:076%20667%208752" value="+94766678752" target="_blank">+94 76 667 8752




--
Bhathiya Jayasekara
Associate Technical Lead,
WSO2 inc., http://wso2.com

Phone: <a href="tel:+94%2071%20547%208185" value="+94715478185" target="_blank">+94715478185



--
Chamin Dias
Mobile : <a href="tel:071%20609%207455" value="+94716097455" target="_blank">0716097455




--
Pubudu Gunatilaka
Committer and PMC Member - Apache Stratos
Senior Software Engineer 
WSO2, Inc.: http://wso2.com
mobile : <a href="tel:%2B94772207163" value="+94772207163" style="font-size:x-small;color:rgb(17,85,204)" target="_blank">+94774078049




--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : <a href="tel:076%20667%208752" value="+94766678752" target="_blank">+94 76 667 8752




--
Bhathiya Jayasekara
Associate Technical Lead,
WSO2 inc., http://wso2.com

Phone: <a href="tel:+94%2071%20547%208185" value="+94715478185" target="_blank">+94715478185



--
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: <a href="tel:%2B94-71-554-8430" value="+94715548430" target="_blank">+94-717-064-214



--
Bhathiya Jayasekara
Associate Technical Lead,
WSO2 inc., http://wso2.com

Phone: <a href="tel:+94%2071%20547%208185" value="+94715478185" target="_blank">+94715478185



--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : <a href="tel:076%20667%208752" value="+94766678752" target="_blank">+94 76 667 8752




--
Bhathiya Jayasekara
Associate Technical Lead,
WSO2 inc., http://wso2.com

Phone: +94715478185

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

Re: [APIM][C5] Multi Environment support with API difference for API Manager

Renuka Fernando
Hi Bhathiya

On 7 November 2017 at 10:35, Bhathiya Jayasekara <[hidden email]> wrote:
Hi Renuka,

On Tue, Nov 7, 2017 at 10:23 AM, Renuka Fernando <[hidden email]> wrote:
Hi Bhathiya

On 6 November 2017 at 22:34, Bhathiya Jayasekara <[hidden email]> wrote:
Hi Rajith,

On Mon, Nov 6, 2017 at 9:11 PM, Rajith Roshan <[hidden email]> wrote:
Hi,

On Mon, Nov 6, 2017 at 7:16 PM, Bhathiya Jayasekara <[hidden email]> wrote:
Hi Renuka,

On Mon, Nov 6, 2017 at 4:24 PM, Renuka Fernando <[hidden email]> wrote:
Hi,

The property environmentName is used to append environment name to cookie and label is used to list down environments in the login page.

Stil not clear to me either. Let me ask 2 direct questions. 

1) In your sample, you have 2 environments, development and production. But your environmentName is Default. What does that mean?  
What if there are no multiple environments in deployment.yaml. Then cookie names will not have any environment name append to it.   So to maintain consistency of cookie names I think its better to have a default value for environment.

Yes, it's fine to have a default value when there are no multiple environments. But my question is about when you have multiple environments. Shouldn't this environmentName be one of those environment labels? If not, I'm confused. 

It is not necessary to environmentName be one of those environment labels. The property environmentName should be unique and that name was used to indicate that uniqueness.

To reduced the confusion, it's good to have the same names for both label and names. Or we can simply get rid of Name and use label for both cases.   

Thanks. I got it.

If UI Service itself is an environment (suppose dev) the environmentName should be given (Development)
Then the deployment.yaml is as below

wso2.carbon.apimgt.environments:
  environmentName: Development
  environments:
  - host: dev.sample.com:9292
    loginTokenPath: /login/token
    label: Development

  - host: prod.sample.com:9292
    loginTokenPath: /login/token
    label: Production

Thanks,
Renuka
 
Thanks,
Bhathiya
 
In the design diagram I have shown the corresponding deployment.yaml file.

Figure 2: Design Diagram
Inline images 1

Table 1: Sample deployment.yaml files

UI Service

environment_1

environment_2

wso2.carbon.apimgt.environments:
  environmentName: Default
  environments:
  - host: dev.sample.com:9292
    loginTokenPath: /login/token
    label: Development

  - host: prod.sample.com:9292
    loginTokenPath: /login/token
    label: Production
wso2.carbon.apimgt.environments:
  environmentName: prod_env
wso2.carbon.apimgt.environments:
  environmentName: dev_env

  • For environment_1
    • environmentName is prod_env
    • label is Production
  1. When appending cookies environment_1 will use the name of the environment i.e. prod_env
  2. When displaying list of environments UI Service will use the labeled name Production

 
But the name environment name can be confusing. As in your second question sometimes this might not be environment (just provide the UI).
2) In case of UI service running separately, what should be the value of environmentName? (I guess you don't need that in this case. Please confirm.)
Exactly this is one use case. UI can be served by separate node which is not a environment . This is where the environment list comes into play. User will have to definitely select either production or development here. Default value is never present to the UI. It is only for internal reference only.

What do we do with that internally? Why can't we just drop that, in this case?

If the UI Service is not an environment itself the environmentName property is useless. 
But if the UI Service is an environment,  environmentName is used to indicate the name of that environment.

If the property environmentName is not present in the deployment.yaml the default value is set to Default.
Default values in org.wso2.carbon.apimgt.rest.api.configurations.models.EnvironmentConfigurations java class[1]
@Configuration(namespace = "wso2.carbon.apimgt.environments", description = "Environment Configurations")
public class EnvironmentConfigurations {

    //Unique name for environment to set cookies by backend
    @Element(description = "Unique Environment-name")
    private String environmentName = "Default";

    @Element(description = "List of all Environments")
    private List<Environment> environments = Arrays.asList(new Environment());

    public String getEnvironmentName() {
        return environmentName;
    }

    public List<Environment> getEnvironments() {
        return environments;
    }
}
 

Thanks,
Renuka

Thanks,
Bhathiya
 

I think overall there are some missing points in this design we need to clarify.
@KasunTe, @PubuduG, Could you please shed some light here since, you have closely followed the GSoc project.

Thanks,
Bhathiya
 

Thank you

On 6 November 2017 at 15:34, Pubudu Gunatilaka <[hidden email]> wrote:
Hi,

environmentName is used to keep the environment to itself. This is used when the server is setting up the cookies by appending the env name to the cookies. The env list is to populate the env list. 

Thank you!

On Mon, Nov 6, 2017 at 2:42 PM, Chamin Dias <[hidden email]> wrote:
Hi Renuka,

Step 7 : "The environment read its deployment.yaml to know the name of itself and set cookies..."

So this means the environment name is taken from the environment itself. Is there any reason to exclude the environment in the provided yaml file?

Thanks.


On Mon, Nov 6, 2017 at 2:24 PM, Bhathiya Jayasekara <[hidden email]> wrote:
Hi Renuka,

On Mon, Nov 6, 2017 at 11:27 AM, Renuka Fernando <[hidden email]> wrote:
Hi all,

We are planning to implement new feature "Multi-Environment Support"[1] for API Manager. The feature allows users to manage environments through one User Interfaces.

Inline images 1
Suppose there are three environments (i.e. three instance of API manager) currently running in an organization. Users of the API Manager have log into each environments and work with three different User Interfaces. The proposed feature allow one User Interface to handle all environments. User can switch environments and also enable new feature like API difference in environments.

This is the proposed design of multi-environment support for API manager.
Inline images 2

The UI service in the diagram may be a separate service for User Interface or another environment itself.

  1. Browser request login page for the app (publisher/store/admin) from UI service.
  2. Serve the page.
  3. Browser call the ConfigurationsAPI (org.wso2.carbon.apimgt.rest.api.configurations)[2] to get available environments.
Since this API is a part of UI service (but not of core), we may need a different name to indicate that. 
  1. Read deployment.yaml that contains environments' details
    • Sample deployment.yaml
    • wso2.carbon.apimgt.environments:
        environmentName: Default
        environments:
        - host: dev.sample.com:9292
          loginTokenPath: /login/token
          label: Development

What's he dfference between environmentName and environments.label? (If environmentName represents the current environment, souldn't it be one of environments.labels?)

Thanks,
Bhathiya
  1. Serve environments' details as JSON.
    • Browser then render a list of environments.
  2. Send request with user credentials to the proper environment to login.
  3. The environment read its deployment.yaml to know the name of itself and set cookies with appending the name to the cookie name.


Appreciate any suggestions.
Thanks

Best regards

--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : <a href="tel:076%20667%208752" value="+94766678752" target="_blank">+94 76 667 8752




--
Bhathiya Jayasekara
Associate Technical Lead,
WSO2 inc., http://wso2.com

Phone: <a href="tel:+94%2071%20547%208185" value="+94715478185" target="_blank">+94715478185



--
Chamin Dias
Mobile : <a href="tel:071%20609%207455" value="+94716097455" target="_blank">0716097455




--
Pubudu Gunatilaka
Committer and PMC Member - Apache Stratos
Senior Software Engineer 
WSO2, Inc.: http://wso2.com
mobile : <a href="tel:%2B94772207163" value="+94772207163" style="font-size:x-small;color:rgb(17,85,204)" target="_blank">+94774078049




--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : <a href="tel:076%20667%208752" value="+94766678752" target="_blank">+94 76 667 8752




--
Bhathiya Jayasekara
Associate Technical Lead,
WSO2 inc., http://wso2.com

Phone: <a href="tel:+94%2071%20547%208185" value="+94715478185" target="_blank">+94715478185



--
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: <a href="tel:%2B94-71-554-8430" value="+94715548430" target="_blank">+94-717-064-214



--
Bhathiya Jayasekara
Associate Technical Lead,
WSO2 inc., http://wso2.com

Phone: <a href="tel:+94%2071%20547%208185" value="+94715478185" target="_blank">+94715478185



--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : <a href="tel:076%20667%208752" value="+94766678752" target="_blank">+94 76 667 8752




--
Bhathiya Jayasekara
Associate Technical Lead,
WSO2 inc., http://wso2.com

Phone: <a href="tel:+94%2071%20547%208185" value="+94715478185" target="_blank">+94715478185



--
Renuka Fernando
Software Engineering Intern | WSO2 Inc

Mobile : +94 76 667 8752


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