Hi All,

As you all know we were rapidly worked on a new AppCloud with Kubernetes,
One of the main features of AppCloud is giving access to application
runtime logs (logs of Kubernetes pods) to the particular user, so that
he/she can view logs of their applications deployed in AppCloud.

Following is the log retrieving architecture of the AppCloud as of now
which is currently in alpha,



Kubernetes itself have the capability to providing the runtime logs of any
pod *[1]*.

Currently AppCloud keep track of every deployment of application, its
replication controller and its pods. When user ask for runtime logs of an
app, AppCloud directly invoke kubernetes api through runtime provisioning
module and retrieve the logs of each pod and direct them into the UX layer.
So that particular user have access to the logs of his/her application.

Kubernetes API give many options to get logs as following, For your
reference you can check out the swagger ui of the Kubernetes api here* [2]*.

- *Snapshot Logs* : Returns all the logs from creation time of the
container.
- *Follow* : Keep tailing the log stream.
- *Since Seconds* : We can set previous seconds so that we can retrieve
logs of that particular period.
- *Number of Tailing lines* : We can set the number of lines from the end
of the logs to show.

These capabilities are currently possible with
*org.wso2.appcloud.provisioning.runtime* module as well of AppCloud. But we
haven't integrated these additional functions with UX Layer yet. Eventually
we will enable those as well.
​​​​
*Drawbacks of the current model*
- Kubernetes only capture std-out of the pod in this mechanism, So we have
to start the servers foreground.
- In this way kubernetes cannot provide logs of a log file, such as access
logs, system logs, etc.
- There may be multiple pods for a application, as we are using replication
controllers, But there is no centralized logging capability in this
mechanism. Have to get each pod level logs (std-out) rather than getting
application logs.
- No log persistence of this model, if a pod get killed we are losing its
logs.

*Future works *
- Work on a centralized and persistent logging model for each
application(deployment) level.
- Evaluate the capability to integrate WSO2 LogAnalyser with AppCloud.

Please note that this is our initial log retrieving design in AppCloud
alpha. But during the implementation we identified the above mentioned
requirements as future possibilities and eventually we will work on them in
upcoming releases. We will update the thread along with the progress of
this feature.

If you have any suggestions and improvements for this please reply to this,
your thoughts on this are highly appreciated.


[1] http://kubernetes.io/v1.1/docs/user-guide/logging.html
[2] http://kubernetes.io/third_party/swagger-ui/


Thanks,
Kasun
-- 
*Kasun de Silva*
Software Engineer | *WSO2 Inc.*; http://wso2.com
lean.enterprise.middleware

email   : [email protected]
mobile : +94 77 794 4260
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to