Wednesday, December 16, 2015

Inspiration: Why write a book about DevOps?

Inspiration

Why write a book about DevOps?

My first computer, a TRS-80 Model I, is in my attic.  It has an external 5-¼ floppy drive and 4k RAM on the main board. I bought the computer, used, with gift money from my Bar Mitzvah.  I liked to play games on it.  Some were classic adventure games with no graphics at all, just descriptions. “You are in a room. There are two doors on the east wall.  On a table are a book and a knife.” When they had graphics it was white, low-res pixels on a grey screen. These games were fun even with the poor graphics. When I wasn’t playing games, I taught myself BASIC programming.  I wrote some small programs, copied others and tweaked a few. 

I had a computer at the beginning of the personal computer revolution, but I was not consumed with my PC.  My interest grew when I got my first exposure to the Internet in college.  I was at the University of Kansas pursuing a degree in Electrical Engineering. I had done well in Calculus and EE seemed more practical than a liberal arts degree and more useful than a business degree.  That was about as much of my future as I could conceive.  This was in the late 1980s before the World Wide Web made the Internet easily accessible.  But the Internet was out there and had been for a few decades already. When I came upon the Internet, I found troves of interesting reads, elite users and computing resources on an international network of systems available for anyone that had the wherewithal to connect to it. And of course—Games! My connection was a 1200-baud modem on a Macintosh Plus, slow even by the standards of the day. The stream of ASCII characters flowing onto my screen in my dormer in Lawrence, Kansas at the bottom of The Hill connected me to more people and places than I could imagine.  The Internet continues to dazzle me.

The Internet has been the engine behind my professional career.  My contributions, as meager as they are compared to many, including people I am fortunate to call friends and colleagues, have been the work of my professional life.  I began my career in earnest when I returned to San Francisco from extended travels.  I had been backpacking around the world.  Returning to the States, I was ready to get my career going.

They year was 1995.  1995 has been called “The Year of the Internet” or even more grandiosely, “The Year the Future Began.”[1] It was the year the Internet entered mainstream consciousness.  The Web exploded over Silicon Valley and sent shockwaves all around the world.  I felt it in the kiosks set up in malls in Thailand where hawkers shouted, “Go ahead! Surf the Internet!” I felt it in the breathless articles in newspapers in India and I felt it in the first Internet café I ever-visited in Jerusalem.
                                                                                                               
I began to see a way to contribute to the great change the Web was going to make.  In India I picked up a marketing brochure that helped me put the pieces together.

Published by Sun in the UK, this 32-page booklet was not your everyday marketing brochure.  The company that embraced “The Network is the Computer” recognized they were selling umbrellas and it was starting to rain.  They saw themselves moving to the center of the international technology stage.

 “There is no doubt that network computing and the Internet have changed business as we know it, delivering flexible and responsive technology.  Our strategy is to help enterprises to capitalize on these opportunities.”

Martyn Lambert
Marketing Director, Sun UK [2]


Figure 1:  Java Essentials. Sun Marketing Booklet[3]



Java was marketed as a revolutionary tool for the enterprise to take advantage of the emerging power and ubiquity of the Internet.  Not withstanding Sun’s enthusiasm, their pitch was sometimes earnest, maybe even self-conscious.  Sun entreated:


Figure 2: It's a revolution! Really! [4]
Note the syntax (This book contains code. You will be asked to look at syntax again).  They printed “Java” and “Revolution” on different lines, as if they hedged their rhetorical bets and relied on your imagination to make the connection.  It does read differently like this:

Join the Java Revolution
Get started today


Sun did not constrain itself to a technical vision in this booklet.  They included lush full-page illustrations reminiscent of the drawings of M.C. Escher and the classic Sci-Fi film, Metropolis.

Figure 3: Sun, Computers, Escher and Metropolis.


Figure 4: Escher. Impossible staircase.

Figure 5: Elevated streets, Metropolis.




What was it about Java that had Sun so excited? Here’s a bullet list of benefits they included:

Table 2: Java Benefits
Java Benefits
·      With Java you can write applications that can run on any computer breaking the links between application and operating system.
·      Java brings interactive functionality to the Web.
·      Java is an object-oriented programming language.
·      Java allows developers to easily write distributed, robust and secure applications.
·      Java applications are distributed in byte code format.
·      To run a Java application, a computer needs to run a Java virtual machine program.
·      Virtual machines are available for many different platforms.
·      A Java application could be downloaded from the Internet and transparently executed, just like a web page.
·      Java applications known as applets can be embedded in web pages.

What was crystal clear to me was the benefit that “with Java you can write applications that can run on any computer breaking the links between application and operating system.”  Write once, run anywhere! I can write a program once that will run on anything: a workstation, a phone, a kiosk, or a thermostat. How about a heart valve regulator? ANYWHERE!  Couple the efficiency of writing the application with the ease of delivering it and we have the makings of a revolution.  A “java application could be downloaded from the Internet and transparently executed, just like a web page.” Java: efficient, portable, ubiquitous.  Java: cracking open the door to the future. 

Some of these benefits passed over my head. I did not appreciate the benefit of distributing applications in “byte code format.” And not all of these benefits were realized with Java.  It was not uncommon to hear Sun’s marketing turned against them.  Write once; debug everywhere! became a well-trodden joke. Nevertheless the impact Java has been making is amongst the great technology stories of the Internet age.

One of the transcendent benefits of Java was that the distance between application conception, Dev, and application delivery, Ops, became shorter and the terrain easier to traverse.  Typical obstacles for developers: programming for heterogeneous environments and distributing their programs, were smoothing towards straight lines.   These technology advancements were nascent DevOps fifteen years before the word was coined.

Without any particularly clear idea of how it was going to happen, I determined to link my coach to this locomotive called Java and see where it would take me.  The train station was in San Francisco.  I returned to San Francisco from my travels and began to pursue a career with Java and the Internet. 

The Internet has not only been a technological marvel of intellectual fascination; or even my ticket to a millennial sized pay-off in the Internet boom, but a conduit for the grandest motivator of all—love.  Before I left on my backpacking journey I had been spending time with a woman in San Francisco.  We’d kept in touch as well as we could by mail while I was away. We had vague plans to meet in Morocco where her sister was living.

I was in Jerusalem when we reconnected over the Internet.  I had found an Internet café.  It was the first one I’d ever seen. They had two workstations available. I logged into one of them and started writing an e-mail to Jill at jilld[ayt]well[dawt]com.

Jill’s email domain, well.com, was the home of an on-line community called The Well.  The Well was already a famous on-line hangout.  It was one of the many spin-offs of the Whole Earth ‘Lectronic Link.  The Whole Earth ‘Lectronic Link is most often remembered when we think of Steve Jobs.  Jobs famously told a Stanford graduating class that he had been inspired by their catalog. The Well began in 1985.  Co-founder, Larry Brilliant a friend of Jobs, showed the Well to him. Jobs told Brilliant it had the ugliest interface he had ever seen.[v]

Notwithstanding Jobs withering appraisal of the interface, The Well incubated extraordinary connections amongst a remarkably diverse group of users.  Writers, artists, musicians and an abundance of technology folks hung out there.  They were true early adopters of Internet technology.  The Well was a paid Internet company and volunteer community long before the commercialization of the Internet and social media.  It continues to operate to this day. In 1995 both Jill and I were members.

Jill was a conference host and was often on-line.   She was on-line when I was sitting in that Internet café in Jerusalem writing her an e-mail.  This café was a primitive setup by today’s standards.  E-mail was not from my own account, but that of the café’s. The e-mail program inserted a footer with the café’s land-line phone number. When my message came across Jill’s computer, never one to sit on her hands, she picked up the phone and called the Internet café and asked for me, half way around the world--much to the shock of the barista.  On that call, our vague plans to meet in Morocco became real plans.  In the years ahead, Jill became my partner, wife and the mother of our three sons.  As my mom was fond of saying, “When you come to a fork in the road, take it.”[vi]



Fourk 1: When you come to the fork in the road, take it!.

This book is about DevOps. DevOps is making important contributions to what we think of as the Internet, how it is developed and how it operates. DevOps is as much as the transmutation of thought into reality.  Devs conceive of applications.  As they put fingers to keys, and arrange their thoughts into well-ordered code, there is a sophisticated conglomeration of process and tools, Ops, that takes that code and delivers it to users wherever and however they need it. 

To do this, DevOps unites previously poorly aligned concerns Development and Operations. Additionally, DevOps has the potential to provide a security bulwark against profound and fast moving security threats on the Internet. DevOps is a phenomenon. As a phenomenon it is part of a wider transformation that transcends technology and impacts how we all think, communicate, sense and interact with our environment.

This transformation is about transcending boundaries heretofore considered insurmountable; boundaries between the beginning and the being; between the mind and the body; between concept and reality (think singularity).  The convergence between Development and Operations, DevOps, is a single example of many convergences emerging in science, business, culture and politics.  Talking about music, is like dancing about architecture[vii] will no longer be a hallmark of inane comparisons, but a harbinger of new ways of seeing and doing.

Ok, so maybe that last paragraph or two is bullshit and I completely went over the top.  Of course, no one actually knows what’s going to happen, or even, what will be important. I will conclude this introduction by saying; we are living in interesting times!  It has been my great privilege to work on the Internet during this epoch, and to add my voice to the story of the information revolution.  It is a story that it still at its beginning.  In the here and now, and in case you somehow missed it, I want to make it abundantly clear: I am excited about DevOps!  Thank you for picking up this book, and joining me on this journey.








[1] Campbell, W. Joseph, 1995: The Year the Future Began. 1995.
[2] Anon. “Java Essentials: The Internet Springs to Life,” Sun Microsystem Computers Ltd. Bagshot, Surrey. 1996.
[3] Anon. “Java Essentials: The Internet Springs to Life,” Sun Microsystem Computers Ltd. Bagshot, Surrey. 1996.
[4] Anon. “Java Essentials: The Internet Springs to Life,” Sun Microsystem Computers Ltd. Bagshot, Surrey. 1996.
[v] http://archive.wired.com/wired/archive/5.05/ff_well.html?pg=4&topic=
[vi] Many. http://quoteinvestigator.com/2013/07/25/fork-road/
[vii] Many. http://quoteinvestigator.com/2010/11/08/writing-about-music/

Thursday, February 5, 2015

Great tips to make VIM fun

vim tips and tricks -- GOOD STUFF!

http://www.cs.swarthmore.edu/help/vim/home.html

#geek #vim #linux #devops

Friday, March 22, 2013

robots tweeting at each other

Excellent commentary by Christopher Mims at Quartz.  The converage of cloud, low cost sensors and big data will finally usher in the "Home of the Future" technophiles have been dreaming about since the '50s.

Thursday, August 23, 2012

say what, yum? #linux #devops





Linux generally doesn't pretend to be user friendly.  Geeks love linux just for that. This is an example of linux moving from geeky to dorky.
Warning: 3.0.x versions of yum would erroneously match against filenames.
 You can use "*/cantfindit" and/or "*bin/cantfindit" to get that behaviour

That's the error message you get when using 'yum provides' to find a package.  The complete output is:
# yum provides thatpackage
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.metrocast.net
 * epel: mirror.metrocast.net
 * extras: mirror.cogentco.com
 * updates: mirror.metrocast.net
Warning: 3.0.x versions of yum would erroneously match against filenames.
 You can use "*/thatpackage" and/or "*bin/thatpackage" to get that behaviour
No Matches found

so what does this mean?  I mean... I didn't much use yum 3.0.x, so what does this have to do with me?

Here's what yum -h says about the 'provides' option
provides       Find what package provides the given value
hmmm... not so much help.  How about 'man'?
provides or whatprovides
Is  used  to find out which package provides some feature or file. Just use a specific name or a file-glob-syntax wildcards to list the packages available or installed  that provide that feature or file.
Say what?  "Just use a specific name or a file-glob-syntax wildcards..."


Yum is trying say, in a particularly obtuse way, "try using */thatpackage and/or *bin/thatpackage."  When you use the wildcard in this fashion (what they are evidently calling the file-glob-sytanx wildcards) yum will search both the package name AND the filename.  By default it only searches the package name, which often is not particularly helpful when trying to find a package or when you're trying to resolve a dependency.  Searching for the filename IS a pretty useful feature.  Perhaps the docs could have explained it a little better.  Just sayin.









Friday, April 6, 2012

Another blog post on HOWTO PORT FORWARD with IPTABLES #in #sysadmin


My application (puppetmaster) is behind a firewall and there is no direct access from the internet to the server.  So, it was necessary to configure a host on the DMZ to act as a proxy.  This was accomplished using IPTABLES to do a forward and reverse NAT. Iptables version: v1.3.5.


This first step is very important.  Without doing this, you will scratch your head wondering why your perfectly formed IPTABLES rules don't get the job done.  


Step 1: enable ip forwarding on the system (if it hasn't already been done):
echo 1 > /proc/sys/net/ipv4/ip_forward
 Step 2: configure IPTABLES (on CentOS, add these lines to your /etc/sysconfig/iptables file and restart iptables):
iptables -A PREROUTING -p tcp -s *route_only_for_this_ip* -d *router_ip* --dport *router_port* -j DNAT --to *destination_ip*:*destination_port*
iptables -A POSTROUTING -o eth0 -d *destination_ip* -j SNAT --to-source *router_ip*
A few definitions for the above:


--dport 8140 -- the default puppetmaster listening port
*route_only_for_this_ip* -- if you want to limit incoming IPs to a single known IP (not required)
*router_port* -- which port incoming requests are accepted on.  This does not have to be the same as the destination_port.  No one should rely on security through obscurity, but using it is a best practice.
*router_ip* -- the host doing the routing (the one running these rules!)
*destination_ip* -- the server that will actually be servicing the request
*destination_port* -- the port on the above server that will accept requests


Now here's an important note.  If you input those rules and run a simple:
iptables -L
Chain INPUT (policy ACCEPT)target     prot opt source               destination         
Chain FORWARD (policy ACCEPT)target     prot opt source               destination         
Chain OUTPUT (policy ACCEPT)target     prot opt source               destination      


What?  Your rules are NOT in your ouptut!  To see them, you need to specify the nat table, like this: 
iptables -L -t nat
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination      
DNAT       tcp  --  anywhere             router_ip                tcp dpt:router_port to:destination_ip:destination_port
Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination      
SNAT       all  --  anywhere             destination_ip      to:router_ip
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         









Resources:


http://www.linuxquestions.org/questions/linux-networking-3/iptables-port-forwarding-599401/
http://www.whatismyip.com -- love this tool.  From a command line using wget or curl goto: http://automation.whatismyip.com/n09230945.asp
http://www.linuxquestions.org/questions/linux-software-2/iptables-list-does-not-show-pre-or-postrouting-rules-785184/