-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrss.xml
1189 lines (894 loc) · 89.5 KB
/
rss.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Simplicity - @rohit01</title>
<link href="https://www.rohit.io/rss.xml" rel="self" />
<link href="https://www.rohit.io/" />
<updated>2016-12-10T21:13:49+05:30</updated>
<id>https://www.rohit.io/</id>
<author>
<name>Rohit Gupta</name>
<email>hello@rohit.io</email>
</author>
<entry>
<title>The Pedal Stroke – "it never gets easier, you just get faster"</title>
<link href="https://www.rohit.io/blog/the-pedal-stroke-it-never-gets-easier-you-just-get-faster.html"/>
<updated>2016-12-10T18:20:00+05:30</updated>
<id>https://www.rohit.io/blog/the-pedal-stroke-it-never-gets-easier-you-just-get-faster</id>
<content type="html"><p>Last Sunday, my alarm rang with a musical note, I turned it off and saw it’s 4:15 in the morning. Excited, I woke up at the very first sound of it. It was my first test of endurance on a bicycle. I quickly got ready, packed my bag and opened google map to confirm the route I will be following - and the journey started - 5:30 a.m.</p>
<div align="center"><table class="map">
<caption align="bottom">Route to Nandi Hills, round trip distance - 140 km</caption>
<tr>
<td><iframe src="https://www.google.com/maps/embed?pb=!1m34!1m12!1m3!1d267181.29474123695!2d77.36251934132298!3d13.155823622984464!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!4m19!3e0!4m5!1s0x3bae14067cca9bdd%3A0x111bbe37cc24e71a!2sThe+Leela+Palace%2C+Bengaluru%2C+Karnataka!3m2!1d12.960146!2d77.648496!4m5!1s0x3bae16356906d16d%3A0x13be180806d255b7!2sPalace+Ground%2C+Jayamahal%2C+Bengaluru%2C+Karnataka!3m2!1d13.01029!2d77.583947!4m5!1s0x3bb1e445ebfcea17%3A0x1639f72959196608!2sNandi+Hills%2C+Karnataka!3m2!1d13.370154!2d77.6834551!5e0!3m2!1sen!2sin!4v1481320151465" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe></td>
</tr>
</table></div>
<p>It was still dark, shops closed and the roads belonged to just one being - <em>dogs</em>. Safety was the number one thought on my mind. However, after a while, I started thinking, <em>&ldquo;when was the last time I rode a bicycle?&rdquo;</em>. It happened to be close to 5 years ago and the effect was clearly visible. I found myself searching for motorcycle controls sub-consciously. I accidently pressed the gear button twice thinking of horn and indicator lights. While crossing a gas station came, I almost entered there thinking of refueling the tank. At every traffic signal, flyover I was thinking, how easy it felt to zoom past these on a motorcycle. But slowly, I started appreciating these hardships. It was because of the bicycle, I realized the importance of energy conservation. I preferred to slow down instead of applying brakes, especially at the signals.</p>
<p>At around 6:30 a.m, I reached Hebbal flyover. I took a short break, drank some aloe-vera juice which I prepared at home (a big mistake). Feeling refreshed, I started again and went over the awesome expressway flyover. Soon, the aloe-vera juice did its job. I started looking for toilets on top of the flyover. I realized, the stretch of the flyover was many kilometers long before it actually touches the ground. With no option in sight, I continued riding. I was thinking, it is not easy for an amateur like me. I should probably, back off. Finally, the flyover ended at Yelahanka. I searched for available options as the shops were still closed. A security guard was very kind to guide me to a nearby Sulabh International.</p>
<p>At 7:40 a.m, I was a little tired. I took a tea break and continued my journey. To distract myself from the pain, I started looking at the scenery. It was refreshing. I reached halfway at around 8:30 a.m. This boosted my confidence and now I was determined to complete the mission. I pushed myself over numerous mighty flyovers. At last, the highway ended and I was excited to ride on the lush green Nandi Hills road. At around 10:30 a.m, the destination was another 11 km away. Feeling very tired, I took another break. This time, it took me a while to re-assure myself that I can do it. I gently crossed the Nandi Hills traffic check post, 7 km uphill track remained. At 11:50 a.m, 5 km remained. I started struggling and it took around 20 mins for the next 1 km stretch. There was a small roadside stall with few snacks and tender coconuts. Tired and hungry, I had some light breakfast and met few cyclists - Prateek &amp; Abhijit.</p>
<p>After refueling and energizing myself, I continued the journey. The roads were steep, sometimes scary due to loose gravels as well. Finally, I made it at 1:12 pm. It was really satisfying to see the gates of Nandi Hills. Mission accomplished :D</p>
<blockquote><p>When my legs hurt, I say: &ldquo;Shut up legs! Do what I tell you to do!&rdquo; – Jens Voigt</p></blockquote>
<table class="image">
<caption align="bottom">Hair pin curves at Nandi Hills</caption>
<tr>
<td><img style="margin-bottom: 0px" src="https://www.rohit.io/res/posts/the-pedal-stroke-it-never-gets-easier-you-just-get-faster/hair-pin-at-nandi-hills.jpg" alt="Hair pin curves at Nandi Hills"/></td>
</tr>
</table>
<p>I had some chat with my new cyclist friends. We had a brief photo session and then decided to travel back together. Riding downhill was amazing and super easy. We overtook many motorcycles, cars slowed us down as the road was not wide enough to overtake them. Riding back to Bangalore was easier than I thought. It is at a lower elevation. However, to keep up with my new friends, I stretched a lot without breaks. At one point, just before the airport flyover, I was completely exhausted. We took a small break and continued till the next food outlet - McDonald&rsquo;s. They planned to go on a different route from there. I bid them goodbye, it was 4 p.m.</p>
<p>Completely exhausted, I decided to take a big 30-40 mins break. My full lower body was paining like hell. I had the first real meal of the day and made a few phone calls. It was relaxing. I decided to start again at 4:40 p.m, around 35 km to go. Slowly and steadily, I continued my journey and reached home at 7 p.m.</p>
<div style="position: relative; padding-bottom: 81%; height: 0; overflow: hidden;"><iframe id="iframe" src="https://www.rohit.io/photos/album/endurance-to-nandi-hills/gallery/" scrolling="no" frameborder="0"style='width:100%; height:100%; position: absolute; top:0; left:0;' ></iframe></div>
<p><br /></p>
<p>Looking back, I realize, I made a few mistakes:</p>
<ul>
<li>Carried too much luggage - 2.5-liter water, eatables, camera, headphones, first aid, etc. I ended up emptying my bottles on the road to reduce weight. It&rsquo;s advisable to carry as little as possible. Most cyclists carry just a bottle of water/electrolyte drink along with few eatables like biscuits.</li>
<li>Aloe-vera juice is not an alternative to an electrolyte drink. Coconut water is best.</li>
<li>Mountain bike (MTB) is not suitable for highway tours.</li>
</ul>
<p>Finally, thanks <a href="https://twitter.com/krishnaghatti">@krishnaghatti</a> for lending your bicycle to me. You are awesome. <strong>And as always, Thanks for reading :-)</strong></p>
</content>
<author>
<name>Rohit Gupta</name>
<uri>https://www.rohit.io/about/</uri>
</author>
</entry>
<entry>
<title>Devops Meetup @ Ola</title>
<link href="https://www.rohit.io/blog/devops-meetup-ola.html"/>
<updated>2016-07-12T01:00:00+05:30</updated>
<id>https://www.rohit.io/blog/devops-meetup-ola</id>
<content type="html"><p>Last Saturday, we hosted a DevOps Meetup at <a href="https://www.olacabs.com/">Ola</a> Bangalore office (EGL). We were delighted to meet so many people, talk about latest trends in DevOps and network with each other.<br/>
Here are <a href="/photos/album/devops-meetup-ola/gallery/">some exciting pics from the event</a>:</p>
<div style="position: relative; padding-bottom: 81%; height: 0; overflow: hidden;"><iframe id="iframe" src="https://www.rohit.io/photos/album/devops-meetup-ola/gallery/" scrolling="no" frameborder="0"style='width:100%; height:100%; position: absolute; top:0; left:0;' ></iframe></div>
<h1>Tech Talks on DevOps</h1>
<p>We had 5 sessions which covered a variety of topics.</p>
<h3>Micro-services at scale</h3>
<hr />
<p><img src="https://www.rohit.io/res/posts/devops-meetup-ola/images/rohit.jpg" width="50%" height="50%" align="right"></p>
<p><strong>Speaker</strong>: <a href="https://twitter.com/rohit01">@rohit01</a>, Production Engineer II at Ola<br/>
<strong>Slides</strong>: <a href="https://www.rohit.io/res/posts/devops-meetup-ola/containers-at-scale-with-mesos/">click here</a><br/>
<strong>Summary</strong>: In this talk, I spoke about how a monolithic application can be converted into microservices. I used a calculator rest API <a href="https://hub.docker.com/r/rohit01/calc_api/">docker image</a> as an example. Demonstrated, how easy it is to create micro-services using Mesos.</p>
<h3>AWS managed services to create serverless applications</h3>
<hr />
<p><img src="https://www.rohit.io/res/posts/devops-meetup-ola/images/chandra.jpg" width="50%" height="50%" align="right"></p>
<p><strong>Speaker</strong>: <a href="https://twitter.com/chandrashekar_m">@chandrashekar_m</a>, Architect at Knowlarity Communications<br/>
<strong>Slides</strong>: <a href="http://www.slideshare.net/AmazonWebServices/aws-may-2016-webinar-series-deep-dive-on-serverless-web-applications">click here</a><br/>
<strong>Summary</strong>: In this talk, Chandra talked about AWS managed services. He talked about AWS lambda, Redshift, DynomoDB among others to create serverless web applications. He also gave an example of Knowlarity use case and explained, how startups can leverage it to have a better focus on business.</p>
<h3>Salt - Deploy, Monitor, React</h3>
<hr />
<p><img src="https://www.rohit.io/res/posts/devops-meetup-ola/images/nabarun.jpg" width="50%" height="50%" align="right"></p>
<p><strong>Speaker</strong>: <a href="https://twitter.com/NabarunChatterj">@NabarunChatterj</a>, Production Engineer I at Ola<br/>
<strong>Slides</strong>: <a href="https://www.rohit.io/res/posts/devops-meetup-ola/salt-deploy-monitor-react.pdf">click here</a><br/>
<strong>Summary</strong>: In this talk, Nabarun gave an introduction about Saltstack. He talked about salt minions, agent vs agentless approach for configuration management and various components of Saltstack. He explained concepts around states, grains, pillars, reactors as well as beacons. Post demo, he also shared his tutorial repository: <a href="https://github.com/nabarunchatterjee/salt-tutorial">https://github.com/nabarunchatterjee/salt-tutorial</a></p>
<h3>Let&rsquo;s talk DNS</h3>
<hr />
<p><img src="https://www.rohit.io/res/posts/devops-meetup-ola/images/abhinav.jpg" width="50%" height="50%" align="right"></p>
<p><strong>Speaker</strong>: <a href="https://twitter.com/rohit01">@mehta_</a>, Software Architect at ZipGo<br/>
<strong>Slides</strong>: <a href="http://www.slideshare.net/developeratworks/lets-talk-dns">click here</a><br/>
<strong>Summary</strong>: In this talk, Abhinav talked DNS service. He started with basics, showed a live demo of how DNS resolution works and slowly moved into advanced topics. DNS root servers got people really excited.</p>
<h3>Productivity Tool(s)</h3>
<hr />
<p><img src="https://www.rohit.io/res/posts/devops-meetup-ola/images/sharad.jpg" width="50%" height="50%" align="right"></p>
<p><strong>Speaker</strong>: <a href="https://twitter.com/sharad1087">@sharad1087</a>, Software Professional at Sandvine<br/>
<strong>Slides</strong>: <a href="https://www.rohit.io/res/posts/devops-meetup-ola/productivity-tools/">click here</a><br/>
<strong>Summary</strong>: In this talk, Sharad talked about OpenGrok, which is a fast and usable source code search and cross reference engine. He talked about how it helped improve the productivity of NOC/support engineers. He also talked about select search chrome extension and vim plugins to talk it to the next level.</p>
<h3>Awesome Audience!</h3>
<p><img src="https://www.rohit.io/res/posts/devops-meetup-ola/images/group_pic.jpg" width="100%" height="100%" align="center"></p>
<h3>Tweets on this event :-D</h3>
<div class="tweetline" align="center">
<a class="twitter-timeline" href="https://twitter.com/hashtag/DMAtOla" data-widget-id="751442179281653760">#DMAtOla Tweets</a>
</div>
<p><strong>And as always, Thanks for reading :)</strong></p>
</content>
<author>
<name>Rohit Gupta</name>
<uri>https://www.rohit.io/about/</uri>
</author>
</entry>
<entry>
<title>29 questions to ask yourself if you’re in devops</title>
<link href="https://www.rohit.io/blog/29-questions-to-ask-yourself-if-you-are-in-devops.html"/>
<updated>2015-07-10T20:10:00+05:30</updated>
<id>https://www.rohit.io/blog/29-questions-to-ask-yourself-if-you-are-in-devops</id>
<content type="html"><p>A few days ago, I had an opportunity to meet and interact with <a href="https://github.com/cachedout">Mike Place</a>, who works as a developer at <a href="https://saltstack.com/">Saltstack</a>. We had an interesting conversation about devops and how things work in the valley. Mike explained the growing importance of devops in organizations and the rise of devops as a culture that aims to collaboratively deliver systems into production, reliably and effectively.</p>
<p>He said <em>“Businesses are ever-changing. Engineers ship code, dozens of times each day. Every change in production has some probability of failure and business can get impacted due to that very failure. Risk is a combination of both of them. If only one of them is high, the risk may still be low. But if both of them are high, it can be a disaster. <strong>The role of devops is to minimize the risk of every change.</strong>”</em></p>
<p>He asked a series of questions to self-evaluate the health of the devops team in any organization. The questions are an eye opener to every devops engineer.</p>
<p>Here are 29 questions that you need to ask yourself if you are in devops. Go ahead and rate yourself on a scale of 1 to 5.</p>
<ol>
<li><p>Do you automate everything that can be automated and makes sense to automate?</p></li>
<li><p>How easy is it to revert the changes?</p></li>
<li><p>Do you use role based configuration management?</p></li>
<li><p>Do you automate the creation of base system configuration (like OS installation, launching VMs, etc.)?</p></li>
<li><p>Is all your code stored in some version control system, viz. Git, mercurial, svn?</p></li>
<li><p>Does everyone (developers, devops, QA, etc.) in your organization knows where to look for code?</p></li>
<li><p>Can you build your code in ONE step? (5 points for one step build, -n if number of steps n is greater than 1)</p></li>
<li><p>Can you deploy your code in ONE step? (5 points for one step deploy, -n if number of steps n is greater than 1)</p></li>
<li><p>Do you have audited log for every deployment?</p></li>
<li><p>Do you release frequent small changes or club smaller changes into a big one to release less frequently?</p></li>
<li><p>Do you always ship master or feature branches?</p></li>
<li><p>Do you use feature flags to enable or disable a feature?</p></li>
<li><p>Do you do private beta releases?</p></li>
<li><p>Do you use AB Testing?</p></li>
<li><p>Do you do dark Launches?</p></li>
<li><p>Do you have metrics shared between Dev and Ops?</p></li>
<li><p>Do you have Application level metrics?</p></li>
<li><p>Do you co-relate application and system metrics?</p></li>
<li><p>Do you make changes based on the application or system metrics?</p></li>
<li><p>Do you have notifications based on metrics?</p></li>
<li><p>Do you have respect for other teams?</p></li>
<li><p>Do you stereotype others?</p></li>
<li><p>How hard it is to say YES?</p></li>
<li><p>Does your team hide things?</p></li>
<li><p>How often Dev talks about the impact with Ops?</p></li>
<li><p>Does Dev and Ops maintain checklist or plans?</p></li>
<li><p>Does Dev have access to production?</p></li>
<li><p>Do you practice fire drills?</p></li>
<li><p>Are there developers on call rotations?</p></li>
</ol>
<p>What&rsquo;s your score? Don&rsquo;t worry, you don&rsquo;t need to share it. It&rsquo;s more important to ask yourself these questions often than focusing only on the answers.</p>
<p>Should you need any clarification regarding these questions, don’t hesitate to comment below. <strong>And as always, Thanks for reading :-)</strong></p>
</content>
<author>
<name>Rohit Gupta</name>
<uri>https://www.rohit.io/about/</uri>
</author>
</entry>
<entry>
<title>Ansible Meetup @ Knowlarity</title>
<link href="https://www.rohit.io/blog/ansible-meetup-knowlarity.html"/>
<updated>2015-04-12T22:10:00+05:30</updated>
<id>https://www.rohit.io/blog/ansible-meetup-knowlarity</id>
<content type="html"><p>Yesterday, we hosted an Ansible Meetup at at <a href="https://www.knowlarity.com/">Knowlarity</a> Bangalore office. It was a wonderful gathering, interactive sessions which included cute as well as dangerous questions :p<br/>
Here are some exciting pics from the event:</p>
<div style='position: relative; padding-bottom: 81%; height: 0; overflow: hidden;'><iframe id='iframe' src='https://flickrit.com/slideshowholder.php?height=80&size=big&speed=3.0&count=100&setId=72157651504518608&click=true&counter=true&theme=1&thumbnails=1&transition=2&layoutType=responsive&sort=0' scrolling='no' frameborder='0'style='width:100%; height:100%; position: absolute; top:0; left:0;' ></iframe></div>
<h1>Tech Talks on Ansible</h1>
<p>We had 5 sessions which covered Introduction to Ansible, advanced topics as well as contributing to Ansible.</p>
<h3>Getting started with Ansible-playbook</h3>
<hr />
<p><img src="https://www.rohit.io/res/posts/ansible-meetup-knowlarity/images/ravdeep.jpg" width="50%" height="50%" align="right"></p>
<p><strong>Speaker</strong>: <a href="https://twitter.com/ravdeep003">@ravdeep003</a><br/>
<strong>Slides</strong>: <a href="https://www.rohit.io/res/posts/ansible-meetup-knowlarity/getting-started-with-ansible-playbook/slides.pdf">click here</a><br/>
<strong>Summary</strong>: In this talk, Ravdeep gave an introduction to Ansible playbooks, inventory, modules, variables and a typical directory structure of an Ansible project. The session was very interactive with many participants completely new to Ansible. The demo session, especially got people excited.</p>
<h3>Web App, Automated deployment</h3>
<hr />
<p><img src="https://www.rohit.io/res/posts/ansible-meetup-knowlarity/images/adik.jpg" width="50%" height="50%" align="right"></p>
<p><strong>Speaker</strong>: <a href="https://twitter.com/adityak2190">@adityak2190</a><br/>
<strong>Slides</strong>: <a href="https://www.adikrishnan.in/static/preso/ansible-sitedeploy.html">click here</a><br/>
<strong>Summary</strong>: In this talk, Aditya showed a complete end to end automation of an application using Ansible. The application was a Django website. The application was deployed with nginx, wsgi (running under gunicorn) and SQLite database. The application was deployed from scratch in less than 5 mins. The source code of the demo application is in his <a href="https://github.com/adityak2190/sitedeploy">github repository</a>.</p>
<h3>Running Ansible via API</h3>
<hr />
<p><img src="https://www.rohit.io/res/posts/ansible-meetup-knowlarity/images/hussain.jpg" width="50%" height="50%" align="right"></p>
<p><strong>Speaker</strong>: <a href="https://twitter.com/ImNagri">@ImNagri</a><br/>
<strong>Slides</strong>: <a href="https://www.rohit.io/res/posts/ansible-meetup-knowlarity/running-ansible-via-api/slides.pdf">click here</a><br/>
<strong>Summary</strong>: In this talk, Hussain demonstrated how to use Ansible as a python library and expose custom APIs. His project used python flask to expose web APIs which was called from a remote server. The remote server had a beautiful WebUI built using bootstrap and javascript. The architecture was discussed in detail.</p>
<h3>AWS Management with Ansible</h3>
<hr />
<p><img src="https://www.rohit.io/res/posts/ansible-meetup-knowlarity/images/rohit.jpg" width="50%" height="50%" align="right"></p>
<p><strong>Speaker</strong>: <a href="https://twitter.com/rohit01">@rohit01</a><br/>
<strong>Slides</strong>: <a href="https://www.rohit.io/res/posts/ansible-meetup-knowlarity/aws-management-with-ansible">click here</a><br/>
<strong>Summary</strong>: In this talk, I did a demo of Ansible cloud modules - AWS EC2 and Route53. The talk started with a quick introduction to AWS followed by a live demo. In the demo, I uploaded my public ssh key into AWS EC2, created a security group, launched two WordPress instances, created an ELB, register the newly created instances behind ELB and added an entry in Route53 nameserver. It demonstrated the power of Ansible to manage public clouds and define infrastructure in the form of simple YAML files.</p>
<h3>Contributing to Ansible</h3>
<hr />
<p><img src="https://www.rohit.io/res/posts/ansible-meetup-knowlarity/images/deepak.jpg" width="50%" height="50%" align="right"></p>
<p><strong>Speaker</strong>: <a href="https://twitter.com/hellodiku">@hellodiku</a><br/>
<strong>Slides</strong>: <a href="https://www.rohit.io/res/posts/ansible-meetup-knowlarity/contributing-to-ansible/slides.pdf">click here</a><br/>
<strong>Summary</strong>: In this talk, Deepak talked about writing custom Ansible modules. The talk started with a quick introduction to key concepts and then focused more on code structure. The demo highlighted the coding structure of Ansible project, while keeping it simple. His demo module is hosted in his <a href="https://github.com/hellodk/ansible-meetup-bangalore">github repository</a></p>
<h3>Say Cheers!</h3>
<p><img src="https://www.rohit.io/res/posts/ansible-meetup-knowlarity/images/group_pic.jpg" width="100%" height="100%" align="center"></p>
<h3>Tweets on this event :-D</h3>
<div class="tweetline" align="center">
<a class="twitter-timeline" href="https://twitter.com/hashtag/AnsibleAtKnowlarity" data-widget-id="587290017782870016">#AnsibleAtKnowlarity Tweets</a>
</div>
<p><strong>And as always, Thanks for reading :)</strong></p>
</content>
<author>
<name>Rohit Gupta</name>
<uri>https://www.rohit.io/about/</uri>
</author>
</entry>
<entry>
<title>Devops Meetup @ Knowlarity</title>
<link href="https://www.rohit.io/blog/devops-meetup-knowlarity.html"/>
<updated>2015-02-21T21:00:00+05:30</updated>
<id>https://www.rohit.io/blog/devops-meetup-knowlarity</id>
<content type="html"><p>Today, we hosted a <a href="https://www.meetup.com/devops-bangalore/">DevOps Bangalore Group</a> meetup at <a href="https://www.knowlarity.com/">Knowlarity</a> office. A picture can tell a thousand words. So, let&rsquo;s enjoy the story of this event with a slideshow (photo courtesy - <a href="https://twitter.com/soumpaul">@soumpaul</a>).</p>
<div style='position: relative; padding-bottom: 81%; height: 0; overflow: hidden;'><iframe id='iframe' src='https://flickrit.com/slideshowholder.php?height=80&size=big&speed=3.0&count=100&setId=72157650942872382&click=true&counter=true&theme=1&thumbnails=1&transition=2&layoutType=responsive&sort=0' scrolling='no' frameborder='0'style='width:100%; height:100%; position: absolute; top:0; left:0;' ></iframe></div>
<h1>Tech Talks</h1>
<p>We had a bunch of Devops related tech talks delivered by well known speakers from IT industry. Here&rsquo;s the schedule with presentation slides:</p>
<ul>
<li><p><em>11:00 AM</em>: <strong>RIP Nagios. Hello Docker Shinken!</strong><br/>
<em>Speaker</em>: Rohit Gupta (me)<br/>
<em>Synopsis</em>: <a href="/blog/rip-nagios-hello-docker-shinken.html">RIP Nagios. Hello Docker Shinken!</a><br/>
<em>Slides link</em>: <a href="https://www.rohit.io/res/posts/devops-meetup-knowlarity/rip_nagios_hello_docker_shinken/">RIP Nagios. Hello Docker Shinken!</a></p></li>
<li><p><em>11:30 AM</em>: <strong>Salt-Stack for Configuration Management</strong><br/>
<em>Speaker</em>: Subhankar Sengupta<br/>
<em>Slides link</em>: <a href="http://www.slideshare.net/DevOpsBangalore/salt-stack-subhankar-sengupta">Salt Stack</a></p></li>
<li><p><em>12:00 PM</em>: <strong>Analyzing logs using ElasticSearch, Fluentd, Kibana</strong><br/>
<em>Speaker</em>: Ravdeep Pasricha<br/>
<em>Twitter</em>: <a href="https://twitter.com/ravdeep003">@ravdeep003</a><br/>
<em>Slides link</em>: <a href="https://www.rohit.io/res/posts/devops-meetup-knowlarity/Analyzing_logs_using_EFK.pdf">Analyzing logs using EFK</a></p></li>
<li><p><em>12:30 PM</em>: <strong>Lunch &amp; Networking</strong><br/>
<em>Sponsored by <a href="https://www.knowlarity.com/">Knowlarity</a></em></p></li>
<li><p><em>01:00 PM</em>: <strong>Apache Falcon (Data Pipeline Onboarding)</strong><br/>
<em>Speaker</em>: Sanjeev Tripurari<br/>
<em>Slides link</em>: <a href="http://www.slideshare.net/DevOpsBangalore/apache-falcon-sanjeev-tripurari">Apache Falcon</a></p></li>
<li><p><em>01:30 PM</em>: <strong>Puppet for Configuration Management(Demo)</strong><br/>
<em>Speaker</em>: Gourav Shah<br/>
<em>Twitter</em>: <a href="https://twitter.com/gouravshah">@gouravshah</a><br/>
<em>Slides link</em>: <a href="https://prezi.com/kqpauy3eftli/package-nginx/">Puppet</a></p></li>
<li><p><em>02:00 PM</em>: <strong>Introduction to Vagrant</strong><br/>
<em>Speaker</em>: Chandra<br/>
<em>Twitter</em>: <a href="https://twitter.com/chandrashekar_m">@chandrashekar_m</a><br/>
<em>Slides link</em>: <a href="https://www.rohit.io/res/posts/devops-meetup-knowlarity/Vagrant_Talk.pdf">Vagrant Talk</a></p></li>
</ul>
<p><strong>And as always, Thanks for reading :)</strong></p>
</content>
<author>
<name>Rohit Gupta</name>
<uri>https://www.rohit.io/about/</uri>
</author>
</entry>
<entry>
<title>RIP Nagios. Hello Docker Shinken!</title>
<link href="https://www.rohit.io/blog/rip-nagios-hello-docker-shinken.html"/>
<updated>2014-12-18T18:00:00+05:30</updated>
<id>https://www.rohit.io/blog/rip-nagios-hello-docker-shinken</id>
<content type="html"><p>Nagios is a great IT infrastructure monitoring tool. Some people still consider it as an IT standard for monitoring. But as with any software, there is always competition. I personally find Shinken to be one of the most compatible, modern and dare I say, a better alternative to Nagios. In this post, I will do a quick comparison between the two tools, show you reasons to migrate and more importantly how to migrate your current Nagios setup to Shinken in less than 10 minutes! No, seriously!</p>
<p><strong>Quick Introduction to Shinken</strong>: Shinken was written by <a href="https://twitter.com/naparuba">Jean Gabès</a> as a proof of concept for a new Nagios architecture. He proposed it as the new development branch of Nagios 4. When this proposal was turned down by Nagios authors, Shinken became an independent network monitoring software application compatible with Nagios. Shinken is basically a Nagios Core replacement written in python.</p>
<h1>Shinken vs Nagios:</h1>
<p>At <a href="https://www.knowlarity.com/">Knowlarity</a>, we did the big switch from Nagios to Shinken for our complete infrastructure in just about a week. Having used both Nagios and Shinken now, I can tell you how Shinken has helped solve some of the fundamental problems which we faced using Nagios.</p>
<ul>
<li><p><strong>Reliability</strong>: I was working on a NRPE notification plugin and deployed it in Nagios. I turned down a service to test it, but to my surprise Nagios was showing the status as OK (green). The last executed time got updated in the UI but nothing happened under the hood. It was a random issue and I suspect it could have been because of a old version of Nagios 3.x. I have been using Shinken for a while now (even before the migration in Knowlarity), and I have never once faced these sort of issues. The UI always displays the truth.</p></li>
<li><p><strong>Active Development</strong>: I updated Nagios to the latest 4.x. The first impression was that nothing had changed except for the colors in the user interface. In contrast, the complete architecture of Shinken 2.0 has been revamped. It has a modular design, and easy installation, and configuration features. Kudos to the Shinken community.</p></li>
<li><p><strong>Multi DC deployment</strong>: At Knowlarity, we have data-centers in multiple cities across multiple countries. It is a known fact that multi-DC deployment using Nagios is first of all difficult, and looks like a hack when deployed. In comparison, Shinken’s distributed architecture is amazingly simple. All of Shinken’s configuration is still managed in a single place. Here you just add a new shinken-poller in all your data centers and voila, you’re done.</p></li>
<li><p><strong>Performance</strong>: Nagios is written in C and is a lot faster than Shinken. However, Shinken has some exciting performance improvement modules like <a href="https://github.com/shinken-monitoring/mod-booster-nrpe">booster-nrpe</a>.</p></li>
<li><p><strong>Modern</strong>: As opposed to Nagios tired old features, Shinken has support for dynamic configuration, AWS hosts, a module installer and many more rich support features. The Shinken community is very active and responsive.</p></li>
<li><p><strong>User Interface</strong>: The Nagios UI, albeit old, is very feature rich. Shinken has a sleek and modern interface - WebUI. WebUI is really easy to use but lack features. However, there are many third party interfaces available. I like to use WebUI and <a href="http://www.thruk.org/">Thruk</a> at the same time. Thruk interface is similar to that of Nagios. So hardcore Nagios users will still feel at home.</p></li>
<li><p><strong>Easy Switch</strong>: Probably the best thing about shinken is that it is like a plug and play replacement of Nagios core. Almost 100% compatible. Just dump your Nagios configuration in Shinken and it works. Take a look at their documentation for more details: <a href="http://shinken.readthedocs.org/en/latest/01_about/whatsnew.html">Feature comparison between Shinken and Nagios</a></p></li>
</ul>
<h1>Switch to Shinken in 3 easy steps:</h1>
<ol>
<li><p>Install <a href="https://docs.docker.com/installation/#installation">docker</a>. Select and pull one of the following docker image:</p>
<ul>
<li><strong>Shinken</strong>: It has basic shinken installation along with few must have modules like WebUI (Web Interface), standard nrpe plugins plus a few extra ones, nrpe-booster support and a lightweight web server (nginx). Link: <a href="https://registry.hub.docker.com/u/rohit01/shinken/">https://registry.hub.docker.com/u/rohit01/shinken/</a></li>
<li><strong>Shinken Thruk</strong>: Shinken (as written above) + Thruk web interface. Internal web server nginx is replaced with apache2. Link: <a href="https://registry.hub.docker.com/u/rohit01/shinken_thruk/">https://registry.hub.docker.com/u/rohit01/shinken_thruk/</a></li>
<li><strong>Shinken Thruk Graphite</strong>: Shinken Thruk (as written above) + graph support in WebUI. Graphs are stored and served using graphite. Retention is configured for 1 month on a per 2 minute basis. Link: <a href="https://registry.hub.docker.com/u/rohit01/shinken_thruk_graphite/">https://registry.hub.docker.com/u/rohit01/shinken_thruk_graphite/</a></li>
</ul>
<p> Sample execution: <code>$ sudo docker pull rohit01/shinken</code></p></li>
<li><p>Clone project <strong><a href="https://github.com/rohit01/docker_shinken">docker_shinken</a></strong>. You will see three directories corresponding to the docker images mentioned above. Go inside the directory corresponding to your selected image. You will see a directory named: <a href="https://github.com/rohit01/docker_shinken/tree/master/shinken_basic/custom_configs">custom_configs/</a>. Dump your Nagios configuration here. A default configuration for monitoring docker host is already defined. User login details can be updated in file: <a href="https://github.com/rohit01/docker_shinken/blob/master/shinken_basic/custom_configs/htpasswd.users">htpasswd.users</a>. File contains the documentation in comments.</p></li>
<li><p>Run the docker image. Expose TCP port 80 to the base machine and mount custom_configs directory to /etc/shinken/custom_configs. Sample execution:</p>
<pre><code class="`"> $ git clone https://github.com/rohit01/docker_shinken.git
$ cd docker_shinken/shinken_basic
$ sudo docker run -d -v "$(pwd)/custom_configs:/etc/shinken/custom_configs" -p 80:80 rohit01/shinken
</code></pre></li>
</ol>
<p>Open your browser and visit these urls (Default credential - admin/admin):</p>
<ol>
<li><strong>WebUI</strong>: <a href="http://localhost/">http://localhost/</a>. Available on all three images.</li>
<li><strong>Thruk UI</strong>: <a href="http://localhost/thruk/">http://localhost/thruk/</a>. Available on shinken_thruk and shinken_thruk_graphite images.</li>
<li><strong>Graphs</strong>: <a href="http://localhost/service/docker_shinken/http_port_7770#graphs">http://localhost/service/docker_shinken/http_port_7770#graphs</a>. Available only on shinken_thruk_graphite image.</li>
</ol>
<h3>Please Note:</h3>
<ul>
<li>Configuration changes are required only in one place/directory: custom_configs</li>
<li>The nrpe plugins installation directory is /usr/lib/nagios/plugins.</li>
<li>If you are using custom NRPE plugins, mount your plugins directory inside docker container at /usr/local/custom_plugins. Modify the resource path accordingly.</li>
</ul>
<p>If you have any question, I will be happy to answer them in comments. <strong>And as always, Thanks for reading :)</strong></p>
</content>
<author>
<name>Rohit Gupta</name>
<uri>https://www.rohit.io/about/</uri>
</author>
</entry>
<entry>
<title>Why static blog site is a good idea!</title>
<link href="https://www.rohit.io/blog/why-static-blog-site-is-a-good-idea.html"/>
<updated>2014-12-08T20:40:00+05:30</updated>
<id>https://www.rohit.io/blog/why-static-blog-site-is-a-good-idea</id>
<content type="html"><p>Starting a blog is fairly easy. There are many free blog hosting providers in the internet. However, each of them has some limitation on the level of customization. So, I decided to host it myself and figure out the best alternative.</p>
<h1>First Steps</h1>
<p>These were the first steps, I took while starting my blog - <a href="http://www.rohit.io">Simplicity</a>:</p>
<ol>
<li><p><strong>Domain</strong>: Domain is the most important identity of a blog. Free domains are mostly bound to a hosting provider and help them more than the owner. So, I decided to get a personal domain - <a href="http://www.rohit.io">rohit.io</a>.</p></li>
<li><p><strong>Static vs Dynamic</strong>: Personal blogs are mostly static. Only blog posts get added every few days and comments by visitors. So, I decided to go with a static website generator - <a href="http://jekyllrb.com/">Jekyll</a>. For comments, I added the <a href="https://disqus.com/">Disqus</a> plugin.</p></li>
<li><p><strong>Hosting provider</strong>: Github has support for hosting Jekyll websites. Plus, it&rsquo;s highly reliable, zero maintenance and free. Problem solved!</p></li>
<li><p><strong>Design</strong>: The inbuilt theme of Jekyll is very basic. I searched few Jekyll websites and decide to reuse this one: <a href="http://rsms.me">http://rsms.me</a> / <a href="https://github.com/rsms/rsms.github.com">https://github.com/rsms/rsms.github.com</a>. Source code was under creative commons license (friendly).</p></li>
<li><p><strong>Search</strong>: <a href="https://www.google.co.in/cse/">Google custom search engine</a> was already configured in the code. I updated the same to point to <a href="http://www.rohit.io">Simplicity</a> blog.</p></li>
<li><p><strong>Google Analytics</strong>: This was, again, already configured in the code. Updated the same with the ID generated for <a href="http://www.rohit.io">Simplicity</a>.</p></li>
</ol>
<h1>Next Steps</h1>
<p>I had a decent blog site. However, there were some unsolved problems like SEO, social plugins, link share previews, etc. Since, the website source code was not mine, it was difficult to fix. I did a complete revamp of the website to fix this. Post this, I was able to solve the following problems:</p>
<ul>
<li><strong>SEO</strong>: Learned about SEO stuff and handled most of the meta tags as per standard.</li>
<li><strong>Page Speed</strong>: Google <a href="https://developers.google.com/speed/pagespeed/insights/">PageSpeed Insight</a> tool is a fantastic tool. It helped me to improve the website structure. I also integrated <a href="https://www.cloudflare.com/">cloudflare CDN</a> to improve latency. The score of <a href="http://www.rohit.io">Simplicity</a> in PageSpeed Insight tool is now <strong>96/100</strong> :-D</li>
<li><strong>Twitter card</strong>: Added <a href="https://dev.twitter.com/cards/overview">twitter card</a> support for previews in twitter for links.</li>
<li><strong><a href="http://ogp.me/">The Open Graph protocol</a></strong>: Added open graph related tags. This is used by Facebook and Linkedin for generating link previews.</li>
<li><strong>Search</strong>: Google CSE depends on Google indexing + the search results were displayed at google website. I wanted to have an in-house search feature. I found this awesome Jekyll plugin: <a href="https://github.com/slashdotdash/jekyll-lunr-js-search">jekyll lunr js search</a></li>
<li><strong>Google Analytics</strong>: The bounce rate at home page was reduced to almost half. This was a bonus :-)</li>
</ul>
<p><strong>Gyaan</strong>: Static websites are great. Page load times are great. Hosting is free, reliable and scalable. 100% customization is possible. Basic dynamic features can be worked out using javascript. However, in the initial stages, it require&rsquo;s a lot of development effort. Changing themes is also a pain.</p>
<p>The source code of <a href="http://www.rohit.io">Simplicity</a> is available <a href="https://github.com/rohit01/rohit01.github.io">here</a>. <strong>And as always, Thanks for Reading :-)</strong></p>
</content>
<author>
<name>Rohit Gupta</name>
<uri>https://www.rohit.io/about/</uri>
</author>
</entry>
<entry>
<title>PythonExpress @ DSCE</title>
<link href="https://www.rohit.io/blog/pythonexpress-dsce.html"/>
<updated>2014-09-08T01:45:00+05:30</updated>
<id>https://www.rohit.io/blog/pythonexpress-dsce</id>
<content type="html"><p>Spent an exciting weekend with college students of Dayananda Sagar College of Engineering (DSCE), Bangalore. They conducted a python workshop on 6-7 Sept, 2014 and invited me as a trainer (Thanks to <a href="http://www.pythonexpress.in/">pythonexpress</a>).</p>
<p><img src="https://www.rohit.io/res/posts/pythonexpress-dsce/group_pic.jpg" alt="Me with DSCE students" /></p>
<h2>Slides</h2>
<ul>
<li><a href="https://www.rohit.io/res/posts/pythonexpress-dsce/slides/python_basics.html">Python basics</a></li>
<li><a href="https://www.rohit.io/res/posts/pythonexpress-dsce/slides/ds_and_functions.html">Data structures and functions</a></li>
<li><a href="https://www.rohit.io/res/posts/pythonexpress-dsce/slides/python_development.html">Python development</a></li>
</ul>
<p><strong>Thanks for Reading :-)</strong></p>
</content>
<author>
<name>Rohit Gupta</name>
<uri>https://www.rohit.io/about/</uri>
</author>
</entry>
<entry>
<title>Not Just Another Independence Day</title>
<link href="https://www.rohit.io/blog/not-just-another-independence-day.html"/>
<updated>2014-08-18T03:35:00+05:30</updated>
<id>https://www.rohit.io/blog/not-just-another-independence-day</id>
<content type="html"><p>My alarm rang with a musical note, I turned it off and saw it&rsquo;s 4:15 in the morning. Surprisingly, my friend was already awake and I wished him <strong><em>Good Morning</em></strong>, he replied <strong><em>Jai Hind</em></strong>. This was the start and it certainly set the mood for making it <em>Not Just Another Independence Day</em>!</p>
<p>It was 5:20 and we, the three idiots, were out in a patriotic mood to celebrate the national festival. We reached the MG Road metro station and found it already awake before 6 AM. My friend asked for a ticket to Chandni Chowk but instead, received a free travel coupon. The person at the ticket counter said that today <strong><em>the ride to Chandni Chowk is Free</em></strong>.</p>
<p>It was 5:52 and we boarded the metro, but got no seats. It was easy to spot people with tricolor badge, traditional dress and young groups discussing national policies. I felt that my nation is now awake and ready to change. We reached Chandni Chowk at 6:45 and contributed to the queue, already too long. CRPF jawans were deployed at the station and were managing the crowd really well. Someone screamed, <strong><em>Bharat Mata ki</em></strong> and everyone replied <strong><em>Jai</em></strong>. This slogan continued throughout our way to Red Fort. I was like, <em>wow</em>!</p>
<p>As we moved out of the Metro station, we saw the security arrangements. On our way to Red Fort, I saw Delhi police, CRPF jawans, SWAT team, NSG Black Cats, Snipers on roof tops and many more. They seemed to outnumber the number of civilians attending the event. At around 7:20, we were at the gallery and as expected, the seats were already full. I took a look around and saw that the Red Fort looked really beautiful, our national flag was flying all over the place, four giant screens displayed the venue live, Doordarshan had built high bamboo towers to cover the event live. Then, I heard someone saying, &ldquo;Aaa gaya&rdquo; (he came), I looked at the screen, our PM was here. People started clapping.</p>
<p>Our PM was here with a style. The Jodhpuri turban was not less than a fashion statement. He gradually reached the stage. An army official shouted something really loud. I heard it clear at a distance of about 500m. Moments later, the PM pulled the rope and our National Flag was flying. But wait, something exploded, something really loud on my right. Is it a bomb?&hellip; Everyone trying to see. Phew, it is part of the 21 Gun Salute (Ekkess Topon Ki Salami). I was wondering, if this is the situation here, what would be like to be on a battlefield.</p>
<p>After an awesome flag hosting moment, the PM reached the Mic. No bullet proof glass on his front, no scripts to read, the gallery is waiting silently, more than a million eyes glued to the television, birds flying above the fort, the tail of his turban flying like a flag and he starts his speech. An hour long speech, and what a speech. There was total silence among the audience and when someone spoke, it was to clarify his last words - <strong><em>Kya bola?</em></strong> (<strong><em>What did he say?</em></strong>). The audience also acknowledged most of his statements with a round of applause. The speech ended with loud, energetic slogans of <strong><em>Bharat Mata ki Jai</em></strong> and <strong><em>Jai Hind</em></strong>. Post this, the national anthem was played. This concluded the event, but we decided to leave a little late and saw the PM among cute children.</p>
<p>After some time, we left the venue at around 9 AM and decided to try out the paratha from the world famous <strong><em>parathe wali gali</em></strong>. As we headed towards the same, we wondered if it was open. Most of the shops were closed and some people said the paratha shop usually opens at 10 AM and today, it might be closed. Determined to taste the lovely parathas, we moved against all odds. And finally, we were at the historic <strong><em>parathe wali gali</em></strong>. The paratha shops were open and the fragrance in the air was making us hungry. But wait, we need to wait&hellip; The shop is already full and there is a queue outside the shop. The board at one of the shops, reads - Oldest and famous, serving parathas through 5 generations. There were pictures of many famous personalities like <strong><em>Lal bahadur sastri</em></strong>, <strong><em>Indira Gandhi</em></strong>, <strong><em>Ranbir Kapoor</em></strong>, <strong><em>Akshay Kumar</em></strong>, <strong><em>Sheila Dikshit</em></strong> and many more. In the pictures, parathas were being served to all, but&hellip; we need to wait!!</p>
<p>Finally, <strong><em>hamara number aa gaya</em></strong> (it was our turn). The menu looked like a sabzi market with paratha after every vegetable name. You name it and it&rsquo;s there. Aloo, tomato, gobi, muli, etc + some strange ones too like rabri paratha. The menu also revealed, <strong><em>its India at its best with the most affordable rates</em></strong>. The table had some free munchies and parathas were served well on time. We ate like pigs and then ordered lassi from another shop. The lassi was served on a kulhad (glass made of clay) with a slice of Malai (cream of milk) on top. It was the best Lassi I ever had in my life.</p>
<p>Post this we headed towards the metro station. It was again, over crowded, but CRPF jawans managed it really well. In the metro, a person caught our attention as he was carrying a box of Bengali sweets. He was formally dressed in grey pants and light colored shirt. After some time, he joined our conversation about PM&rsquo;s speech. I asked him if he went to the Red Fort and he replied, &ldquo;<strong>No. I went to the office for the flag hosting ceremony. This time, everybody was present. Instructions were given that if anyone is absent, his/her accountability will be checked</strong>&rdquo;. He cherished the PM&rsquo;s initiative on punctuality but revealed that some government officials are unhappy about it. Once we reached home, we saw the news channels analyzing independence day speech, but we crashed on the bed sooner than expected!</p>
<p>How did you celebrate the National Festival? Waiting to hear your answer and feedback in comments. <strong>And as always, Thanks for reading :-)</strong></p>
</content>
<author>
<name>Rohit Gupta</name>
<uri>https://www.rohit.io/about/</uri>
</author>
</entry>
<entry>
<title>Contributing to Ansible is Super Easy</title>
<link href="https://www.rohit.io/blog/contributing-to-ansible-is-super-easy.html"/>
<updated>2014-08-05T13:23:00+05:30</updated>
<id>https://www.rohit.io/blog/contributing-to-ansible-is-super-easy</id>
<content type="html"><p>Just three days back, I thought about writing a SMS notification module and bingo, I was able to send a <a href="https://github.com/ansible/ansible/pull/8408">pull request</a>, same day. I submitted a module named &lsquo;plivo&rsquo; which allows sending SMS notification using <a href="https://www.plivo.com">Plivo</a> services. The playbook examples are hosted here: <a href="https://github.com/rohit01/ansible-plivo-example">https://github.com/rohit01/ansible-plivo-example</a>.</p>
<p>Writing an <a href="http://ansible.com">Ansible</a> module, is pretty much a straight forward approach. Though ansible modules can be written in any language, I will stick to Python in this post. In Python, a module is generally a single file with 3 different parts:</p>
<ol>
<li><strong>Documentation</strong>: This usually takes up the most number of lines</li>
<li><strong>Logic</strong>: The real programming logic to perform the task</li>
<li><strong>Ansible framework</strong>: Ansible provides some really useful classes and functions to help you in this process</li>
</ol>
<h2>Documentation</h2>
<p>Ansible is designed to read two global variables and generate documentation. These are:</p>
<ul>
<li><p><strong>Documentation</strong>: A multiline string literal and a valid YAML document. It contains the detailed description of module we see using the command <code>ansible-doc &lt;module_name&gt;</code> or at <a href="http://docs.ansible.com">docs.ansible.com</a>.</p></li>
<li><p><strong>Examples</strong>: A multiline string literal and a valid YAML document. It demonstrates the sample usage of module.</p></li>
</ul>
<h2>Logic</h2>
<p>Logic is the programatic way to perform the task. It uses various resources provided by Ansible. These resources may include the arguments passed to module, ssh connection to host, cloud resources such as AWS, GAE, and many more. Ansible will connect to the host only if logic requires the same. For example, a notification module does not connect to the host for sending SMS, email, etc.</p>
<h2>Ansible Framework</h2>
<p>Ansible modules usually import a bunch of utilities to perform its task. The basic utilities are generally imported by all modules using the following import statement:</p>
<pre><code class="python"> from ansible.module_utils.basic import *
</code></pre>
<hr />
<h2>Lets write a simple module</h2>
<p><strong>Module to return a configurable string and control success status:</strong></p>
<p><noscript><pre>#!/usr/bin/python</p>
<h1>-<em>- coding: utf-8 -</em>-</h1>
<p>#</p>
<h1>Author: Rohit Gupta - @rohit01 &lt;rohit.kgec@gmail.com&gt;</h1>
<p>#</p>
<h1>Sample ansible module to demonstrate code structure.</h1>
<p>#</p>
<h1>&mdash;- Documentation Start &mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;-</h1>
<h2>DOCUMENTATION = &#39;&#39;&#39;</h2>
<p>version_added: &quot;1.7&quot;
module: echo
short_description: echo
description:
- This module returns/displays a configured string
options:
name:
description:
text message to print
success:
description:
If false, the module will exit with failure.
required: false
default: yes
choices: [ &quot;yes&quot;, &quot;no&quot; ]
notes:
- This module does not connect to host. It is a dummy module
required: true
requirements: []
author: Rohit Gupta - @rohit01
&#39;&#39;&#39;</p>
<p>EXAMPLES = &#39;&#39;&#39;
- name: &quot;echo&quot;
echo: name=&quot;I executed successfully&quot; success=yes
&#39;&#39;&#39;</p>
<h1>&mdash;- Logic Start &mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;</h1>
<p>def main():
# Note: &#39;AnsibleModule&#39; is an Ansible utility imported below
module = AnsibleModule(
argument_spec=dict(
name=dict(required=True),
success = dict(default=True, type=&#39;bool&#39;),
),
supports_check_mode=True
)
success = module.params[&#39;success&#39;]
text = module.params[&#39;name&#39;]
if success:
module.exit_json(text=text)
else:
module.fail_json(msg=text)</p>
<h1>&mdash;- Import Ansible Utilities (Ansible Framework) &mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;</h1>
<p>from ansible.module_utils.basic import *
main()
</pre></noscript><script src="https://gist.github.com/rohit01/7ce30e3d3f12a4901fe2.js"> </script></p>
<p><strong>And the examples to use this module is also simple:</strong></p>
<pre><code class="YAML"> - echo: name="Hello World!"
- echo: name="Success is Yes" success=yes
- echo: name="Success is No" success=no
</code></pre>
<h2>Write your own module</h2>
<p>Now that you know some basics, why not write something on your own. For more details on developing modules, I highly recommend the following:</p>
<ul>
<li>Check some real module related to the one you are writing. Ansible modules are hosted <a href="https://github.com/ansible/ansible/tree/devel/library">here</a></li>
<li>Visit the <a href="http://docs.ansible.com/developing_modules.html">Ansible documentation on developing modules</a></li>
<li>Find Ansible utilities you may like to re-use. You can find them <a href="https://github.com/ansible/ansible/tree/devel/lib/ansible/module_utils">here</a></li>
</ul>
<p>Share what you want to write and feedback in comments. <strong>And as always, Thanks for reading :-)</strong></p>
</content>
<author>
<name>Rohit Gupta</name>
<uri>https://www.rohit.io/about/</uri>
</author>
</entry>
<entry>
<title>Ansible is Awesome</title>
<link href="https://www.rohit.io/blog/ansible-is-awesome.html"/>
<updated>2014-07-30T10:30:00+05:30</updated>
<id>https://www.rohit.io/blog/ansible-is-awesome</id>
<content type="html"><p>Since a couple of weeks, I have started using Ansible and am amazed with its awesomeness. In this short duration, I automated a bunch of items, read about best practices and found a lot of batteries/community projects.</p>
<h2>So, what really makes Ansible awesome?</h2>
<ol>
<li><p><strong>Features:</strong></p>
<ul>
<li><em>Agentless</em>: Unlike Puppet, Chef or Saltstack, there is no need to run an agent on the clients</li>
<li><em>Secure</em>: Uses native SSH for all communications between master and client</li>
<li><em>Scalable</em>: &lsquo;ansible-pull&rsquo; is an advanced feature which has potential for very large deployments</li>
<li><em>Ansible Facts</em>: Systems data, such as IP address, OS, Disk space, etc. are available by default in the form of variables. It makes custom configuration and cloud deployments super easy</li>
<li><em>Ansible Playbooks</em>: Playbooks are like ansible code, usually writen for orchestration. These are YML files - Powerful and easy to understand</li>
<li><em>Role</em>: Ansible framework for writing playbooks in an organized structure</li>
</ul>
</li>
<li><p><strong>Super Easy to get started:</strong></p>
<ul>
<li><p>Installation:</p>
<ul>
<li>Using PyPI: <code>(env)</code>$ <code>pip install ansible</code></li>
<li>Pakage Manager: $ <code>apt-get install ansible</code></li>
</ul>
</li>
<li><p>Hello world with ansible in just two steps:</p>
<ul>
<li>$ <code>echo "127.0.0.1" &gt; ansible_hosts</code></li>
<li>$ <code>ansible all -i ansible_hosts -m ping</code></li>
</ul>
</li>
</ul>
</li>
<li><p><strong>Batteries Included</strong> - <a href="http://docs.ansible.com/list_of_all_modules.html">Ansible modules</a></p></li>
<li><p><strong><a href="https://github.com/ansible/ansible">Open-source project</a> and under active development</strong></p></li>
<li><p><strong>Change management:</strong></p>
<ul>
<li>Ansible is intellegent in making changes only if it is necessary. This means, when you ask ansible to install a software, it will install it only if it is not installed. It also provides a special <code>register</code> method to trap the result in a variable. This variable can later be used in conditional statements to act differently.</li>
</ul>
</li>
</ol>
<h2>My playbooks written as per guidelines on best practices</h2>
<p>Github repository: <a href="https://github.com/rohit01/ansible-playbooks">https://github.com/rohit01/ansible-playbooks</a>. This project provides a basic layout for building configuration management system using Ansible.</p>
<p>Would love to hear your feedback in comments. <strong>And as always, Thanks for reading :-)</strong></p>
</content>
<author>
<name>Rohit Gupta</name>
<uri>https://www.rohit.io/about/</uri>
</author>
</entry>
<entry>
<title>Dikhao - Quickly find all related AWS resources</title>
<link href="https://www.rohit.io/blog/dikhao-quickly-find-all-related-aws-resources.html"/>
<updated>2014-05-14T13:10:00+05:30</updated>
<id>https://www.rohit.io/blog/dikhao-quickly-find-all-related-aws-resources</id>
<content type="html"><p>Dikhao is an open source project (<a href="https://github.com/rohit01/dikhao">hosted in github</a>), to cache every EC2 and route53 resource, find relations between them, and provide really fast lookups. It can be installed as a python command line utility (<em>pip install dikhao</em>), deployed in <a href="https://heroku.com/">Heroku</a> and has a ready to use <a href="https://hubot.github.com/">hubot</a> plugin.</p>
<hr />
<h2>Example search</h2>
<ul>
<li>CLI command:<br/>
<code>$ batao -i route53.rohit.io</code></li>
<li><a href="https://hubot.github.com/">Hubot</a> bot in hipchat:<br/>
<code>@hubot batao route53.rohit.io</code></li>
<li><a href="https://heroku.com/">Heroku</a> application:<br/>
<code>http://&lt;app_name&gt;.herokuapp.com/lookup/route53.rohit.io</code></li>
</ul>
<p><em>Note:</em> Key <em>&lsquo;route53.rohit.io&rsquo;</em> can be anything from the configurable list of indexed items (written below).</p>
<h2>Output</h2>
<pre><code>Route53 Details (210 secs ago):
</code></pre>
<table>
<thead>
<tr>
<th> Name </th>
<th> ttl </th>
<th> Type </th>
<th> Value </th>
</tr>
</thead>
<tbody>
<tr>
<td> route53.rohit.io. </td>
<td> 300 </td>
<td> CNAME </td>
<td> ec2-54-162-144-108.us-west-1.compute.amazonaws.com </td>
</tr>
<tr>
<td> elb1-dns.rohit.io. </td>
<td> 600 </td>
<td> A (Alias) </td>
<td> blog-elb-993346533.us-west-1.elb.amazonaws.com. </td>
</tr>
<tr>
<td> elb1-dns.rohit.io. </td>
<td> 600 </td>
<td> A (Alias) </td>
<td> web-elb-1401441163.us-west-1.elb.amazonaws.com. </td>
</tr>
</tbody>
</table>
<pre><code>EC2 Instance Details (265 secs ago):
</code></pre>
<table>
<thead>
<tr>
<th> Property </th>
<th> Value </th>
</tr>
</thead>
<tbody>
<tr>
<td> Instance ID </td>
<td> i-e68e0cca </td>
</tr>
<tr>
<td> State </td>
<td> running </td>
</tr>
<tr>
<td> EC2 DNS </td>
<td> ec2-54-162-144-108.us-west-1.compute.amazonaws.com </td>
</tr>
<tr>
<td> IP address </td>
<td> 54.162.144.108 </td>
</tr>
<tr>
<td> Region </td>
<td> us-west-1 </td>
</tr>
<tr>
<td> Zone </td>
<td> us-west-1b </td>
</tr>
<tr>
<td> Instance type </td>
<td> m1.large </td>
</tr>
<tr>
<td> Private IP address </td>
<td> 10.201.136.202 </td>
</tr>
<tr>
<td> Private DNS </td>
<td> ip-10-201-136-202.us-west-1.compute.internal </td>
</tr>
<tr>
<td> ELB names </td>
<td> blog-elb,web-elb </td>
</tr>
</tbody>
</table>
<pre><code>Elastic IP Details (261 secs ago):
</code></pre>
<table>
<thead>
<tr>
<th> Elastic IP </th>
<th> Instance ID </th>
</tr>
</thead>
<tbody>
<tr>
<td> 54.162.144.108 </td>
<td> i-e68e0cca </td>
</tr>
</tbody>
</table>
<pre><code>ELB Details (266 secs ago):
</code></pre>
<table>
<thead>
<tr>
<th> Name </th>
<th> ELB DNS </th>
<th> Instance ID </th>
<th> State </th>
</tr>
</thead>
<tbody>
<tr>
<td> blog-elb </td>
<td> blog-elb-993346533.us-west-1.elb.amazonaws.com. </td>
<td> i-e68e0cca </td>
<td> InService </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> i-e68kkbba </td>
<td> InService </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> i-52641cad </td>
<td> OutOfService </td>
</tr>
<tr>
<td> web-elb </td>
<td> web-elb-1401441163.us-west-1.elb.amazonaws.com. </td>
<td> i-e68e0cca </td>
<td> InService </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> i-e68kkbba </td>
<td> InService </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> i-52641cad </td>
<td> OutOfService </td>
</tr>
</tbody>
</table>
<hr />
<h2>Installation</h2>
<ul>
<li><p><strong>CLI Tool</strong><br/>
<em>dikhao</em> is available for installation using PyPi. Once installed, it provides two commands: <em>padho</em> and <em>batao</em>. <em>padho</em> syncs all AWS details into redis and <em>batao</em> can be used for searching the same.</p>
<p> (venv)$ pip install dikhao</p></li>
<li><p><strong>Heroku App</strong><br/>
Clone respsitory and use the automated install script <em><a href="https://github.com/rohit01/dikhao/blob/master/install.sh">install.sh</a></em>.</p>
<p> <strong>Manual install instructions:</strong></p>
<pre><code class="``"> $ git clone git@github.com:rohit01/dikhao.git
$ cd dikhao
$ heroku create {app_name} -s cedar
$ git push heroku master
$ heroku addons:add rediscloud --app {app_name}
$ heroku ps:scale web=1
#### Add credentials: ####
$ heroku config:set AWS_ACCESS_KEY_ID='&lt;ACCESS-KEY&gt;'
$ heroku config:set AWS_SECRET_ACCESS_KEY='&lt;SECRET-KEY&gt;'
$ heroku config:set REDIS_HOST='&lt;rediscloud-hostname&gt;'
$ heroku config:set REDIS_PORT_NO='&lt;rediscloud-port&gt;'
$ heroku config:set REDIS_PASSWORD='&lt;rediscloud-password&gt;'
$ heroku config:set PORT='80'
</code></pre></li>
<li><p><strong>Hubot Agent:</strong></p>
<ul>
<li>Deploy <em>dikhao</em> as a Heroku app</li>
<li>Add the <em>Heroku application url</em> in <a href="https://github.com/rohit01/dikhao/blob/master/hubot/dikhao.coffee">coffee script</a></li>
<li>Integrate the coffee script in your existing hubot setup</li>
</ul>
</li>
</ul>
<hr />
<h2>Current features</h2>
<ol>
<li>Supported AWS services:
<ul>
<li>EC2 - Instance, Elastic IP and ELB</li>
<li>Route53 - All DNS types</li>
</ul>
</li>
<li>Search input value can be any one of the indexed item. Dikhao supports indexing based on the following (<a href="https://github.com/rohit01/dikhao/blob/master/dikhao/sync.py#L16">configurable</a>):
<ul>
<li>Route 53 - DNS record name</li>
<li>Route 53 - DNS record value</li>
<li>EC2 Instance - ID</li>
<li>EC2 Instance - IP address</li>
<li>EC2 Instance - Private IP address</li>
<li>EC2 Instance - Public DNS</li>
<li>EC2 Instance - Private DNS</li>
<li>EC2 ELB - Name</li>
<li>EC2 ELB - DNS</li>
<li>EC2 - Elastic IP</li>
</ul>
</li>
<li>Provides many syncing options to help cater different needs. Few notable configurable options:
<ul>
<li>NO_EC2 - If True, EC2 details will not be synced. Default: False</li>
<li>NO_ROUTE53 - If True, Route53 details will not be synced. Default: False</li>
<li>HOSTED_ZONES - List of comma separated hosted zone names to be synced. Default: all</li>
<li>REGIONS - List of comma separated EC2 region names to be synced. Default: all</li>
<li>EXPIRE_DURATION - Duration for which details are cached. Default: 86,400 seconds (1 Day)</li>
</ul>
</li>
</ol>
<p><strong>And as always, Thanks for reading :-)</strong></p>
</content>
<author>
<name>Rohit Gupta</name>
<uri>https://www.rohit.io/about/</uri>
</author>
</entry>
<entry>
<title>Ubuntu on a legacy laptop without HDD</title>
<link href="https://www.rohit.io/blog/ubuntu-on-a-legacy-laptop-without-hdd.html"/>
<updated>2014-05-14T00:45:00+05:30</updated>