tag:blogger.com,1999:blog-51791435453388291732024-02-07T16:28:02.076-08:00DunnoThe opinions expressed in this blog are my own views and not those of SAP luckyabhishekhttp://www.blogger.com/profile/06037992570806202609noreply@blogger.comBlogger124125tag:blogger.com,1999:blog-5179143545338829173.post-27919715053955087722020-10-30T01:52:00.001-07:002020-10-30T01:52:30.711-07:00Blockchain is useless and I will be happy to be proven wrong<p style="text-align: justify;"><span style="font-family: verdana;">Over last few years I have seen Blockchain technology climb the hype curve and the hype refuses to die down. I've spent countless hours reading about the technology and the potential use cases it can solve. The basic arguments for Blockchain are about Decentralization, Immutability, Traceability and no need of intermediaries for transacting. </span></p><p style="text-align: justify;"><span style="font-family: verdana;">The use cases I hear about are A blockchain of Financial Assets (think of Land Records, Currency, etc.) or a blockchain of records which record the movement through the supply chain etc. </span></p><p style="text-align: justify;"><span style="font-family: verdana;">Now one the fundamental usecase from which blockchain is refactored out is that of bitcoin. As far as I understand blockchain is a distributed ledger with 2 features which make it unique. </span></p><p style="text-align: justify;"></p><ul><li><span style="font-family: verdana;">It's a consensus based ledger without a central authority. As in if more then 50% of the nodes believe a transaction has happened then it's considered as consensus. </span></li><li><span style="font-family: verdana;">It's an immutable record of transactions, i.e. once the 50+% of people have recorded and validated the transaction. It can't be tampered with anymore. It can only be reverted by doing a compensatory transaction.</span></li></ul><p></p><p style="text-align: justify;"><span style="font-family: verdana;">Apart from these there are other features like open for all, anyone can participate etc. which are also found in run of the mill technologies.</span></p><p style="text-align: justify;"><span style="font-family: verdana;">Blockchain made a lot of sense with bitcoin because, </span></p><p style="text-align: justify;"></p><ul><li><span style="font-family: verdana;">The bitcoin was a digital asset, which took birth in bitcoin's blockchain and remained in the same ledger from birth.</span></li><li><span style="font-family: verdana;">There is no physical asset changing hand and hence the transactions are really tamper proof. </span></li></ul><p></p><p style="text-align: justify;"><span style="font-family: verdana;">Now any usecase which people try to solve with blockchain have a few contradictions to the original usage of blockchain. </span></p><p style="text-align: justify;"></p><ul><li><span style="font-family: verdana;">In most use cases, a central authority (A government or a company) wants to "Own" the blockchain. </span></li><li><span style="font-family: verdana;">In most use cases, the underlying asset is not digital, e.g. food through a supply chain, or land. In such cases, blockchain can't offer any protection as the physical good can easily be tampered with. </span></li></ul><div><span style="font-family: verdana;"><br /></span></div><div><span style="font-family: verdana;">Everything else which is provided by blockchain, e.g. open system of records, immutable records, anytime access etc. can be easily done with cheaper and more efficient technologies which exist in the market. e.g. A digital record of Land Ownership and it's transfer already exists in most countries and there is no reason to move them to blockchain in order to do things like easy access and smart contracts. They can be done in the existing stack for far cheaper costs. </span></div><div><span style="font-family: verdana;"><br /></span></div><div><span style="font-family: verdana;">This is my personal view on blockchain as I struggled through for 5 years to figure out a usecase which fits this tech. This involves speaking to various banks and asset intensive industries.</span></div><div><span style="font-family: verdana;">Everyone wants it due to the hype curve, but no one understands why they need it. I would really be happy to be proven wrong here. Please leave comments to make me understand why I should still care about this technology </span></div><div><span style="font-family: verdana;"><br /></span></div><div><span style="font-family: verdana;">Cheers,</span></div><div><span style="font-family: verdana;">Abhishek</span></div><p></p>luckyabhishekhttp://www.blogger.com/profile/06037992570806202609noreply@blogger.com1tag:blogger.com,1999:blog-5179143545338829173.post-6232961588476191202020-07-16T03:50:00.001-07:002020-07-16T03:50:35.085-07:00Using SAP Cloud Connector for Automation<span style="font-family: Verdana, sans-serif;">I recently got a. requirement to dockerize and use SAP Cloud Connector for one of the test rigs we have built up internally. </span><br />
<span style="font-family: Verdana, sans-serif;">The idea was to expose a few REST APIs written in a java application through cloud connector. One of the services we write should be able to call this java application through SAP Cloud Connector. </span><br />
<span style="font-family: Verdana, sans-serif;">For the test rig we had to setup a cloud connector and connect to a subaccount automatically. Turns out Cloud Connector has an API which is documented on <a href="https://help.sap.com/viewer/cca91383641e40ffbe03bdc78f00f681/Cloud/en-US/db9170a7d97610148537d5a84bf79ba2.html">here</a>.</span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">There is a nice <a href="https://github.com/nzamani/sap-cloud-connector-docker">github</a> repository which allows you to Dockerize the Cloud Connector as well. </span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">The challenge is that SAP Cloud Connector has no APIs to do the first time configuration i.e. to change the password for the first time and to set the Installation Mode. </span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">So here's the hack we did. We did the changes on the running SAP Cloud Connector and found that 2 files are touched by these APIs. Went ahead and made another image which adds the touched files. and Voila.. we have SAP CC Docker image on which we can directly call the APIs and automate the rig. </span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">The code is available in a fork of the original repository. You can access the fork <a href="https://github.com/luckyabhishek/sap-cloud-connector-docker">here</a>. </span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">Happy Coding, </span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">Abhishek</span>luckyabhishekhttp://www.blogger.com/profile/06037992570806202609noreply@blogger.com0tag:blogger.com,1999:blog-5179143545338829173.post-72388143676750236712020-06-11T09:29:00.000-07:002020-06-11T09:29:36.438-07:00Quick Hack to debug your docker image in cloudfoundry<span style="font-family: Verdana, sans-serif;">I am trying to make a docker image bind with the kafka service on SAP's Cloudfoundry Platform. The kafka on SCP works on SASL authentication, and needs some configuration. </span><br />
<span style="font-family: Verdana, sans-serif;">Now the docker image has a start command which directly launches my process which binds to the Kafka Service, tries to connect to Kafka Cluster and fails because of some misconfiguration. </span><br />
<span style="font-family: Verdana, sans-serif;">It's almost impossible to try the configuration, unless I change the environment and then push the image to my repository, and then push the image from repository to cloudfoundry. </span><br />
<span style="font-family: Verdana, sans-serif;">Too Painful. </span><br />
<span style="font-family: Verdana, sans-serif;">So a quick hack to solve the problem is to change the startup command of my docker image to </span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="background-color: #d7d3b7; color: #3b2322; font-family: Courier; font-size: 18px; font-variant-ligatures: no-common-ligatures;">CMD tail -f /dev/null</span><br />
<span style="background-color: #d7d3b7; color: #3b2322; font-family: Courier; font-size: 18px; font-variant-ligatures: no-common-ligatures;"><br /></span>
<span style="font-family: Verdana, sans-serif;">And change the health check type in manifest to none. </span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">Push the image back in CF and ssh into it, to fiddle with the environment as many times as you like :). </span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">Happy Coding!!</span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">Abhishek</span>luckyabhishekhttp://www.blogger.com/profile/06037992570806202609noreply@blogger.com0tag:blogger.com,1999:blog-5179143545338829173.post-24639905076076746092019-06-17T01:01:00.001-07:002019-06-17T01:01:51.743-07:00Day 11: Diaries from Summer Vacation 2019<span style="background-color: white; color: #222222; font-family: "verdana" , sans-serif; text-align: justify;"><span style="font-size: large;">We took an awesome and memorable 10 day road trip (17th May 2019 - 27th May 2019) from Chandigarh to Amritsar via Himachal Pradesh. These are the notes taken every night from that vacation. I will publish them one day at a time for the next 10 days</span></span><br />
<span style="background-color: white; color: #222222; font-family: "verdana" , sans-serif; text-align: justify;"><span style="font-size: large;"><br /></span></span>
<span style="background-color: white; color: #222222; font-family: "verdana" , sans-serif; text-align: justify;"><span style="font-size: large;"><span style="font-size: small;">PS: Just realised it was a 11 day trip and not 10. </span></span></span><br />
<span style="background-color: white; color: #222222; font-family: "verdana" , sans-serif; text-align: justify;"><span style="font-size: large;"><span style="font-size: small;"> </span></span></span><span style="background-color: white; color: #222222; text-align: justify;"><span style="font-family: "verdana" , sans-serif;">27th May 2019 Day 11</span></span><br />
<br />
<div>
<span style="background-color: white; color: #222222; text-align: justify;"><span style="font-family: "verdana" , sans-serif;"></span></span><br />
<div style="text-align: justify;">
<span style="background-color: white; color: #222222; text-align: justify;"><span style="font-family: "verdana" , sans-serif;">I write this on day <strike>11</strike> (edit 12) as I simply was too tired to write it yesterday. We got up in Amritsar and I was very very tired. So I decided to stay in the hotel, while Richa and Reyansh wanted to go inside the golden temple. We couldn't enter inside the temple the day before as it was too crowded. Before leaving for the temple we did the majority of packing. </span></span></div>
<span style="background-color: white; color: #222222; text-align: justify;"><span style="font-family: "verdana" , sans-serif;">
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Richa and Reyansh left and I decided to catch on some sleep in the hotel. Around 20 minutes later, Richa called and told me that we didn't go inside the Jalianwala Bagh yesterday. I wanted to go in for sure. So I took a quick shower and asked Richa to meet me near Jalianwala Bagh in a bit. I finished packing, put the bags in the car and rushed to Jalianwala Bagh. Richa and Reyansh again found a huge queue and decided to not enter the temple and came near the Jalianwala. </div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
We also saw a Digambar Jain temple in the same lane as Jalianwala and had a quick visit over there.</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
This happens to be 100 year anniversary of the tragedy in which so many innocent people were killed by General Diar. The entrance to Jalianwala is as narrow as it was a 100 year ago, it is even marked that this was the way from which Diar entered the Bagh. There are a couple of brick walls one can still see marks of bullets which were fired at the time. A total of 1650 rounds were fired by the troops. One can also see the well in which most people had jumped to save themselves. A total of 120 bodies were taken out of the well. The well is very concealed though. The crowd in the Bagh is too much and you hardly get any sense of nostalgia or sympathy inside the park. </div>
<div style="text-align: justify;">
After visiting the park we went back to hotel, and then to return the car to zoom car. A cab to Amritsar airport, flight back to Bangalore and a cab back to home followed. </div>
<div style="text-align: justify;">
An awesome vacation comes to an end. A few of the highlights for me were : </div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
1) Unplanned road trips are fun. </div>
<div style="text-align: justify;">
2) People are throwing plastic bottles all over the beautiful landscapes of our country. We need to clean it up soon or else we will lose all the natural beauty we have. </div>
<div style="text-align: justify;">
3) Himalayas are majestic and we should visit more often. </div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Signing off Day 11.</div>
</span></span></div>
luckyabhishekhttp://www.blogger.com/profile/06037992570806202609noreply@blogger.com0tag:blogger.com,1999:blog-5179143545338829173.post-59536310739382489972019-06-17T01:01:00.000-07:002019-06-17T01:01:41.983-07:00Day 10: Diaries from Summer Vacation 2019<div style="text-align: left;">
<span style="background-color: white; color: #222222; font-family: "verdana" , sans-serif; text-align: justify;"><span style="font-size: large;">We took an awesome and memorable 10 day road trip (17th May 2019 - 27th May 2019) from Chandigarh to Amritsar via Himachal Pradesh. These are the notes taken every night from that vacation. I will publish them one day at a time for the next 10 days</span></span></div>
<br />
<div style="text-align: right;">
<span style="color: #222222; font-family: "verdana" , sans-serif; font-size: large;"><br /></span></div>
<span style="background-color: white; color: #222222; text-align: justify;"></span><br />
<div style="text-align: left;">
<span style="background-color: white; color: #222222; text-align: justify;"><span style="font-family: "verdana" , sans-serif;">26th May 2019 Day 10 </span></span></div>
<span style="background-color: white; color: #222222; text-align: justify;">
</span><br />
<span style="background-color: white; color: #222222; text-align: justify;"><span style="font-family: "verdana" , sans-serif;"><br /></span></span>
<br />
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Last night we stayed in Raja Ka Bagh @Nurpur which is a boutique hotel. The hotel also hosts live music on Saturday nights. Party and music went on till 3.00 am which made it difficult to sleep in time. We somehow managed to get some sleep. </span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">As we got up, we had to figure out the plan of the day. I wanted to visit the partition museum in Amritsar in addition to our plans of catching the Beating Retreat ceremony at Atari Wagah border and visiting the golden temple. As we checked various places on the map we realised that partition museum is closed on Mondays, which meant we had to visit it today. We also had to attend the ceremony at Wagah today, given that it happens around sunset time. So we decided to skip Nurpur Fort and drive to Amritsar post breakfast. The restaurant at the hotel looked pretty slow so we rushed out and got some breakfast at a dhaba on the way. We then drove non-stop to a coffee day in Amritsar. After having a green tea, we parked our car in a public car parking next to partition museum. </span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">This museum is 2 years old and tells the story of our independence specially focusing on partition. It covers a few years post partition and how it affected the politics and lives of the people of both Pakistan and India. It captures the story of the biggest migration in the history of the world and it is the first museum in India which I felt is done beautifully and was badly needed.</span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">We could have spent half a day at the museum, however as we had to go to Wagah border we had to rush through the museum. We decided to take a cab to Atari as we thought it would make it easier for us to attend the ceremony instead of trying to find parking. We took a cab for Rs. 1150. There was heavy traffic and we were a bit late. We anyhow managed to reach the border at around 4.45. The crowd and the queues were humongous. They separated the men from women for the security and there was no way to figure out how to meet after the security. The BSF people were not allowing us to stand and wait and moving wasn’t really an option. Phones were not working and if we had moved then there was no way for Richa to know that we have moved to the stadium. Once we found Richa back we had to jostle through the crowd to enter the stadium. There was no easy way to get in and people were pushing all around. After a while we managed to enter the stadium and there was no place to sit. The ceremony was good. They played some songs, made people dance on the road inside the arena. There was a lot of slogan shouting. And the BSF did an orchestrated show of aggression and brought the flag down. On the way back we were stuck inside the parking for 1.5 hours.</span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
</div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">The ceremony felt a lot longer then what it is as we had to stand all through and had to carry Reyansh on my shoulder for around an hour.</span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
</div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">As we reached back towards golden temple, we checked in to hotel City Park. We can now say that we changed 9 hotels in 9 nights in this vacation. After check in we decided to have dinner, however on the way to dhaba we decided to visit golden temple instead. It felt crowded on the heritage street (street around temple). As we entered the temple complex we decided to not go inside the temple owing to the crowd. As we moved towards the langar it had the same kind crowd to get food. We decided to not have langar either.</span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
</div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">After a round inside the temple complex we had chole kulcha on a shop next to the temple. The chole tasted nice. In the past 9 days We have had too much junk and no work out :(. After dinner we came back to hotel via our car parking. </span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Richa went for some quick shopping while me and Reyansh took all our stuff from car to the room. We need to pack everything we have in 3 bags tomorrow morning. </span></div>
<div style="text-align: justify;">
<span style="background-color: white; color: #222222; text-align: justify;"><span style="font-family: "verdana" , sans-serif;"></span></span><br /></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Richa may try to visit the temple from inside tomorrow however I only intend to return the car to zoomcar and then fly back home.</span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Signing off Day 10</span></div>
luckyabhishekhttp://www.blogger.com/profile/06037992570806202609noreply@blogger.com0tag:blogger.com,1999:blog-5179143545338829173.post-70757435801258983892019-06-14T01:21:00.000-07:002019-06-14T01:21:25.696-07:00Day 9 : Diaries from Summer Vacation 2019<span style="background-color: white; color: #222222; font-family: "verdana" , sans-serif; text-align: justify;"><span style="font-size: large;">We took an awesome and memorable 10 day road trip (17th May 2019 - 27th May 2019) from Chandigarh to Amritsar via Himachal Pradesh. These are the notes taken every night from that vacation. I will publish them one day at a time for the next 10 days</span></span><br />
<span style="background-color: white; color: #222222; font-family: "verdana" , sans-serif; text-align: justify;"><span style="font-size: large;"><br /></span></span><span style="background-color: white; color: #222222; text-align: justify;"><span style="font-family: "verdana" , sans-serif;">25th May 2019 Day 9</span></span><br />
<span style="background-color: white; color: #222222; text-align: justify;"><span style="font-family: "verdana" , sans-serif;"><br /></span></span>
<br />
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">We woke up in Dalhousie today and the weather was pretty cold. We had late breakfast and then got out for sight seeing. </span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">The traffic in Dalhousie is very dense and given that the city is situated in the mountains driving is very difficult. There is nothing to see in Dalhousie. It's mostly about the awesome weather in the town because of the altitude it is at. There happens to be a church which we couldn't go to as there was no parking nearby. We then went to Saptdhara which is nothing again ..however there was a small waterfall next to it with activities like zip-line and river crossing happening. We sat on the fall and had a tea while Reyansh dip his legs in the cold water and had some fun. </span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">We walked back to car park. The number of sales people bothering tourists with offer to buy Kesar, Shilajit and herbs to grow hair is very high and its irritating to keep saying no to them. These vendors just won't give up and catch you near everywhere. </span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">We were also offered with 5 items for 10000 Rs. Sale. This is the same sale which we had ended up buying a carpet, chingu and a few more items, 11 years ago in Shimla. Nothing has changed in 11 years :). We anyways declined to buy and started driving towards Khajjiar. </span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Khajjiar is a small town almost an hour's drive from Dalhousie. The drive is pretty tricky as it has narrow road in the mountains and the traffic makes it almost impossible to enjoy the route. We reached Khajjiar and it is called Mini Switzerland for a reason. There is a large meadow and a lake in the middle of huge trees and it looks and feels great. The lunch was at a non descript restaurant facing the lake and the service was very poor.</span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
</div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Reyansh wanted to ride a horse so Richa took him for a ride on a white horse named Shera. I sat near the lake where they had many 'adventure activities' going on. Zorbing slope gradient was pretty low as compared to what I have seen in Bangalore. The most funny thing was a paragliding kind of ride. A team of almost 10 people will run with a parachute and make the kid airborne for approximately 10-15 seconds. How far up the kid goes depends on the height and weight of the kid. While the kid comes down a couple of people will focus on catching her to ensure that she doesn't fall on the ground too badly. Some kids weren't even sitting properly on the seat and it was mockery of a gliding. It was very unsafe and not sure why parents were risking something like this with their kids. </span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">After spending a good 3.5 hours near the lake we decided to drive towards Nurpur where we are staying for the night. </span></div>
<span style="background-color: white; color: #222222; text-align: justify;"><span style="font-family: "verdana" , sans-serif;"></span></span><br />
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">I write this from Nurpur which is our last night halt in Himachal. tomorrow we will drive to Amritsar and it's a pretty flat drive. We are back to planes now and the drive should become simpler. We have driven almost a 1000 kms in Himachal Pradesh and thank god for no major incident in the drive :)</span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Signing Off Day 9.</span></div>
luckyabhishekhttp://www.blogger.com/profile/06037992570806202609noreply@blogger.com0tag:blogger.com,1999:blog-5179143545338829173.post-46395385400986913562019-06-12T20:19:00.000-07:002019-06-12T20:19:19.439-07:00Day 8 : Diaries from Summer Vacation 2019<span style="background-color: white; color: #222222; font-family: "verdana" , sans-serif; text-align: justify;"><span style="font-size: large;">We took an awesome and memorable 10 day road trip (17th May 2019 - 27th May 2019) from Chandigarh to Amritsar via Himachal Pradesh. These are the notes taken every night from that vacation. I will publish them one day at a time for the next 10 days</span></span><br />
<span style="background-color: white; color: #222222; font-family: "verdana" , sans-serif; text-align: justify;"><span style="font-size: large;"><br /></span></span>
<span style="background-color: white; color: #222222; text-align: justify;"><span style="font-family: "verdana" , sans-serif;">24th May 2019 Day 8 </span></span><br />
<div>
<span style="background-color: white; color: #222222; text-align: justify;"><span style="font-family: "verdana" , sans-serif; font-size: medium;"><br /></span></span></div>
<div>
<span style="background-color: white; color: #222222; text-align: justify;"><span style="font-family: "verdana" , sans-serif;"></span></span><br />
<div dir="auto" style="text-align: justify;">
<span style="background-color: white; color: #222222; text-align: justify;"><span style="font-family: "verdana" , sans-serif;">This holiday has been long and busy. The memories of the days are already merging together. I write this blog from Dalhousie where we just checked in to a hotel. </span></span></div>
<span style="background-color: white; color: #222222; text-align: justify;"><span style="font-family: "verdana" , sans-serif;">
</span></span>
<div dir="auto" style="text-align: justify;">
<span style="background-color: white; color: #222222; text-align: justify;"><span style="font-family: "verdana" , sans-serif;"><br /></span></span></div>
<span style="background-color: white; color: #222222; text-align: justify;"><span style="font-family: "verdana" , sans-serif;">
<div dir="auto" style="text-align: justify;">
I couldn't sleep well yesterday night. The moon and stars were visible from the wall size window of the room we had checked in to and it just kept me uneasy for some reason. As we woke up on Mcleodganj this morning, it was already raining. The weather was cold and we had a dull begining of the day. The tiredness was now catching up. We somehow managed to go for breakfast at around 9.15 am. The breakfast was usual chola bhatura and poha. After the breakfast we pushed ourselves to mobe and checked out by 11.00. </div>
<div dir="auto" style="text-align: justify;">
<br /></div>
<div dir="auto" style="text-align: justify;">
The first stop was Bhagsu nag temple and waterfall. Reyansh loved the fall and walked all the way up and down to earn the binoculars he wanted to buy. On the way back he even raced with a traveller from USA. At the end of Bhagsu Nag I had to buy him a well earned binoculars. </div>
<div dir="auto" style="text-align: justify;">
<br /></div>
<div dir="auto" style="text-align: justify;">
Afterwards we went to Namgyal monastery. It is the monastery near which Dalai Lama lives. The monastery wasn't as peaceful as we had seen near Kullu or in Bir but is significant as it hosts Dalai Lama. The market in Mcleodganj was very crowded and all we wanted to do was run away from this place due to congestion on the roads. Richa did some shopping and then we were off to Dalhousie around 5.00 PM. As we neared Dalhousie we realised that sun sets around 7.50 pm in this part of our vast country. The sky looked beautiful with various shades of blue as the night settled in. </div>
<div dir="auto" style="text-align: justify;">
<br /></div>
<div dir="auto" style="text-align: justify;">
We reached Dalhousie at around 9.10 pm. It's a cantonment area followed by a tourist city. The cantonment was probably established as Lord Dalhousie was a Governer General of India and had established this city. </div>
<div dir="auto" style="text-align: justify;">
<br /></div>
<div dir="auto" style="text-align: justify;">
All the hotels were full as it was a Friday. We somehow managed to get a room in Clarks inn and crashed for the night. Reyansh fell asleep at around 5 in the car and looks like he will sleep through the night. </div>
<div dir="auto" style="text-align: justify;">
<br /></div>
<div dir="auto" style="text-align: justify;">
Tomorrow we would visit a local church and Khajjiar. We are still not sure if we want to stay in Dalhousie tomorrow night or sleep in Nurpur, which is on the way to Amritsar and has a small fort. </div>
<div dir="auto" style="text-align: justify;">
<br /></div>
<div dir="auto" style="text-align: justify;">
Will decide tomorrow...<br />
<br />
Signing off Day 8</div>
</span></span></div>
luckyabhishekhttp://www.blogger.com/profile/06037992570806202609noreply@blogger.com0tag:blogger.com,1999:blog-5179143545338829173.post-32562918751580260092019-06-11T21:23:00.000-07:002019-06-11T21:23:01.458-07:00Day 7 : Diaries from Summer Vacation 2019<span style="background-color: white; color: #222222; font-family: "verdana" , sans-serif; text-align: justify;"><span style="font-size: large;">We took an awesome and memorable 10 day road trip (17th May 2019 - 27th May 2019) from Chandigarh to Amritsar via Himachal Pradesh. These are the notes taken every night from that vacation. I will publish them one day at a time for the next 10 days</span></span><br />
<span style="background-color: white; color: #222222; font-family: "verdana" , sans-serif; text-align: justify;"><span style="font-size: large;"><br /></span></span>
<span style="background-color: white; color: #222222; font-family: "verdana" , sans-serif; text-align: justify;"><span style="font-size: large;"><span style="font-family: "verdana" , sans-serif; font-size: 13.2px;">23rd May 2019 Day 7 </span></span></span><br />
<span style="background-color: white; color: #222222; font-family: "verdana" , sans-serif; font-size: medium; text-align: justify;"><br /></span>
<br />
<div style="text-align: justify;">
<span style="color: #222222; font-family: "verdana" , sans-serif; font-size: medium;">As we woke up in Bir today, both me and Richa were looking forward to paragliding experience. We had asked the Oyo Holiday Inn (the hotel we stayed overnight), Bir to make a booking for us. We had asked for 8.30 and they were at our door at 8.15 AM. Earlier plan was that Richa would go first as I wanted to sleep more and then I would follow, however they had given us a 600 Rs. discount thinking that both of us would go together and they can save 600Rs. on the cab charges. </span></div>
<div style="text-align: justify;">
<span style="color: #222222; font-family: "verdana" , sans-serif; font-size: medium;"><br /></span></div>
<div style="text-align: justify;">
<span style="color: #222222; font-family: "verdana" , sans-serif; font-size: medium;">So on midst of all the confusion I decided to go first. The plan was that I would then drive Richa to take off site in our rental car and this way they still save 600 on the cab.</span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="color: #222222; font-family: "verdana" , sans-serif; font-size: medium;">As we (The driver, pilot and me) drove to Billing, which is around 18 km from Bir and is the take off site at 8000-9000 ft above sea level, the anticipation made me a bit nervous. </span></div>
<div style="text-align: justify;">
<span style="color: #222222; font-family: "verdana" , sans-serif; font-size: medium;"><br /></span></div>
<div style="text-align: justify;">
<span style="color: #222222; font-family: "verdana" , sans-serif; font-size: medium;">I was fairly confident but waiting made the hands sweat. I decided to have a word with my pilot and driver. The name of the pilot was Happy and he had been flying since last 12 years. He has a wife and a 4 year old son. He did take off and land 3-4 times a day and I was fairly confident in his abilities now. I thought that what is a one off for me is a routine for him, so it can't be as dangerous or difficult. As we reached the top Happy explained how he needs wind for take off. The wind was quite low, we had to change our take off spot once and finally we had wind support. I was asked if I want to take a video, the charges were 500 Rs. I politely declined as I am not the one who would ever watch that video again. Happy tied the harnesses to the seat and told me that I should run till the pressure from wind pushes me back and makes the seat like a basket to hold me. He said I shouldn't worry and just keep running. We were at the edge of the cliff and I asked him that how far can I really run as we might fall off. He said that it's enough distance. I was probably 20 strides away from where I would fall off. Anyways he held me and asked me to run, I ran for like a few seconds and were in the air. </span></div>
<div style="text-align: justify;">
<span style="color: #222222; font-family: "verdana" , sans-serif; font-size: medium;"><br /></span></div>
<div style="text-align: justify;">
<span style="color: #222222; font-family: "verdana" , sans-serif; font-size: medium;">We had Dhauladhar range covered in snow on our right and we could see the landing site on our right as well. We could see the wheat fields below and Happy told me that they would now sow the next crop. We could also see the XUV parked near our hotel. As we flew on the glider Happy told me that we could see Palpung Monastery as well. I wasn't sure where it was but I just agreed with him. Suddenly I saw a glider rolling down very fast, I thought it's an accident, but it was a passenger asking for aerobatic flying to his pilot. Happy offered to do that for me as well, however I declined politely. He did it once anyways and it was a bit scary due to the sound it makes and I felt dizzy very quickly. </span></div>
<div style="text-align: justify;">
<span style="color: #222222; font-family: "verdana" , sans-serif; font-size: medium;"><br /></span></div>
<div style="text-align: justify;">
<span style="color: #222222; font-family: "verdana" , sans-serif; font-size: medium;">We landed in Bir soon and it was time for Richa to go for her flight. It took a total of 1 hour 20 minutes from Hotel to landing and it was an awesome experience. </span></div>
<div style="text-align: justify;">
<span style="color: #222222; font-family: "verdana" , sans-serif; font-size: medium;"><br /></span></div>
<div style="text-align: justify;">
<span style="color: #222222; font-family: "verdana" , sans-serif; font-size: medium;">Richa went for her flight in a cab. We decided to pay extra for her cab as it will save Reyansh from going up to Billing. The drive is quite rough and has too many curves which could have triggered his motion sickness. In the meantime, me and Reyansh checked out and Reyansh had his brunch. We then went to landing site to pick Richa up.</span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="color: #222222; font-family: "verdana" , sans-serif; font-size: medium;">As we reached the site, Richa had already landed. She decided to make a video as well. After we settled the accounts , we decided to visit a cafe nearby for Richa to have her brunch. </span></div>
<div style="text-align: justify;">
<span style="color: #222222; font-family: "verdana" , sans-serif; font-size: medium;">At the cafe I found that they also teach paragliding and one can fly his first solo from Billing to Bir within 7 days. I am excited about it and it may go to my bucket list. You can find more info on <a href="http://www.paragliding.guru/">www.paragliding.guru</a> .</span></div>
<div style="text-align: justify;">
<span style="color: #222222; font-family: "verdana" , sans-serif; font-size: medium;"><br /></span></div>
<div style="text-align: justify;">
<span style="color: #222222; font-family: "verdana" , sans-serif; font-size: medium;">Once we were done with snacks it was already raining. Our agent had hurried us up in the morning citing weather conditions being bad in the later part of the day and we were now thankful as it saved us from missing this experience. </span></div>
<div style="text-align: justify;">
<span style="color: #222222; font-family: "verdana" , sans-serif; font-size: medium;"><br /></span></div>
<div style="text-align: justify;">
<span style="color: #222222; font-family: "verdana" , sans-serif; font-size: medium;">We then visited Palpung Monastery. This is the second time Google maps confused us due to wrong map and we learnt our lesson by heart to not trust the map completely in Himalayas. The monastery is located at a very quiet scenic hill near Bir. We are now becoming quite comfortable in asking about Buddhist traditions and monasteries in general to the monks and we have found them eager to help us. They had a 3 hour prayer going on in the temple and Richa sat in it for almost 10 minutes enjoying the traditional Pooja. </span></div>
<div style="text-align: justify;">
<span style="color: #222222; font-family: "verdana" , sans-serif; font-size: medium;"><br /></span></div>
<div style="text-align: justify;">
<span style="color: #222222; font-family: "verdana" , sans-serif; font-size: medium;">After that we had a quick visit to Baijnath temple and then started towards Mcleodganj. The GPS again took us to a bad road which I chose to turn back from (after a km or so) and then we took the main highway to Dharamshala and then to Mcleodganj. On the way we had Palampur where we saw some tea gardens a d even had a tea of Wah brand, right in front of their gardens. </span></div>
<span style="color: #222222; font-family: "verdana" , sans-serif; font-size: medium;"><span style="background-color: white; text-align: justify;"></span></span><br />
<div style="text-align: justify;">
<span style="color: #222222; font-family: "verdana" , sans-serif; font-size: medium;"><br /></span></div>
<div style="text-align: justify;">
<span style="color: #222222; font-family: "verdana" , sans-serif; font-size: medium;">T</span><span style="color: #222222; font-family: "verdana" , sans-serif; font-size: medium;">he whole drive had Dhauladhar range running on the right and we loved the snow capped mountains all through. </span></div>
<div style="text-align: justify;">
<span style="color: #222222; font-family: "verdana" , sans-serif; font-size: medium;"><br /></span></div>
<div style="text-align: justify;">
<span style="color: #222222; font-family: "verdana" , sans-serif; font-size: medium;">Signing Off Day 7</span></div>
luckyabhishekhttp://www.blogger.com/profile/06037992570806202609noreply@blogger.com0tag:blogger.com,1999:blog-5179143545338829173.post-44922590987615606922019-06-10T20:53:00.005-07:002019-06-10T20:53:51.982-07:00Day 6 : Diaries from Summer Vacation 2019<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif; font-size: large;">We took an awesome and memorable 10 day road trip (17th May 2019 - 27th May 2019) from Chandigarh to Amritsar via Himachal Pradesh. These are the notes taken every night from that vacation. I will publish them one day at a time for the next 10 days. </span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">22nd May 2019 Day 6 : (Written today)</span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">I missed taking any notes on Day 6 and I realise this today as I was tracking my emails to check out my notes. </span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">From what I remember we woke up in Kulu today and most of the day was spent driving towards Bir. We had 2 options, to drive to Bir via shortest path or drive via Pandoh dam. We were told by locals that Pandoh dam is just a bridge from where you can see water and doesn't have much, however we chose that route anyways as it was a national highway. </span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">Over our drive we saw a lot of tunnels being constructed through the mountains, and one can only imagine the economic impact the faster connectivity will bring to this part of India. The drives which are through the mountainous route of 30 km today may end up becoming a straight tunnel of approximately 10-12 kms in a few years. The construction work going on in all of Himachal forces you to keep the windows of your car closed as the fine dirt can cause real problem for your health. </span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">We had lunch on the way and we were near Bir by 4.00 PM. We had a lot of time on hand so decided to take a detour to Barot. It had beautiful valleys and is still has less tourists going over there. Halfway through Barot we realised that we should go back Bir as we might be too late otherwise, so we headed back and made it to Bir by 9.30 PM. We had quick dinner, asked the Oyo Holiday Inn reception to arrange paragliding for us. We wanted to do that first thing in the morning after. </span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">Signing off Day 6 </span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<br /></div>
luckyabhishekhttp://www.blogger.com/profile/06037992570806202609noreply@blogger.com0tag:blogger.com,1999:blog-5179143545338829173.post-53741899177859709832019-06-09T21:10:00.000-07:002019-06-09T21:10:02.966-07:00Day 5 : Diaries from Summer Vacation 2019<div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; text-align: justify;">
<span style="font-family: "verdana" , sans-serif; font-size: medium;">We took an awesome and memorable 10 day road trip (17th May 2019 - 27th May 2019) from Chandigarh to Amritsar via Himachal Pradesh. These are the notes taken every night from that vacation. I will publish them one day at a time for the next 10 days. </span></div>
<div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">21st May 2019 Day 5 : </span></div>
<div style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="background-color: white; color: #222222; text-align: justify;">
<div dir="auto" style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">As we woke up in Manali, we knew that way to Rohtang pass and even Marhi is closed. So the place we can go is Gulaba tourist spot and Solang Valley.</span></div>
<div dir="auto" style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div dir="auto" style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">After breakfast we decided to go to Gulaba first. The google maps shows a Gulaba viewpoint and Gulaba tourist spot separately. It was confusing so we decided that we will keep driving till we hit the barrier where they check permits for Marhi and Rohtang pass. We were told that the barrier will be closed today as it's a tuesday and Border Roads Organization will be doing weekly maintenance work on the road.</span></div>
<div dir="auto" style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">We got out of Manali and there are stores on both sides of highway giving away dress and boots to play in the snow. We chose to not take it as we were told by hotel reception that there is no snow in Gulaba.</span></div>
<div dir="auto" style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">As we drove to Gulaba the views on both sides were spectacular. The traffic was sparse, which was confusing, as Mall road was jam packed yesterday night. We were wondering as to where are all the tourists, that we saw in Manali the last night.</span></div>
<div dir="auto" style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div dir="auto" style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">After a couple of stops near waterfalls and To see the snow capped mountains, we reached Gulaba tourist spot. The drive was fairly easy and we went at luxurious pace soaking in the beauty.</span></div>
<div dir="auto" style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Richa and Reyansh took a horse ride to the spot which was 1.5 km away while I chose to walk. The horse owner said there is still a bit of snow. Once we reached the spot, we realised that the snow was almost ice and very very dirty. Reyansh touched the snow but we couldn’t go in as we didn’t have shoes to negotiate icy snow and honestly it was just too dirty. We came back to our car and drove till the barrier. Finally at the barrier there was clarity that the permits to Rohtang are issued on <a data-saferedirecturl="https://www.google.com/url?q=http://hpkullu.nic.in&source=gmail&ust=1559966766800000&usg=AFQjCNE3Spyrkif40d3NIyH-RAf-rriB_g" href="http://hpkullu.nic.in/" style="color: #1155cc;" target="_blank">hpkullu.nic.in</a>. So if anyone ever wants to take a self drive, that's the place to get permit from.</span></div>
<div dir="auto" style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div dir="auto" style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">We had a few Maggie noodles on a shop for which we were the only customers. The views were breathtaking and the air was fresh. </span></div>
<div dir="auto" style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">After that we decided to visit Solang valley. Reyansh had to take medicine for motion sickness, and he fell asleep. Once we entered the valley we realised its a mess as all the tourists from Manali were there. They have activities like paragliding, all terrain vehicles, cable cars etc. Reyansh was asleep and we were not interested in joining such a huge crowd so we drive right back and moved towards Kullu. </span></div>
<div dir="auto" style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">As one drives towards Kullu the highway is in parallel to BEAS river and one can sign up for zip lines across beas, or for water rafting on the spot. We decided against rafting as they won’t allow Reyansh on the raft due to his age. They had paragliding going on as well, but we wanted to do paragliding in Bir. So, We went to Dhakpo Shedrupling Monastery. </span></div>
<div dir="auto" style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div dir="auto" style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">After the monastery we decided to visit Kullu market as we had taken a bypass from Kullu on the way to Manali. Once in Kullu we decided to get the car cleaned as all the dust from highways had made the cabin unbelievable by dirty. Richa visited Tibetan market but it wasn’t as good. Me and Reyansh got the car cleaned. There was a walnut tree in the yard and Reyansh plucked a couple of them.</span></div>
<div dir="auto" style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHm7u4IyY_hllfw9mYLF6QbR25OklseaL5xxh8JGkvIR_tIFb450Oq0P6rlzm3KQgBxfJUSQm4Bqbh2KRrxtK-pFQCrR9YCLg6sZ8RZiQuvGbtYdSV7bQgOrlVMbcIL269alYXj7RhlEI/s1600/unnamed.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1200" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHm7u4IyY_hllfw9mYLF6QbR25OklseaL5xxh8JGkvIR_tIFb450Oq0P6rlzm3KQgBxfJUSQm4Bqbh2KRrxtK-pFQCrR9YCLg6sZ8RZiQuvGbtYdSV7bQgOrlVMbcIL269alYXj7RhlEI/s400/unnamed.jpg" width="300" /></a></div>
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div dir="auto" style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">We then had dinner and decided to sleep in Kullu for the night. We need to now drive to Bir tomorrow morning and hope to be there in time to visit the local monastery and also do the paragliding.</span></div>
<div dir="auto" style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div dir="auto" style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Signing off Day 5.</span></div>
</div>
luckyabhishekhttp://www.blogger.com/profile/06037992570806202609noreply@blogger.com0tag:blogger.com,1999:blog-5179143545338829173.post-35647393974223386182019-06-09T21:08:00.003-07:002019-06-09T21:09:43.461-07:00Day 4 : Diaries from Summer Vacation 2019<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><span style="font-size: large;">We took an awesome and memorable 10 day road trip (17th May 2019 - 27th May 2019) from Chandigarh to Amritsar via Himachal Pradesh. These are the notes taken every night from that vacation. I will publish them one day at a time for the next 10 days. </span></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: verdana, sans-serif;">20th May 2019 Day 4 : </span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">We woke up to a cold morning 10 kms before Manali, at least cold by Indian standards in May. We had a nice breakfast at the hotel and then started our drive towards Manali. The jam which we avoided yesterday was still there , however we were well rested so didn't mind it as much. As we waited in a long queue of vehicles, it was frustrating to see private cars and sometimes even cabs running past us on the right lane, which has to be used by vehicles from the other side. It is frustrating to see how everyone across India has 2 qualities which are same. First is that we are in a hurry on the road and second, we are always late for any appointment :). The wait was made bearable by the river flowing along the highway on the right and some waterfalls on the left. </span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">After negotiating the jam which was caused by a landslide(Nature trumps engineering after all), we reached Manali. The weather got a bit bad and it started drizzling. Manali is a small town which has grown because of tourists however walking on the congested roads, one is inhaling more kerosene and diesel fumes and less of the fresh air one wants to inhale, while visiting mountains. </span></div>
<div style="text-align: justify;">
<span style="font-family: verdana, sans-serif;"><br /></span>
<span style="font-family: verdana, sans-serif;">There is hardly any landmark worth visiting. We visited Hadimba (She was Bheema's wife from Mahabharata) temple but it was really a temple which is a tourist spot because there is no other spots.</span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">We wanted to visit Rohtang pass but it is open only till Marhi and that too couldn't be visited today as we were late to arrive. Tomorrow is Tuesday and Rohtang is closed for maintenance. We are told that we may be able to go till Gulaba tomorrow. People believe we can drive till Gulaba in the XUV we have rented and there is no need to take a local cab. We will try that tomorrow.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">We checked in to hotel Sringeri Regency early evening and after a quick tea walked towards Mall road. The drizzle was gone and it was a good 10 degrees ... Perfect weather for a stroll. Richa did some shopping from Mall road. Reyansh enjoyed strawberry and cherries which are abundantly available. He missed mangos so we asked a juice shop to cut a couple of mangos for him. He may have enjoyed that more than the berries . At 8.30 pm we decided to return to the hotel. The auto Walas in Manali are no better as compared to Bangalore auto wallas and they wanted 100 Rs. For 1.5 kms. After walking a while we found one who agreed for 70 Rs. </span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">We came back and took a glass of milk before hitting the bed. </span></div>
<div style="text-align: justify;">
<span style="font-family: verdana, sans-serif;">Tomorrow if all goes well , we plan to visit Gulaba and Solang and sleep in Bhuntar. Before heading to Bir ...</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: verdana, sans-serif;">Signing off Day 4</span></div>
luckyabhishekhttp://www.blogger.com/profile/06037992570806202609noreply@blogger.com0tag:blogger.com,1999:blog-5179143545338829173.post-62727451621202873382019-06-09T21:07:00.000-07:002019-06-09T21:07:07.413-07:00Day 3 : Diaries from Summer Vacation 2019<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif; font-size: large;">We took an awesome and memorable 10 day road trip (17th May 2019 - 27th May 2019) from Chandigarh to Amritsar via Himachal Pradesh. These are the notes taken every night from that vacation. I will publish them one day at a time for the next 10 days. </span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">19th May 2019 Day 3 :</span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">We got up a bit late and hungry . So after finishing 3 parathas and a sandwich, we started for Kullu via Prashar lake.</span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">However, Reyansh had a thorn in his feet, and we wanted to buy a forcep to get rid of the thorn. However today was Loksabha voting day in this region so most medical stores were closed. as we drove past a few closed stores, we saw a hospital and decided to visit the emergency room. The doctor and the staff were very helpful and removed the thorn. Jury is still out on if the doctor managed to remove the thorn or not. I believe he did and Richa says that she can still see the thorn. Reyansh is not complaining of pain. So we need to recheck tomorrow. </span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">We started our drive towards Prashar lake. As we were driving, the fact that Himalaya is a range of mountains dawned upon me, once gain after 11 years. For Richa and Reyansh it was a first experience, where you climb a mountain ... Get down and then climb the next one. Or just when you thought that we are on the peak of a tall mountain...the taller one emerges on the next turn. Himalayas are beautiful and one needs to be focus to avoid any mishaps while driving. </span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">As we closed in towards the peak of the mountain which hosts Prashar lake, Reyansh had symptoms of motion sickness. Our trip to Yercaud had surfaced this for the first time and we were thankfully better prepared. We gave him medicine and stopped for a quick break which turned out to be lunch break. We had some jeera rice and dal. All 3 of us were full in one portion. </span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">Finally we were at Prashar lake. It's really a beautiful lake with a temple of Prashar muni and is frequented by the locals who use it as a picnic spot. </span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">We had a stroll around the lake and then started our drive to Kullu at 2.30 pm. Reyansh fell asleep immediately and we drove in mountains. It was a narrow and curvy road. So we were slow and steady. </span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">Finally we reached near Kullu by 5.30 PM. we decided to have snacks which turned out to be dinner for me. Richa spoke to the kind lady on reception who told us that there isn't much to do in Kullu except shopping, rafting and visiting sarabai monastery. We immediately went to Sarabai monastery. We reached there around 6.45 and closing prayers for the day were going on. I spoke to a kid monk, who told us that he is studying in class 5. He wasn't participating in the prayers as it was his year of service. He is supposed to serve all the monks who are praying with tea, snacks etc. for the whole year. He came from Manali to study there. The monastery teaches them sanskrit, english, Hindi and Tibetan . They teach students till class 8th post which he wasn't sure what they do. But be wants to become a big man once he grows up. He visits his parents on his own...whenever he wished ..though he needed to apply leave for it. </span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">After visiting the monastery we decided to drive to Manali as we felt we still had energy. The road to Manali from Kullu is as good as you get in the plains, you don't feel that you are driving in Himalayas (though you are) and engineers have done a good job on design. However, 10km before Manali we were stuck in a huge Jam. It was adding at least 40 mins of delay. After waiting for 20 mins We decided to make a U turn. Having no plan turned a blessing. We found a hotel 1.5 km behind us. Richa negotiated a 25% discount and we checked in to crash for the night. </span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">Signing off Day 3</span></div>
luckyabhishekhttp://www.blogger.com/profile/06037992570806202609noreply@blogger.com0tag:blogger.com,1999:blog-5179143545338829173.post-24195886838694741122019-06-06T21:14:00.001-07:002019-06-06T21:14:28.301-07:00Day 2 : Diaries from Summer Vacation 2019<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif; font-size: large;">We took an awesome and memorable 10 day road trip (17th May 2019 - 27th May 2019) from Chandigarh to Amritsar via Himachal Pradesh. These are the notes taken every night from that vacation. I will publish them one day at a time for the next 10 days. </span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">18th May 2019 Day 2 : </span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: Verdana, sans-serif;">The hotel we stayed over last night had a huge window and it opened towards a government school. As I was mentioned yesterday the infrastructure at Chandigarh is amazing. Here is a picture of that school. </span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk6uHksldFWswothNKptEoJXEK5AlYfFbq5vmdGyQBoO7p-j8h_vP7loYxOBRquhs4JeArFKQP7_6O7AyimJxlprBcvY3_iohwx53YPcRY60pXC_YGLH67jBALNixnTRvbczufA532VAI/s1600/IMG_20190518_075554.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1200" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk6uHksldFWswothNKptEoJXEK5AlYfFbq5vmdGyQBoO7p-j8h_vP7loYxOBRquhs4JeArFKQP7_6O7AyimJxlprBcvY3_iohwx53YPcRY60pXC_YGLH67jBALNixnTRvbczufA532VAI/s640/IMG_20190518_075554.jpg" width="480" /></a></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: Verdana, sans-serif;">I haven't seen such open spaces in some of the privately funded schools of Bangalore, which charge a high fee. The first and the only planned city of India is something to be proud of and needs to be emulated across. </span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: Verdana, sans-serif;">The objective for today was to visit Rock Garden and then reach Mandi before sunset. That would have given us ample rest before we drive to Kulu via Prashar Lake. After breakfast we landed in Rock Garden and it is one of the most amazing places we have seen in India. It was very clean and has amazing collection of things made from rocks. It is one man's creation (Nek Chand) and I can only imagine what would have happened to him had he not found some support from a city like Chandigarh. The garden is world class. It could be a bit more well maintained (the signs and audio guides are missing.) And has the potential of becoming a much more popular tourist spot. </span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: Verdana, sans-serif;">After rock garden, we decided against visiting the lake in Chandigarh and drove towards Kirtarpur Sahib. Pradeep (our zoomcar ground executive) had suggested that if we drive towards Mandi then that's the city from which we should cross over to Himachal, as we would easily spot the RTO office of Himachal where we will have to pay the road tax.</span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: Verdana, sans-serif;">On the way to Kirtarpur Sahib it was almost time for lunch. We did Google around a bit and figured that there are a lot of Gurudwaras in Anandpur Sahib. It adds a bit of drive for us but then we can see a nice Gurudwara, have Prasad in Langar. We also saw that there is a highly reviewed and rated museum called Virasat-e-Khalsa. We visited Gurudwara Kila Sri Anandgarh Sahib and had our lunch over in langar. Post that we visited Virasat-e-Khalsa which is an amazing museum. The entry is free and the structure is clean and has an imposing presence. The exhibits inside were very well maintained and planned. We ended up spending a good amount of time in these 2 places. And that meant we were going to be driving late. </span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: Verdana, sans-serif;">We started from this place around 4.15 PM and the question in our head was, do we want to visit Bhakra dam as it could be a life time experience. We decided against it as it would have added a couple of hours of drive time and another hour of visiting time.We wouldn't have made there during the sunny hours and visit would have been out of question.</span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: Verdana, sans-serif;">We started to drive towards Mandi. On the way we had dinner around 7 pm. It was good chapati (got them after 2 days as all we got in Chandigarh was tandoori rotis) with dal and Potatoes. </span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: Verdana, sans-serif;">We kept driving and finally halted for night in a Oyo around 10 kms before Mandi. </span></div>
<span style="font-family: Verdana, sans-serif;"></span><br />
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: Verdana, sans-serif;">We want to visit Prashar Lake and land in Kulu by sunset tomorrow. Let's see how it pans out. </span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: Verdana, sans-serif;">Signing off day 2</span></div>
</div>
luckyabhishekhttp://www.blogger.com/profile/06037992570806202609noreply@blogger.com0tag:blogger.com,1999:blog-5179143545338829173.post-50055990246631247562019-06-06T01:13:00.001-07:002019-06-06T21:28:14.161-07:00Day 1 : Diaries from Summer Vacation 2019 <div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif; font-size: large;">We took an awesome and memorable 10 day road trip (17th May 2019 - 27th May 2019) from Chandigarh to Amritsar via Himachal Pradesh. These are the notes taken every night from that vacation. I will publish them one day at a time for the next 10 days. </span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">17th May 2019 Day 1 : </span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="background-color: white; color: #222222;"><span style="font-family: "verdana" , sans-serif;">This is our second summer vacation with Reyansh. Last year we had gone to Singapore however this year we decided to keep it within India. Whilst planning this vacation all we could agree on was that we land on Chandigarh and take off from Amritsar. We could never agree or deliberate on what to do for the days in between. </span></span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">As we kept postponing to plan the plan, the date to take off came very near, and so we decided to make the best use of this unplanned trip. We decided to make it an impromptu road trip where we will decide the night halt and next days plan on the go. </span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Here starts the day 1 of this trip. </span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">We took a cab from our home to Bangalore airport. The cab was booked through MakeMyTrip and the cost of Rs. 789 is a steal for us. Halfway through we realised that Reyansh is feeling sick. Is it due to motion sickness ?(happened in our last trip to Yercaud and Maheshwar) or is it because of some bad food he had ? We still don't have the answer. But we are worried as we do have a rough idea that we will go to Himachal on between Chandigarh and Amritsar. We have approximately 10 days!!!.</span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">As we reached airport, the flight or Chandigarh is a non stop air Asia flight. Reyansh slept for an hour in between while me and Richa couldn't. The funny part was that Reyansh had a couple of glasses of water before he went to sleep, he got up as the cabin was being prepared for touchdown. As soon he got up he wanted to pee and cabin crew refused to allow us to leave seats due to turbulence and aircraft was preparing to land. This is the first time he could control his urge to pee, successfully for 15 mins, and he went to restroom as soon as we landed. I was prepared mentally, to clean up the seats after he wets his pants but it never came to it :). </span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">After we landed in Chandigarh we took a cab to pick our rental car from Chandigarh railway station. We had booked a Ford EcoSport as it's a new model and were looking forward to take it for our trip. However as soon as we landed in Chandigarh , Zoomcar executives called us to inform that they don't have the EcoSport available as it needs some maintenance and they can offer a scorpio or a swift hatchback. We chose scorpio as it sounded like an upgrade. However once we reached the pickup site we realised it was an old scorpio which was already driven for more then 85000 kms and the driving experience was not the best. As we prepared to accept our fate, Richa saw an EcoSport and asked the onsite Zoomcar executive as to why we aren't offered that as we had booked an EcoSport. The exec on ground asked us to call the call centre. When we called them they couldn't offer it as it was booked by 3-4 people in next 7 days and they didn't want to apologise to all of them. I asked them if they could offer something else, I can also see some XUVs there . Finally they offered us with XUV W5 version. It had closed 908 kms before we took it. </span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">It was a good upgrade for us. </span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">We then drove to international dolls museum which was established in 1985. The museum has dolls which look like brides from various states in India, they also have dolls which represent culture of different countries. However the museum needs upkeep and a way to make the tour interesting. The souvenir shop didn't have any dolls on offer, which is surprising.</span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Next we went to Zakir Hussain Rose Garden which is spread over 40 acres and has almost 800+ variety of roses. The roses weren't blooming but Reyansh enjoyed running in open spaces. </span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">In the evening we roamed around in the city and had dinner at a pure veg restaurant (Sindhi Sweets) in sector 17. The food was good and Richa also did some shopping . </span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">I loved Chandigarh city, it's planned and can compete with any city in the world in terms of infrastructure. Can't understand why we can't simply copy the best practices from a city like this and make whole of India like this. </span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">With this ...signing off from day 1. Tomorrow we go and sleep in Mandi . And need to visit Rock garden before we leave ....</span></div>
<div dir="auto" style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Signing off day 1.</span></div>
luckyabhishekhttp://www.blogger.com/profile/06037992570806202609noreply@blogger.com0tag:blogger.com,1999:blog-5179143545338829173.post-56162386905089440492019-03-27T06:01:00.000-07:002019-03-27T06:01:11.912-07:00Connecting to Cloud Foundry Kafka Service from your localhost using KafkacatSo we are developing a cloud foundry application and one of the backing services we use is a Kafka Service. Our backing service uses SASL for authentication and uses a self signed certificate issued by the owner of the backing service.<br />
<br />
Now we all know that while deploying and debugging the application on localhost while connecting with Cloudfoundry backing is sometimes a necessary evil and depending on your network setup it could sometimes be tricky.<br />
<br />
I managed to make Kafkacat (https://github.com/edenhill/kafkacat) connect to the backing service from my local macbook. Here is how you can achieve it.<br />
<br />
Here is how my service looked like in the VCAP_SERVICES variable.<br />
<br />
<script src="https://gist.github.com/luckyabhishek/aefd8fc3a95fbf095cb94ed61c429edb.js"></script>
<br />
Now there are a couple of challenges for me to work with service using Kafkacat.<br />
<br />
<ul>
<li>The username and password given in the VCAP_SERVICES variable don't work directly with Kafkacat. We have to generate a Token using the token services URL given in the json and then provide that authentication token as password to the utility. </li>
<li>The broker IPs and the zookeeper IPs (10.254 series of IPs in the json) are unreachable from my local machine.</li>
<li>The SSL communication between kafkacat and kafka service is encrypted by a certificate which is issued by the rootCA which is available on https://kafka-service-broker.example.com/certs/rootCA.crt</li>
</ul>
<div>
<br /></div>
<div>
Let's solve these issues one by one. </div>
<div>
<ol>
<li>In order to create the token to be provided to the kafka service as a password you can use the following script. The envrionment variables USERNAME and PASSWORD are set to the values which you found in the VCAP_SERVICES. The output of this command can be set in another environment variable TOKEN which we will use in the final steps. <script src="https://gist.github.com/luckyabhishek/87f3c24afa9b066f51e765df4eafd775.js"></script>
</li>
<li>You should store all the BROKERS in an environment variable called BROKERS. </li>
<li>In order to make the kafkacat work, we need to make sure that we are able to reach the 3 broker IPs given in the environment variables from the localhost. We will do this with the help of virtual interfaces and ssh tunnels on the macbook. I didn't manage to find the right way to do it using bash so I am listing down the steps you need to take from UI (with screenshots). </li>
<ul>
<li>Open the network option in your System Preferences and from the bottom wheel select "Manage Virtual Interfaces" . <div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm-dyy0DmDafcP0fT-STvdg-e3ZytJKYn3lIP4tMK39OVS9MiO9VtlVhE1wnBVYqrOI4fzv3umkJlyh_SLViVZvMBLImWWk1IfSHwLVPfPBJP46YAp-IBUUn4SEXAlcicwn8KUxeGgFLw/s1600/Screen+Shot+2019-03-27+at+6.04.24+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="679" data-original-width="669" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm-dyy0DmDafcP0fT-STvdg-e3ZytJKYn3lIP4tMK39OVS9MiO9VtlVhE1wnBVYqrOI4fzv3umkJlyh_SLViVZvMBLImWWk1IfSHwLVPfPBJP46YAp-IBUUn4SEXAlcicwn8KUxeGgFLw/s320/Screen+Shot+2019-03-27+at+6.04.24+PM.png" width="315" /></a></div>
</li>
<li><div class="separator" style="clear: both; text-align: left;">
In the next dialog select Add VLAN option to add a VLAN. </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizcb5p9bZE6wqqG5CX9utYR1DjvbmqV8me9c3g99CqBZ4yX5K_VOPrY_6tk29l4TxmmhLFp7dT_fyNGneMOfPdqkEcIlFZxa98yuPUDu6BVPdcnDb15842InaPksGDIEMmTcX8s86o4xc/s1600/Screen+Shot+2019-03-27+at+6.06.39+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="568" data-original-width="676" height="268" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizcb5p9bZE6wqqG5CX9utYR1DjvbmqV8me9c3g99CqBZ4yX5K_VOPrY_6tk29l4TxmmhLFp7dT_fyNGneMOfPdqkEcIlFZxa98yuPUDu6BVPdcnDb15842InaPksGDIEMmTcX8s86o4xc/s320/Screen+Shot+2019-03-27+at+6.06.39+PM.png" width="320" /></a></div>
</li>
<li><div class="separator" style="clear: both; text-align: left;">
Give the VLAN the name vlan0 and select an interface. (You need to select the interface you are connected to else it doesn't work). </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_NxUgYv2HFInDt_V-yg0axInVxGmS12sbaNeEVjhyphenhyphen1MVAP3Ta5tAHtzYu6vTjCrugI3f4gjUT2OKlqxak748ILdYs0GpoGNP2eF0Im5hn-Fm7D-QXoVzD5i2cXJage37CX1LR56fiMxY/s1600/Screen+Shot+2019-03-27+at+6.08.30+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="563" data-original-width="671" height="268" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_NxUgYv2HFInDt_V-yg0axInVxGmS12sbaNeEVjhyphenhyphen1MVAP3Ta5tAHtzYu6vTjCrugI3f4gjUT2OKlqxak748ILdYs0GpoGNP2eF0Im5hn-Fm7D-QXoVzD5i2cXJage37CX1LR56fiMxY/s320/Screen+Shot+2019-03-27+at+6.08.30+PM.png" width="320" /></a></div>
</li>
<li><div class="separator" style="clear: both; text-align: left;">
Press create->done and ensure that VLAN appears in the network dialog, as shown below. </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfAFjQ8NDwZ4IeC-xhlM9XYMy74I8LwRhR8TkB91wiGGTSYdZTEleKvZAcVXiVipyX4PEqan7edV9WGDNAZtM_kXzZkQBXQ2kESkST8s2tnGtCLk2YftfjzzeJ7ukye3SA6UJDjRq7IaY/s1600/Screen+Shot+2019-03-27+at+6.10.19+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="564" data-original-width="671" height="268" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfAFjQ8NDwZ4IeC-xhlM9XYMy74I8LwRhR8TkB91wiGGTSYdZTEleKvZAcVXiVipyX4PEqan7edV9WGDNAZtM_kXzZkQBXQ2kESkST8s2tnGtCLk2YftfjzzeJ7ukye3SA6UJDjRq7IaY/s320/Screen+Shot+2019-03-27+at+6.10.19+PM.png" width="320" /></a></div>
</li>
<li><div class="separator" style="clear: both; text-align: left;">
Now go ahead and change the Configure IPv4 from DHCP to manually and assign one of the IP address which we had in the VCAP_SERVICES to this vlan interface. </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzQg3sR7GeC3FluXllu9Mn6KvtWFVQSJxFcycaELD7I6QXzbf2jw4C4aiKNo0CUbwFlarPBAJCdiLLh1Fl4mpb2Fnn0lmYgUwrK4HbBZYLwDh0Hgw4noSmxeZcAUsEXGw5bGjKtkFhioo/s1600/Screen+Shot+2019-03-27+at+6.15.29+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="563" data-original-width="668" height="269" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzQg3sR7GeC3FluXllu9Mn6KvtWFVQSJxFcycaELD7I6QXzbf2jw4C4aiKNo0CUbwFlarPBAJCdiLLh1Fl4mpb2Fnn0lmYgUwrK4HbBZYLwDh0Hgw4noSmxeZcAUsEXGw5bGjKtkFhioo/s320/Screen+Shot+2019-03-27+at+6.15.29+PM.png" width="320" /></a></div>
</li>
<li><div class="separator" style="clear: both; text-align: left;">
After this go ahead and duplicate vlan0 2 times. The option is available as shown below. </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHxcsm0Tcmk4QhLJbje3h-2t0LoCK35pACjk332OnqHgtFRuBJeRkv-z4ofpUurJNgL025LXO8KCLTEABbkDtAaMfl6Q531Syr6HkDRYjS0-hUo8O4-DK1MB0rYVgfF5PLk1SO7q2YGIg/s1600/Screen+Shot+2019-03-27+at+6.16.43+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="565" data-original-width="658" height="274" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHxcsm0Tcmk4QhLJbje3h-2t0LoCK35pACjk332OnqHgtFRuBJeRkv-z4ofpUurJNgL025LXO8KCLTEABbkDtAaMfl6Q531Syr6HkDRYjS0-hUo8O4-DK1MB0rYVgfF5PLk1SO7q2YGIg/s320/Screen+Shot+2019-03-27+at+6.16.43+PM.png" width="320" /></a></div>
</li>
<li><div class="separator" style="clear: both; text-align: left;">
Make sure that you enter the other 2 IPs in the duplicated interfaces. After this step my dialog looks like the following. Please note that IP is different for all 3 interfaces. For me vlan0 => 10.254.33.21, vlan1 => 10.254.33.22, vlan2 => 10.254.33.23 now. </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqbnzb8fTnHdwrpFs9WDsH4Np8b03xeCGqxK27OK771zplunCCQOu4-LSAFKncNBCWGCnr-PSATBe6EAas0st4XZXyueTWo5S3ir84hPg5MGo_DwNIsX7xWcUwW5yTI88UJRai1ETrzVw/s1600/Screen+Shot+2019-03-27+at+6.18.47+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="563" data-original-width="673" height="267" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqbnzb8fTnHdwrpFs9WDsH4Np8b03xeCGqxK27OK771zplunCCQOu4-LSAFKncNBCWGCnr-PSATBe6EAas0st4XZXyueTWo5S3ir84hPg5MGo_DwNIsX7xWcUwW5yTI88UJRai1ETrzVw/s320/Screen+Shot+2019-03-27+at+6.18.47+PM.png" width="320" /></a></div>
</li>
</ul>
<li style="text-align: left;">After the above step, the macbook now starts responding to all the 3 broker IPs. Now we need to ensure that any request on these interfaces is tunneled to the real Kafka brokers hosted in Cloud Foundry. To do that I establish 3 SSH tunnels with the commands below.
<script src="https://gist.github.com/luckyabhishek/39dacb9414981b8d06ff5e2f974d9a30.js"></script></li>
<li style="text-align: left;">In order to provide the rootCA.crt to kafkacat, I download the certificate to the local machine in a folder from where I intend to use kafkacat. I use curl to do this.
<script src="https://gist.github.com/luckyabhishek/534f96e6311338b8487ab39ec7eb04e7.js"></script></li>
<li style="text-align: left;">You can install kafkacat on mac using brew</li>
<li style="text-align: left;">Now you can start using kafkacat with its normal commands, however since it's a SASL setup, you need to provide some parameters to make it work. Here is how I use kafkacat to list all topics.
<script src="https://gist.github.com/luckyabhishek/bd2d954eb943d889e3fc5602a35afd56.js"></script>
You can use the same format to execute any other kafkacat commands you are interested in. You can also use your java application running your localhost to now start connecting to the remote kafka service on cloudfoundry. </li>
</ol>
<div>
<br /></div>
</div>
<div>
Happy coding</div>
<div>
!Abhishek</div>
luckyabhishekhttp://www.blogger.com/profile/06037992570806202609noreply@blogger.com0tag:blogger.com,1999:blog-5179143545338829173.post-6785482662022936112019-03-11T21:52:00.000-07:002019-03-11T21:54:05.639-07:00Ubuntu with a desktop and RDP on Azure<span style="font-family: "verdana" , sans-serif;">Often while working on various projects, we need VMs with the OS which is different then the one available on local laptop. </span><br />
<span style="font-family: "verdana" , sans-serif;">More often then not I need Ubuntu which I don't have on my mac and I end up creating a VM on Azure, RDP into it from my local mac machine. </span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">In order to do this, one can create a VM on Azure (I chose Ubuntu 18.04 LTS image on Azure). Once created SSH into machine and follow the below instructions to ensure that you are able to RDP into this machine. </span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span><span style="font-family: "verdana" , sans-serif;">Use the following script to achieve it. </span><br />
<script src="https://gist.github.com/luckyabhishek/c6ef1785344ae20f6d6b05f3def57a21.js"></script>
<span style="font-family: "verdana" , sans-serif;"><br /></span><span style="font-family: "verdana" , sans-serif;">You can now go ahead and RDP into the machine. </span>luckyabhishekhttp://www.blogger.com/profile/06037992570806202609noreply@blogger.com0tag:blogger.com,1999:blog-5179143545338829173.post-1125715043957002132019-02-26T03:18:00.002-08:002019-02-26T03:18:58.277-08:00Deploy your own UAA in Cloudfoundry<span style="font-family: "verdana" , sans-serif;">One of the interesting backing service in the cloudfoundry landscape is a UAA. In most cloudfoundry editions (e.g. Pivotal or SAP and probably in others too) one gets UAA as a backing service. However from time to time one wants to run their own UAA to see how things are really working or just for the high of having their own UAA :). </span><br />
<span style="font-family: "verdana" , sans-serif;">Recently I had a requirement to host a UAA of my own as I was trying to understand how the JWTs are really getting issued by UAA and how exactly are they signed etc. </span><br />
<span style="font-family: "verdana" , sans-serif;">As I turned to web to ensure that I can host my own UAA, it turned out that most articles do not have enough instructions to host a UAA in PCF as an app. Thus came the idea to document all I had to do to deploy my own UAA. </span><br />
<span style="font-family: "verdana" , sans-serif;">Note that below instructions can be followed to get a just about working UAA and are in no way enough to install the UAA for production purposes. </span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">Here are the basic tools you would need to finish this exercise.I have a mac so most commands assume at least bash</span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">1) git CLI</span><br />
<span style="font-family: "verdana" , sans-serif;">2) uaac (</span><span style="background-color: rgba(27 , 31 , 35 , 0.05); color: #24292e; font-family: , "consolas" , "liberation mono" , "menlo" , "courier" , monospace; font-size: 13.6px;">gem install cf-uaac)</span><span style="font-family: "verdana" , sans-serif;"> </span><br />
<span style="font-family: "verdana" , sans-serif;">3) cf cli with access to a CF space where you can deploy an application </span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">Once you are set with these command line utilities, here are the steps to follow </span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">1) Go ahead and clone the repository </span><span style="font-family: "verdana" , sans-serif;">https://github.com/cloudfoundry/uaa.git </span><br />
<span style="font-family: "verdana" , sans-serif;">2) once cloned you need to make a few changes in some files. </span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">In the file uaa/src/main/resources/uaa.yml go ahead and add the following lines in the begining of the file </span><br />
<script src="https://gist.github.com/luckyabhishek/b304713e66f915400753df244b83ba84.js"></script>
<span style="font-family: "verdana" , sans-serif;"><br /></span><br />
<span style="font-family: "verdana" , sans-serif;">Next go ahead and uncomment the section jwt and cors in the same file. It looks like the following </span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">Then go ahead and open the file uaa/src/main.webapp/WEB0INF/spring/saml-idp.xml and add a keyManager for the bean idpMetadataManager. After this addition the bean definition looks like </span><br />
<script src="https://gist.github.com/luckyabhishek/8c3ea96d86fbd31d78874134ad26ef06.js"></script>
<span style="font-family: "verdana" , sans-serif;"><br /></span><br />
<span style="font-family: "verdana" , sans-serif;">Lastly we need to change the memory and timeout for the deployment descriptor found in uaa/src/test/resources/sample-manifests/uaa-cf-application.yml </span><br />
<script src="https://gist.github.com/luckyabhishek/43d35ed6e261771a1f141a249d2ca329.js"></script>
<span style="font-family: "verdana" , sans-serif;"><br /></span><br />
<span style="font-family: "verdana" , sans-serif;">3) Once these changes are done go ahead, build and deploy the application using the following commands </span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<script src="https://gist.github.com/luckyabhishek/9949276c67a3e36c77ef3a8fa45127b8.js"></script>
<span style="font-family: "verdana" , sans-serif;">4) Now that you have deployed the UAA. It's time to login to the UAA using uaac</span><br />
<script src="https://gist.github.com/luckyabhishek/9126d493eba4288b8a1d34549e0c4d52.js"></script>
<span style="font-family: "verdana" , sans-serif;"><br /></span><span style="font-family: "verdana" , sans-serif;">You can probably change this secret in /uaa/src/main/webapp/WEB-INF/spring/oauth-clients.xml (I haven't tried this bit though) </span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">5) You can even create a new client credential on UAA by using the commands below. You can use these commands to list the JWTs issued by UAA as well. </span><br />
<script src="https://gist.github.com/luckyabhishek/c36c00b27e6b464a89effedf16cca4d1.js"></script>
<span style="font-family: "verdana" , sans-serif;"><br /></span><span style="font-family: "verdana" , sans-serif;">Happy Coding :) </span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">~Abhishek</span>luckyabhishekhttp://www.blogger.com/profile/06037992570806202609noreply@blogger.com0tag:blogger.com,1999:blog-5179143545338829173.post-74111303713936692542017-08-21T01:06:00.000-07:002017-08-21T01:06:15.914-07:00SCI and User, Roles and Groups<div style="text-align: justify;">
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">In the <a href="http://luckyabhishek.blogspot.in/2017/07/getting-started-with-sap-identity.html">previous post</a> I discussed how to get started with SAP ID Service and build a simple HCP Application which outsources its authentication to SAP ID Service. </span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Now let's extend this scenario. In general I like to use Identity Provider to provide me with user attributes like name, email address etc. and also provide me with group memberships. So the greeting service should greet the end user with the real name, rather then an ID like P0000 which we saw in the previous post. </span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">I would also like to introduce 2 roles in my application viz. Everyone and GreetingEditor. </span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">At the application side I generally prefer to create roles and groups. These roles and groups on the application side have a 1:1 mapping. So we will create a group called GreetingEditor and a group called GreetingEditors.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">While creating/enrolling the application with the IdP I generally like to map the groups on IdP side with the groups on Application side. These mappings could be based on AND or OR condition. e.g. A user in IDP who is present in both 'ChiefGreeters' and 'Editors' group should be mapped to the group called "GreetingEditors</span><span style="font-family: "verdana" , sans-serif;">" in my greeting application. </span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">The group GreetingEditors should then be assigned the role GroupEditor. </span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Let's extend our Greetings Application for the above scenario. Let's first fix the fact that it greets the end user with her name rather then the crazy ID like P0000. </span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Open web.xml and add the following entry </span></div>
<div style="text-align: start;">
<script src="https://gist.github.com/luckyabhishek/409319e66a13298d1c88a41685866f84.js"></script>
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<br />
<div style="text-align: justify;">
</div>
<span style="font-family: "verdana" , sans-serif;">Then open your Greeting.java and in your doGet method add the following code. </span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<script src="https://gist.github.com/luckyabhishek/a4be2b6962d9ae2123de760e86e69079.js"></script>
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">What you are essentiallly doing is that you are using User Provider available in HCP to parse and provide us with the SAML attributes which we get from the SAP Identity Service. In order to ensure that these attributes viz. firstname and lastname are available with the application we need to configure the application correctly in the SAP Identity Service management console. </span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">Go to your Management Console and choose Applications & Resources -> Applications -> Custome Applications -> sayHello (This is the name of my applications" -> Assertion Attributes.</span><br />
<span style="font-family: "verdana" , sans-serif;">Now Ensure that you have First Name and Last Name added in the user attributes. This is how the screen should look like </span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlj2jcWGs3LYHfruppXNXuNqTccx5f_zyUGLf9kZE6f2qH_TtA_Yqw_Ilfxq5-iIosde75U9v3gGceTVUyqwkWDpNRNUKxOFi2T2YQtx73hXbfC6QYJsaB7nRsmifqBK4BRr2ndYiuZ6k/s1600/Screen+Shot+2017-08-16+at+11.29.12+AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="369" data-original-width="1065" height="136" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlj2jcWGs3LYHfruppXNXuNqTccx5f_zyUGLf9kZE6f2qH_TtA_Yqw_Ilfxq5-iIosde75U9v3gGceTVUyqwkWDpNRNUKxOFi2T2YQtx73hXbfC6QYJsaB7nRsmifqBK4BRr2ndYiuZ6k/s400/Screen+Shot+2017-08-16+at+11.29.12+AM.png" width="400" /></a></div>
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">If you look at the screenshot above the attributes are called first_name and last_name while I query firstName and lastName in my application code. This is because the second mapping is yet to be done. In the second mapping we are going to map these attributes for the application in the Cloud Cockpit. Go to your SubAccount -> Trust -> Application Identity Provider -> (Select the IdP) </span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">Now select Attributes tab and add 2 assertion based attributes. The assertion based attribute should map first_name to firstName and last_name to lastName. This is how my screen looks like </span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9VcSPYoXjLYfprpKI_PhL9NWMQA17F_NK8ZicpyL0FIuejvif3lm0XSeJH70bGQnCa7crQZHz5qKOevdme7shiOiUYz7BLD7Ds56o8i1EtV9UglPnpzT3otXE_TTdB5OnnQtB3ld5tBM/s1600/Screen+Shot+2017-08-16+at+11.35.15+AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="173" data-original-width="1093" height="61" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9VcSPYoXjLYfprpKI_PhL9NWMQA17F_NK8ZicpyL0FIuejvif3lm0XSeJH70bGQnCa7crQZHz5qKOevdme7shiOiUYz7BLD7Ds56o8i1EtV9UglPnpzT3otXE_TTdB5OnnQtB3ld5tBM/s400/Screen+Shot+2017-08-16+at+11.35.15+AM.png" width="400" /></a></div>
<br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">This mapping ensures that the SAML attributes coming from IdP are mapped to the user attributes in the application which is using the UserProvider. </span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">Now deploy the application and run it. It should now say "Hello, <<loggged in="" name="" s="" user="">>" </loggged></span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">So we achieved the first objective of this exercise. As a matter of fact you can map many user fields like phone number, address, groups etc. as assertion attributes in the Application Configuration at the IdP side and then map them to custom attributes on the IdP configuration at the application side. </span><br />
<span style="font-family: "verdana" , sans-serif;">This helps us with the fact that you can outsource the user management totally to SAP Identity Service. </span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">Let's go ahead and now and configure the roles and groups as per our requirement. </span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">First let's try to setup roles to ensure that we have OOB roles created when we deploy the applications. </span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">Open web.xml and add the following security roles there. </span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;"><script src="https://gist.github.com/luckyabhishek/db9a08a06698a247c957e1ac8f0ee323.js"></script></span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;"><br /></span><br />
<span style="font-family: "verdana" , sans-serif;">Please note that the role EveryOne is created and assigned to every authenticated user by default, so you need not specify this role in the web.xml. Next time you publish your application to HCP you'd see a role called GreetingEditor. In your cloud cockput, you can go to SubAccount -> (Select the Application) -> Security -> Roles. </span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1uZqGRjhMk-uIqu-0D7cYjOl2If3tLPmid4Rt8yceT_Yn6YrBFU2aCG9nLzMOq9Nw5SzXkyql0XV8pR6mL31nqrpHvzOd_K8pGYNgTePbjyyc5IlzTWhmaCtwyux8q4cdZFLP_iWnFr0/s1600/Screen+Shot+2017-08-16+at+1.47.45+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="170" data-original-width="1419" height="47" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1uZqGRjhMk-uIqu-0D7cYjOl2If3tLPmid4Rt8yceT_Yn6YrBFU2aCG9nLzMOq9Nw5SzXkyql0XV8pR6mL31nqrpHvzOd_K8pGYNgTePbjyyc5IlzTWhmaCtwyux8q4cdZFLP_iWnFr0/s400/Screen+Shot+2017-08-16+at+1.47.45+PM.png" width="400" /></a></div>
<br />
<span style="font-family: "verdana" , sans-serif;">Once this is done let's go ahead and create a group called GreetingEditors. On the same screen click Assign on the Groups tab and create a new group and save it. Once it is assigned to the role this is how your screen would look like. </span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbbeVhk9mK41Egx2HbGAf04vcuWevyQEznHMRLa6Kqd6UY8kPj74oCv5Onmw74WWeezZpi4k2XtvPwJHtJ1KXsgEhHe82Ek66GTO2XORS_wvcvWMK4lEhsImqbk8mAcoHaOzOLCeH0K3A/s1600/Screen+Shot+2017-08-16+at+1.50.46+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="448" data-original-width="1428" height="125" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbbeVhk9mK41Egx2HbGAf04vcuWevyQEznHMRLa6Kqd6UY8kPj74oCv5Onmw74WWeezZpi4k2XtvPwJHtJ1KXsgEhHe82Ek66GTO2XORS_wvcvWMK4lEhsImqbk8mAcoHaOzOLCeH0K3A/s400/Screen+Shot+2017-08-16+at+1.50.46+PM.png" width="400" /></a></div>
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">Now let's go ahead and add the relevant groups we discussed to the IdP. In the SAP Identity Service admin console go to Users & Authorizations -> User Groups and Add 2 new groups. Now go to the User Management and assign these 2 groups to a user. This is how my user looks like after the changes are done. </span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXsgRzwjq1Ap1KvxWSWFjhju4S1XTJmccxaGBMuLU0G4DVDA59I4c-_u1d4ap41idZhUc96AAaRbeLjsQLnkDstDaPhAiYUyd7B-ry4N9PACnNrUshqupuoHHKqqj-1GnGJpwmWe1RxzI/s1600/Screen+Shot+2017-08-16+at+2.05.53+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="381" data-original-width="1417" height="107" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXsgRzwjq1Ap1KvxWSWFjhju4S1XTJmccxaGBMuLU0G4DVDA59I4c-_u1d4ap41idZhUc96AAaRbeLjsQLnkDstDaPhAiYUyd7B-ry4N9PACnNrUshqupuoHHKqqj-1GnGJpwmWe1RxzI/s400/Screen+Shot+2017-08-16+at+2.05.53+PM.png" width="400" /></a></div>
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">Now we need to ensure that these groups are sent to the application as part of SAML attributes. In order to do this we need to go to Application Configuration on the IdP side and add another SAML Assertion Attribute called groups to the list of attributes the IdP passes to the application. Here's how my screen looks like once I make this change. </span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjnJyI2bAX6EiWYh7iYReNHyVuqDcbF7v-FBTpvC2mJ_aAJ5vD55JHcQUqQsIu6Y_Lp1vkg63_Hy6lR1LRIqchCtp0FBtiLRuOFh2u7Bdi6pZVDv-gS2MfNq7r0PP868egCrJ7egXpXEo/s1600/Screen+Shot+2017-08-16+at+2.13.08+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="372" data-original-width="1076" height="137" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjnJyI2bAX6EiWYh7iYReNHyVuqDcbF7v-FBTpvC2mJ_aAJ5vD55JHcQUqQsIu6Y_Lp1vkg63_Hy6lR1LRIqchCtp0FBtiLRuOFh2u7Bdi6pZVDv-gS2MfNq7r0PP868egCrJ7egXpXEo/s400/Screen+Shot+2017-08-16+at+2.13.08+PM.png" width="400" /></a></div>
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">Once this is done we need to ensure that we do the appropriate mapping in the application such that if a user is part of both ChiefGreetors and Editors group in IdP, she is assigned to GreetingEditors group in the application, thus assigning her with the role GreetingEditor. In order to do this we need to enter the IdP configuration in the HCP Cockpit and add a simple assertion based group in the Groups Tab. Here's how my tab looks like after the change. </span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPjKkzxzEknyMEyC81wbExqAygVMxchRBTZ-TSyCgtwBOmq-2_q2rV9QIMQcysKOy4VcvyIYFUulg313IBCW-VjKVMNCYRulxsUTAa9HRO-h8TFGcjSgkWr0G30sBbb-CFv2V-yJ-0ly0/s1600/Screen+Shot+2017-08-16+at+2.14.50+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="348" data-original-width="1098" height="126" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPjKkzxzEknyMEyC81wbExqAygVMxchRBTZ-TSyCgtwBOmq-2_q2rV9QIMQcysKOy4VcvyIYFUulg313IBCW-VjKVMNCYRulxsUTAa9HRO-h8TFGcjSgkWr0G30sBbb-CFv2V-yJ-0ly0/s400/Screen+Shot+2017-08-16+at+2.14.50+PM.png" width="400" /></a></div>
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">Now let's change the doGet method of our greeting service to list out the roles the logged on user has been enrolled in. Change the doGet method to the following. </span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;"><script src="https://gist.github.com/luckyabhishek/aa97677da0680313e86b890764ade753.js"></script></span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">Try running your service with the user who has been added to both ChiefGreeters and Editors group and you should see the output which looks like the following. </span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwO7A95ZYlV0wB4TC1wSRmHmTCbyd6-hJemCHdJg6MqRRMd1Ia8rYyxgSNabyhHPuistlKke2H7NXsl6wJOjxGcBx2StENpJOzlvLFJA9iv3zts2PCJtfjunwYDrYnLjnNyApPsDEKC14/s1600/Screen+Shot+2017-08-21+at+1.33.52+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="122" data-original-width="356" height="136" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwO7A95ZYlV0wB4TC1wSRmHmTCbyd6-hJemCHdJg6MqRRMd1Ia8rYyxgSNabyhHPuistlKke2H7NXsl6wJOjxGcBx2StENpJOzlvLFJA9iv3zts2PCJtfjunwYDrYnLjnNyApPsDEKC14/s400/Screen+Shot+2017-08-21+at+1.33.52+PM.png" width="400" /></a></div>
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">Happy Coding!!</span></div>
luckyabhishekhttp://www.blogger.com/profile/06037992570806202609noreply@blogger.com0tag:blogger.com,1999:blog-5179143545338829173.post-9924958879151023382017-07-24T23:30:00.001-07:002017-07-24T23:37:18.671-07:00Getting Started with SAP Identity Service and HCP Cloud<div style="text-align: justify;">
So I recently started working on Hana Cloud Platform and one of the first challenges which await me is to figure out how to achieve SSO in a set of simple applications my team is writing on Hana Cloud Platform. </div>
<div style="text-align: justify;">
Since we are working on Hana Cloud Platform, choosing ID Service is easy, it has got to be SAP Cloud Identity Service. Here are the steps you need to follow, to get you started on HANA Cloud Platform with SCI Service. </div>
<div style="text-align: justify;">
<br />
<div style="text-align: justify;">
Objective : At the end of this blog you should be able to </div>
<div style="text-align: justify;">
</div>
<ul style="text-align: start;">
<li style="text-align: justify;">Run a simple greeting service which would greet the logged in user using SAP Cloud SDK on your local machine</li>
<li style="text-align: justify;">Deploy the greeting service on cloud and configure the application and SCI tenant to greet the end user. </li>
</ul>
</div>
<div style="text-align: justify;">
Pre requisites : In order to make the scenario work, you need a HCP account and access to a tenant of SCI service. You may want to work with your SAP contact to get a handle to both of them. You can also request for the trials online. Once you have access to both, please ensure that you have setup your eclipse with SAP Cloud SDKs. You can follow the instructions on this <a href="https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/7613843c711e1014839a8273b0e91070.html">link</a> to setup your development environments. </div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<ul>
</ul>
<div>
<div style="text-align: justify;">
Let's get started. </div>
</div>
<div>
<ol>
<li style="text-align: justify;">Fire up your eclipse and create a new Dynamic Web Project. Here are a few things to set while you create it </li>
<ul>
<li style="text-align: justify;">Name : sayHello</li>
<li style="text-align: justify;">Target Runtime : SAP -> Java Web Tomcat 8 . It may ask you to set path to a Neo SDK. I set it to the folder where I have unzipped neo-java-web-sdk-3.30.16 SDK. I chose the default workbench JRE which is a SAP JVM in my case. </li>
<li style="text-align: justify;">Dynamic Web Module Version -> 3.1 </li>
<li style="text-align: justify;">I set my sources folder on build path to /src/main and Default output folder to build/target</li>
<li style="text-align: justify;">I do check the Generate web.xml deployment descriptor to true in the wizard. </li>
</ul>
<li style="text-align: justify;">Now let's create a new Servlet. Here's what I fill in my wizard</li>
<ul>
<li style="text-align: justify;">Java Package : com.sample.helloworld</li>
<li style="text-align: justify;">Class name : Greeting</li>
<li style="text-align: justify;">URL mapping : /greeting</li>
</ul>
<li style="text-align: justify;">Add the following code to the doGet and fix the imports</li>
<script src="https://gist.github.com/luckyabhishek/b37083cd759985d314339db2e3b2b5c8.js"></script>
<li style="text-align: justify;">Right click the project -> Run As -> Run on Server. </li>
<li style="text-align: justify;">You now need to define a local tomcat server. Choose SAP-> Java Web Tomcat 8 Server and finish the wizard. </li>
<li style="text-align: justify;">Now try opening http://localhost:8080/sayHello/greeting and it should throw up a login screen. We can't login yet since we haven't defined a user in the container yet. Let's do that in the next step. </li>
<li style="text-align: justify;">Double click the newly defined server in the Servers window of your eclipse. Open Users tab and add a new User. I choose my user name as test. </li>
<li style="text-align: justify;">Hit the service http://localhost:8080/sayHello/greeting again and login with the newly defined username and password. You should now see an output "Hello, test" in your browser. </li>
</ol>
<div style="text-align: justify;">
Now that we have a locally authenticated service working in our eclipse, let's publish the application to HCP and outsource our authentication to SCI. Here are the steps to do that </div>
</div>
<div>
<ol>
<li style="text-align: justify;">Right click on Servers window of your eclipse and choose New Server. </li>
<li style="text-align: justify;">In the dialog box which shows up choose SAP-> SAP Cloud Platform. Enter the correct region code for your HCP account. You can find the available regions and hosts <a href="https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/350356d1dc314d3199dca15bd2ab9b0e.html">here</a>. Mine happens to be int.sap.hana.ondemand.com. (If host for your region is not available on the page, check the post <a href="http://luckyabhishek.blogspot.com/2017/07/host-name-for-europe-rot-canary-region.html">here</a> , as it may help you figure out your host. SAP uses some conventions so you may crack it yourself. )</li>
<li style="text-align: justify;">Enter the application name as sayhello, You can leave the runtime to be chosen Automatically. </li>
<li style="text-align: justify;">The subaccount name is available in your Hana Cloud Cockpit. Enter the subaccount and your credentials. </li>
<li style="text-align: justify;">Add the sayHello application to the configured resources for the server, and press Finish.</li>
<li style="text-align: justify;">It will take some time, but finally the application should be deployed successfully, Copy your application URL from the Server window and hit the greeting service using a browser. The URL for my service was https://sayhelloi031884sapdev.int.sap.hana.ondemand.com/sayHello/greeting and the error I got was "Identity Provider could not process the authentication request received. Delete your browser cache and stored cookies, and restart your browser. If you still experience issues after doing this, please contact your administrator." The error is unintuitive and should have been something different like "There is no IDP configured for this application so I can't allow you to login" </li>
</ol>
<div style="text-align: justify;">
The application is now deployed successfully on HCP so let's proceed to configure the SCI for this application, </div>
<ol>
<li style="text-align: justify;">Open your HCP cockpit and navigate to the subaccount in which you deployed the sayHello application.</li>
<li style="text-align: justify;">On the left hand side navigation choose Security->Trust and click </li>
<li style="text-align: justify;">Change the Local Service Provider from default to Custom, Click Generate Key Pair to generate a new key pair. Let Principal propogation and force authentication be Disabled. and save. </li>
<li style="text-align: justify;">Select the next tab i.e. Application Identity Provider and click Add Trusted Identity Provider. </li>
<li style="text-align: justify;">Before you proceed any further you need to open the SCI tenant in a new browser tab which you have. I have mine hosted on https://i031884.accounts400.ondemand.com/admin/ . Logon to this tenant as administrator and go to Tenant Settings -> SAML 2.0 Configuration and select to download metadata file. </li>
<li style="text-align: justify;">Go back to HCP console ( i.e. the browser tab you were using in step 4 to add trusted identity provider) . Browse and select the metadata file we downloaded in step 5. Choose Save. i031884.accounts400.ondemand.com should now be your default identity provider. </li>
<li style="text-align: justify;">Go to tab Local Service Provider and click Get Metadata again. Save the file in downloads folder </li>
<li style="text-align: justify;">Go back to SCI tenant (Browser tab which we opened in step 5) and navigate to Applications and Resources -> Applications. </li>
<li style="text-align: justify;">Click Add Application and give a name sayhello and click save</li>
<li style="text-align: justify;">select sayhello application and click on SAML 2.0 configuration. Browse to the file you saved in step 7 and click save. You have now configured the application and IDP to trust and know each other. </li>
<li style="text-align: justify;">Try hitting the application again (https://sayhelloi031884sapdev.int.sap.hana.ondemand.com/sayHello/greeting in my case) and it should prompt you to enter id, password and you are good to go :).</li>
</ol>
<div style="text-align: justify;">
<br /></div>
</div>
<div style="text-align: justify;">
Happy coding!!!!</div>
luckyabhishekhttp://www.blogger.com/profile/06037992570806202609noreply@blogger.com0tag:blogger.com,1999:blog-5179143545338829173.post-19521323190174675062017-07-24T22:51:00.000-07:002017-07-24T22:51:01.176-07:00Host name for Europe (Rot) - Canary region in Hana Cloud Platform <div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">While working with Hana Cloud Platform for SAP, one needs to enter the Host name to publish an application to the cloud. Now most of the Host name are documented by SAP on over <a href="https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/350356d1dc314d3199dca15bd2ab9b0e.html">here</a> and more often then not it works for the region where you are working. </span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">However if you have an account on Europe (Rot) - Canary region like I do, the document doesn't specify the host and you would keep scratching your head on what to enter in eclipse. </span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">My first intuition was to do the brute force and I tried a few combinations from the page as host for my account and it kept giving me an error which told me that my password is incorrect. </span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">Now I was sure that my password is not incorrect as I was copying it into the eclipse dialog to be sure. So much for exception handling in eclipse. </span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">Finally asked for help from an ops colleague, who again had no information on this. However while looking into this situation, we noticed a pattern emerging when we click various regions on the HCP cockpit. If you keep selecting various regions in your cockpit and compare them with the host names in the documentation, you can notice that pattern too. And voila we discovered our host name for Europe (Rot) - Canary region. It is "int.sap.hana.ondemand.com" </span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">Happy coding!!!!</span></div>
luckyabhishekhttp://www.blogger.com/profile/06037992570806202609noreply@blogger.com0tag:blogger.com,1999:blog-5179143545338829173.post-9464028129966296052017-01-04T21:58:00.001-08:002017-01-09T04:56:32.321-08:00Making a vagrant box for RHEL<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">One of the assignments at work is getting me into creating a vagrant box for RHEL, as I would want to create and destroy RHEL VMs multiple times in a day. </span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">This blog summarizes the steps to create a vagrant box for RHEL. The software I have are </span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">1) Oracle VM Virtual Box</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">2) An ISO file with RHEL 7 setup rhel-server-7.0-x86_64-dvd.iso</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Let's begin by creating a baseline VM </span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">1) New Machine -> Give a Name, Type is Linux, Version is Red Hat 64 bit</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">2) Memory is fine at 1024 MB</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">3) Create a Virtual Hard Disk. I chose VDI as my hard disk type, Dynamically allocated size is better for me, and the size for HDD is set to 100 GB. </span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">4) Go ahead and mount the iso file to the VM. This can be done by selecting the machine settings -> Storage -> and mount the iso on the optical drive. </span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">5) Start the machine and select to install the RHEL O/S. Walkthrough the wizard and install the RHEL on the VM. While installing the OS I also chose to create an additional user 'abhishek' on it.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">6) Register with the subscription manager by using subscription-manager register</span><br />
<span style="font-family: "verdana" , sans-serif;">7) sudo visudo and comment the line "Defaults .requiretty"</span><br />
<span style="font-family: "verdana" , sans-serif;">8) Create a user called vagrant and set the password as vagrant. Commands to use are useradd vagrant. And passwd vagrant. </span><br />
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Monaco; color: #4d2f2d; background-color: #dfdbc3}
span.s1 {font-variant-ligatures: no-common-ligatures}
</style>
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Once done let's package this VM as a vagrant box </span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">1) vagrant package --base BaseRHEL </span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">2) vagrant box add test package.box </span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">and now you have a vagrant box for the machine. Enjoy creating as many VMs as you want :). </span></div>
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Monaco; color: #4d2f2d; background-color: #dfdbc3}
span.s1 {font-variant-ligatures: no-common-ligatures}
</style>
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Monaco; color: #4d2f2d; background-color: #dfdbc3}
span.s1 {font-variant-ligatures: no-common-ligatures}
</style>
luckyabhishekhttp://www.blogger.com/profile/06037992570806202609noreply@blogger.com0tag:blogger.com,1999:blog-5179143545338829173.post-16503278394535128032016-02-22T21:47:00.001-08:002016-02-22T21:47:46.243-08:00Configuring X11 Forwarding on CentOS to Mac<span style="font-family: Verdana, sans-serif;">I have a linux machine on Azure which I am able to SSH into, however many applications needs to throw a UI on my mac and it is important to configure X11 Forwarding on the CentOS machine to make sure I can see that UI. </span><br />
<span style="font-family: Verdana, sans-serif;">I managed to make it work after googling stuff for around 2 hours. Here's a quick guide if you are in a similar situation. </span><br />
<span style="font-family: Verdana, sans-serif;">You need to do things on both your mac and your CentOS machine to make sure that the forwarding works. </span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">1) On your mac you need to install XQuartz. This is the daemon which would listen for the forwarded requests from your CentOS and render a UI on your mac. </span><br />
<span style="font-family: Verdana, sans-serif;">2) On your CentOS you need to </span><span style="font-family: Verdana, sans-serif;">edit /etc/ssh/sshd_config and add the following entries to it</span><br />
<br />
<ul>
<li><span style="font-family: Verdana, sans-serif;">AddressFamily inet #this entry ensures that SSH is not messed up over IPV6. My forwarding was not working till I made this entry. </span></li>
<li><span style="font-family: Verdana, sans-serif;">X11Forwarding yes #this entry will ensure that the forwarding happens from CentOS. </span></li>
</ul>
<div>
<span style="font-family: Verdana, sans-serif;">3) Next install a package called xauth on your CentOS machine. you can use yum to install it. </span></div>
<div>
<ul>
<li><span style="font-family: Verdana, sans-serif;">yum install xauth </span></li>
</ul>
</div>
<div>
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Verdana, sans-serif;">4) restart the ssh daemon </span></div>
<div>
<ul>
<li><span style="font-family: Verdana, sans-serif;">
<div class="p1">
<span class="s1">sudo service sshd restart</span></div>
</span></li>
</ul>
<div>
<span style="font-family: Verdana, sans-serif;">5) Install an app like xeyes to test if the X11 forwarding is working or not. </span></div>
</div>
<div>
<ul>
<li><span style="font-family: Verdana, sans-serif;">yum install xeyes</span></li>
</ul>
<span style="font-family: Verdana, sans-serif;">6) logoff from the CentOS and login again using -X flag this time </span></div>
<div>
<ul>
<li><span style="font-family: Verdana, sans-serif;">ssh -X user@host</span></li>
</ul>
<span style="font-family: Verdana, sans-serif;">7) Run xeyes and you should be able to see the eyes coming up on your mac screen :). </span></div>
<div>
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Verdana, sans-serif;">Happy coding!!!</span></div>
<div>
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Verdana, sans-serif;">Abhishek </span></div>
<br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
luckyabhishekhttp://www.blogger.com/profile/06037992570806202609noreply@blogger.com0tag:blogger.com,1999:blog-5179143545338829173.post-41501142046981210452016-01-05T02:50:00.000-08:002016-01-05T02:50:15.030-08:00Pitfalls of Object Oriented Programming<span style="font-family: Verdana, sans-serif;">As I try to understand Javascript as a language one of the things which I need to unlearn is Object Oriented Programming. With Ecmascript 6 and tools like TypeScript from Microsoft, so far I have managed to write a lot of object oriented programs in Javascript which essentially is a functional language. </span><div>
<span style="font-family: Verdana, sans-serif;">So first thing which I need to do is unlearn OOPS. Here are a few pitfalls of OOPS : </span></div>
<div>
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Verdana, sans-serif;">1) A Class is a collection of Data and Methods which operate on this data. As a programmer trying to learn OOPS this was very unintuitive, but once you start practicing OOPS, it becomes the obvious choice and all the apprehensions like why exactly should I keep my data definitions and Functions together goes away. Going back to my learning days, I once again find it unintuitive. </span></div>
<div>
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Verdana, sans-serif;">2) The way a function behaves in a class can be totally dependent on the state of the object which can be hidden from the consumer of the class. e.g. I can easily write a class which like </span></div>
<div>
<span style="font-family: Verdana, sans-serif;">public class Calci{</span></div>
<div>
<span style="font-family: Verdana, sans-serif;"> private var toggle = false;</span></div>
<div>
<span style="font-family: Verdana, sans-serif;"> public int Add(a,b){</span></div>
<div>
<span style="font-family: Verdana, sans-serif;"> toggle = ! toggle;</span></div>
<div>
<span style="font-family: Verdana, sans-serif;"> if(toggle) return a + b;</span></div>
<div>
<span style="font-family: Verdana, sans-serif;"> return a - b;</span></div>
<div>
<span style="font-family: Verdana, sans-serif;"> }</span></div>
<div>
<span style="font-family: Verdana, sans-serif;">}</span></div>
<div>
<span style="font-family: Verdana, sans-serif;">The behavior of method Add totally depends on a the state of the Calci object which is hidden from the consumer. So understanding what a method does in object oriented program can be tricky sometimes. Although this is an advantage when compared to Procedural language where the behavior of the function can be dictated by a global variable which is declared somewhere in a different file. But then I have visibility in the scope and if I try it hard I can figure it out. </span></div>
<div>
<br /></div>
<div>
<span style="font-family: Verdana, sans-serif;">3) No Class Hierarchy is correct : No matter how much thought one gives into create a right class hierarchy. One does end up in a situation where the hierarchy is not correct. This is one of the major reasons for refactoring the code while developing projects. As the code size grows it becomes rather difficult to refactor as the change impacts all the ecosystem. </span></div>
<div>
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Verdana, sans-serif;">4) You get a lot of rings and bells attached with any class which you choose to reuse. e.g. If I derive from a Car class I get the method Drive for free even though I may not want to drive an auto-drive car. </span></div>
<div>
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Verdana, sans-serif;">As one learns javascript one should ensure that we don't fall back on the knowledge we acquired while learning OOPS and try to apply them in this new paradigm. Next up is to figure out what kind of inheritance is possible in javascript, how we can use it, and how it differs from classical inheritance of OOPS.</span></div>
<div>
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
luckyabhishekhttp://www.blogger.com/profile/06037992570806202609noreply@blogger.com0tag:blogger.com,1999:blog-5179143545338829173.post-35283249631173872782015-05-13T00:54:00.002-07:002015-05-13T00:54:33.464-07:00Why Database is not suitable for a Queue<span style="font-family: Verdana, sans-serif;">There are many applications which use database as a queue in order to orchestrate a long running business process. While it is enticing and easy to do so here are a few reasons about why the developer should avoid doing it...</span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">1) Work distribution : As the number of messages flowing through the system increases the work distribution has to be managed by using locks or by using a Z axis scaling i.e. partition the message table and let different processes handle it. It becomes difficult to manage the failure cases e.g. if the process responsible to manage a particular partition goes down how do I bring up another process to pick up that partition. This is a problem which can be easily solved by event driven queues with horizontal scaling. </span><br />
<span style="font-family: Verdana, sans-serif;">2) Database loads : As the messages passing through the system increase the load on the database starts increasing. This means that the database needs a scaling which is much more costly then scaling a queue bases solution. </span><br />
<span style="font-family: Verdana, sans-serif;">3) Deleting and archiving the queue related tables is expensive as they are indexed. </span><br />
<span style="font-family: Verdana, sans-serif;">4) Database has to be polled to see the pending work items while an event driven queue can simply call the worker process when a new message pops into the queue. </span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">So while it may be enticing and easy to use database to orchestrate queue related workflows one should refrain from taking this technical debt as it would be really hard to pay it back in the future...</span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">Abhishek</span>luckyabhishekhttp://www.blogger.com/profile/06037992570806202609noreply@blogger.com0tag:blogger.com,1999:blog-5179143545338829173.post-91132742842826394822013-11-19T05:33:00.000-08:002013-11-19T05:33:02.010-08:00My struggles with a Mac<span style="font-family: Verdana, sans-serif;">For the first time in my life I am away from a PC. I recently got a Mac and I have my struggles going on now... To begin with there were a few usability issues like the trackpad tap not working as a click which were simple preferences tweak. Then came the big one </span><br />
<span style="font-family: Verdana, sans-serif;">1) The Eclipse installation on Mac was not picking the proxy from the Safari settings so I had to set them myself. That can be done by downloading the Pac file from the automatic configuration script URL and then setting the right proxy in the Eclipse Network Connection Preferences section.</span><br />
<span style="font-family: Verdana, sans-serif;">2) My Lync for Mac is not working for some reason. This still needs to be figured out. I will update this section once I am able to sort that out. </span><br />
<span style="font-family: Verdana, sans-serif;">3) There is no Propose New Time functionality in the Outlook Calendar. (Sad :()</span><br />
<span style="font-family: Verdana, sans-serif;">4) The Outlook Calendar in Mac shows 1 hour slot as big as 2 hours in my Outlook Calendar in Windows which I am used to. This can be changed by going to Organize Menu and playing with the Scale. </span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">There will be more and I will keep updating this blog post for the small tweaks :). </span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">nJoi!!!</span><br />
<span style="font-family: Verdana, sans-serif;">Abhishek</span>luckyabhishekhttp://www.blogger.com/profile/06037992570806202609noreply@blogger.com0