Getting started with Puppet Automation

Puppet is one of the popular configuration management and IT Automation tools out there. In an age where we have more servers being spawned every minute in the cloud and on-premise, it will be a disaster not to adopt configuration management tools. There are other tools out there like Salt, Chef, Ansible etc. Currently I’m liking Puppet.

Came across a presentation on getting started with Puppet and it provided an interesting insight for me. I took notes from the presentation and I thought to share it with any beginner out there. If you have the time, you could go over and watch the presentation here.

For those in a hurry or have already started playing with Puppet, here is the summary:

Why Automate?

  • Speed
  • Consistency

1. Pick the right things to automate based on cost and value

-> How often do you run to the problem
-> Cost Vs. Value. Start with Low cost, high value services e.g Syslog
-> Start with the simple services you know, Start with common service everywhere
Syslog, Host keys, Accounts, Monitoring configs

2. Don’t learn two things at once. don’t automate what you’re still trying to learn

-> Figure it out – Learn the technology/product before you attempt to automate it
-> Refine the setup -> Learn how to set it up the application first, learn to make it dance before attempting to automate it

3. Use puppet tooling to make you better
-> Study the facter Inventory service
-> Write custom facts. Facts.d -> By using the Puppet Console, you can get lots of facts to add to your manifests.
-> Use Live Management
-> Learn the Resource Abstraction Layer (RAL)
-> Use Puppet resource cli to gather resource info e.g ‘puppet resource user root’ to get more information about the root account
-> Puppet describe <resource> : Use this to learn about any resource, including example declaration.
-> Noop is amazing  (—noop and —debug)

4. Start Simple, Stay simple
-> Build Small Single purpose modules
-> Have lots of small modules rather than a single monolithic module
-> Take time to plan the automation
-> Start by asking yourself what you do when a new server/VM comes online or is freshly provisioned. e.g Set the public IP, set up ssh keys etc
-> Build on what you’ve learnt and iterate.
->Configure version control

5. Next Level : Scale it up

-> Add a different node for puppetdb i.e Install the PuppetDB on a separate machine.
-> Add a node for foreman/cobler/razor
-> Modules
-> Read puppet modules

Why it will take us 100 years not 50.

Getting better at something and developing a country both have one thing in common. Deliberate effort. You need deliberate effort to get better at a thing the same way a country needs to deliberately put structures in place for development to happen.

The 50 years vs. 100 years is just an analogy. My point is that it will take us twice as much time to become the technology hub we hope to become.

Another analogy. Imagine you work for this company whose vision is to dig the best holes in the country. Over time, you become the best digger on staff. Unfortunately though, this company has a bad PR machine. As such, every time you dig, a miscommunication by the PR department pushes some of the sands you have dug out back into the hole. You might eventually achieve your goal, but as a result of your company’s action, you will get there latter than sooner. This same analogy applies to Nigeria’s Technology drive.

Individuals, organizations, a handful of private companies are striving hard to put the country on the tech map. They catch them young, support developers, encourage start-ups and all that. However, the country’s (in)actions are making this job very difficult. If we really had a goal of developing tech manpower, our policies (local or foreign) will align with this goal.

It’s no longer news that MasterCard will be issuing every Nigerian a National Identity Card. Nigeria has a population of approximately 170M people. It doesn’t matter if this was announced years ago, people have made spirited efforts at discouraging this then, and we are still doing now.

Why this couldn’t be handled by an indigenous company still beats my imagination. In an age where every country protects the data of its citizens diligently, you wonder why we would willfully delivers ours to a foreign private company. The NIMC gave reasons as seen in the tweets below:
Screen Shot 2014-08-31 at 2.59.39 PM

Field experience? Biometric functionality?

This project should have gone to an indigenous firm, or a consortium of indigenous firms. Interswitch, Valuecard and other indigenous players have been in the card business for many years. (Disclaimer. I used to work with Interswitch).

If its field experience, these guys have it. Biometric? Common…Patents to biometrics can be licensed. The NIMC has missed the point here. With a national IT policy, things like this should not have happened. Development is a deliberate effort. I would think the Ministry of ICT and even the NIMC would be the ones advocating for indigenous firms to handle this based on how critical the data is.

What difference does it make.

It makes a lot of difference. Creating National Identity cards for 170M people would also require skills and expertise of all sorts of people.

MasterCard would probably rely on the Chinese and Indians to pull this project off, from a cost perspective. Meaning this project will probably be outsourced. The finished product and the not so critical part will be done in Nigeria. On the contrary, an indigenous firm would need to expand its local talent pool to pull this off. If required, they would bring in a handful of expatriates for knowledge transfer.

