Archive

Archive for the ‘Open Source Technologies’ Category

Redefining the “Systems Engineer”

December 9th, 2010 Ahmed El Gamil 1 comment

I usually come across stuff on the web and just post it to my twitter account, but i was browsing the other day and came across a fantastic article by Ben Rockwood (@Benr) which he gave a title of “Devops: The Re-emergance of Systems Engineering as a Discipline”, Let’s quote some words of wisdom from this article:

The people that I met that seems to “get” the devops culture are devs. But not that kind… You see, they profess years in administration or ops, but they more excited by JSON and AMQP than they are by the next release of their favorite OS or chip architecture. These people no longer see computers as autonomous entities, rather they see the protocols to link them. They are more excited by NoSQL databases that can house metrics than they are in the commands and interfaces they can get them from. Spending time learning every little feature of an OS isn’t exciting, but optimizing inter-system communication is.

That’s interestingly true !, When NoSQL was trending, i saw it on the UNIX/Sysadmins blogs more than on the developers blogs, some of us just like to follow the new/alternative to the software models we have been using in operations because we already experienced the bottle necks of performance for the old systems and kept inventing workarounds to get those systems up and running in production efficiently.

What I’m driving at is that the most interesting artifact of the “devops” movement is that its bringing a new generation of Systems Engineers out of the closet. They are devs in an ops world. Not dev for dev sake… not ops for ops sake… but rather dev for the sake of ops.

Take a look at the new tools in our market:

  • Configuration Management -> created by Sysadmins turned Developers for the sake of managing the configuration of a large amount of systems
  • Servers Orchestration/ Command & Control -> Also created by Ops sick of SSHing into each server and doing the same thing over and over again, therefor they created frameworks for orchestrating their servers.
  • Examples here are simply endless ! ….

But making a culture change like this in a job that most of it is based around routine processes (Monitoring, Provisioning, Deploying the same stuff over and over again) is not that easy, Especially for people who entered the Systems world seeking a “stable” job, those guys must think again about their jobs, one day they may be in an “Evolve or Die” situation:

As the good news of “devops” spreads it first enlightens, then brings excitement, then dread. If your one of those “specialists”, you can easily feel that your now out-dated. Consider that there is now pride within the devops elite that CIO’s are now talking about having a “devops strategy”. Some even suggest a (I’m paraphrasing) “evolve or die” scenario for operations teams. If your a sysadmin who uses Borne or Korn shell instead of Ruby, look out! I don’t think that’s fair, nor do I think its true for all. Instead, it all makes more sense when you see it as three camps instead of two, with a the culture over the three… that is, applications developers (traditional “dev”), system administrators (traditional “ops”), with a new role in the middle of Systems Engineers that helps glue the camps together. Some of your Systems Engineers will emerge from the dev side, some from the ops side, always having hidden their secret urges to do both. And, as with any emergent role, many will aspire to it but simply not be cut out for it.

And that’s all folks ! :) , I see this as a real enlightenment for the Systems Engineer, Our jobs are almost being redefined right now.

You can read the whole article that Ben wrote on his blog: Devops: The Re-emergance of Systems Engineering as a Discipline

chmod -x chmod

October 11th, 2010 Ahmed El Gamil No comments

What do you think will happen if you remove the executable flag from the chmod binary itself ? ;-)

Announcing Egypt’s DevOps

July 28th, 2010 Ahmed El Gamil 6 comments

Assalamu Alykom Everybody,

I know that this blog has almost been dead and you can only see my twitter updates laying around (seen this line before ?! well, it is the most famous line that bloggers write when they stop writing for some time, — Back to the topic chatty !! –)

So i have been working in the Egyptian market for quite some time now in the field of UNIX-like/Linux Systems administration, dealt with a lot of technologies like: web operations/scalability, Infrastructure management, web farms,VoIP, Security systems and whole bunch of stuff, which gave me some idea on how do sysadmins (or systems engineers whatever you like :-) ) do and achieve their goals.

The point is, I DON’T LIKE IT, WE ARE BEING KILLED BY OUR JOBS, Systems are evolving and we are not ?! ..

Virtualization and Cloud Computing brought a whole lot of machines, and we still manage them using “almost” the same technologies ?! ..

If you are like me and have been searching for a solution for the past year or two, You will see around the internet that people are talking about “Agile Systems Administration”, “Infrastructure As Code” , “Command and Control”, “Configuration Management”, “Server Orchestration” and “DevOps”.

So I started asking people working on our industry, and there is almost NOBODY individually or an enterprise in Egypt that started working with those technologies, just some tiny trials and i just cannot stand the time/power we are wasting on managing our servers “Old School”. (If your Enterprise is using some of the technologies mentioned above, please tell us in the comments or mail me personally, I would love to have a chat about that.)

So within the next days isA, i will start doing some steps to get us out of the misery :-) , may be creating some collaboration channels, contacting key professionals on that topic, who knows may be even making and event/sessions about it ..

But first I need your trusty comments, What do you think of the technologies mentioned ? Do you see it applicable at your employer ? Did you start using it ?

Installing the free G729 Codec for Asterisk

May 28th, 2010 Ahmed El Gamil 4 comments

This tutorial will let you install the G729 Codec on an Asterisk installation in under 5 minutes.

cd /usr/lib/asterisk/modules

Download the codec

[root@Machine modules]# wget http://asterisk.hosting.lv/bin/codec_g729-ast14-gcc4-glibc-pentium.so

Notice that we are in the modules directory

Rename the codec file

mv codec_g729-ast14-gcc4-glibc-pentium4.so codec_g729.so

Restart Asterisk

/etc/init.d/asterisk restart

Check your work

Connect to Asterisk

asterisk -r

Then show all of the codec translations available using the command below, and check g729 at the left, you should see that it can be translated to many other codecs on the top of the table

Machine*CLI> show translations

         Translation times between formats (in milliseconds) for one second of data

          Source Format (Rows) Destination Format (Columns)

          g723 gsm ulaw alaw g726aal2 adpcm slin lpc10 g729 speex ilbc g726 g722

     g723    -   -    -    -        -     -    -     -    -     -    -    -    -

      gsm    -   -    2    2        2     2    1     2    3     -    -    2    -

     ulaw    -   3    -    1        2     2    1     2    3     -    -    2    -

     alaw    -   3    1    -        2     2    1     2    3     -    -    2    -

 g726aal2    -   3    2    2        -     2    1     2    3     -    -    2    -

    adpcm    -   3    2    2        2     -    1     2    3     -    -    2    -

     slin    -   2    1    1        1     1    -     1    2     -    -    1    -

    lpc10    -   3    2    2        2     2    1     -    3     -    -    2    -

     g729    -   3    2    2        2     2    1     2    -     -    -    2    -

    speex    -   -    -    -        -     -    -     -    -     -    -    -    -

     ilbc    -   -    -    -        -     -    -     -    -     -    -    -    -

     g726    -   3    2    2        2     2    1     2    3     -    -    -    -

     g722    -   -    -    -        -     -    -     -    -     -    -    -    -

Machine*CLI> quit

Troubleshooting

If you didn’t see the codec translation as mentioned above then probably you downloaded the wrong codec, please check again the points mentioned during downloading the codec, you can use the following commands to help you:

asterisk -V

uname -a

Routing calls from Zap Trunks to SIP trunks in Asterisk

March 9th, 2010 Ahmed El Gamil 2 comments

So i had this situation where i have 2 Asterisk boxes, the 1st one of them had a PRI card and the 2nd one is just attached to the network through an ethernet card

Goal: redirect all of the incoming calls on the PRI to the 2nd Asterisk box through a SIP Trunk (The 2nd box holds the IVR and all of those stuff, all of the IP phones are connecting to this one), There was no decent documentation about this out there so i am documenting this and may be someone will find it useful.

Here is what you should do (I am assuming you are using an Asterisk installation that uses FreePBX):

  • Create the Zap Trunk as you normally do from the FreePBX interface: Trunks -> Add Zap Trunk
  • Create a SIP trunk that points to the 2nd Asterisk box, we will use this Trunk later in the configuration: Trunks -> Add SIP Trunk, scroll down to outgoing settings and add the following
    • Trunk name: to-2ndAsterisk
    • Peer details:

type=peer

host=<IP Address of 2nd Asterisk Box>

  • Connect to the 1st Asterisk box using SSH and edit the file /etc/asterisk/dahdi-channels.conf, you will find some configuration like
group=0,11
context=from-pstn
switchtype = euroisdn
signalling = pri_cpe
channel => 1-15,17-31
context = default
group = 63
  • So as you can see all of the incoming calls are directed to the from-pstn context, we will now edit this line to direct the calls to the from-pstn-custom context and do the rest of the magic in this context so the file should be as follows
group=0,11
context=from-pstn-custom
switchtype = euroisdn
signalling = pri_cpe
channel => 1-15,17-31
context = default
group = 63
  • Now edit the file /etc/asterisk/extensions_custom.conf and add the following at the end of the file

[from-pstn-custom]
exten => _.,1,Dial(SIP/to-2ndAsterisk/${EXTEN:2},20,rt)

So what this does is that it matches all of the calls (_.) then redirect them through the SIP trunk to the 2nd Asterisk box

  • And the last step is to allow calls coming from the 1st Box to the 2nd Box, you should do IP-based authentication on the 2nd box by editing /etc/asterisk/sip_custom.conf and add the following

[1stAsterisk]
type=peer
canreinvite=no
host=<IP Address of 1st Asterisk Box>
context=from-pstn
nat=no
dtmfmode=rfc2833
disallow=all
allow=ulaw
insecure=port
qualify=yes

Of course you can now create any inbound routes on the 2nd Asterisk Box to match your needs.

I hope this works for you, and if you need any assistance please don’t hesitate to ask me in the comments

Thanks for listening :)