I’ve attached the big red button to the raspberry Echo, so the wires are all hidden underneath the shelf now. Just need to get some mounting hardware for the pi.
A colleague is attending the nginx conference in Austin this week, and shared with me several anecdotes in which a speaker preached misinformation – or if I want to be generous, grievously outdated information – about Apache httpd, to support the notion that nginx is better.
This led to the following:
I’m getting seriously weary of the nginx community lying about Apache httpd to make their product look better. Compete on features, not lies
— Rich Bowen (@rbowen) September 8, 2016
Here’s an honest, non-clickbaity, practical comparison of Apache httpd and nginx that’s worth reading: https://t.co/FvAImgxccu
— Rich Bowen (@rbowen) September 8, 2016
Comparing your nginx install to a 12 year old, misconfigured Apache 2.2 server isn’t honest. Y’all need to stop that.
— Rich Bowen (@rbowen) September 8, 2016
nginx is a good solid product on its own merits. There’s absolutely no need to lie about Apache httpd to convince people of that.
— Rich Bowen (@rbowen) September 8, 2016
Each time I have encountered nginx people at conferences, and attended their talks, they have compared nginx to grossly misconfigured, 10 year old installations of Apache httpd 2.2 to support their claim that nginx is leaner, faster, and easier to administer.
Here’s the thing. nginx is a solid project. I have zero beef with the software itself. I have used it myself, when the need arose. What I object to is the habit of the fans of nginx to lie (or exaggerate, or just spout uninformed opinions) to make themselves look better. If you must compare, compare our latest to your latest, and have experts correctly configure each. That way, each will show where it shines, and where it doesn’t.
It is possible to configure ANY software badly. This is why it’s almost always a bad idea for an expert on SoftwareA, who knows little or nothing about SoftwareB, to compare them head to head – they’ll invariably be comparing a well-configured A to a less than optimally configured B. And in the case of nginx vs Apache httpd, these guys almost always use 2.2 or 1.3 as an example of … well, all of the things that 2.4 fixed. 5 years ago.
Any intro to marketing class will tell you that you need to talk about your own strengths more than you talk about the other guy’s weaknesses. This is a message that nginx and presidential candidates seem to have missed. And, in the case of software, it’s even more important, because whereas Donald Trump will always be a monster, every time you point out a legitimate shortcoming in Apache httpd, we fix it.
At LinuxCon, I won a Raspberry Pi in a raffle, and someone suggested that I make an Amazon Echo with it.
There are two sets of instructions for making an Echo from a Pi.
There’s the set from Amazon, at https://github.com/alexa/alexa-avs-raspberry-pi/blob/master/README.md which is about 93 steps, cleverly disguised as 12 steps, and looked way too much work.
Then there’s Sam Machin’s version, at https://github.com/sammachin/AlexaPi which is one step. Sort of.
And there’s a YouTube video – HERE – which every article about this topic links to. The video, while helpful, skips several important steps, and uses the word “obviously” just often enough to make me feel like a drooling idiot. ‘Cause it’s not obvious, that’s why.
However, with persistence, and a lot of guess work, I got it working.
The instructions go something like this, with some of the details filled in.
Obtain a Raspberry Pi. This is pretty much the only step that is actually obvious.
Attach necessary hardware. Plug a speaker into the headphone jack, and a USB mic into one of the USB ports. I used my Samson Go Mic, and a little speaker I wasn’t using. You’ll need to use a powered (amplified) speaker, if you want to actually hear anything. Finally, you need to attach a push-button across two of the pins on the Raspberry Pi board. The pins are BPIO 18 and ground. Pin GPIO 18 is the sixth pin from the top right, when you hold the board with the pins to your right. Ground is the bottom left pin. There’s a diagram of the pins below, as well as a photo of mine.
Note that I soldered the wires to the pins, but there are also slide-on pin jumpers that you can acquire to do this without soldering. I just didn’t have any handy.
You can use any simple electronics kit pushbutton. I got mine at Radio Shack – you know, when there used to be Radio Shacks. 🙁
Register for an Amazon Echo developer account. You’ll do this at https://developer.amazon.com/edw/home.html#/ and this will give you access to the tools necessary to write your own Alexa apps, as well as to register your Raspberry Pi Echo. Now, go to the 3:44 mark in the video and follow his instructions for registering your device. Give it a name you will remember – I called mine AlexaPi, but anything’s fine. Once it’s registered, leave this browser tab open. You’ll need it below.
Download Noobs – the starter Pi boot image, from https://www.raspberrypi.org/downloads/noobs/ and unpack that zip file onto a micro SD card that is freshly formatted with a FAT filesystem.
Boot the Pi from that card, and follow the instructions to install Raspbian.
Update Raspbian, and install necessary things. SSH to your newly running Pi (your username is ‘pi’, and your password is ‘raspberry’), and run the following commands.
sudo apt-get update
sudo apt-get install git
Now, obtain and run Sam’s code:
git clone https://github.com/sammachin/AlexaPi.git
This script will walk you through the installation process, and will require information from the Amazon developer website that you have open in your browser. You’ll need the name you gave your device, and three long hex strings (numbers and letters) which you’ll paste into the script inputs. The video says that you’ll need to edit a configuration file, but that’s no longer the case, so I presume that there used to be a bug in the script that is now fixed.
The script will tell you to reboot the Pi. Do that.
When it comes back up, it will be running the Alexa service. You press the button to talk to it, and release to tell it you’re done talking. Ask it for the weather. (You can tell your new Echo where you live in the phone app, so that it gives you your local weather, rather than Seattle, which appears to be the default location.)
This is a picture of the finished product.
My plan is to attach a nicer button, like, say, one of the Staples “that was easy” buttons, if I can get one back from the kids, and then put the rest of this stuff in a more attractive container. But everything works as desired, with one exception. Turns out that the Raspberry Echo doesn’t have access to the Amazon music services, so you can’t actually play music from Prime Music, Pandora, or other music services that are available from the “real” Echo. It’s still a very useful, and cheap, alternative to buying an actual Echo. I did all of this with parts that I already had laying around, and a Pi that I won in a raffle, so it was essentially “free”. But if I had to guess, I’d say you could do the whole project for under $75, including the Pi, a USB mic, and a speaker. Perhaps a little more, depending on what mic and speaker you go with.
If I missed any steps, please let me know, so that I can update the article. Thanks.
Last week I attended LinuxCon North America in Toronto, where I represented the RDO project in the Red Hat booth, and also gave two presentations.
My first presentation – Introduction to OpenStack – was attended by about 50 people and was, as the name suggests, an introduction to OpenStack. I talked about the project’s history, the way that the Foundation works, and the software itself.
My second presentation was titled ‘RTFM? Write a better FM‘, and as about documentation, end-user support, and treating customers with compassion and respect. This talk was also well received, however, I always get the sense that people are only going to attend a talk like this if they are already predisposed to the message. I’ve been giving this talk, in one form or another, for most of 10 years. However, the last 3 or 4 times I’ve given it, I’ve rewritten it each time. I have so much to say on the topic that I can’t fit it all into an hour, so I emphasize different things each time.
The LinuxCon audience is very diverse, in terms of technology interests and depth of knowledge. So it was gratifying to have so many good conversations after my OpenStack talk, and a few at the booth, about what people are doing with OpenStack.
In the hours that I worked the Red Hat booth, we had very few OpenStack/RDO questions. Most of the conversations were around containers, or people that were looking for jobs at Red Hat. (Yes, we’re hiring!) The LinuxCon audience is very diverse, in terms of technology interests.
Photos from LinuxCon are HERE.
It’s also worth mentioning that I have awesome coworkers. It’s always a pleasure to do events with them. They work hard, and they also know how to have fun, and I’m very lucky to work on such an amazing team.
I started reading Wizard, by John Varley. Unfortunately, about 2 chapters in, I suddenly realized that it’s the second in a trilogy – the Gaea Trilogy. The first book is Titan, and the third is Demon.
I’ve set this aside for the moment, and am now reading The Name Of the Wind. I’ll get back to Gaea soon. ish.
It’s the same story the crow told me; it’s the only one he knows
Like the morning sun you come and like the wind you go
Ain’t no time to hate, barely time to wait
Wo, oh, what I want to know, where does the time go?
Uncle John’s Band, the Grateful Dead
We’re first in line for Rhi’s student id card. The last 18 years have gone by in a flash and my baby girl is off on her own.
We drove 1200 miles listening to The Grateful Dead and talking about everything. It was wonderful. And now, just a few hours left with her.
I’ve been working through a list of SciFi/Fantasy books, which is a merging of three “top 50” lists that I’ve found over the years. I just finished reading Hothouse, by Brian Aldiss.
It was … weird, and ok. I guess I can see how some people would enjoy it. It follows the travels of group of primitive people around a post-civilization world where vegetation is the dominant life form.
I found it unsatisfying. Not much happens, and the people in the story are largely uninteresting, or, at least, Aldiss doesn’t tell us very much about them. So it’s more of a travelogue than a novel.
Anyways, on to the next book. I’ve included the list below, if you want to follow along. Stared books are those that I’ve already read – many of them before I encountered the list. I’m only on #3 of the ones that I hadn’t read yet when i started. Give me a few more years …
* A Canticle for Leibowitz by Walter M. Miller (1960)
* A Journey to the Center of the Earth by Jules Verne (1864)
* A Wrinkle in Time by Madeleine Lâ€™Engle (1962)
* Alas, Babylon by Pat Frank (1959)
* Brave New World by Aldous Huxley (1932)
* Do Androids Dream of Electric Sheep? by Philip K. Dick (1968)
* Dune by Frank Herbert (1965)
* Ender’s Game by Orson Scott Card (1985)
* Foundation by Isaac Asimov (1951)
* Make Room! Make Room! by Harry Harrison (1966)
* Nineteen Eighty-Four by George Orwell (1949)
* Old Man’s War by John Scalzi (2005)
* Rendezvous with Rama by Arthur C. Clarke (1972)
* Ringworld by Larry Niven (1970)
* Starship Troopers by Robert Heinlein (1959)
* The Hitchhiker’s Guide to the Galaxy by Douglas Adams (1979)
* The Illustrated Man by Ray Bradbury (1951)
* The Left Hand of Darkness by Ursula K. Le Guin (1969)
* The Stand by Stephen King (1978)
* The War of the Worlds by H.G. Wells (1898)
* Uglies by Scott Westerfeld (2005)
* Ribofunk by Paul Di Filippo (1996)
* Little Brother by Cory Doctorow (2007)
* Hothouse by Brian Aldiss (1962)
A Fire Upon the Deep (1992), by Vernor Vinge
Acme Novelty Library #19 by Chris Ware (2008)
Behold the Man by Michael Moorcock (1969)
Consider Phlebas by Iain M. Banks (1987)
Cryptonomicon by Neal Stephenson (1999)
Earth Abides by George R. Stewart (1949)
Embassytown by China MiÃ©ville (2011)
Falling Free by Lois McMaster Bujold (1988)
Glasshouse (2006), by Charles Stross
He, She, and It (1991), by Marge Piercy
Hyperion by Dan Simmons (1989)
Kindred (1979), by Octavia Butler
Logan’s Run by William F. Nolan & George Clayton Johnson (1967)
Man Plus by Frederik Pohl (1976)
Mission of Gravity by Hal Clement (1954)
Newton’s Wake (2004), by Ken MacLeod
Nor Crystal Tears by Alan Dean Foster (1982)
Odd John by Olaf Stapledon (1935)
Pattern Recognition (2003), by William Gibson
Perdido Street Station (2002), by China Mieville
Red Mars by Kim Stanley Robinson (1993)
Ring Around the Sun by Clifford D. Simak (1953)
Roadside Picnic / Tale of the Troika by Boris & Arkady Strugatsky (1972)
Sarah Canary (1991), by Karen Joy Fowler
Solaris by Stanislaw Lem (1961)
The Bohr Maker (1995), by Linda Nagata
The Chrysalids by John Wyndham (1955)
The Death of Grass or No Blade of Grass by John Christopher (1956)
The Demolished Man by Alfred Bester (1953)
The Dispossessed (1974), by Ursula LeGuin
The Drowned World by J.G. Ballard (1962)
The Female Man by Joanna Russ (1975)
The Long Tomorrow by Leigh Brackett (1955)
The Mount (2002), by Carol Emschwiller
The Sirens of Titan by Kurt Vonnegut (1959)
The Sparrow (1996), by Mary Doria Russell
Venus Plus X by Theodore Sturgeon (1960)
When Worlds Collide by Edwin Balmer & Philip Wylie (1933)
Wizard (1979), by John Varley
I discovered a few days ago, quite by accident, that the Cacti project is still quite alive and well. I don’t know why I thought it wasn’t. I thought it would be kind of cool to set it up to graph my network traffic here at home.
I have an Asus RT-N66U wireless router, which I’ve been very pleased with since I acquired it.
Step one was getting Cacti running, which has always been something of a challenge. The installation instructions, while extensive, miss a lot of prerequisites that you encounter along the way. (Install packages are not, apparently, available for CentOS7.) Notably, you have to install Spine (the stats collection daemon) from source, and it required the -devel version of several of the items that the docs mention. So, things like php-devel, mysql-devel, snmp-utils, which are not mentioned in the installation instructions. No big deal, but it did make the process a little longer, finding and installing these prerequisites.
Step two was getting file permissions set up correctly in my Apache httpd document directory. This turned out to be a combination of missing directories (log/ and rra/ in Cacti’s home directory) and the fact that my vanilla installation of php had logging turned off, so everything just silently failed. Those directories, once created, and ownership changed to the newly created cactiuser user, Cacti itself started running. Awesome.
Step three is enabling SNMP on the router, which isn’t hard, but is a little time consuming. Instructions for doing this may be found on the My gap in the void blog, and I will not copy them here.
Finally, there’s the step of getting Cacti to talk to the N66U. This turned out to be absurdly easy. Under ‘devices’, I clicked Add. I gave it the name and IP address of the router, and selected “Generic SNMP-enabled Host” from the Host Template dropdown, and pressed ‘Create’.
On the server, in the cactiuser’s crontab, add:
*/5 * * * * php /var/www/html/poller.php > /dev/null 2>&1
Then, click ‘New Graphs’, select the “select all” checkbox, and press ‘Create’.
Finally, under ‘Graph Management’, select the ‘select all’ checkbox, select ‘Place on a tree (default tree)’, and press go.
And, you’re done. Wait a few hours for data to accumulate:
“You must write every single day of your life… You must lurk in libraries and climb the stacks like ladders to sniff books like perfumes and wear books like hats upon your crazy heads… may you be in love every day for the next 20,000 days. And out of that love, remake a world.”
And so, between Ray and Rain, I’m trying to write something every day. It’s surprisingly hard. All of the words I write every day in inconsequential email, all the words spoken in meetings, all the words listened to on tv, radio, podcasts, youtube, and read on Facebook, and I struggle to have something consequential to say on my own.
Ray Bradbury, my favorite author since I can’t remember when, wrote a story every day – or at least until he was very near the end. One thing that he said, in some foreword to one of his books, stuck with me – that most of them were rubbish, but that that didn’t matter. It was more important to write, and exercise the muscle, than to have everything one writes be a masterpiece. And, out of the rubbish, a few ideas spring, and from the ideas, the art.
I keep expecting, in the years after Ray’s death, to see a flood of publications of The Other Stuff. I’m both looking forward to it, and dreading it. He threw it out for a reason.
But, just one look at his office should let you know that he never actually threw something out. So, one of these days, we’re going to see new books by Bradbury, and most of it is going to be really bad. But there will be gems in there that make it worthwhile.
So, while I know I’m no Bradbury, I will try to keep it going, and write something every day, and hope that one of these days I’ll find some more stories and poems lurking around the dusty corners of my mind.