Furthermore, in a country with weak data privacy laws, what are the economic and security implications of having the data of all Nigerians in the hands of a private company outside the shores of Nigeria. What happens when a foreign Government with Mastercard’s loyalty requests for this data? These and similar issues are the things that make the difference. While other nations protect their data assets, we give up ours so carelessly. Is this ignorance or naivety? or is someone being paranoid?

Countries all over the world give their own the opportunity to grow. They also support them to excel abroad. The Chinese still protect the interests of Chinese companies, so do the Americans. We need to protect our own.

Development is a deliberate effort.

10 kobo tips for Nigerian Pre-Startups!

I am usually very careful when using the word ‘startup’. The growing tech media in Nigeria have adopted the word ‘startup’ wholly as it is being used in Silicon Valley for every tech idea someone’s trying to execute. I am of the opinion that this generalisation isn’t fair for most ‘startups’ in Nigeria.

According to Wikipedia:

“a startup company or startup is a company, a partnership or temporary organisation designed to search for a repeatable and scalable business model…A critical task in setting up a business is to conduct research in order to validate, assess and develop the ideas or business concepts in addition to opportunities to establish further and deeper understanding on the ideas or business concepts as well as their commercial potential”

You don’t do the above with water and air. You need some resources which include some tech skills (depending on what you’re trying to achieve), some cash and human resources (business guy or guys, mentors etc). While it is possible to start with an idea, usually ideas alone are not enough.

There are two categories of ‘startups’ in Nigeria.

The first group, you can actually call the startups. They deserve the sticker ‘startups’. There are actually only a handful of these in Nigeria as at today. They actually have some resources to throw around. They have a handful of developers and they can go to market very fast. Because they have some resources to play with, they launch startups serially, with all their startups running from the same pool of resources. These group know their numbers, they have business guys and can brandish graphs, stats and figures to prove their point. These group can actually afford to go from idea to execution and they represent the people behind the startup rhetorics/wave in Nigeria. But they are sadly very very few.

(PS: These guys are also domain hoppers. They have probably registered all conceivable .ng domain names)

The other group (startup-wannabes) consists of young, talented, ambitious and often inexperienced folks who have the raw ideas of changing the world. They are hip, skilled in one of two programming languages, they are often in touch with the latest in tech. They have broad knowledge of technologies but not deep enough to create something outstanding. Off course they sabi clone too.

These group however haven’t learnt the art of execution. They tend to start multiple projects without seeing any of them through. They jump from event to event, project to project, idea to idea, depending on which catches their fancy at any point in time. The folks in these group launch Betas that stay Beta for many months, and even years with no concrete plans for the next level.

Also, rather then wait it out with one good idea, they move on to other ideas without spending enough time to see their first idea/project gain traction. Unfortunately, they also call themselves startups. Putting themselves in the same category as the first group. This group should rather be called pre-startups. Some can graduate to startup level, while others just implode.

Enough said. I have 3 advice for the second group, the pre-startups. If you think you or your ‘startup’ fall in the second group, take note of these things. Unfortunately, folks with plenty tech skills tend to fall into the second group. So this advice is for me as well.

1. Starting and not finishing

I hardly visit Facebook these days, but when I do, I read through silicon Africa and Creative Tech groups. On these groups, I see a lot of hurriedly executed projects discussed that never gets finished. Some of them very good and others, not so good. A handful of them go under even after people have taken time to give them ideas on how to make their product or service better.

Its either the Facebook or twitter login is not working or a page outrightly says “under construction”. I tried one with an invalid email and it got the email registered. This is totally unfair on users who are trying to check out and possibly sign up for the service. I’d like to see more projects actually get completed. A nice sounding domain name is not enough, we need to learn to start finishing whatever it is we start guys.

2. Trying to do more than one thing

Another reason ’startups’ in the second group never make it to production is because they try to do many things. They try to add many assumed features which delays launch. I look forward to when startups wannabe in the second group focus on one thing and do it very well. Off course, it is natural to be afraid a competitor will clone your service and add your missing features. Yup, but then, competition is good and you’d better launch with 1 functionality and gain some users rather than not launching because you aren’t ready with the 65th feature.

3. Terrible UI

Common guys its 2014!. I have also noticed we have a pathetic UI problem. There are templates written all over the sites launched by these second group of startups. Arguably because of limited time and resources and not having a dedicated UI Engineer. Templates are not bad, it’s the art of beautifully integrating them into your own logic/functionality that is still missing.

If you are short of UI designers or you can’t afford one, frameworks like Twitter Bootstrap and Zurb foundation are out there to help you out. Please use them.

Early 2000 web design

First, if you are developer reading this and you’re not subscribed to Hacker Newsletter, you are on a long thing. Its a regular collection of the best write ups you’ll ever read in tech  – Subscribe to Hackernewsletter.com here

This write up is inspired by this Article I saw on Hackernews. Reading through, I felt nostalgic and decided to write a list of things that got me excited doing web design on the early 2000s.

1. Yeah, Marquee was indeed Awesome.
This is a one

This was one of those things you learned to use that made your website stand out. Getting a piece of text and make it scroll across the screen., in any direction you wanted. When you used this, you were regarded as a master developer. It was so cool. And like everything web though, overuse started making it clunky. Eventually, we had folks write articles on why it was bad to use marquee, so we stopped.

2. BrainBench!

If you were not a Brainbench certified HTML guru, you didn’t know your shit.  It was a bragging right. You even had the logo on any website you designed. I had that shit on my CV back then looking for a web design job during my early university semester breaks. It was the right online test that tested how you combined the HTML tags, making sure the title tag doesn’t come before the opening head tag.

Be a brain bench certified HTML guru, learn how to copy and paste javascript codes from the internet and you are suddenly an accomplished web designer.

3. View Source

I guess one of the things that made the art of web design popular back then was the fact that you could right click in the browser and view the source of all web pages on the internet. After learning HTML, the next natural thing to do was to start viewing sources all over the place. It built confidence to know an effect was achieved with the HTML tag you just learnt.

Even though developers still view source today, it was way different back then. Back then, it was like viewing the source code for Windows OS.

4. Type HTML from tag to tag.

A lot of folks, including myself started writing HTML with notepad. It was one of those ‘languages’ you write and you felt like a real geek. It was cool and it was a bragging right. I even remember teaching a couple of folks how to write HTML and I actually told them writing by hand was better.Write it, save it as .html and open it with internet explorer, and keep refreshing the page anytime you update the notepad.

Overtime we got to learn about Microsoft frontpage and eventually Dreamweaver. If you’ve mastered HTML though, like a Brainbench master, (LOL), you won’t need a WYSIWYG editor (Like they were called then).

5. Ampersand &anything;

Apart of the non-breaking spaces &nbsp; to add space between any two texts, there were also a ton of similar relics used aggressively back then. While some are still in use today, these were the hallmarks of web design then, beyond the regular texts. Some I can remember from my head include:

&nbsp – Space
&bull; – bullet
&copy; – copyright, still used today
&reg – registered trademark
&raquo – >> In place of bullets

Nigeria’s Tech Talent Problem

Phew! Writing almost a year later!

I had a discussion with a friend recently. He has this grand idea that will change entertainment in Nigeria and to launch, he needs a website. A web app if you may. My friend is a very good graphics designer. He already has a mock up of what he wants the website to look like. He presented it to me and it looks great.

Just like any useful web app though, my friend needs developers/programmers to write the functionalities for the website. I’m aware of the acute shortage of good developers in Nigeria myself, however I had thought what my friend wanted to build isn’t too difficult, he’d easily find one or two developers to whip it together. I personally could have helped if my hands weren’t so full. To maintain this blog sef na war.

A few days after I took my friend to meet a potential partner/investor in his idea, I asked what his timeline for launch was. As a proponent of “release early, release often” I buzzed my friend on google talk on why he hasn’t launched his website already. Here is part of our conversation:

Me: Dude wassap when are you launching?
My friend: Soon
Me: How soon?
My friend: After $5000. I need $5, 000 plus to pay the foreign developers.
Me: Uhn?!!! Oin?

Yeah, you read that right. Five thousand dollars.

Continue…

Downtown Soweto and other places!

I visited South Africa  last December and was glad I did. A beautiful city with a rich history of struggle and of hope and eventually, of reconciliation. I didn’t understand the depth of South Africa’s diversity until then. South Africa is where you’d see a white-german-indo-african man. Now that’s rich. After visiting the Apartheid Museum I came to relate with why Mandela had to choose the negotiating table rather than gun against those that stole 27 years of his life. It’s a complex mix.

One thing that still baffles me though is why there is still so much Xenophobia in South Africa. I would think for a country with such a history, they’d be the world’s model for tolerance, especially to people of their own skin color. Above all though, SA is a country to visit. It has so much to teach the rest of the world.

My trip wouldn’t have been complete if I hadn’t visited So-we-to! Continue…