tag:blogger.com,1999:blog-78129122024-02-28T17:32:31.531+05:30Ravi Vagadia's BlogComputer Geek. M.Sc. IT, DA-IICT. All about Distributed Systems, DevOps and Cloud InfrastructureRavi Vagadiahttp://www.blogger.com/profile/13516436128051331690noreply@blogger.comBlogger33125tag:blogger.com,1999:blog-7812912.post-55515169037849744992020-06-07T16:07:00.000+05:302020-06-07T16:07:10.802+05:30Deploying Django/Flask App in Production with NGINX Unit and Docker<div dir="ltr" style="text-align: left;" trbidi="on">
<section class="ge gf gg gh gi" style="box-sizing: inherit; caret-color: rgba(0, 0, 0, 0.8); color: rgba(0, 0, 0, 0.8); font-family: medium-content-sans-serif-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; word-break: break-word; word-wrap: break-word;"><div class="n p" style="box-sizing: inherit; display: flex; justify-content: center;">
<div class="z ab ac ae af gj ah ai" style="box-sizing: inherit; margin: 0px 64px; max-width: 680px; min-width: 0px; width: 680px;">
<blockquote class="ir is it" style="box-shadow: rgba(0, 0, 0, 0.84) 3px 0px 0px 0px inset; box-sizing: inherit; margin: 0px 0px 0px -20px; padding-left: 23px;">
<section class="fy fz ga gb gc" style="box-sizing: inherit; caret-color: rgb(0, 0, 0); color: black; word-break: break-word; word-wrap: break-word;"><div class="n p" style="box-sizing: inherit; display: flex; justify-content: center;">
<div class="z ab ac ae af gd ah ai" style="box-sizing: inherit; margin: 0px 64px; max-width: 680px; min-width: 0px; width: 680px;">
<blockquote class="im in io" style="box-shadow: rgba(0, 0, 0, 0.84) 3px 0px 0px 0px inset; box-sizing: inherit; margin: 0px 0px 0px -20px; padding-left: 23px;">
<div class="ip jc ap ir is b gy it jd ha iu je iv iw hl ix iy hm iz ja hn jb fy" data-selectable-paragraph="" id="c83b" style="box-sizing: inherit; color: rgba(0, 0, 0, 0.84); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; font-style: italic; letter-spacing: -0.003em; line-height: 32px; margin-bottom: -0.46em; margin-top: 2em; word-break: break-word;">
NGINX unit is a modern take at application server, it supports talking to apps over CGI, WSGI and shared memory incase of statically compiled apps. Unit is open source available at <a class="cn dj jf jg jh ji" href="https://unit.nginx.org/" rel="noopener nofollow" style="background-image: url("data:image/svg+xml; background-position: 0px calc(1em + 1px); background-repeat: repeat no-repeat; background-size: 1px 1px; box-sizing: inherit; color: inherit; http: //www.w3.org/2000/svg\"><line x1=\"0\" y1=\"0\" x2=\"1\" y2=\"1\" stroke=\"rgba(0, 0, 0, 0.84)\" /></svg>"); text-decoration: none;" target="_blank">https://unit.nginx.org/</a></div>
</blockquote>
<div class="ip jc ap by is b gy it jd ha iu je iv iw hl ix iy hm iz ja hn jb fy" data-selectable-paragraph="" id="0049" style="box-sizing: inherit; color: rgba(0, 0, 0, 0.84); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 32px; margin-bottom: -0.46em; margin-top: 2em; word-break: break-word;">
<span class="is jj" style="box-sizing: inherit; font-weight: 700;">Here are some features:</span></div>
<div class="ip jc ap by is b gy it jd ha iu je iv iw hl ix iy hm iz ja hn jb fy" data-selectable-paragraph="" id="495d" style="box-sizing: inherit; color: rgba(0, 0, 0, 0.84); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 32px; margin-bottom: -0.46em; margin-top: 2em; word-break: break-word;">
- Modern Polyglot Application Server</div>
<div class="ip jc ap by is b gy it jd ha iu je iv iw hl ix iy hm iz ja hn jb fy" data-selectable-paragraph="" id="813e" style="box-sizing: inherit; color: rgba(0, 0, 0, 0.84); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 32px; margin-bottom: -0.46em; margin-top: 2em; word-break: break-word;">
- Supports apps written in popular languages like Go, Python, Java, JavaScript (NodeJS), Ruby and of course good old PHP</div>
<div class="ip jc ap by is b gy it jd ha iu je iv iw hl ix iy hm iz ja hn jb fy" data-selectable-paragraph="" id="c596" style="box-sizing: inherit; color: rgba(0, 0, 0, 0.84); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 32px; margin-bottom: -0.46em; margin-top: 2em; word-break: break-word;">
- Supports advanced workflow like deploying apps without any downtime, remote configuration management via REST APIs and has ability to run multiple apps (even with different runtime versions!)</div>
<div class="ip jc ap by is b gy it jd ha iu je iv iw hl ix iy hm iz ja hn jb fy" data-selectable-paragraph="" id="7aec" style="box-sizing: inherit; color: rgba(0, 0, 0, 0.84); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 32px; margin-bottom: -0.46em; margin-top: 2em; word-break: break-word;">
- Support for custom routing logic allows easy to A/B testing.</div>
<div class="ip jc ap by is b gy it jd ha iu je iv iw hl ix iy hm iz ja hn jb fy" data-selectable-paragraph="" id="2169" style="box-sizing: inherit; color: rgba(0, 0, 0, 0.84); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 32px; margin-bottom: -0.46em; margin-top: 2em; word-break: break-word;">
- And it can do TLS in case you’re looking for end-to-end TLS encryption.</div>
<div class="ip jc ap by is b gy it jd ha iu je iv iw hl ix iy hm iz ja hn jb fy" data-selectable-paragraph="" id="b996" style="box-sizing: inherit; color: rgba(0, 0, 0, 0.84); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 32px; margin-bottom: -0.46em; margin-top: 2em; word-break: break-word;">
Does that sound exciting? let’s look at how you can use Unit to deploy your Django or Flask app on production environment.</div>
</div>
</div>
</section><hr class="jk ey jl jm jn jo jp jq jr js jt ju" style="border: none; box-sizing: inherit; color: rgba(0, 0, 0, 0.97); font-family: medium-content-slab-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 28px; margin-top: 30px; text-align: center;" />
<section class="fy fz ga gb gc" style="box-sizing: inherit; caret-color: rgb(0, 0, 0); color: black; word-break: break-word; word-wrap: break-word;"><div class="n p" style="box-sizing: inherit; display: flex; justify-content: center;">
<div class="z ab ac ae af gd ah ai" style="box-sizing: inherit; margin: 0px 64px; max-width: 680px; min-width: 0px; width: 680px;">
<div class="ip jc ap by is b gy it jd ha iu je iv iw hl ix iy hm iz ja hn jb fy" data-selectable-paragraph="" id="dcb5" style="box-sizing: inherit; color: rgba(0, 0, 0, 0.84); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 32px; margin-bottom: -0.46em; margin-top: 2em; word-break: break-word;">
Steps for Flask App (we’ll use existing httpbin app which is written using Flask framework and uses gunicorn as application server):</div>
<div class="ip jc ap by is b gy it jd ha iu je iv iw hl ix iy hm iz ja hn jb fy" data-selectable-paragraph="" id="87f3" style="box-sizing: inherit; color: rgba(0, 0, 0, 0.84); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 32px; margin-bottom: -0.46em; margin-top: 2em; word-break: break-word;">
<span class="is jj" style="box-sizing: inherit; font-weight: 700;">Step 1 :</span> Let’s clone httpbin from Github repo: <a class="cn dj jf jg jh ji" href="https://github.com/postmanlabs/httpbin" rel="noopener nofollow" style="background-image: url("data:image/svg+xml; background-position: 0px calc(1em + 1px); background-repeat: repeat no-repeat; background-size: 1px 1px; box-sizing: inherit; color: inherit; http: //www.w3.org/2000/svg\"><line x1=\"0\" y1=\"0\" x2=\"1\" y2=\"1\" stroke=\"rgba(0, 0, 0, 0.84)\" /></svg>"); text-decoration: none;" target="_blank">https://github.com/postmanlabs/httpbin</a></div>
<pre class="jv jw jx jy jz ka kb kc" style="background-color: rgba(0, 0, 0, 0.05); box-sizing: inherit; margin-top: 56px; overflow-x: auto; padding: 20px;"><span class="kd ke ap by kf b hx kg kh r ki" data-selectable-paragraph="" id="9ebf" style="box-sizing: inherit; color: rgba(0, 0, 0, 0.84); display: block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; white-space: pre-wrap;">git clone <a class="cn dj jf jg jh ji" href="https://github.com/postmanlabs/httpbin" rel="noopener nofollow" style="background-image: url("data:image/svg+xml; background-position: 0px calc(1em + 1px); background-repeat: repeat no-repeat; background-size: 1px 1px; box-sizing: inherit; color: inherit; http: //www.w3.org/2000/svg\"><line x1=\"0\" y1=\"0\" x2=\"1\" y2=\"1\" stroke=\"rgba(0, 0, 0, 0.84)\" /></svg>"); text-decoration: none;" target="_blank">https://github.com/postmanlabs/httpbin</a></span></pre>
<div class="ip jc ap by is b gy it jd ha iu je iv iw hl ix iy hm iz ja hn jb fy" data-selectable-paragraph="" id="c1e8" style="box-sizing: inherit; color: rgba(0, 0, 0, 0.84); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 32px; margin-bottom: -0.46em; margin-top: 2em; word-break: break-word;">
<span class="is jj" style="box-sizing: inherit; font-weight: 700;">Step 2:</span> Make following changes in Dockerfile:</div>
<pre class="jv jw jx jy jz ka kb kc" style="background-color: rgba(0, 0, 0, 0.05); box-sizing: inherit; margin-top: 56px; overflow-x: auto; padding: 20px;"><span class="kd ke ap by kf b hx kg kh r ki" data-selectable-paragraph="" id="0514" style="box-sizing: inherit; color: rgba(0, 0, 0, 0.84); display: block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; white-space: pre-wrap;">-FROM ubuntu:18.04
+FROM nginx/unit:1.18.0-python3.7</span><span class="kd ke ap by kf b hx kj kk kl km kn kh r ki" data-selectable-paragraph="" id="079a" style="box-sizing: inherit; color: rgba(0, 0, 0, 0.84); display: block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: 1.91em; white-space: pre-wrap;">-CMD ["gunicorn", "-b", "0.0.0.0:80", "httpbin:app", "-k", "gevent"]
+COPY config/config.json /docker-entrypoint.d/</span></pre>
<div class="ip jc ap by is b gy it jd ha iu je iv iw hl ix iy hm iz ja hn jb fy" data-selectable-paragraph="" id="2131" style="box-sizing: inherit; color: rgba(0, 0, 0, 0.84); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 32px; margin-bottom: -0.46em; margin-top: 2em; word-break: break-word;">
What did we change?</div>
<ul class="" style="box-sizing: inherit; list-style: none none; margin: 0px; padding: 0px;">
<li class="ip jc ap by is b gy it jd ha iu je iv iw hl ix iy hm iz ja hn jb ko kp kq" data-selectable-paragraph="" id="1dd2" style="box-sizing: inherit; color: rgba(0, 0, 0, 0.84); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 32px; list-style-type: disc; margin-bottom: -0.46em; margin-left: 30px; margin-top: 2em; padding-left: 0px;">Instead of using Ubuntu base image, we’re using nginx/unit image with Python 3.6 runtime.</li>
<li class="ip jc ap by is b gy kr jd ha ks je iv kt hl ix ku hm iz kv hn jb ko kp kq" data-selectable-paragraph="" id="a046" style="box-sizing: inherit; color: rgba(0, 0, 0, 0.84); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 32px; list-style-type: disc; margin-bottom: -0.46em; margin-left: 30px; margin-top: 1.05em; padding-left: 0px;">Removed gunicorn command, instead we’ll use configuration file to load application with NGINX Unit.</li>
</ul>
<div class="ip jc ap by is b gy it jd ha iu je iv iw hl ix iy hm iz ja hn jb fy" data-selectable-paragraph="" id="b52b" style="box-sizing: inherit; color: rgba(0, 0, 0, 0.84); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 32px; margin-bottom: -0.46em; margin-top: 2em; word-break: break-word;">
<span class="is jj" style="box-sizing: inherit; font-weight: 700;">Step 3: </span>Unit looks for “application” object, adding application object in core.py, here is the diff:</div>
<pre class="jv jw jx jy jz ka kb kc" style="background-color: rgba(0, 0, 0, 0.05); box-sizing: inherit; margin-top: 56px; overflow-x: auto; padding: 20px;"><span class="kd ke ap by kf b hx kg kh r ki" data-selectable-paragraph="" id="781a" style="box-sizing: inherit; color: rgba(0, 0, 0, 0.84); display: block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; white-space: pre-wrap;">app.config["SWAGGER"] = {"title": "httpbin.org", "uiversion": 3}</span><span class="kd ke ap by kf b hx kj kk kl km kn kh r ki" data-selectable-paragraph="" id="e5f2" style="box-sizing: inherit; color: rgba(0, 0, 0, 0.84); display: block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: 1.91em; white-space: pre-wrap;">+# NGINX Unit looks for application object
+application = app
+
template = {
"swagger": "2.0",
"info": {</span></pre>
<div class="ip jc ap by is b gy it jd ha iu je iv iw hl ix iy hm iz ja hn jb fy" data-selectable-paragraph="" id="40ae" style="box-sizing: inherit; color: rgba(0, 0, 0, 0.84); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 32px; margin-bottom: -0.46em; margin-top: 2em; word-break: break-word;">
<span class="is jj" style="box-sizing: inherit; font-weight: 700;">Step 4 :</span> Adding Unit configuration file (config/config.json):</div>
<pre class="jv jw jx jy jz ka kb kc" style="background-color: rgba(0, 0, 0, 0.05); box-sizing: inherit; margin-top: 56px; overflow-x: auto; padding: 20px;"><span class="kd ke ap by kf b hx kg kh r ki" data-selectable-paragraph="" id="fbad" style="box-sizing: inherit; color: rgba(0, 0, 0, 0.84); display: block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; white-space: pre-wrap;">{
"listeners":{
"*:80":{
"pass":"applications/httpbin"
}
},
"applications":{
"httpbin":{
"type":"python 3",
"path":"/httpbin",
"module":"httpbin"
}
}
}</span></pre>
<div class="ip jc ap by is b gy it jd ha iu je iv iw hl ix iy hm iz ja hn jb fy" data-selectable-paragraph="" id="bbec" style="box-sizing: inherit; color: rgba(0, 0, 0, 0.84); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 32px; margin-bottom: -0.46em; margin-top: 2em; word-break: break-word;">
This file contains instruction to listen to port 80 on all interfaces and routing any traffic on port 80 to our flask app “httpbin”</div>
<div class="ip jc ap by is b gy it jd ha iu je iv iw hl ix iy hm iz ja hn jb fy" data-selectable-paragraph="" id="c14f" style="box-sizing: inherit; color: rgba(0, 0, 0, 0.84); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 32px; margin-bottom: -0.46em; margin-top: 2em; word-break: break-word;">
“httpbin” section contains path to project directory and module with contains flask “application” object.</div>
<div class="ip jc ap by is b gy it jd ha iu je iv iw hl ix iy hm iz ja hn jb fy" data-selectable-paragraph="" id="73e7" style="box-sizing: inherit; color: rgba(0, 0, 0, 0.84); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 32px; margin-bottom: -0.46em; margin-top: 2em; word-break: break-word;">
And finally, let’s build the docker image with httpbin + nginx unit:</div>
<pre class="jv jw jx jy jz ka kb kc" style="background-color: rgba(0, 0, 0, 0.05); box-sizing: inherit; margin-top: 56px; overflow-x: auto; padding: 20px;"><span class="kd ke ap by kf b hx kg kh r ki" data-selectable-paragraph="" id="ec43" style="box-sizing: inherit; color: rgba(0, 0, 0, 0.84); display: block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; white-space: pre-wrap;">docker build -t httpbin-unit .</span></pre>
<div class="ip jc ap by is b gy it jd ha iu je iv iw hl ix iy hm iz ja hn jb fy" data-selectable-paragraph="" id="18f1" style="box-sizing: inherit; color: rgba(0, 0, 0, 0.84); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 32px; margin-bottom: -0.46em; margin-top: 2em; word-break: break-word;">
<span class="is jj" style="box-sizing: inherit; font-weight: 700;">Result:</span></div>
<figure class="jv jw jx jy jz kx fs ft paragraph-image" style="box-sizing: inherit; clear: both; margin: 56px auto 0px;"><div class="ky kz fa la ai" style="box-sizing: inherit; cursor: zoom-in; position: relative; transition: transform 300ms cubic-bezier(0.2, 0, 0.2, 1); width: 680px; z-index: auto;">
<div class="fs ft kw" style="box-sizing: inherit; margin-left: auto; margin-right: auto; max-width: 1184px;">
<div class="le r fa fg" style="background-color: rgba(0, 0, 0, 0.05); box-sizing: inherit; margin: auto; position: relative;">
<div class="lf lg r" style="box-sizing: inherit; height: 0px; padding-bottom: 648.40625px;">
<div class="dw lb s t u dr ai av lc ld" style="box-sizing: inherit; height: 648.40625px; left: 0px; opacity: 0; overflow: hidden; position: absolute; top: 0px; transform: translateZ(0px); transition: opacity 100ms 400ms; width: 680px; will-change: transform;">
<img class="s t u dr ai lh li bc sq" height="1129" role="presentation" src="https://miro.medium.com/max/60/1*WkjXheaqeMfryieYFN9OLQ.png?q=20" style="box-sizing: inherit; filter: blur(20px); height: 648.40625px; left: 0px; position: absolute; top: 0px; transform: scale(1.1); transition: visibility 0ms 400ms; vertical-align: middle; visibility: hidden; width: 680px;" width="1184" /></div>
<img class="eg rk s t u dr ai lk" height="1129" role="presentation" sizes="700px" src="https://miro.medium.com/max/1184/1*WkjXheaqeMfryieYFN9OLQ.png" srcset="https://miro.medium.com/max/552/1*WkjXheaqeMfryieYFN9OLQ.png 276w, https://miro.medium.com/max/1104/1*WkjXheaqeMfryieYFN9OLQ.png 552w, https://miro.medium.com/max/1280/1*WkjXheaqeMfryieYFN9OLQ.png 640w, https://miro.medium.com/max/1400/1*WkjXheaqeMfryieYFN9OLQ.png 700w" style="background-color: white; box-sizing: inherit; height: 648.40625px; left: 0px; opacity: 1; position: absolute; top: 0px; transition: opacity 400ms 0ms; vertical-align: middle; width: 680px;" width="1184" /><div class="ip jc ap by is b gy it jd ha iu je iv iw hl ix iy hm iz ja hn jb fy" data-selectable-paragraph="" id="487c" style="box-sizing: inherit; color: rgba(0, 0, 0, 0.84); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 32px; margin-bottom: -0.46em; margin-top: 2em; word-break: break-word;">
When the container is started, Unit will look for any configuration file in /docker-entrypoint.d/*. Since we have put our configuration file there, Unit will load the configuration from /docker-entrypoint.d/config.json and reconfigure itself to load our application.</div>
<div class="ip jc ap by is b gy it jd ha iu je iv iw hl ix iy hm iz ja hn jb fy" data-selectable-paragraph="" id="b5d2" style="box-sizing: inherit; color: rgba(0, 0, 0, 0.84); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 32px; margin-bottom: -0.46em; margin-top: 2em; word-break: break-word;">
Here is the Github commit <a class="cn dj jf jg jh ji" href="https://github.com/ravirdv/httpbin/commit/cde46c422b105bbc16338cddfa09b0a417d6caf9" rel="noopener nofollow" style="background-image: url("data:image/svg+xml; background-position: 0px calc(1em + 1px); background-repeat: repeat no-repeat; background-size: 1px 1px; box-sizing: inherit; color: inherit; http: //www.w3.org/2000/svg\"><line x1=\"0\" y1=\"0\" x2=\"1\" y2=\"1\" stroke=\"rgba(0, 0, 0, 0.84)\" /></svg>"); text-decoration: none;" target="_blank">link</a> for all these changes and ready to use httpbin + unit image on <a class="cn dj jf jg jh ji" href="https://hub.docker.com/r/ravirdv/httpbin-nginx-unit" rel="noopener nofollow" style="background-image: url("data:image/svg+xml; background-position: 0px calc(1em + 1px); background-repeat: repeat no-repeat; background-size: 1px 1px; box-sizing: inherit; color: inherit; http: //www.w3.org/2000/svg\"><line x1=\"0\" y1=\"0\" x2=\"1\" y2=\"1\" stroke=\"rgba(0, 0, 0, 0.84)\" /></svg>"); text-decoration: none;" target="_blank">DockerHub</a></div>
<div class="ip jc ap by is b gy it jd ha iu je iv iw hl ix iy hm iz ja hn jb fy" data-selectable-paragraph="" id="bc0e" style="box-sizing: inherit; color: rgba(0, 0, 0, 0.84); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 32px; margin-bottom: -0.46em; margin-top: 2em; word-break: break-word;">
Hope this is useful to integrate Unit with your Flask apps, I’ve done this using real app instead of simple “hello world” Flask app :-)</div>
</div>
</div>
</div>
</div>
</figure></div>
</div>
</section><div class="eg dy ll ds ai ls lq lt" data-test-id="post-sidebar" style="box-sizing: inherit; caret-color: rgb(0, 0, 0); color: black; opacity: 1; pointer-events: none; position: fixed; top: calc(159px); transition: opacity 200ms; width: 1720px; will-change: opacity;">
<div class="n p" style="box-sizing: inherit; display: flex; justify-content: center;">
<div class="z ab ac ae af ag ah ai" style="box-sizing: inherit; margin: 0px 64px; max-width: 1192px; min-width: 0px; width: 1192px;">
<div class="lu n lv" style="box-sizing: inherit; display: flex; flex-direction: column; width: 131px;">
<div class="sp" style="box-sizing: inherit; pointer-events: auto;">
<div class="lw lx ly n" style="box-sizing: inherit; display: flex; margin-bottom: 19px; margin-left: -3px; padding-top: 28px;">
<div class="n o" style="align-items: center; box-sizing: inherit; display: flex;">
<div class="r fa lz ma mb mc md" style="box-sizing: inherit; margin-right: 5px; position: relative;">
<div class="" style="box-sizing: inherit;">
<div style="box-sizing: inherit;">
<div aria-describedby="2" aria-hidden="true" aria-labelledby="2" class="ch" role="tooltip" style="box-sizing: inherit; display: inline-block;">
<div class="bl me mf mg mh mi mj mk q ml mm mn" style="-webkit-user-select: none; border: 0px; box-sizing: inherit; cursor: not-allowed; fill: rgba(0, 0, 0, 0.84); opacity: 0.25; outline: 0px; padding: 0px;">
<svg height="29" width="29"><g fill-rule="evenodd"><path d="M13.74 1l.76 2.97.76-2.97zM18.63 2.22l-1.43-.47-.4 3.03zM11.79 1.75l-1.43.47 1.84 2.56zM24.47 14.3L21.45 9c-.29-.43-.69-.7-1.12-.78a1.16 1.16 0 0 0-.91.22c-.3.23-.48.52-.54.84l.05.07 2.85 5c1.95 3.56 1.32 6.97-1.85 10.14a8.46 8.46 0 0 1-.55.5 5.75 5.75 0 0 0 3.36-1.76c3.26-3.27 3.04-6.75 1.73-8.91M14.58 10.89c-.16-.83.1-1.57.7-2.15l-2.5-2.49c-.5-.5-1.38-.5-1.88 0-.18.18-.27.4-.33.63l4.01 4z"></path><path d="M17.81 10.04a1.37 1.37 0 0 0-.88-.6.81.81 0 0 0-.64.15c-.18.13-.71.55-.24 1.56l1.43 3.03a.54.54 0 1 1-.87.61L9.2 7.38a.99.99 0 1 0-1.4 1.4l4.4 4.4a.54.54 0 1 1-.76.76l-4.4-4.4L5.8 8.3a.99.99 0 0 0-1.4 0 .98.98 0 0 0 0 1.39l1.25 1.24 4.4 4.4a.54.54 0 0 1 0 .76.54.54 0 0 1-.76 0l-4.4-4.4a1 1 0 0 0-1.4 0 .98.98 0 0 0 0 1.4l1.86 1.85 2.76 2.77a.54.54 0 0 1-.76.76L4.58 15.7a.98.98 0 0 0-1.4 0 .99.99 0 0 0 0 1.4l5.33 5.32c3.37 3.37 6.64 4.98 10.49 1.12 2.74-2.74 3.27-5.54 1.62-8.56l-2.8-4.94z"></path></g></svg></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="lx r" style="box-sizing: inherit; margin-bottom: 19px;">
<div class="dv" style="box-sizing: inherit; cursor: pointer;">
<div class="mo n o er" style="align-items: center; box-sizing: inherit; display: flex; flex-direction: row; padding-right: 4px;">
<svg class="q" height="25" width="25"><path d="M19.07 21.12a6.33 6.33 0 0 1-3.53-1.1 7.8 7.8 0 0 1-.7-.52c-.77.21-1.57.32-2.38.32-4.67 0-8.46-3.5-8.46-7.8C4 7.7 7.79 4.2 12.46 4.2c4.66 0 8.46 3.5 8.46 7.8 0 2.06-.85 3.99-2.4 5.45a6.28 6.28 0 0 0 1.14 2.59c.15.21.17.48.06.7a.69.69 0 0 1-.62.38h-.03zm0-1v.5l.03-.5h-.03zm-3.92-1.64l.21.2a6.09 6.09 0 0 0 3.24 1.54 7.14 7.14 0 0 1-.83-1.84 5.15 5.15 0 0 1-.16-.75 2.4 2.4 0 0 1-.02-.29v-.23l.18-.15a6.6 6.6 0 0 0 2.3-4.96c0-3.82-3.4-6.93-7.6-6.93-4.19 0-7.6 3.11-7.6 6.93 0 3.83 3.41 6.94 7.6 6.94.83 0 1.64-.12 2.41-.35l.28-.08z" fill-rule="evenodd"></path></svg><div class="r fa mp mq mr ms mt mu mv mw" style="box-sizing: inherit; padding-left: 6px; position: relative;">
</div>
</div>
</div>
</div>
<div style="box-sizing: inherit;">
<div class="cf" style="box-sizing: inherit; fill: rgba(0, 0, 0, 0.76);">
<div style="box-sizing: inherit;">
<div aria-describedby="3" aria-hidden="true" aria-labelledby="3" class="ch" role="tooltip" style="box-sizing: inherit; display: inline-block;">
<button class="cn co bg bh bi bj bk bl bm bn cp cq bq br cr cs" style="background-color: transparent; border: inherit; box-sizing: inherit; color: inherit; fill: inherit; font-family: inherit; font-size: inherit; letter-spacing: inherit; margin: 0px; overflow: visible; padding: 0px;"><svg height="25" viewbox="0 0 25 25" width="25"><path d="M19 6a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v14.66h.01c.01.1.05.2.12.28a.5.5 0 0 0 .7.03l5.67-4.12 5.66 4.13a.5.5 0 0 0 .71-.03.5.5 0 0 0 .12-.29H19V6zm-6.84 9.97L7 19.64V6a1 1 0 0 1 1-1h9a1 1 0 0 1 1 1v13.64l-5.16-3.67a.49.49 0 0 0-.68 0z" fill-rule="evenodd"></path></svg></button></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="eg sp ll ds lm ln lo lp lq lr" style="box-sizing: inherit; caret-color: rgb(0, 0, 0); color: black; left: 860px; opacity: 1; pointer-events: auto; position: fixed; top: calc(133px); transform: translateX(406px); transition: opacity 200ms; width: 188px; will-change: opacity;">
</div>
<div style="box-sizing: inherit; caret-color: rgb(0, 0, 0); color: black;">
<div class="mx kx n lv p" style="box-sizing: inherit; clear: both; display: flex; flex-direction: column; justify-content: center; margin-top: 40px;">
<div class="n p" style="box-sizing: inherit; display: flex; justify-content: center;">
<div class="z ab ac ae af gd ah ai" style="box-sizing: inherit; margin: 0px 64px; max-width: 680px; min-width: 0px; width: 680px;">
<div class="n my" style="box-sizing: inherit; display: flex; flex-wrap: wrap;">
</div>
<div class="n o my" style="align-items: center; box-sizing: inherit; display: flex; flex-wrap: wrap;">
</div>
<div class="mz r" style="box-sizing: inherit; margin-top: 25px;">
<ul class="bl bm" style="box-sizing: inherit; list-style: none none; margin: 0px; padding: 0px;">
<li class="ch na ik fj" style="box-sizing: inherit; display: inline-block; list-style-type: none; margin-bottom: 8px; margin-right: 8px;"></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="iu jh ap iw ix b he iy ji hg iz jj ja jb hr jc jd hs je jf ht jg ge" data-selectable-paragraph="" id="c83b" style="box-sizing: inherit; color: rgba(0, 0, 0, 0.84); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; font-style: italic; letter-spacing: -0.003em; line-height: 32px; margin-bottom: -0.46em; margin-top: 2em; word-break: break-word;">
<br class="Apple-interchange-newline" style="caret-color: rgb(0, 0, 0); color: black; font-style: normal; letter-spacing: normal;" /></div>
</blockquote>
</div>
</div>
</section></div>
Ravi Vagadiahttp://www.blogger.com/profile/13516436128051331690noreply@blogger.com0tag:blogger.com,1999:blog-7812912.post-48746264427463830342018-12-26T20:00:00.000+05:302020-06-01T13:46:57.323+05:30Microservices : What is Service Mesh and how does it help you?<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
<div class="graf graf--p graf-after--h3" id="375f" name="375f" style="--baseline-multiplier: 0.17; --x-height-multiplier: 0.375; caret-color: rgba(0, 0, 0, 0.843137); color: rgba(0, 0, 0, 0.843137); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 1.58; margin-top: 8px; text-align: start;">
When working with microservices, it becomes difficult to track down an issue or get in-depth visibility around how your services communicate with each other. You may want to know things like traffic stats on each service, error rate, request/response payload or you may want more control on setting up access policy across all services or a set of services. You’ll also need some mechanism to handle faults, encryption, and routing. I highly recommend getting an overview of <a class="markup--anchor markup--p-anchor" data-href="https://12factor.net" href="https://12factor.net/" rel="noopener nofollow" style="background-image: linear-gradient(to right, currentcolor 100%, currentcolor 0px); background-position: 0px calc(1em + 1px); background-repeat: repeat no-repeat; background-size: 1px 1px; color: inherit; text-decoration: none;" target="_blank">twelve factor app</a> if you’re building microservices.</div>
<div class="graf graf--p graf-after--p" id="51a5" name="51a5" style="--baseline-multiplier: 0.17; --x-height-multiplier: 0.375; caret-color: rgba(0, 0, 0, 0.843137); color: rgba(0, 0, 0, 0.843137); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 1.58; margin-top: 29px; text-align: start;">
Designing your micro-services architecture considering the features you get with a service mesh system means you’ll save a ton of efforts on maintaining and monitoring the system. Your development team can focus on core logic and worry less about (mis)communication :-). Before we go into details about how service mesh like linkerd or Istio works.</div>
<div class="graf graf--p graf-after--p" id="38e6" name="38e6" style="--baseline-multiplier: 0.17; --x-height-multiplier: 0.375; caret-color: rgba(0, 0, 0, 0.843137); color: rgba(0, 0, 0, 0.843137); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 1.58; margin-top: 29px; text-align: start;">
Service mesh system like Istio or Linkerd allows you to have deep insight on how each service handles traffic, takes care of service discovery with sidecar acting as reverse and forward proxy, allows you to debug API calls, inspect payload and do much more. Sidecar is design pattern for <a class="markup--anchor markup--p-anchor" data-href="https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/45406.pdf" href="https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/45406.pdf" rel="noopener nofollow" style="background-image: linear-gradient(to right, currentcolor 100%, currentcolor 0px); background-position: 0px calc(1em + 1px); background-repeat: repeat no-repeat; background-size: 1px 1px; color: inherit; text-decoration: none;" target="_blank">containers based distributed systems</a>.</div>
<div class="graf graf--p graf-after--p" id="0798" name="0798" style="--baseline-multiplier: 0.17; --x-height-multiplier: 0.375; caret-color: rgba(0, 0, 0, 0.843137); color: rgba(0, 0, 0, 0.843137); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 1.58; margin-top: 29px; text-align: start;">
At high-level, service mesh systems are divided into two parts i.e “Control Plane” and “Data Plane”. Control Plane is set of services which acts as a source of truth for data plane. It configures various components of data plane to ensure each service has what it needs to communicate with other services. Control Plane also takes care of managing telemetry data, configuring traffic paths and much more.</div>
<div class="graf graf--p graf-after--p" id="a86c" name="a86c" style="--baseline-multiplier: 0.17; --x-height-multiplier: 0.375; caret-color: rgba(0, 0, 0, 0.843137); color: rgba(0, 0, 0, 0.843137); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 1.58; margin-top: 29px; text-align: start;">
Data plane takes care of handling traffic, collecting stats, monitoring health, load balancing and authentication. Let’s dig down further to see how it works.</div>
<div class="graf graf--p graf-after--p" id="e715" name="e715" style="--baseline-multiplier: 0.17; --x-height-multiplier: 0.375; caret-color: rgba(0, 0, 0, 0.843137); color: rgba(0, 0, 0, 0.843137); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 1.58; margin-top: 29px; text-align: start;">
Data plane uses sidecar (nothing but a proxy like envoy, Nginx, HAProxy etc) which sits along with your service container in a pod, and all communication between your service and other services goes through this sidecar. This pattern enables service mesh to capture all communication and export stats to control plane.</div>
<div class="graf graf--p graf-after--p" id="3613" name="3613" style="--baseline-multiplier: 0.17; --x-height-multiplier: 0.375; caret-color: rgba(0, 0, 0, 0.843137); color: rgba(0, 0, 0, 0.843137); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 1.58; margin-top: 29px; text-align: start;">
Without a sidecar, services would communicate with each other directly. In most cases, this pattern will have some service discovery code on each service so that it knows IP and Port of target service.</div>
<div class="graf graf--p graf-after--p" id="4450" name="4450" style="--baseline-multiplier: 0.17; --x-height-multiplier: 0.375; caret-color: rgba(0, 0, 0, 0.843137); color: rgba(0, 0, 0, 0.843137); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 1.58; margin-top: 29px; text-align: start;">
Here’s how that would work:</div>
<figure class="graf graf--figure graf-after--p" id="f42e" name="f42e" style="-webkit-user-select: auto; box-sizing: border-box; caret-color: rgba(0, 0, 0, 0.843137); clear: both; color: rgba(0, 0, 0, 0.843137); font-family: medium-content-sans-serif-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; font-size: 20px; margin: 43px 0px 0px; outline: 0px; position: relative; text-align: start; z-index: 100;"><div class="aspectRatioPlaceholder is-locked" style="margin: 0px auto; max-height: 216px; max-width: 640px; position: relative; width: 640px;">
<div class="aspectRatioPlaceholder-fill" style="padding-bottom: 216.3125px;">
</div>
<div class="progressiveMedia js-progressiveMedia graf-image is-canvasLoaded is-imageLoaded" data-height="216" data-image-id="0*67lrXfrkfWEEOa-j" data-is-featured="true" data-scroll="native" data-width="640" style="box-sizing: border-box; height: 216px; left: 0px; margin: auto; max-width: 100%; position: absolute; top: 0px; transition: background 0.2s; width: 640px;">
<canvas class="progressiveMedia-canvas js-progressiveMedia-canvas" height="25" style="-webkit-backface-visibility: hidden; box-sizing: border-box; display: block; height: 216px; left: 0px; margin: auto; opacity: 0; position: absolute; top: 0px; transition: visibility 0s linear 0.5s, opacity 0.1s 0.4s; vertical-align: baseline; visibility: hidden; width: 640px;" width="75"></canvas><img class="progressiveMedia-image js-progressiveMedia-image" data-src="https://cdn-images-1.medium.com/max/1600/0*67lrXfrkfWEEOa-j" src="https://cdn-images-1.medium.com/max/1600/0*67lrXfrkfWEEOa-j" style="-webkit-backface-visibility: hidden; border: 0px; box-sizing: border-box; display: block; height: 216px; left: 0px; margin: auto; opacity: 1; position: absolute; top: 0px; transition: visibility 0s linear 0s, opacity 0.4s 0s; visibility: visible; width: 640px; z-index: 100;" /></div>
</div>
<figcaption class="imageCaption" style="--baseline-multiplier: 0.22; --x-height-multiplier: 0.342; -webkit-nbsp-mode: normal; color: rgba(0, 0, 0, 0.682353); font-family: medium-content-sans-serif-font, "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Arial, sans-serif; font-feature-settings: "liga", "lnum"; font-size: 16px; left: 0px; letter-spacing: 0px; line-height: 1.4; margin-top: 10px; outline: 0px; position: relative; text-align: center; top: 0px; width: 700px; z-index: 300;">Services talking directly with each other.</figcaption></figure><div class="graf graf--p graf-after--figure" id="979d" name="979d" style="--baseline-multiplier: 0.17; --x-height-multiplier: 0.375; caret-color: rgba(0, 0, 0, 0.843137); color: rgba(0, 0, 0, 0.843137); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 1.58; margin-top: 38px; text-align: start;">
In this case, you’ll not have control over rate limiting or inspecting content of request without modifying services. In order to solve this problem, a simple mechanism is to have a proxy like Nginx or HAProxy running along with each service and service only communicates via proxy. You can have more control over who can talk to this service and at what rate. Let’s see how that would work:</div>
<figure class="graf graf--figure graf-after--p" id="738b" name="738b" style="-webkit-user-select: auto; box-sizing: border-box; caret-color: rgba(0, 0, 0, 0.843137); clear: both; color: rgba(0, 0, 0, 0.843137); font-family: medium-content-sans-serif-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; font-size: 20px; margin: 43px 0px 0px; outline: 0px; position: relative; text-align: start; z-index: 100;"><div class="aspectRatioPlaceholder is-locked" style="margin: 0px auto; max-height: 194px; max-width: 640px; position: relative; width: 640px;">
<div class="aspectRatioPlaceholder-fill" style="padding-bottom: 193.90625px;">
</div>
<div class="progressiveMedia js-progressiveMedia graf-image is-canvasLoaded is-imageLoaded" data-height="194" data-image-id="0*Pn6SvjfOXKBPJO3G" data-scroll="native" data-width="640" style="box-sizing: border-box; height: 193.90625px; left: 0px; margin: auto; max-width: 100%; position: absolute; top: 0px; transition: background 0.2s; width: 640px;">
<canvas class="progressiveMedia-canvas js-progressiveMedia-canvas" height="22" style="-webkit-backface-visibility: hidden; box-sizing: border-box; display: block; height: 193.90625px; left: 0px; margin: auto; opacity: 0; position: absolute; top: 0px; transition: visibility 0s linear 0.5s, opacity 0.1s 0.4s; vertical-align: baseline; visibility: hidden; width: 640px;" width="75"></canvas><img class="progressiveMedia-image js-progressiveMedia-image" data-src="https://cdn-images-1.medium.com/max/1600/0*Pn6SvjfOXKBPJO3G" src="https://cdn-images-1.medium.com/max/1600/0*Pn6SvjfOXKBPJO3G" style="-webkit-backface-visibility: hidden; border: 0px; box-sizing: border-box; display: block; height: 193.90625px; left: 0px; margin: auto; opacity: 1; position: absolute; top: 0px; transition: visibility 0s linear 0s, opacity 0.4s 0s; visibility: visible; width: 640px; z-index: 100;" /></div>
</div>
<figcaption class="imageCaption" style="--baseline-multiplier: 0.22; --x-height-multiplier: 0.342; -webkit-nbsp-mode: normal; color: rgba(0, 0, 0, 0.682353); font-family: medium-content-sans-serif-font, "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Arial, sans-serif; font-feature-settings: "liga", "lnum"; font-size: 16px; left: 0px; letter-spacing: 0px; line-height: 1.4; margin-top: 10px; outline: 0px; position: relative; text-align: center; top: 0px; width: 700px; z-index: 300;">Services communicating via sidecar</figcaption></figure><div class="graf graf--p graf-after--figure" id="96e0" name="96e0" style="--baseline-multiplier: 0.17; --x-height-multiplier: 0.375; caret-color: rgba(0, 0, 0, 0.843137); color: rgba(0, 0, 0, 0.843137); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 1.58; margin-top: 38px; text-align: start;">
Routing all traffic to a service via proxy along with each service can help you gather operational metrics which is helpful in optimization as well as to ensure reliable operations. Now think about managing hundreds of services with thousands of instances and their proxies, you see the problem? That’s where control plane come into play, since containers are scheduled dynamically it is very like that old containers are destroy and new containers are deployed when scaling or rolling out upgrades. It’s the role of control plane to keep these proxies (sidecars) updated with current network state, apply access policies, encryption scheme etc. Here’s a general architecture of how this would work :</div>
<figure class="graf graf--figure graf-after--p" id="da5b" name="da5b" style="-webkit-user-select: auto; box-sizing: border-box; caret-color: rgba(0, 0, 0, 0.843137); clear: both; color: rgba(0, 0, 0, 0.843137); font-family: medium-content-sans-serif-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; font-size: 20px; margin: 43px 0px 0px; outline: 0px; position: relative; text-align: start; z-index: 100;"><div class="aspectRatioPlaceholder is-locked" style="margin: 0px auto; max-height: 457px; max-width: 700px; position: relative; width: 700px;">
<div class="aspectRatioPlaceholder-fill" style="padding-bottom: 457.09375px;">
</div>
<div class="progressiveMedia js-progressiveMedia graf-image is-canvasLoaded is-imageLoaded" data-action-value="0*cmbWS0DcS2ZRxfIq" data-action="zoom" data-height="1045" data-image-id="0*cmbWS0DcS2ZRxfIq" data-scroll="native" data-width="1600" style="box-sizing: border-box; cursor: zoom-in; height: 457px; left: 0px; margin: auto; max-width: 100%; position: absolute; top: 0px; transition: background 0.2s; width: 700px;">
<canvas class="progressiveMedia-canvas js-progressiveMedia-canvas" height="48" style="-webkit-backface-visibility: hidden; box-sizing: border-box; display: block; height: 457px; left: 0px; margin: auto; opacity: 0; position: absolute; top: 0px; transition: visibility 0s linear 0.5s, opacity 0.1s 0.4s; vertical-align: baseline; visibility: hidden; width: 700px;" width="75"></canvas><img class="progressiveMedia-image js-progressiveMedia-image" data-src="https://cdn-images-1.medium.com/max/1600/0*cmbWS0DcS2ZRxfIq" src="https://cdn-images-1.medium.com/max/1600/0*cmbWS0DcS2ZRxfIq" style="-webkit-backface-visibility: hidden; border: 0px; box-sizing: border-box; display: block; height: 457px; left: 0px; margin: auto; opacity: 1; position: absolute; top: 0px; transition: visibility 0s linear 0s, opacity 0.4s 0s; visibility: visible; width: 700px; z-index: 100;" /></div>
</div>
<figcaption class="imageCaption" style="--baseline-multiplier: 0.22; --x-height-multiplier: 0.342; -webkit-nbsp-mode: normal; color: rgba(0, 0, 0, 0.682353); font-family: medium-content-sans-serif-font, "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Arial, sans-serif; font-feature-settings: "liga", "lnum"; font-size: 16px; left: 0px; letter-spacing: 0px; line-height: 1.4; margin-top: 10px; outline: 0px; position: relative; text-align: center; top: 0px; width: 700px; z-index: 300;">Architecture Overview of Service Mesh</figcaption></figure><div class="graf graf--p graf-after--figure" id="362d" name="362d" style="--baseline-multiplier: 0.17; --x-height-multiplier: 0.375; caret-color: rgba(0, 0, 0, 0.843137); color: rgba(0, 0, 0, 0.843137); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 1.58; margin-top: 38px; text-align: start;">
There are a collection of services which makes it easy to work with service mesh. <a class="markup--anchor markup--p-anchor" data-href="https://istio.io/" href="https://istio.io/" rel="nofollow noopener" style="background-image: linear-gradient(to right, currentcolor 100%, currentcolor 0px); background-position: 0px calc(1em + 1px); background-repeat: repeat no-repeat; background-size: 1px 1px; color: inherit; text-decoration: none;" target="_blank">Istio</a> & <a class="markup--anchor markup--p-anchor" data-href="https://linkerd.io/" href="https://linkerd.io/" rel="nofollow noopener" style="background-image: linear-gradient(to right, currentcolor 100%, currentcolor 0px); background-position: 0px calc(1em + 1px); background-repeat: repeat no-repeat; background-size: 1px 1px; color: inherit; text-decoration: none;" target="_blank">linkerd</a> are two famous service mesh systems which you can drop in along with your existing services without changing any code, although this may look quite complex, configuring service mesh is getting simpler.</div>
<div class="graf graf--p graf-after--p graf--trailing" id="7562" name="7562" style="--baseline-multiplier: 0.17; --x-height-multiplier: 0.375; caret-color: rgba(0, 0, 0, 0.843137); color: rgba(0, 0, 0, 0.843137); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.003em; line-height: 1.58; margin-top: 29px; text-align: start;">
I’ve got chance to use linkerd, in next post, I’ll cover how you can get started with linkerd.</div>
</div>
</div>
Ravi Vagadiahttp://www.blogger.com/profile/13516436128051331690noreply@blogger.com0tag:blogger.com,1999:blog-7812912.post-61572555559503952442018-09-08T21:28:00.000+05:302018-09-08T21:28:13.525+05:30Rancher for Microservices : Upgrades and Rollback.<div dir="ltr" style="text-align: left;" trbidi="on">
So far we've checked how easy it is to <a href="https://blog.ravi.ws/2018/09/getting-started-with-rancher-kubernetes.html" target="_blank">get up and running with Rancher</a>. We also deployed a very simple HTTP service on our Rancher Cluster, attached an L7 Load balancer and <a href="https://blog.ravi.ws/2018/09/rancher-for-microservices-load.html" target="_blank">successfully scaled up containers running this service</a>.<br />
<br />
In this post, I'll use the same service with a slight modification which is version number now return as 2.0 in HTTP response. So far our service is on v1.0, let's say we've worked very hard and released a new version with latest features. We want to release it to our users while ensuring there is no downtime during deployment. At this stage, our docker image of service 2.0 is pushed to docker repository (ravirdv/app:2.0).<br />
<br />
In the world without container orchestration platforms, we'd have to write scripts to spawn up compute resource (EC2, VM etc) and then use something like Ansible/Chef/Farbic scripts to provision required services and dependencies. Once that is done, we'd push our package and hope there is no dependency/version mismatch and our service starts up. After new version of service is up, we'd slowly migrate our traffic to new version of service and clean up compute resources of old version or may be keep it running as standby. Now there might be variations of how this is done, but roughly this is how normally people did it in past.<br />
<br />
Enough of history lesson 🙂, let's get back to how we can achieve similar result with more predictability and fault tolerance using Rancher. Rancher likes to call collection of containers a "Workload", in this case, our HTTP service containers are part of same workload. So when we ask Rancher to upgrade the Workload, it will spin up new set of containers with specified revision of docker image and instruct our L7 load balancer to gradually redirect traffic to new set of containers. Rancher does all of this for you, without breaking a sweat! awesome isn't it? 🤩<br />
<br />
Upgrading a workload is very simple. You just have to click on Edit, update image version and hit "Upgrade" button, Rancher will instantly fetch the docker image from registry and provision a set of containers using that image.<br />
<br />
Demo time! let's try to upgrade our service from v1.0 to v2.0 and see how our curl script handles it.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjES32hctIyFzJrcXD8A9N_LUov7Pro67kOhELWOifvEpXHjFKkZPuzSj7RqED517V9DcTjqeAzySxGU_e8NQr6ipm1XVqD4IgVqxA74Is3IwrhSDAO-1RX-S6Yx5NVB4bvDvHbaA/s1600/07+-+Upgrade+with+Curl.gif" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="461" data-original-width="800" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjES32hctIyFzJrcXD8A9N_LUov7Pro67kOhELWOifvEpXHjFKkZPuzSj7RqED517V9DcTjqeAzySxGU_e8NQr6ipm1XVqD4IgVqxA74Is3IwrhSDAO-1RX-S6Yx5NVB4bvDvHbaA/s1600/07+-+Upgrade+with+Curl.gif" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Looking at "App Version" value, we can see that it curl slowly starts receiving v2.0 as response.</td></tr>
</tbody></table>
<br />
It takes few more seconds to switch all containers to new version, below screen capture shows all responses are now from 2.0<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWTY-_c_DSbA7hrTNPSoZfrsPR3OzozHIfvjiXVlX0lmfNczI8sG9o0AN_tL3qGkL47QaCPSCKdmbOPVcL23PyiR30LB-kJGmwxo5yfErbB1iNsu4Qpdlbz5P4npvpAL_BbGJrFw/s1600/08+-+upgrade+complete.gif" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="461" data-original-width="800" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWTY-_c_DSbA7hrTNPSoZfrsPR3OzozHIfvjiXVlX0lmfNczI8sG9o0AN_tL3qGkL47QaCPSCKdmbOPVcL23PyiR30LB-kJGmwxo5yfErbB1iNsu4Qpdlbz5P4npvpAL_BbGJrFw/s1600/08+-+upgrade+complete.gif" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td class="tr-caption" style="font-size: 12.8px;">As our service is now upgraded, "App Version" value is 2.0 in response, also container host are now different.</td></tr>
</tbody></table>
</td></tr>
</tbody></table>
I was completely blown away by this feature, this "nuke and pave" approach give me much more confidence than modifying existing server configuration. However, things may go wrong. May be there is a last minute bug which impact a set of users or a top secret feature which shouldn't have been part of this release or anything else really where you'd wish your infrastructure had an "undo" button.<br />
<br />
And you guessed it! while not really an undo button, Rancher makes it very easy to rollback to previous version. Process for rollback is same as upgrade. Let's say we found an issue in our cutting edge 2.0 release and now we've decided to rollback to 1.0 version ASAP 🔥. Let's see how Rancher handles it:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht2kUPZ1BzstvvxQmTljmOnOzhSrab3PDnL2N7WyyWpVjdcVWFA7h9SRU2RB28Xh9QDI-BIQv_FQcotY8GjkIrUFsaot0JBTLTLrpPAS-ck8ub64boZaqYteH7lVX3GZoqD1PPzQ/s1600/09+-+Rollback.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="461" data-original-width="800" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht2kUPZ1BzstvvxQmTljmOnOzhSrab3PDnL2N7WyyWpVjdcVWFA7h9SRU2RB28Xh9QDI-BIQv_FQcotY8GjkIrUFsaot0JBTLTLrpPAS-ck8ub64boZaqYteH7lVX3GZoqD1PPzQ/s1600/09+-+Rollback.gif" /></a></div>
<br />
<br />
As you can see from HTTP response, we can see service 2.0 containers are replaced with version 1.0 containers. Although, this will be much more messy if services are not stateless, I'll write more about this when covering persistent storage topic. If you're new to containerization and its ecosystem then I highly recommend to start with services which are stateless. Running your app on local machine with Docker-Compose is easiest way to start in my opinion.<br />
<br />
I hope this series of posts give you enough ammunition to start playing with Rancher. In next series of posts, I'll write about how you can use this platform to perform service discovery, handle configuration changes, store secrets, and most importantly debug and monitor services.<br />
<br />
If you found this interesting or if there is something that I can improve then please let me know via comments.<br />
<br />
<br />
<br /><br />
<br />
<br /></div>
Ravi Vagadiahttp://www.blogger.com/profile/13516436128051331690noreply@blogger.com0tag:blogger.com,1999:blog-7812912.post-30943902330881930242018-09-08T05:00:00.002+05:302018-09-08T20:39:41.068+05:30Rancher for Microservices : Load Balancing and Scaling Containers.<div dir="ltr" style="text-align: left;" trbidi="on">
In my <a href="https://blog.ravi.ws/2018/09/getting-started-with-rancher-kubernetes.html" target="_blank">previous post</a>, we saw how easy it is to set up Kubernetes cluster using Rancher. Once you have a cluster up and running, next step is to deploy your microservices on the cluster. In this post, we’ll look at how to deploy, run and scale a docker image on your cluster. We’ll also look at setting up an L7 load balancer to distribute traffic between multiple instances of your app.<br />
<br />
Let’s create a simple HTTP service which returns server hostname & current version of the binary (hardcoded). I’ve used go-lang for this, below is code snippet which returns hostname and service version.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJDp2_bUTXOuSstWHvmY0-Rwui8QxA2-GtDX5FpEaHJOa7IDhjTRSfwLdAnuVTUx9ta9Tun3-5Kj2cpiMslmZPATVNiEQn1DKMCbmfuERvvG1Rb4W3LkQrf8h1XqEpg5iEr4waDQ/s1600/Screen+Shot+2018-09-08+at+1.37.32+PM.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img data-image-align="middle" data-image-caption="Simple HTTP Server, return app version & hostname." src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJDp2_bUTXOuSstWHvmY0-Rwui8QxA2-GtDX5FpEaHJOa7IDhjTRSfwLdAnuVTUx9ta9Tun3-5Kj2cpiMslmZPATVNiEQn1DKMCbmfuERvvG1Rb4W3LkQrf8h1XqEpg5iEr4waDQ/s640/Screen+Shot+2018-09-08+at+1.37.32+PM.png" style="max-width: 100%;" width="1372" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Simple HTTP Server, return app version & hostname.</td></tr>
</tbody></table>
<br />
All it does is, returns a string "App Version 2.0 running on host: <hostname>", once deployed it will return container hostname.<br />
<br />
Next step is to dockerize our service by generating a docker image and push it to DockerHub (or your private Docker registry), below is Dockerfile I used to dockerize this service.<br />
<div dir="ltr">
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrdYJeeSWoHUvCNNlqvpI0VhgxlIPJ3q3Cga0RCaP6k7e5MRN48zcVkcyssbiV9lPcfzYLTOSYYUBT9FveROi19CirLQN-79Wwwdy9ygRpe9CIr3BkHoYaY1WQZ4Eh1AC3DLluWg/s1600/Screen+Shot+2018-09-08+at+1.42.14+PM.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="454" data-original-width="1444" height="201" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrdYJeeSWoHUvCNNlqvpI0VhgxlIPJ3q3Cga0RCaP6k7e5MRN48zcVkcyssbiV9lPcfzYLTOSYYUBT9FveROi19CirLQN-79Wwwdy9ygRpe9CIr3BkHoYaY1WQZ4Eh1AC3DLluWg/s640/Screen+Shot+2018-09-08+at+1.42.14+PM.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Dockerfile: run "docker build -t ravirdv/app:v1.0 ."</td></tr>
</tbody></table>
<br />
Running this will compile our service and generate a docker image on local machine. Version number is generally used to tag docker image so we’ve tagged it as v1.0. </div>
<div dir="ltr">
<br /></div>
<div dir="ltr">
We can push this image to DockerHub using following command : <i>docker push</i></div>
<div dir="ltr">
<br /></div>
<div dir="ltr">
You can access this image from https://hub.docker.com/r/ravirdv/app/, there are two tags i.e. 1.0 & 2.0</div>
<div dir="ltr">
<br /></div>
<div dir="ltr">
Now that we've our shiny app on the docker repository, we can deploy it on our cluster via Rancher.</div>
<br />
On Rancher, select your cluster, namespace and click on "Deploy", specify service name, docker image and hit the "Launch" button to start a container.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisQ0cAt7_CoJPHPBdidiLN3sRhAwMYR6AhfjLViXJBdZi8FOxrd3pKHwN8VyCf612X2_mVs6RwbtBnpUpshg7fGLyI_BKl5RGkHpbPsBSds3eGheWXjrIKBGNxZ0XPL_TIXElbBA/s1600/01-+Deploy.gif"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisQ0cAt7_CoJPHPBdidiLN3sRhAwMYR6AhfjLViXJBdZi8FOxrd3pKHwN8VyCf612X2_mVs6RwbtBnpUpshg7fGLyI_BKl5RGkHpbPsBSds3eGheWXjrIKBGNxZ0XPL_TIXElbBA/s1600/01-+Deploy.gif" style="max-width: 100%;" width="800" /></a></div>
<br />
It will show the workload as active once the container is started. Now since our app is HTTP service running on port 8080, we need to expose this port to the external world. In order to do this, we got few options, first one is to bind container’s port 8080 to a random port on a node, another option is to attach an L7 load balancer to route traffic to our container. L7 Load balancer approach give you more flexibility. By default, Rancher deploys nginx to handle L7 traffic and it runs on port 80. Rancher also allows you to specify a hostname or generate a xip.io subdomain with your app name. In this case, it generated app.tutorial.<localip>.xip.io and point its A record to out cluster IP.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZWb6GptM4ouQ9SNXAHAEFDg9RkheMaVrV6ZGShICHGs38sf3EOO3-_Zls1pJViwQEqmFqDA28i7HkFqOHhyphenhyphen9enw12qifJu6h77cgSIxKGRt0hJ4lKrFgcVuZHaXSEEJWM6c-ZkQ/s1600/02-+Load+Balancer.gif"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZWb6GptM4ouQ9SNXAHAEFDg9RkheMaVrV6ZGShICHGs38sf3EOO3-_Zls1pJViwQEqmFqDA28i7HkFqOHhyphenhyphen9enw12qifJu6h77cgSIxKGRt0hJ4lKrFgcVuZHaXSEEJWM6c-ZkQ/s1600/02-+Load+Balancer.gif" style="max-width: 100%;" width="800" /></a></div>
<br />
<br />
You can map a path with this container and the port on which the container is listening. It takes around 20 to 30 seconds for it to generate xip.io hostname, you should be able to get a response from the endpoint once generated.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiqvqwFp2GH4IBINcW9uCGF1gfiK2AsmLrJ82jazU7tdEG5ZUGYMrur5fVad-8dmBvJu2aRYKv0hjyEsul1YV4r-nLxrYbVJtKqaPl5QpDmk1Yo74gqdA_ZdYPWyO3eV7k7ydGxw/s1600/03-+XIP+Access.gif"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiqvqwFp2GH4IBINcW9uCGF1gfiK2AsmLrJ82jazU7tdEG5ZUGYMrur5fVad-8dmBvJu2aRYKv0hjyEsul1YV4r-nLxrYbVJtKqaPl5QpDmk1Yo74gqdA_ZdYPWyO3eV7k7ydGxw/s1600/03-+XIP+Access.gif" style="max-width: 100%;" width="800" /></a></div>
<br />
<br />
Now that we've got it up and running, let's start a curl script to periodically make HTTP call to this service.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWcmzZ1Mpx1gTfSV58mwgcaz1I67Axt15403sfwsMyBhcm6KernYIigNHjnZDU2m3FNO7FgJ1bERpR5_EWaqqnC_AoLoi7YHIiEcpBZ7gtUF9ocrxQNiQrrcjCq6CP61OfTR6QqQ/s1600/04-+Curl+with+single+pod.gif"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWcmzZ1Mpx1gTfSV58mwgcaz1I67Axt15403sfwsMyBhcm6KernYIigNHjnZDU2m3FNO7FgJ1bERpR5_EWaqqnC_AoLoi7YHIiEcpBZ7gtUF9ocrxQNiQrrcjCq6CP61OfTR6QqQ/s1600/04-+Curl+with+single+pod.gif" style="max-width: 100%;" width="800" /></a></div>
<br />
<br />
As you can see, we have got service version and container hostname as HTTP response, if you look closely all responses have the same hostname. That's expected since we've got only one container running.<br />
<br />
Now let's look at how scaling container works. Since we've mapped our workload with the L7 load balancer, it should automatically take care of distributing traffic among our containers. You can edit the workload and increase the number of containers.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOm32SwbEghAPnUShm3Vxw60mH2YL0Kn7q0XAc4mDjSeqKmNNqSfsb1dk_rV1wO_-XqmjHmjDn5ycJQws-aB7c2IH_bgRCUguUmR9i5UKQzl5Pyr9hHN8Y0dmx-RtfF9p_LfYZ2w/s1600/05-+Increase+Pods+to+2.gif"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOm32SwbEghAPnUShm3Vxw60mH2YL0Kn7q0XAc4mDjSeqKmNNqSfsb1dk_rV1wO_-XqmjHmjDn5ycJQws-aB7c2IH_bgRCUguUmR9i5UKQzl5Pyr9hHN8Y0dmx-RtfF9p_LfYZ2w/s1600/05-+Increase+Pods+to+2.gif" style="max-width: 100%;" width="800" /></a></div>
<br />
<br />
Now looking at same curl script output, we can see requests distributed between two containers as response contains two different hostnames.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeJvAd72anopLhVNdugVFy27wf3ms2Pg-utRpPcVwzA1W7XLAdNOgmqAKa-pD2GW-TH1UnBUZCN7Ir8SIUXVkoGUB8p9Pg7TcxRzxtWmfBSH3YkEwgTJgfTJzxiJk-Ia19tbBckA/s1600/06+-+Curl+with+2+Pods.gif"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeJvAd72anopLhVNdugVFy27wf3ms2Pg-utRpPcVwzA1W7XLAdNOgmqAKa-pD2GW-TH1UnBUZCN7Ir8SIUXVkoGUB8p9Pg7TcxRzxtWmfBSH3YkEwgTJgfTJzxiJk-Ia19tbBckA/s1600/06+-+Curl+with+2+Pods.gif" style="max-width: 100%;" width="800" /></a></div>
<br />
Now we have a service which scales, its easy since our service doesn't have any state. I'll cover more on persistence storage for services like databases.<br />
<br />
I hope this post helps you deploying simple stateless services on your cluster, please leave a comment in case something is unclear. In next post, we'll look into how Rancher handles upgrades and rollback.</div>
Ravi Vagadiahttp://www.blogger.com/profile/13516436128051331690noreply@blogger.com0tag:blogger.com,1999:blog-7812912.post-70053320732806410182018-09-08T04:30:00.003+05:302018-09-09T08:31:51.708+05:30Getting Started with Rancher & Kubernetes<div dir="ltr" style="text-align: left;" trbidi="on">
During my time working at Azoi (a startup), I was responsible for maintaining Gitlab for my team along with various other self-hosted internal services. When I first setup Gitlab in 2013, it was quite a task, as setting it up would involve configuring various services using provided scripts and a lot of luck. Fortunately, I found Bitnami Gitlab package to make that process easier. However initial setup is one thing and keeping up with the latest releases was a nightmare.<br />
<br />
<div dir="ltr">
Fast forward to 2016, I joined eInfochips as Solutions Consultant. Where one of my responsibilities was to modernize development workflow and encourage DevOps culture. It made sense to use Gitlab specially for Gitlab-runner and since this was a fresh setup, I explored few options to setup Gitlab, I found that Gitlab monthly releases were now published as Docker images. So I decided to use Gitlab docker image to host gitlab-ce internally. This time around, the experience was very different, initial setup and upgrading Gitlab was almost instant and painless.</div>
<div dir="ltr">
<br /></div>
<div dir="ltr">
I was quite impressed with this mechanism and got an opportunity to set up a similar mechanism for delivering a project I was working on. I quickly set up a local private docker repository and CI pipeline using Gitlab-runner to build and push few spring-boot based micro-services on docker registry. And used <a href="https://rancher.com/" target="_blank">Rancher</a> (more on it later) to deploy it on different environments (Dev, QA, Prod). It worked like charm.</div>
<div dir="ltr">
<br /></div>
<div dir="ltr">
That brings me to Kubernetes. Having read a lot about it, I gave it a try and back then it wasn't easy to set up as there were not many helper utilities like kops. Rancher, on the other hand, had built-in support for setting up Kubernetes cluster. Setting up Rancher is as simple as running a docker container. I had a great experience with Rancher and would like to share how easy it is to use it for deploying services and getting yourself familiar with Kubernetes.</div>
<div dir="ltr">
<br /></div>
So that brings us to what exactly is the role of Rancher, as container scheduling is handled by Kubernetes. Rancher is a cluster management tool, it allows you to set up and manage multiple Kubernetes cluster. It supports multi-cloud backends, authentication, access control, and a nice UI using which you can deploy and manage your containers. It also allows you to import existing cluster made on GKE or Amazon EKS.<br />
<br />
<div dir="ltr">
I'll focus on Rancher 2.0, the latest version at this moment. Setting it up is a <a href="https://rancher.com/quick-start/" target="_blank">2 step process</a>. First is to install Rancer-Server and second is to install Rancher-Agent on worker nodes. I used 3 Ubuntu Server (18.04) boxes with Docker to set it up. One box runs Rancher Server and 2 boxes are workers which will run our containers (along with few Kubernetes services).</div>
<div dir="ltr">
<br /></div>
<div dir="ltr">
On Machine 1, run following command to start Rancher-Server, it should be up within a minute and you should be able to access web UI on port 443.</div>
<div dir="ltr">
<br /></div>
<i> sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher</i><br /><br /><div dir="ltr">
Beauty of Rancher is that you don’t have to be familiar with Kubernetes, it sets up cluster transparently.<br />
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhw_bxauy9k15H3snK2DiIVoM9dk_jOAZVYFoFCcHA1owwuUlajzKfUbzTaOWDpBb4gx9g_kApGwJPVQc3zjrciHGxnBaiyQLnFUsm3BvtGWT3kBZnFf-4dIeamTREjfBGoEpudkQ/s1600/Screen+Shot+2018-09-08+at+9.48.52+AM.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img data-image-align="middle" data-image-caption="Rancher 2.0 - Login Screen" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhw_bxauy9k15H3snK2DiIVoM9dk_jOAZVYFoFCcHA1owwuUlajzKfUbzTaOWDpBb4gx9g_kApGwJPVQc3zjrciHGxnBaiyQLnFUsm3BvtGWT3kBZnFf-4dIeamTREjfBGoEpudkQ/s640/Screen+Shot+2018-09-08+at+9.48.52+AM.png" style="max-width: 100%;" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Rancher 2.0 - Login Screen</td></tr>
</tbody></table>
<br />
Set admin password, and proceed to create a new cluster by clicking "Add Cluster" button.<br />
<br />
<div dir="ltr">
Choose infrastructure provider, in my case I used local machines as nodes so I selected "Custom" however if you provide API key for GCP/AWS/Azure etc, Rancher will instantiate required compute resources for you!</div>
<div dir="ltr">
<br /></div>
Now to set up nodes for our cluster, start one node with "etcd", "Control Plane" and "Worker" as roles. Additional nodes can be added with only "Worker" role.<br />
<br />
Rancher will generate a docker run command which you can run on your nodes to make them part of the cluster. This will start rancher-agent on nodes and will set up Kubernetes services. It can take a couple of mins to show these nodes as active on your cluster. At this point, you should be able to see your cluster health and resource utilization. I highly recommend exploring catalog apps to get yourself familiar with Rancher. <br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6ucCShVbrAFsjawUCm-WCMjA5F_Q4ECOGlMmzPapP_S2MN1e1bLVbRgqGVMUfKXh4KPb19A7uv5dORgOiYkLyL9h3qSwT7x695uSs0q_eB_si8wKZlljwLfDAXxhN5ik3h8ATvg/s1600/Screen+Shot+2018-09-08+at+9.59.50+AM.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img data-image-align="middle" data-image-caption="Cluster Health" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6ucCShVbrAFsjawUCm-WCMjA5F_Q4ECOGlMmzPapP_S2MN1e1bLVbRgqGVMUfKXh4KPb19A7uv5dORgOiYkLyL9h3qSwT7x695uSs0q_eB_si8wKZlljwLfDAXxhN5ik3h8ATvg/s640/Screen+Shot+2018-09-08+at+9.59.50+AM.png" style="max-width: 100%;" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Cluster Health</td></tr>
</tbody></table>
I hope this helps you get started with Rancher, in my next post I'll write more about how you can deploy your app on Rancher and perform upgrades and rollback.</div>
Ravi Vagadiahttp://www.blogger.com/profile/13516436128051331690noreply@blogger.com10tag:blogger.com,1999:blog-7812912.post-26983881380775331032015-08-01T16:32:00.000+05:302018-09-21T17:31:39.989+05:30EuroPython 2015 - Python and Internet of Things <div dir="ltr" style="text-align: left;" trbidi="on">
I've been working in area of IoT for quite some time, and at Azoi we use Python extensively. Looking at usage of Python on micro-controller, I realised that it's not used as much as in other areas. I've had very good experience going with Python. I've got some exposure with micro controller and think it assists you to rapidly build prototype involving hardware.<br />
<br />
I applied for a talk on Internet of Things with Python to spread some awareness around this and it was selected along with another talk by my colleague <a href="https://www.linkedin.com/in/bhaumikshukla/" target="_blank">Bhaumik Shukla</a> and one more by <a href="https://www.linkedin.com/in/hitulmistry/" target="_blank">Hitul Mistry</a>. Out of all all submissions, there were total 4 selection out of which 3 were from my team at Azoi. It was also my first major talk at a large conference like EuroPython. I was both nervous and excited as the same time and since I was going to Bilbao, Spain for conference, I thought its a great opportunity to explore other cities as well :-)<br />
<br />
Bhaumik's topic was "<a href="https://www.youtube.com/watch?v=et0Hnntk3-s" target="_blank">Python for Cloud Services and Infrastructure Management</a>" and Hitul's Topic was on <a href="https://www.youtube.com/watch?v=6EBBWv6tuA8" target="_blank">Concurrency and Parallelism</a>.<br />
<br />
After a lot of preparation I was ready to go on stage to deliver my talk, one piece of advise you're delivering a talk at a conference, avoid changing your slides at last moment. In my case, my talk was on 2nd day so I thought I'll add a demo video and modify the flow a little bit to make it more easy to understand. It clearly wasn't a good idea but I managed to handle it.<br />
<br />
<br />
Here's video of my talk, looking forward to your feedback! <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/oS_5FK-KJag/0.jpg" src="https://www.youtube.com/embed/oS_5FK-KJag?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />
<br />
<br />
<br />
<br /></div>
Ravi Vagadiahttp://www.blogger.com/profile/13516436128051331690noreply@blogger.com0tag:blogger.com,1999:blog-7812912.post-18842030470014389232015-02-16T00:36:00.003+05:302015-02-16T00:51:12.439+05:30Reliance Jio: a revolution in India's broadband scene?<div dir="ltr" style="text-align: left;" trbidi="on">
Reliance Jio Infocomm acquired pan India 4G spectrum in 2010, now is the time when they're obliged to utilize spectrum and launch their services. I'm closely following developments related to Jio from quite some time.<br />
<div>
<br /></div>
<div>
RJIL is aggressively laying fibre almost everywhere. They've also started public WiFi hotspots in few cities of Gujarat with Jionet branding and I'm actively using it. It was started on 26th Jan 2014 in Ahmedabad and was supposed to be free for first 3 months however it's Feb 15 2015 and the service is still freely available. Based on my experience with Jionet, I've seen speeds upto 11 Mbps however most of time it is around 3-8 Mbps, which is good considering that the service is free of cost.</div>
<div>
<br /></div>
<div>
I think there is a big push towards data driven applications, they're also working on apps like </div>
<div>
<br /></div>
<div>
<ul style="text-align: left;">
<li><a href="http://register.jiodrive.com/jdhelp.html" rel="nofollow" target="_blank">Jio Drive</a> (Service like Dropbox, 100 GB Storage!)</li>
<li><a href="http://jioplay.jioconnect.com/downloads/templates/iphone/3.0.0.11/" rel="nofollow" target="_blank">Jio Play</a> (Live TV, with 7 days of content, more than 300 channels)</li>
<li>Jio Beats (Similar to Spotify, Gaana, Saavn etc)</li>
<li>Jio On-Demand (Netflix ?)</li>
<li>Jio Movies</li>
<li>Jio World (looks like Jio's appstore & deals portal)</li>
<li><a href="https://jiofriends.preprod.ril.com/#" target="_blank">Jio Friends</a> </li>
<li>Jio Social (WhatsApp + Hike + Viber, sound quality and video quality is great even on mobile data )</li>
<li>Jio Mags (e-magazines app)</li>
<li>Jio News (all newspapers in electronic format for almost all regional languages, similar to NewHunt)</li>
<li>Jio Broadcast</li>
</ul>
</div>
<div>
You can install and try some of these apps once you install Jio World.<br />
<br />
I've been using these apps on both Android & iOS, I'll write more about above mentioned apps along with screen shots.<br />
<br />
They seem to be pushing Digital India dream as well. They're setting up around 15 data centers in India to take care of distributing content as well as providing cloud services similar to Amazon AWS.<br />
<br />
Based on few tweets it also looks like they've started powering commercial building and residential societies with 100 Mbps FTTX connections.<br />
<br />
I'm looking forward for their launch, I've a feeling that interesting time is ahead for Indian broadband space. It would be great if Mukesh Ambani can pull off the same effect in ISP space as was done by Reliance Infocomm in mobile in 2004. </div>
<div>
<br /></div>
<div>
<br /></div>
<div>
</div>
</div>
Ravi Vagadiahttp://www.blogger.com/profile/13516436128051331690noreply@blogger.com1tag:blogger.com,1999:blog-7812912.post-72623896860982016442014-06-07T20:06:00.000+05:302018-09-21T15:31:15.015+05:30iOS Notifications with ANCS Bluetooth Low Energy Profile.<div dir="ltr" style="text-align: left;" trbidi="on">
So I got my hands on this TI CC2540 development board, which is a Bluetooth Low Energy boarding with MCU running OSAL. I was reading about BLE profiles and came across a profile called ANCS Bluetooth profile. ANCS stands for Apple Notification Center Service, this profile allows you to subscribe to notifications on iOS devices.<br />
<br />
I came across interesting demo on Github <a href="https://github.com/KhaosT/ANCS-Mac" target="_blank">repo</a> which shows Mac working as BLE peripheral device and iOS working as BLE central device. This app shows how you can subscribe to notifications on iOS device and show them on your Mac. I'm a big fan of Pebble Watch which uses same profile to show notifications on watch via BLE.<br />
<br />
Having a development board like CC2540 allowed me to build a very simple custom firmware which would have a ANCS profile and LEDs on board reacting to notifications. It turns out that that there's amazing <a href="http://mbientlab.com/blog/ancs-on-ti2541-in-an-afternoon/" target="_blank">blog</a> with explain how to implement this in details </div>
Ravi Vagadiahttp://www.blogger.com/profile/13516436128051331690noreply@blogger.com0tag:blogger.com,1999:blog-7812912.post-78491887816202012332014-05-03T23:32:00.000+05:302018-09-21T16:25:40.356+05:30Introducing Kito (formerly Wello)!<div dir="ltr" style="text-align: left;" trbidi="on">
I'm fortunate to be part of team unveiling Kito (formerly Wello) at SXSW 2012, I've been working hard along with my team on this for last few months and it feels so good to finally show it to the world. Kito is health tracker device which is in form of a smartphone case, it talks to the phone using Bluetooth Low Energy and has its own battery which can last couple of months on a single charge.<br />
<br />
It was a very hectic week with all of us working around the clock on setting up pre-order website and preparing for launch. I went to Delhi for a local release event before heading towards Austin. By the time I left for Austin, Kito launch was covered all major tech publications, below is list of few links which covers Kito launch<br />
<ul style="text-align: left;">
<li><a href="https://www.engadget.com/2014/03/06/wello/" target="_blank">engadget - 'Wello' iPhone case can track your blood pressure, temperature and more</a></li>
<li><a href="https://pocketnow.com/wello-case-iphone-health" target="_blank">PocketNow - “Wello” case tracks your health with your current iPhone</a></li>
<li><a href="https://www.macrumors.com/2014/03/06/wello-health-tracking-case-iphone/" target="_blank">Macrumors - Azoi Unveils 'Wello' Health Tracking Case for iPhone</a></li>
<li><a href="https://techcrunch.com/2014/04/02/hands-on-with-wello-the-iphone-case-that-monitors-and-tracks-your-vital-signs/" target="_blank">Techcrunch - Hands On With Wello, The iPhone Case That Monitors And Tracks Your Vital Signs</a></li>
</ul>
<div>
As soon as it went out in wild, me and everyone in my team were glued to our monitoring dashboards and it awesome to see stuff flying on nginx access.log :-)</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<br />
Here are some pictures from the event:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfiQTafqTDDZC4G7gMnCv7eF7YxTDVWzUaAi7eAeXWyPgY1Psck4_KIRZ8QaN861LPPR6sAoWG5CclD-C2Ie-vLpZVrgeVHPMzTLIE7HLEpHk6L26wHb4n4BTt_vEUqDglYZHdNw/s1600/1796856_10152084399052762_265465364_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="852" data-original-width="1136" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfiQTafqTDDZC4G7gMnCv7eF7YxTDVWzUaAi7eAeXWyPgY1Psck4_KIRZ8QaN861LPPR6sAoWG5CclD-C2Ie-vLpZVrgeVHPMzTLIE7HLEpHk6L26wHb4n4BTt_vEUqDglYZHdNw/s320/1796856_10152084399052762_265465364_o.jpg" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBBRlO6EmnSbxGEspbrmpY7V4UAiEV_ChPV_bFJVSF6mWNC8kPSJe1W26fL7V2v_3kSU8yfg6LMlAHDwS2_fFIMeMHzTp0qy8qA_l3xgne0uSKjDrxmLVfKODGd-XeFz-2GrnImg/s1600/1959339_10202543531263884_1415511994_n.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="960" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBBRlO6EmnSbxGEspbrmpY7V4UAiEV_ChPV_bFJVSF6mWNC8kPSJe1W26fL7V2v_3kSU8yfg6LMlAHDwS2_fFIMeMHzTp0qy8qA_l3xgne0uSKjDrxmLVfKODGd-XeFz-2GrnImg/s320/1959339_10202543531263884_1415511994_n.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Our booth</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnFDbTVMaYDiEqorNiBqvDrRUTbIIuMSA1mTBqEwb8MX-UX1KWNZDCwRJknb4elsfrkm_BA2Dlal6ZjxfW-N6FTX9FgpVrr-nw965J3u2wzijgLr6XMBgg2XsxeZUsYGVwLnxajg/s1600/1601378_10202543530943876_1470307531_n.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="960" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnFDbTVMaYDiEqorNiBqvDrRUTbIIuMSA1mTBqEwb8MX-UX1KWNZDCwRJknb4elsfrkm_BA2Dlal6ZjxfW-N6FTX9FgpVrr-nw965J3u2wzijgLr6XMBgg2XsxeZUsYGVwLnxajg/s320/1601378_10202543530943876_1470307531_n.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
That's me and my boss.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBxDl9VyqLXuUaKZPfd3o_IU3zaqINuAnA7dPQH4r9CjEaBjOe67MJSsU3j7Bu0kSr4r12Ybp8Ls5lnuGqfylK1xfRWJasmKoC3ljBcN507qFCZpO2L5mBM7KMCDhGwZQcVKmryA/s1600/main-qimg-b8e7b42d1c305a7ce9f0e4ff4993994d-c.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="449" data-original-width="600" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBxDl9VyqLXuUaKZPfd3o_IU3zaqINuAnA7dPQH4r9CjEaBjOe67MJSsU3j7Bu0kSr4r12Ybp8Ls5lnuGqfylK1xfRWJasmKoC3ljBcN507qFCZpO2L5mBM7KMCDhGwZQcVKmryA/s320/main-qimg-b8e7b42d1c305a7ce9f0e4ff4993994d-c.jpeg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
That's me, show off our device :-)</div>
<br />
<br />
<br />
Here's our CEO's interview with TechCrunch, walking through some features:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/-AAzeaN8eko/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/-AAzeaN8eko?feature=player_embedded" width="320"></iframe></div>
<br />
<br />
<br />
<br />
Update: Name updated to Kito and added few video links.<br />
<div>
<br /></div>
</div>
Ravi Vagadiahttp://www.blogger.com/profile/13516436128051331690noreply@blogger.com0tag:blogger.com,1999:blog-7812912.post-18024987788886984112014-01-26T10:38:00.000+05:302018-09-18T11:30:11.497+05:30How will Samsung succeed where Nokia failed?<div dir="ltr" style="text-align: left;" trbidi="on">
Anyone who's following Tizen project knows developing apps is mostly using HTML5, CSS & JavaScript. While I like the idea of HTML apps on mobile and all the portability advantages of it, what I don't like is how limited access you have when it comes to build apps which are CPU intensive. In general, it doesn't give a good UX and it feels sluggish in comparison to BB10 Qt/QML, iOS with Swift, heck even Android with Java is better.<br />
<div>
<br /></div>
<div>
Looks like every new platform wants to quickly gain maximum app developers, due to which they end target people who are familiar with web technologies. With BB10's fluid UI and good set of native apps, they are struggling to survive, and then there is Jolla Sailfish (by ex-Nokia team) which looks like more of a hobby project. </div>
<div>
<br /></div>
<div>
As a developer, having experienced Tizen OS (which is no different in terms of features than Android) I see no reason to believe Tizen to succeed where Nokia & Blackberry failed. Which is bringing high end apps on the platform.</div>
</div>
Ravi Vagadiahttp://www.blogger.com/profile/13516436128051331690noreply@blogger.com0tag:blogger.com,1999:blog-7812912.post-22622433856144235072013-03-22T01:32:00.000+05:302013-03-22T01:32:22.683+05:30Ubuntu Touch SDK, Core Apps & Mac OSX<div dir="ltr" style="text-align: left;" trbidi="on">
I have started working on Ubuntu Touch core apps, this involves using Ubuntu UI Toolkit which is basically QML Components designed for Ubuntu Touch OS. Unfortunately Ubuntu UI Toolkit is not available for Mac OS. In order to develop Ubuntu Touch core apps I have to get Ubuntu UI components running on Mac.<br />
<br />
So this has shifted my focus from Ubuntu Touch core apps to ubuntu ui sdk. Once I get it, I can start working on Ubuntu Touch core apps.<br />
<br />
<br />
Coming back to the SDK, it is a straightforward package which contains QML building block for application developers. Now compiling this on Mac should not be diffcult.<br />
<br />
I have identified following dependencies causing compilation to fail.<br />
<br />
<br />
QtDbus:<br />
<br />
This is the first error message i got when trying to compile Ubuntu UI Toolkit.<br />
it says Unknown Module : dbus when I run QMake.<br />
<br />
I have no clue why this is coming, as I think I have qtdbus installed. will come back to this point once I have a solution<br />
<br />
libintl includes:<br />
<br />
Ubuntu Touch SDK seems to be using libintl package for internationalization, hunting down this dependency was quite easy.<br />
<br />
just download and this libintl package from<br />
<br />
<div style="color: #222222; font-family: arial; font-size: small;">
https://code.google.com/p/rudix/downloads/detail?name=static-libintl-0.18.1.1-5.pkg&can=2&q=</div>
<div>
<br /></div>
<br />
gio<br />
<br />
It also uses glib/gio library, installing the library is very simple as it's available on HomeBrew.<br />
<br />
brew install glib<br />
<br />
added include dirs<br />
/usr/local/Cellar/glib/2.32.4/include/glib-2.0<br />
/usr/local//Cellar/glib/2.32.4/lib/glib-2.0/include/<br />
<br />
So I think once I get the dbus module for qt5, SDK should compile fine unless some other dependencies are missing.<br />
<br />
<br />
<br /></div>
Ravi Vagadiahttp://www.blogger.com/profile/13516436128051331690noreply@blogger.com2tag:blogger.com,1999:blog-7812912.post-9068196381713114962012-09-17T17:27:00.000+05:302018-09-17T15:55:15.536+05:30Setting up Android nightly builds using Jenkins<div dir="ltr" style="text-align: left;" trbidi="on">
Hi everyone! after few of months working on JS & and building a low level linux service which interacts with depth sensor, I got chance to working on Android base system to build input drivers.<br />
<br />
When I started working on it, building kernel module didn't take much time but observed that building a new Android base system was a manual process. Anyone new in team has to spend some time to understand how to trigger build.<br />
<br />
I'm a big fan of Cyanogenmod, and looking at how they build and distribute ROM for many devices I felt we can improve our system. So I took this up and setup a Jenkins server on a local machine. Migrating our custom build script was straight forward as its a bash script.<br />
<br />
Compared to our previous system, we now have a UI which anyone can access and access latest builds and check compilation logs. Another cool thing about setting it up on Jenkins is that we can now automatically publish it on our file server and send out an email to everyone with link to download it. This also helps our testing team to easily download ROM and flash it on board.<br />
<br />
Jenkins also fetches commit messages and I configured Jenkins to send change log as part of mail body. Overall, everyone is very after moving to Jenkins.</div>
Ravi Vagadiahttp://www.blogger.com/profile/13516436128051331690noreply@blogger.com0tag:blogger.com,1999:blog-7812912.post-5015980759317970452012-04-21T15:02:00.000+05:302018-09-17T15:29:04.415+05:30Cross platform NPAPI browser plugin.<div dir="ltr" style="text-align: left;" trbidi="on">
Recently, I got chance to work on building NPAPI plugin. I've used few NPAPI plugin and had basic idea about what it is but didn't knew how to build one.<br />
<br />
Primary use case for me was to make it run on Android and interact with a C++ service running in background. There is a sensor attached with Android based hardware and my task is to build a JavaScript SDK which allows developers to access this hardware sensor data via C++ service.<br />
<br />
I started building a simple plugin using <a href="https://code.google.com/archive/p/npapi-sdk/" target="_blank">NPAPI SDK</a> which has a function which can be invoked using JavaScript from Firefox running on Ubuntu. However, this focuses on building it for Linux.<br />
<br />
After some digging, I was able to build it on Android (Gingerbread). But when I tried to load it on Emulator it wasn't working. Looks like a strange issue as it just doesn't register with browser on Android emulator.<br />
<br />
I posted my <a href="https://stackoverflow.com/questions/10190697/load-npapi-plugin-on-android-device-emulator" target="_blank">query</a> on StackOverflow, but didn't come across anything useful. After trying some more I was able to resolve it by adding JNI interfaces for relevant entrypoints and it start working!<br />
<br />
Next step is to separate OS specific interfaces so that this plugin can be built with platform specific code separate and sdk related code separately.<br />
<br />
I hope this help anyone looking for building NPAPI plugin for Android, feel free to contact me in case you need any assistance.</div>
Ravi Vagadiahttp://www.blogger.com/profile/13516436128051331690noreply@blogger.com0tag:blogger.com,1999:blog-7812912.post-37893522166593288462011-12-26T14:10:00.000+05:302011-12-26T14:10:54.250+05:30New Year Gift From Nokia! :)<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
Just received Nokia Lumia 800</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0JmUEB-HRLpNC5k17pxxlbHeVZWd1UPEFvbUi0MLgUxkm9b5KcaqRh3vU-j0PAoOi7SqgZbPxWTl2V60QNT4R0fGB2vAeNTtabvugoiXEFlm2MWZ3OoB0OaRKU6KMjSRPnqSNag/s1600/Picture+009.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0JmUEB-HRLpNC5k17pxxlbHeVZWd1UPEFvbUi0MLgUxkm9b5KcaqRh3vU-j0PAoOi7SqgZbPxWTl2V60QNT4R0fGB2vAeNTtabvugoiXEFlm2MWZ3OoB0OaRKU6KMjSRPnqSNag/s320/Picture+009.jpg" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLsnN0khOkmA8_Kk3AbiSGaLCUdmlubU6T8U8uQvKV3X0MjIhFh56zHaV1HrqYhuPVhAYGHiq7DeLPHSsSevUJFvb0uvC1SRewxg7CP67ltqJBvWxVhLP_kqVhhbMSuWQGXRaGpA/s1600/Picture+010.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLsnN0khOkmA8_Kk3AbiSGaLCUdmlubU6T8U8uQvKV3X0MjIhFh56zHaV1HrqYhuPVhAYGHiq7DeLPHSsSevUJFvb0uvC1SRewxg7CP67ltqJBvWxVhLP_kqVhhbMSuWQGXRaGpA/s320/Picture+010.jpg" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikkk5HmQcVE1t5qH8WGfyKk0-SUg2_0brwy_SvtKqO_ugSchGy4L3EJCPA6df-Opw2vsTfgSlg0jZhtjZnvRmrJxzSsOvAE5daHDtHSdpgl62HBnHpkw7J1s2LhNYzgywJXvpqiA/s1600/Picture+012.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikkk5HmQcVE1t5qH8WGfyKk0-SUg2_0brwy_SvtKqO_ugSchGy4L3EJCPA6df-Opw2vsTfgSlg0jZhtjZnvRmrJxzSsOvAE5daHDtHSdpgl62HBnHpkw7J1s2LhNYzgywJXvpqiA/s320/Picture+012.jpg" width="239" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHU9X1ZKdAGnqc4ronU5BZ5k2kufV1CAiubjZXouo2-cduhAWgMUKd12nFZeaMlMWDsQsyOcpc2ciqwgCexvsrq_AbCi2LTvShvW66GwSTRNetSupNixkCVbyTQ1tqm2-PHfREuw/s1600/Picture+014.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHU9X1ZKdAGnqc4ronU5BZ5k2kufV1CAiubjZXouo2-cduhAWgMUKd12nFZeaMlMWDsQsyOcpc2ciqwgCexvsrq_AbCi2LTvShvW66GwSTRNetSupNixkCVbyTQ1tqm2-PHfREuw/s320/Picture+014.jpg" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3k1XuwRq1bCMT9yG-f1vxijrL4vQwfosF0cf_FKUHJp-qWEA8AQsy10U5tvSFtBLosmw2Nk3y_aMlQlh9Hh1ZGrbRp-WdTblinr9RuVhYAX_R54_dK0YHPRxkxIy8_Uec9BA57g/s1600/Picture+015.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3k1XuwRq1bCMT9yG-f1vxijrL4vQwfosF0cf_FKUHJp-qWEA8AQsy10U5tvSFtBLosmw2Nk3y_aMlQlh9Hh1ZGrbRp-WdTblinr9RuVhYAX_R54_dK0YHPRxkxIy8_Uec9BA57g/s320/Picture+015.jpg" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSoHeME4JC3tt8wcaayIAcqYw5j6VvPccAWMPNz2pkWCLWTakKMdWVwT2Rx5f8ZX_yShUFshEFXoQ3cQE3hZqRkYu57p2qVtrzAzeEOHp2y8ltun-nqsXHNjxXAQP9mNN4oYryhQ/s1600/Picture+019.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSoHeME4JC3tt8wcaayIAcqYw5j6VvPccAWMPNz2pkWCLWTakKMdWVwT2Rx5f8ZX_yShUFshEFXoQ3cQE3hZqRkYu57p2qVtrzAzeEOHp2y8ltun-nqsXHNjxXAQP9mNN4oYryhQ/s320/Picture+019.jpg" width="239" /></a></div>
<div style="text-align: center;">
well no comments about WP7 before trying it :)</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7l5fS-mk7BzDDiBgtBt5uYZ1t2eoLxcd7sZBDViwxKY-3CFqmC4Q41Nk8wM3X8X6rOpYL1oVkp5DEtUnl6dw1EkT5XyBwMMhEopi8BLygQcmUqMHO8pMdqZqluOrZBRvsRcJWA/s1600/Picture+018.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7l5fS-mk7BzDDiBgtBt5uYZ1t2eoLxcd7sZBDViwxKY-3CFqmC4Q41Nk8wM3X8X6rOpYL1oVkp5DEtUnl6dw1EkT5XyBwMMhEopi8BLygQcmUqMHO8pMdqZqluOrZBRvsRcJWA/s320/Picture+018.jpg" width="239" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQwv2I7l86XXIe_JDhbM8qWWCbUUaHFs6SEFnMXAQvq8QjZr-yqKPlu8wNuYjzJX3eBupOFp4Y3zYv21BP98oHDn7Kk1a-QMRtw_IKmth5noEjWjd80RZ7QdPG9BcW676mA6aILQ/s1600/Picture+017.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQwv2I7l86XXIe_JDhbM8qWWCbUUaHFs6SEFnMXAQvq8QjZr-yqKPlu8wNuYjzJX3eBupOFp4Y3zYv21BP98oHDn7Kk1a-QMRtw_IKmth5noEjWjd80RZ7QdPG9BcW676mA6aILQ/s320/Picture+017.jpg" width="320" /></a></div>
<div style="text-align: center;">
wonderful build quality.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQmeCOajbQqpJPGGoGnDk4Fa-oKibE1QrBuyouk4PXGWjiiZE0herABPmO-mtstd8qlQNpLG9ITPTLmjI1YV4XGp45v1rD8M4GQ_s-FJC5piSjsWaJEqzo3zPBF9fIhUgQNkDdQ/s1600/Picture+016.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQmeCOajbQqpJPGGoGnDk4Fa-oKibE1QrBuyouk4PXGWjiiZE0herABPmO-mtstd8qlQNpLG9ITPTLmjI1YV4XGp45v1rD8M4GQ_s-FJC5piSjsWaJEqzo3zPBF9fIhUgQNkDdQ/s320/Picture+016.jpg" width="320" /></a></div>
<br /></div>Ravi Vagadiahttp://www.blogger.com/profile/13516436128051331690noreply@blogger.com1Amreli, Gujarat, India21.602871 71.2181721.5733445 71.178688 21.6323975 71.257652000000007tag:blogger.com,1999:blog-7812912.post-24412210374765941102011-09-21T17:35:00.000+05:302018-09-21T17:51:09.080+05:30N9 - Nokia's answer to iPhone?<div dir="ltr" style="text-align: left;" trbidi="on">
If you're following smartphone industry then you'd have come across Nokia's N9 with Harmattan OS. Nokia showcased N9 in June and should be out in market next month. Unfortunately Nokia has said they'll be focusing completely on Windows Phone going forward and so even if N9 is a success they won't release a successor with Harmattan.<br />
<br />
Nokia N9 comes with a fundamentally different UX, it's an all screen phone with no buttons and an awesome camera. Body is designed in a completely different way and it looks awesome! I've been a huge fan of Symbian so far but I understand the changing landscape and Symbian definitely lags in terms of hardware support and UX. However, looking at current state of Android, Blackberry and iPhone, N9 definitely looks promising. I really wish Nokia change their stance on N9 or at least brings N9 UX on WP.<br />
<br />
<br />
Look at N9 commercial and let me know what you think about Nokia N9.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/lRbktl-yZPQ/0.jpg" src="https://www.youtube.com/embed/lRbktl-yZPQ?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br /></div>
Ravi Vagadiahttp://www.blogger.com/profile/13516436128051331690noreply@blogger.com0tag:blogger.com,1999:blog-7812912.post-34033192663920766532011-09-11T17:39:00.001+05:302011-09-11T17:39:41.754+05:30Meego Harmattan Web Browser (N950)<div dir="ltr" style="text-align: left;" trbidi="on">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1PlOGnOPEvSvFew4VHTnpThjAvIUWpAqEihkKpFy8FIFUiKy1qKuva6mIStnuiLfMzyb51NVY487oq0gGr1NeDkZgEDF86AevkoT7m2DDT88CHsFjDLeGICXZ6rSCg7fKvZD9WA/s1600/11092011007.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1PlOGnOPEvSvFew4VHTnpThjAvIUWpAqEihkKpFy8FIFUiKy1qKuva6mIStnuiLfMzyb51NVY487oq0gGr1NeDkZgEDF86AevkoT7m2DDT88CHsFjDLeGICXZ6rSCg7fKvZD9WA/s320/11092011007.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Acid 3 Test Nokia N950 Stock Web Browser vs Google Chrome 13.</td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7Fp6RjsHAbSJHTld0ytCC29RVRfBYiUtBkAJJpKj5_7SviWdK-XvljooiYp6NAvXlF-nrNAPLIeJ_o3AH9kmQVbGqC4jgBPhrQBa4bO3GAIkiit6AeMoczutuUjwfCEnyjDlNcg/s1600/07092011001.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7Fp6RjsHAbSJHTld0ytCC29RVRfBYiUtBkAJJpKj5_7SviWdK-XvljooiYp6NAvXlF-nrNAPLIeJ_o3AH9kmQVbGqC4jgBPhrQBa4bO3GAIkiit6AeMoczutuUjwfCEnyjDlNcg/s320/07092011001.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">HTML5TEST - Nokia N950 vs Internet Explorer 8</td></tr>
</tbody></table>
I'll will add more screenshots soon.</div>
Ravi Vagadiahttp://www.blogger.com/profile/13516436128051331690noreply@blogger.com0tag:blogger.com,1999:blog-7812912.post-39831660921849576662011-09-11T16:06:00.000+05:302011-09-11T16:06:41.269+05:30Koza - English to Gujarati Dictionary for Smart Phones<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<br />
<center>
<div dir="ltr" style="text-align: left;" trbidi="on">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://store.ovi.com/content/125926" style="margin-left: auto; margin-right: auto;" target="_new"><img alt="" border="0" src="http://snac.nokia.com/hosted/67/bd/-nokia-n8-6-77e9.jpg" /></a><br />
<br />
<br /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span class="Apple-style-span" style="font-size: small;">Hi! check out Koza, a very simple Gujarati Dictionary for your smart phone.<br /><br /></span><br />
<div style="text-align: left;">
<span class="Apple-style-span" style="font-size: small;">Koza is available for <a href="https://market.android.com/details?id=com.lstViewTest&feature=search_result">Android</a>, <a href="http://store.ovi.com/content/125926">Symbian^1</a> and above, <a href="http://store.ovi.com/content/125926">Meego Harmattan</a> (Nokia N9 & N950) and WP7.</span></div>
<span class="Apple-style-span" style="font-size: small;">
</span></td></tr>
</tbody></table>
</div>
</center>
</div>
Ravi Vagadiahttp://www.blogger.com/profile/13516436128051331690noreply@blogger.com3Bengaluru, Karnataka, India12.9715987 77.594562712.724026199999999 77.2787057 13.2191712 77.910419699999991tag:blogger.com,1999:blog-7812912.post-72713476717315747342011-07-21T00:00:00.000+05:302011-07-21T10:21:24.936+05:30Nokia N950 Developer Device<div style="text-align: center;"><br /></div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoSJ2FOeceyPgNL8TwNIpUz6-GctTrbMl2Js8xOTJuBvYdCQRtRlxaxnhqGbLP8AhQmYR8XqSir87bar9UTIUByppa99ogs3w02bgimsNXoR3_OLRO4RlWGRJjfK5J1TlSdJtrQg/s1600/DSC_0048.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"></a><div style="text-align: center;"><span class="Apple-style-span" ><u><br /></u></span></div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBc0VKY-XRs7mhMMl2OHtufZy3BTQfmPPKKREF3oBoPXzKdFLIhunqgMXKRiZyFrJIBvdi46bpI28BpdurBQEuP30P9RA3lCrhyphenhyphenEwTJrWGxr3ewzdH_A8mn5Rb33rxlFEZwXfTYw/s1600/DSC_0046.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"></a><br />I was desperately waiting for N950 and finally it arrived. I'm yet to get my hands on it as it was shipped to my hometown but anyway I got some pics from home.<div><br /></div><div>so here is my N9 Dev Kit:</div><div><br /></div><div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYtTZcIcLEKDoujB-NSBENg5VOt_3-kgXZAO_oTmgnxaCNkURZgCd6Qv4qwjlDlGKml7NT4LuxpRy2VKABWDH26PNWAtfKpCoS8OlIdbTkclYAyqcu_rVAx_0qoZJaQuNSk9xcKg/s1600/DSC_0037.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYtTZcIcLEKDoujB-NSBENg5VOt_3-kgXZAO_oTmgnxaCNkURZgCd6Qv4qwjlDlGKml7NT4LuxpRy2VKABWDH26PNWAtfKpCoS8OlIdbTkclYAyqcu_rVAx_0qoZJaQuNSk9xcKg/s320/DSC_0037.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5631508296397191186" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 240px; height: 320px; " /></a></div><div style="text-align: center;">Thank you Nokia & DHL :)</div><div><br /></div><div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgShwapZ4FHfPhFQH3b2VMYX83h9J6vb-xb7ZXVtG3k6KNbf6aNer4hZj1oiB67QOPdzkMmJ0zWSE649nvkZdjvVxXN_IvPwhsZYLFxgwsF51K2I2YIUVNFOZ5os1vkQklg5If3gA/s1600/DSC_0043.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgShwapZ4FHfPhFQH3b2VMYX83h9J6vb-xb7ZXVtG3k6KNbf6aNer4hZj1oiB67QOPdzkMmJ0zWSE649nvkZdjvVxXN_IvPwhsZYLFxgwsF51K2I2YIUVNFOZ5os1vkQklg5If3gA/s320/DSC_0043.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5631508300961100850" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 320px; height: 240px; " /></a></div><div style="text-align: center;">can't stop my self from looking at this pic!</div><div style="text-align: center;"><br /></div><div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBc0VKY-XRs7mhMMl2OHtufZy3BTQfmPPKKREF3oBoPXzKdFLIhunqgMXKRiZyFrJIBvdi46bpI28BpdurBQEuP30P9RA3lCrhyphenhyphenEwTJrWGxr3ewzdH_A8mn5Rb33rxlFEZwXfTYw/s1600/DSC_0046.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBc0VKY-XRs7mhMMl2OHtufZy3BTQfmPPKKREF3oBoPXzKdFLIhunqgMXKRiZyFrJIBvdi46bpI28BpdurBQEuP30P9RA3lCrhyphenhyphenEwTJrWGxr3ewzdH_A8mn5Rb33rxlFEZwXfTYw/s320/DSC_0046.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5631508312356638418" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 320px; height: 240px; " /></a><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPvSHk19qarqhUV_Y9fkzcmctFR-mWRwk6REpis6MQ2h10ojSfYuyH-HjsZ8SdPIstPEQtlnQbpGCZviBlP0r4lG-nBhK3-AfVUbvIovxlsFfwoFRyc7tlqkKYu-k5T2BJ2COb0A/s1600/DSC_0045.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPvSHk19qarqhUV_Y9fkzcmctFR-mWRwk6REpis6MQ2h10ojSfYuyH-HjsZ8SdPIstPEQtlnQbpGCZviBlP0r4lG-nBhK3-AfVUbvIovxlsFfwoFRyc7tlqkKYu-k5T2BJ2COb0A/s320/DSC_0045.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5631508309938709394" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 240px; height: 320px; " /></a><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUyv84vLA4sj8HcaqKRA1ixVioJp4AJGg2KzxLJpzKXXq3rw_dzatpcLvK9jKkggXujEvIEh3V0Er-jIqaKif4cI6lPd1s-0vyXoO0XM1PZK14e5nJyIlyTWdxvotMulAjGVNXdA/s1600/DSC_0044.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUyv84vLA4sj8HcaqKRA1ixVioJp4AJGg2KzxLJpzKXXq3rw_dzatpcLvK9jKkggXujEvIEh3V0Er-jIqaKif4cI6lPd1s-0vyXoO0XM1PZK14e5nJyIlyTWdxvotMulAjGVNXdA/s320/DSC_0044.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5631508303433228066" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 320px; height: 240px; " /></a><br /><div style="text-align: center;"><span class="Apple-style-span" ><u><br /></u></span></div></div><div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpsyJal645AQ5hcgfHjaTdhLcNx4Kbkg6fBXa995wwDp8EeBmraqfmuftPwXXjLUHDjrBGf2Rwp0b-5KrHp1I0UPC31-lR0rxkDVkqR2uGFcQB_Trn7-KqG0OzDf1ytCPatXaJdg/s1600/DSC_0047.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpsyJal645AQ5hcgfHjaTdhLcNx4Kbkg6fBXa995wwDp8EeBmraqfmuftPwXXjLUHDjrBGf2Rwp0b-5KrHp1I0UPC31-lR0rxkDVkqR2uGFcQB_Trn7-KqG0OzDf1ytCPatXaJdg/s320/DSC_0047.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5631509129465124594" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 320px; height: 240px; " /></a></div><div style="text-align: center;">Looks awesome! A perfect device for geeks</div><div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoSJ2FOeceyPgNL8TwNIpUz6-GctTrbMl2Js8xOTJuBvYdCQRtRlxaxnhqGbLP8AhQmYR8XqSir87bar9UTIUByppa99ogs3w02bgimsNXoR3_OLRO4RlWGRJjfK5J1TlSdJtrQg/s1600/DSC_0048.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoSJ2FOeceyPgNL8TwNIpUz6-GctTrbMl2Js8xOTJuBvYdCQRtRlxaxnhqGbLP8AhQmYR8XqSir87bar9UTIUByppa99ogs3w02bgimsNXoR3_OLRO4RlWGRJjfK5J1TlSdJtrQg/s320/DSC_0048.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5631509135045269330" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 320px; height: 240px; " /></a></div><div style="text-align: center;">There are somethings which money can't buy, for everything else we've got visa/master or whatever cards :P</div><div><br /></div><div>That's all, can't wait to post my experience with this device and ya, keep checking this space for updates on my projects for Meego.</div>Ravi Vagadiahttp://www.blogger.com/profile/13516436128051331690noreply@blogger.com1tag:blogger.com,1999:blog-7812912.post-32180965915531841332011-07-08T01:30:00.001+05:302011-07-08T01:48:42.471+05:30Control VLC over HTTP<div style="text-align: center;"><br /><div style="text-align: left;">VLC Player offers something called VLC HTTP Interface, enabling it will allow you to control VLC Player from any web browser/mobile VLC Remote App.</div></div><div><br /></div><div><br /></div><div>1. Start VLC, Go to Tools -> Preferences.</div><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7ktM24phx_ZyaV2Qg65BuSmGWZAsFqdHBfLE9WsWx4YQWNnFx2HkXu4sVEKLo3OX-xa0T1DmDzfJ7K6RJ1Gc77cGogKd7Vr_8OLhkrS2IwBqwKSW8eBBvcF_OdwAc1Mw2soq3XQ/s320/1.png" style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 243px;" border="0" alt="" id="BLOGGER_PHOTO_ID_5626706323972184210" /><div style="text-align: center;">2. Select "All" under "Show Settings" in bottom left corner.</div><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi70QPZ00n1DAhdA8PJF2MUkr0N0UM86FupFDoIwIV4hLK3P4PlyF8-wYXBJmY-WNg-OGG8W8jgtgKh4FEIzj71PBkD1isp7hk-KvtlgcsJ_hDY3zjXbV8jeBGXAVXM6plSxB616g/s320/2.PNG" style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 206px;" border="0" alt="" id="BLOGGER_PHOTO_ID_5626706524170105138" /><div style="text-align: center;">3. Click on Main Interfaces -> Select HTTP remote control interface</div><div><br /></div><div><br /></div><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6_6pJHIYzCLlQBxKVIQy1wRmU6U5T1Whc42sCXe_IVi4nrw7BOluHv9Z942JNx6jlmHoupYHQwuxuzhWtuAHBmuJoneGbslVJQxJNIBQQLEV08eZmcXWoeAT857EAV9KXl_jSGw/s320/3.PNG" style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 179px;" border="0" alt="" id="BLOGGER_PHOTO_ID_5626706787975560546" /><div> 4. Finally Click "Save" and restart your VLC Player.</div><div><br /></div><div>you can access the player from any web browser by entering http://[ip address]: [port] </div><div>e.g. http://127.0.01:8080</div><div><br /></div><div>I hope you find this help ful</div>Ravi Vagadiahttp://www.blogger.com/profile/13516436128051331690noreply@blogger.com0tag:blogger.com,1999:blog-7812912.post-84929257546168094872010-04-03T20:05:00.000+05:302011-03-28T11:34:46.476+05:30HypeRoam On Symbian<object height="344" width="425"><param name="movie" value="http://www.youtube.com/v/hYKbZ8WfF5I&hl=en&fs=1"><param name="allowFullScreen" value="true"><param name="allowscriptaccess" value="always"><embed src="http://www.youtube.com/v/hYKbZ8WfF5I&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="344" width="425"></embed></object>Ravi Vagadiahttp://www.blogger.com/profile/13516436128051331690noreply@blogger.com0tag:blogger.com,1999:blog-7812912.post-10120604764366473662009-12-11T22:39:00.000+05:302011-03-28T11:44:33.597+05:30Fixing a bugI'm an open source software enthusiast, and alway wanted to contribute something to the community, as a full time KDE user, and a hardcore KDE fan, I started learning Qt4 after I became familiar with Qt4 I thought of trying my hand on bug fixing, and as regular planet reader, this postRavi Vagadiahttp://www.blogger.com/profile/13516436128051331690noreply@blogger.com0tag:blogger.com,1999:blog-7812912.post-37138532127967562202009-12-06T18:43:00.000+05:302011-03-28T11:44:27.611+05:30Introducing HypeRoam!HypeRoam is a cross-platform <a href="http://en.wikipedia.org/wiki/Cyberoam">Cyberoam</a> client with features such as auto/on-demand account switching & auto reconnecting. It is developed using Qt4.6<br /><br />On Arch Linux:<div><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkie8K1korWKMOSDnxjbnki6jmXQAVX8wcLEIX9cVlkPlu-oqTtn1awyBDEdCObaHmragYOKJMbvJe44o0z7Szy5PQROl_vqxNq4aaECEdWcnMqV_OaQc5co2Vhq1Rs-wylaQp/s1600-h/Hyperoam.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 363px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkie8K1korWKMOSDnxjbnki6jmXQAVX8wcLEIX9cVlkPlu-oqTtn1awyBDEdCObaHmragYOKJMbvJe44o0z7Szy5PQROl_vqxNq4aaECEdWcnMqV_OaQc5co2Vhq1Rs-wylaQp/s400/Hyperoam.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5423671102333281954" /></a><br />On Windows :<br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnDD_mqB9q8TNk2pkCz-Y4slSIXsc0xaJdF-MXtVUEfFRaWN8Wc3GE2zVZkiMLOvOqL6JTwnu_ZD534_3RV6FYVR44XYbyEncuMAyDq0u25pmaLf2nknsFJ6M3zC02ih3KdUKb/s1600-h/hyproam.PNG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 358px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnDD_mqB9q8TNk2pkCz-Y4slSIXsc0xaJdF-MXtVUEfFRaWN8Wc3GE2zVZkiMLOvOqL6JTwnu_ZD534_3RV6FYVR44XYbyEncuMAyDq0u25pmaLf2nknsFJ6M3zC02ih3KdUKb/s400/hyproam.PNG" alt="" id="BLOGGER_PHOTO_ID_5412112288760010018" border="0" /></a></div>Ravi Vagadiahttp://www.blogger.com/profile/13516436128051331690noreply@blogger.com1tag:blogger.com,1999:blog-7812912.post-36431952713031272072009-07-26T12:16:00.000+05:302011-03-28T11:44:27.612+05:30DA-IICT Campus Pics :)<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLIsNU4eCv7F61mMwhbZ-rPbFkXPCGtmtd-aTvnD0izACWZiSQo6qOndeUMJOL5tS0WFhqmjE7cuNW-aBGy6UdXHseR1Q-G7KKZ3qfJBpmjy-2hgQu2UJrs9n-jNihBIOsewCa/s1600-h/1177958222_7c52447a96.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 286px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLIsNU4eCv7F61mMwhbZ-rPbFkXPCGtmtd-aTvnD0izACWZiSQo6qOndeUMJOL5tS0WFhqmjE7cuNW-aBGy6UdXHseR1Q-G7KKZ3qfJBpmjy-2hgQu2UJrs9n-jNihBIOsewCa/s400/1177958222_7c52447a96.jpg" alt="" id="BLOGGER_PHOTO_ID_5362660134822109554" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAgls9hZNV6QBYemDwS0vmCrLOAVrdEkyuw22wR37zmdppFKi7JZxjDO_fTfV8kLbJn8kIiu7zFOzOOnWiyvc1db5RRjxVYAAsRoswwUggm5CYyEDQVtimxCu0L8QvJ2KBDIuo/s1600-h/1177957124_8b7c914922_o_d.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 285px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAgls9hZNV6QBYemDwS0vmCrLOAVrdEkyuw22wR37zmdppFKi7JZxjDO_fTfV8kLbJn8kIiu7zFOzOOnWiyvc1db5RRjxVYAAsRoswwUggm5CYyEDQVtimxCu0L8QvJ2KBDIuo/s400/1177957124_8b7c914922_o_d.jpg" alt="" id="BLOGGER_PHOTO_ID_5362660130798611634" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6kw99_28_RSEMpqjIJXKGow1AtB78RC4UCPhK0MZXaEyDIhbIUlnr54cYLZRKC3Zaib7Pzn9zHD-E1g2Z-0X5ScvzowQT_mqX7e7aLsbRD_KgwI7Xy6fXZ705AsDeMirCaYIe/s1600-h/1177097987_569c87e05c_o_d.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 286px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6kw99_28_RSEMpqjIJXKGow1AtB78RC4UCPhK0MZXaEyDIhbIUlnr54cYLZRKC3Zaib7Pzn9zHD-E1g2Z-0X5ScvzowQT_mqX7e7aLsbRD_KgwI7Xy6fXZ705AsDeMirCaYIe/s400/1177097987_569c87e05c_o_d.jpg" alt="" id="BLOGGER_PHOTO_ID_5362660129875417394" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilK4ZS7gG4UgV8Gh4yl0elQDvV6WjsHZlpOYbpMXXYr-T5EgMhTM_5oEa83zBt5m0bHwhnSihBiMkpJVUKonf9Ir_PEcbS2C851MN94nwhyphenhyphen_BqJggFvzwBvBPOV6gGGeCUegW4/s1600-h/1177095059_b11898d3a5_o_d.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 286px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilK4ZS7gG4UgV8Gh4yl0elQDvV6WjsHZlpOYbpMXXYr-T5EgMhTM_5oEa83zBt5m0bHwhnSihBiMkpJVUKonf9Ir_PEcbS2C851MN94nwhyphenhyphen_BqJggFvzwBvBPOV6gGGeCUegW4/s400/1177095059_b11898d3a5_o_d.jpg" alt="" id="BLOGGER_PHOTO_ID_5362660124471534770" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjC3E1AgzHlXZRx_9m9oHTy7_Bmc0qZVVnGO7cftyu3MeSJVGd1pjRgenS3e10vR-fHfT9pYwgT4NFOWSkDyk-cyDojqgNIKtePPis1BhoHzZY4PkhF6YDnoyw5LTkgILZz8yO0/s1600-h/1743260358_3c7a10fe2c.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjC3E1AgzHlXZRx_9m9oHTy7_Bmc0qZVVnGO7cftyu3MeSJVGd1pjRgenS3e10vR-fHfT9pYwgT4NFOWSkDyk-cyDojqgNIKtePPis1BhoHzZY4PkhF6YDnoyw5LTkgILZz8yO0/s400/1743260358_3c7a10fe2c.jpg" alt="" id="BLOGGER_PHOTO_ID_5362660137582090722" border="0" /></a><br /><3 the beautiful green campus :)<br /><br /><span style="font-size:78%;">pics from flickr</span>Ravi Vagadiahttp://www.blogger.com/profile/13516436128051331690noreply@blogger.com0tag:blogger.com,1999:blog-7812912.post-71580233535148504932009-04-13T08:39:00.000+05:302018-08-17T07:46:01.037+05:30Simple QtS60 App<div dir="ltr" style="text-align: left;" trbidi="on">
Finally I managed to build and run Qt app on my Symbian device (Nokia E51)<br />
<br />
Now this one is a super simple reverse string program, just trying to get my hands dirty.<br />
<br />
check out this snapshot<br />
<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPrOwQmHvHDPM9rO-wJJg3iIKvqnyPvAMzqGYvQtVj6ez2NlGWogJvW4eYSQMEX1DWJWtUHJmDetp2ueXu_WW-Dbz7ex7CTYhjv21nIbhSHPexTm5km_aR8Z4N9oFL5pQrtLx9/s1600-h/Z1l3kb5f.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5324010388944122706" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPrOwQmHvHDPM9rO-wJJg3iIKvqnyPvAMzqGYvQtVj6ez2NlGWogJvW4eYSQMEX1DWJWtUHJmDetp2ueXu_WW-Dbz7ex7CTYhjv21nIbhSHPexTm5km_aR8Z4N9oFL5pQrtLx9/s400/Z1l3kb5f.jpg" style="cursor: pointer; display: block; height: 213px; margin: 0px auto 10px; text-align: center; width: 160px;" /></a>and it works :)<br />
<br />
PS: length of my blog posts indicates twittereffect :P</div>
Ravi Vagadiahttp://www.blogger.com/profile/13516436128051331690noreply@blogger.com0tag:blogger.com,1999:blog-7812912.post-39704664658636568552008-12-23T19:01:00.000+05:302018-08-17T07:43:56.448+05:30Trying Qt for Symbina S60<div dir="ltr" style="text-align: left;" trbidi="on">
Trying to make an app for E51 using qt60 lets see what I can do :)</div>
Ravi Vagadiahttp://www.blogger.com/profile/13516436128051331690noreply@blogger.com0