Hi Lasantha,
On Thu, Dec 8, 2016 at 10:17 AM, Lasantha Samarakoon <[email protected]>
wrote:
> Hi Imesh,
>
> Thanks for the feedback. I modified the API so that now the following two
> GET endpoints are also available.
>
> *GET /deployments*
>
> Returns all of the current deployments.
>
>
> *GET /deployments/{id}*
>
> - Path parameter: {id} - ID generated by Kubernetes for a deployment
>
> Returns a single deployment identified by the ID
>
> WRT to the {id}, ATM we are using the ID auto generated by the container
> cluster manager and there is no ID property introduced in the deployment
> definition. I have added the ID property into the Deployment model as well.
>
+1 Great work! I also reviewed the PR and added some comments
please have a look.
>
> In addition to that I removed the platform property from the Object model
> and moved that to environment variable as we have discussed offline. The
> reason for that is basically the container cluster manager won't get
> changed for a particular environment dynamically so that it will be a
> unnecessary property in API payload. The new Deployment model is as follows.
>
> {
> "id": "<guid>"
> "product":"esb",
> "version":"4.9.0",
> "pattern":1,
> }
>
>
A very good point, yes we might not need to expose the platform property
from this API as it would be fixed for a given deployment. +1 for providing
it via an environment variable.
Thanks
>
>
> Thanks,
>
> *Lasantha Samarakoon* | Software Engineer
> WSO2, Inc.
> #20, Palm Grove, Colombo 03, Sri Lanka
> Mobile: +94 (71) 214 1576 <+94%2071%20214%201576>
> Email: [email protected]
> Web: www.wso2.com
>
> lean . enterprise . middleware
>
> On Thu, Dec 8, 2016 at 10:00 AM, Lasantha Samarakoon <[email protected]>
> wrote:
>
>> Hi Pubudu,
>>
>> Agree on your thoughts. But since the infrastructure is basically fixed
>> and there won't be multiple versions of the Kubernetes running within the
>> same environment I don't think we will have such a requirement. But
>> definitely when deploying products using this API, we will need to go with
>> the compatible Kubernetes platform.
>>
>>
>> Regards,
>>
>> *Lasantha Samarakoon* | Software Engineer
>> WSO2, Inc.
>> #20, Palm Grove, Colombo 03, Sri Lanka
>> Mobile: +94 (71) 214 1576 <+94%2071%20214%201576>
>> Email: [email protected]
>> Web: www.wso2.com
>>
>> lean . enterprise . middleware
>>
>> On Tue, Dec 6, 2016 at 2:18 PM, Pubudu Gunatilaka <[email protected]>
>> wrote:
>>
>>> Hi Lasantha,
>>>
>>> How do we handle multiple versions in K8s? There could be API changes in
>>> K8 major versions. I think we need to consider the platform version as well
>>> when deploying the products.
>>>
>>> Thank you!
>>>
>>> On Tue, Dec 6, 2016 at 12:03 PM, Imesh Gunaratne <[email protected]> wrote:
>>>
>>>> Correction: s/identified generated/identifier generated/g
>>>>
>>>> Thanks
>>>>
>>>> On Tue, Dec 6, 2016 at 12:02 PM, Imesh Gunaratne <[email protected]>
>>>> wrote:
>>>>
>>>>> Hi Lasantha,
>>>>>
>>>>> Great work! Please find few comments inline:
>>>>>
>>>>> On Mon, Dec 5, 2016 at 5:31 PM, Lasantha Samarakoon <
>>>>> [email protected]> wrote:
>>>>>>
>>>>>>
>>>>>> Following endpoints are available in this API (Please see the
>>>>>> attached Swagger definition for detailed description).
>>>>>>
>>>>>> *POST /deployments *
>>>>>> - Payload: Product model
>>>>>>
>>>>>> *DELETE /deployments*
>>>>>> - Payload: Product model
>>>>>>
>>>>>> Product model:
>>>>>> {
>>>>>> "product":"esb",
>>>>>> "version":"4.9.0",
>>>>>> "pattern":1,
>>>>>> "platform":"kubernetes"
>>>>>> }
>>>>>>
>>>>>
>>>>> I think we might need to use the same term given for the API resource
>>>>> for the object model. In this scenario maybe we can call it deployment.
>>>>> WDYT?
>>>>>
>>>>>
>>>>> We would also need to expose two API resources for queriing
>>>>> deployments:
>>>>>
>>>>> GET /deployments - Returns all deployments
>>>>> GET /deployments/{id} - Returns the deployment that matches the {id}
>>>>>
>>>>> Note the {id} parameter in the second API resource. I think we would
>>>>> need to add an id property to the deployment definition and use the
>>>>> identified generated by the container cluster manager.
>>>>>
>>>>> *How the API works?*
>>>>>>
>>>>>> Kubernetes artifacts which is used to deploy the product in a
>>>>>> container environment needs to be hosted in the host environment. '
>>>>>> KUBERNETES_HOME' environment variable contains the path to this
>>>>>> Kubernetes artifacts directory. Directory structure of the
>>>>>> KUBERNETES_HOME
>>>>>> is as follows.
>>>>>>
>>>>>> [KUBERNETES_HOME]/[PRODUCT_NAME]/[PRODUCT_VERSION]/[PATTERN]
>>>>>> /[PRODUCT_PROFILE].yaml
>>>>>>
>>>>>
>>>>> Shall we change this to read K8S artifacts from a folder inside
>>>>> repository/deployment folder (need to check the exact folder path from C5
>>>>> product structure)?
>>>>>
>>>>> Thanks
>>>>>
>>>>>
>>>>> --
>>>>> *Imesh Gunaratne*
>>>>> Software Architect
>>>>> WSO2 Inc: http://wso2.com
>>>>> T: +94 11 214 5345 M: +94 77 374 2057 <+94%2077%20374%202057>
>>>>> W: https://medium.com/@imesh TW: @imesh
>>>>> lean. enterprise. middleware
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> *Imesh Gunaratne*
>>>> Software Architect
>>>> WSO2 Inc: http://wso2.com
>>>> T: +94 11 214 5345 M: +94 77 374 2057 <+94%2077%20374%202057>
>>>> W: https://medium.com/@imesh TW: @imesh
>>>> lean. enterprise. middleware
>>>>
>>>>
>>>> _______________________________________________
>>>> Architecture mailing list
>>>> [email protected]
>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>>
>>>>
>>>
>>>
>>> --
>>> *Pubudu Gunatilaka*
>>> Committer and PMC Member - Apache Stratos
>>> Software Engineer
>>> WSO2, Inc.: http://wso2.com
>>> mobile : +94774078049 <%2B94772207163>
>>>
>>>
>>
>
--
*Imesh Gunaratne*
Software Architect
WSO2 Inc: http://wso2.com
T: +94 11 214 5345 M: +94 77 374 2057
W: https://medium.com/@imesh TW: @imesh
lean. enterprise. middleware
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture