Wednesday, October 24, 2012

Just Enough juju

The cloud may or may not be intrinsically evil, and even if not intrinsically evil it might be evil in most or nearly all of its actual implementations, or at least in its most pervasive commercial implementations.

But admit it. You want it.

Ubuntu is free and easy to install. And Amazon Web Services has a "Free Usage Tier". And the connection between the two is juju:
Getting Started:
https://juju.ubuntu.com/docs/getting-started.html
User Tutorial:
https://juju.ubuntu.com/docs/user-tutorial.html

Other stuff:
Beginning PHP with Eclipse:
http://www.i-programmer.info/programming/php/463-beginning-php-with-eclipse.html

AWS toolkit for Eclipse:
http://aws.amazon.com/eclipse/

PHP and Git on AWS Elastic Beanstalk:
http://acloudyplace.com/2012/03/php-and-git-on-aws-elastic-beanstalk/
"When Amazon announced Beanstalk’s support for PHP I was curious to know what it would look like. So I decided to give it a try. I hadn’t used my AWS account for a while, so I had to do some account setup tasks, configuring command line tools, etc. In this article I will explain how to set up a PHP application in Beanstalk from scratch."

Up and running with Elastic Beanstalk:
http://www.w2lessons.com/2012/03/up-and-running-with-elastic-beanstalk.html
"Elastic Beanstalk isn’t a service per se. Rather it is a collection of existing Amazon services strung together to yield a low maintenance, easy to set up and highly scalable web hosting environment for JVM based applications and recently, Amazon has added support for PHP and Git deployments. Beanstalk is geared at new AWS users as well as companies that have not yet achieved a scale that requires very fine tuning of their infrastructure. Although Elastic Beanstalk is relatively simple to use, a good deal of the challenges you’ll encounter stem from the immediate requirement to make your application work under a distributed environment. For those that have been writing AWS based applications for some time, this is second nature, but for those new to the task, it can pose a number of challenges. The great thing about adhering to the restrictions imposed by Elastic Beanstalk is that it forces you to think about scalability from the outset making your applications more robust and decoupled. This can also be a deterrent as few of us want to invest precious idea validation time writing highly scalable code, but with a good game plan it proves to be less onerous than expected."

Wednesday, October 17, 2012

Understanding Routing (especially EIGRP and OSPF for CCNA)

When I did a google search on "eigrp manual summarization" (without the quotes) the very first hit was a page at cisco.com:
http://www.cisco.com/en/US/tech/tk365/technologies_white_paper09186a0080094cb7.shtml (Document ID: 16406). I found this doc to be very helpful, although to be honest it could use some serious editing (for example it wastes a significant amount of time and space talking about "output interpreter").

Original image by Fermín Galán and David Fernández:
http://neweb.dit.upm.es/vnumlwiki/index.php/Example-OSPF_1.8
Another document that is really nice at explaining the routing process in Cisco IOS is: Route Selection in Cisco Routers (Document ID: 8651). This one is short and sweet and anyone who wants to learn more about the fundamentals of Cisco IOS should sit down and read it straight through.

For an excellent (and "as simple as possible but no simpler") discussion of the Shortest Path First algorithm, see Computer Networking: A Top-Down Approach, 6E, by Kurose and Ross, especially Chapter 4, Section 5: Routing Alforithms. Personally I didn't think their treatment of Distance Vector was as good, but their whole chapter on routing (chapter 4) is something I want to get back to and read through carefully from beginning to end.

Radia Perlman's discussion of both Link-State and Shortest Path First is very good in her classic Interconnections. If you don't know about Perlman, she invented Spanning Tree Protocol and also IS-IS routing protocol, so she's kind of a big deal.

I am  really liking the CCNP "self-study" book on routing by Catherine Paquet and Diane Teare. I'm studying the CCNA curriculum right now, but everytime you get get to the good stuff you read "this topic is discussed in CCNP." I think that Paquet and Teare's book is good for someone working on CCNA who plans to move directly to CCNP! The full title of the book is Building Scalable Cisco Internetworks, 3e.

Here is an excellent summary of the query process in EIGRP (taken from here: http://www.ccie.net/blogs/eigrpquery-process):
Query process happens with the following:
1.Query is sent when route is lost and NO Feasible Successor is available.
2.The Lost Route is now in active state.
3.Query then sent to all neighboring router on all interface EXCEPT the interface to successor.
4.If the neighbors don't have lost route information, queries are sent to their neighbor.
5.If the router has a alternate route, it answers the query and stop query propagation.
And here is a more in-depth discussion, by Jeremy Stretch of PacketLife.Net, of the EIGRP Query process, which nicely explains, among other things, why EIGRP really is a true Distance Vector protocol and NOT some kind of "hybrid":
Understanding EIGRP Queries.

Finally, here are some key concepts that I consider "key" not because of their role in routing so much as their role in making sure that you understanding routing:
  • route summarization
  • the difference between routing and forwarding
  • this sentence: "The longest prefix match always wins among the routes actually installed in the routing table, while the routing protocol with the lowest administrative distance always wins when installing routes into the routing table."
  • level one versus level two routes, parent and child routes, ultimate routes
  • what the prefixes in level one routes mean; when the classful mask is used as opposed to when the subnet mask is used; and how to interpret the output of "sh ip route" in general.
  • know why it is almost always a good idea to turn off classful automatic summarization ("no auto").
  • know what this sentence means (referring to EIGP): "Queries result in a split horizon only when a router receives a query or update from the successor it is using for the destination in the query."

Here are the short and the long forms of the EIGRP metric:
Image found at the Root Bridge blog: http://rootbridge.wordpress.com/2012/02/15/eigrp-part-2/

Image from PacketLife.Net: http://packetlife.net/wiki/eigrp/


Wednesday, October 10, 2012

Instsalling Gluster on CentOS

In case you wanted to know:

1.
create and mount bricks

2.
install glusterfs
go here:
http://www.gluster.org/download/
follow the instructions. basically follow the instructions in the readme: http://download.gluster.org/pub/gluster/glusterfs/3.3/3.3.1/CentOS/readme.txt. Except instead of just doing
yum --enablerepo=glusterfs-epel install glusterfs
ALSO do these:
yum install glusterfs-fuse
yum install glusterfs-server

3.
make sure to open ports and/or disable SELinux/firewalls, etc

4.
Also make sure that glusterd and glusterfsd are running

5.
Run peer probe from the primary glusterfs server. DO NOT run it from the other gluster servers.

6.
Create the gluster volume on the primary server. For example:
gluster volume create thing1 underling1:/export/brick3 underling1:/export/brick4 underling2:/export/brick5 underling2:/export/brick6

7.
make sure glusterfs and gluster-fuse are installed on the client

8.
mount the gluster volume on the client. For example:
mount -t glusterfs underling1:/thing1 /thing1

9.
A very helpful link:
http://www.gluster.org/2012/08/gluster-new-user-guide/

10.
test file system with bonnie. if you need to get bonnie, check here:
http://pkgs.org/centos-6-rhel-6/repoforge-x86_64/bonnie-1.5-1.el6.rf.x86_64.rpm.html

Saturday, October 6, 2012

Violating Your Privacy As A Service

Steve Wozniak: Cloud Computing Will Cause 'Horrible Problems In The Next Five Years':
(August 6, 2012)
http://www.businessinsider.com/steve-wozniak-cloud-computing-will-cause-horrible-problems-in-the-next-five-years-2012-8

Interview with Brian Kernighan
(October 1, 2012)
http://www.informit.com/articles/article.aspx?p=1960359
"If I had to pick a single issue, it would be privacy. The spread of the Internet, the steadily decreasing cost of storage and processing power, and the pervasive use of the Internet have combined to make it very difficult to restrict how much others can find out about our lives. Commercial interests of course want to know as much as possible as they can about us so they can induce us to buy more. Governments have perhaps come a bit late to the party, but they too are eager to learn everything possible about their citizens. I fear that without some unlikely combination of restraint, law, and pushback by ordinary people, we are heading to a world that will make the invasions of Orwell's 1984 seem desirable by contrast."




Monday, October 1, 2012

Socket Programming, Anyone??

For now this is just some links. After I have a chance to play around more with this stuff, I will update this post with more substantial comments on what really works and what gets you there the quickest and easiest.

http://www2.its.strath.ac.uk/courses/c/

http://www.cprogramming.com/tutorial/c-tutorial.html

Introduction to network functions in C
http://shoe.bocks.com/net/

Beej's Guide to Network Programming Using Internet Sockets
http://beej.us/guide/bgnet/

But if you really want to be able to do and understand socket programming in Linux, this looks like the place to go:
http://www.linuxhowtos.org/C_C++/socket.htm

Hmmm - here's a new link that looks promising:
http://www.prasannatech.net/2008/07/socket-programming-tutorial.html

figure from:  http://www.troubleshooters.com/codecorn/sockets/