Friday, June 10, 2016

DevOps Things to Remember


 DevOps Things to Remember








By: Corey M Albright aka: Hawaiideveloper










This is a living document.  It will be updated regularly.


My own words:   

"Why remember it(DRY)? If your job is CLOUD based and your notes are on the CLOUD."  Stay motivated to learn new things and record the old.


My most important lesson learned while job hunting was:


I treated getting a job like a job and the date was 06/10/2016, and I had lots of companies calling me when foreign accents and I had to get over the language barrier for in order for me to be successful.  I answered the phone religiously, and made a software package called UlyssesOs so that I could keep all my skills fresh and my coding skills ever growing.


My history:


I worked as a system-engineer primarily with windows.  I started to get bored and curious about the other half and their salaries so I visited the linux side of house.  There I found my first MacBook as my primary choice of machines provided it had a 15" or bigger screen.

The salaries of Linux admins is about 10% higher than that of a Windows Admin, plus when things go wrong in Linux, there are events that have not been written to.  The best thing to have... if you are a linux admin is a technical support subscription, as nothing is worse than not having the help you need to keep your job during the most toughest times.

Any true admin will agree, that during a (sprint, deployment, or restore) things can go wrong in either platform and the only thing you have is your knowledge.  The sad thing is, is that new things and problems show up all the time.  So having tools is important.

Tools, are anything from (Docker, Python, Ruby, Java, Vagrant, Rsync, Copy command, tar, zip, etc.)  Sometimes we get so involved with a tool it becomes the primary platform of our existence.  When I first heard of docker it was a tool to give you a container to work in.  It ended up being so powerful that I was once offered $200/hour to unclog buffers, and export settings globally.

Java was a powerful thing from the time I was in school 2002 until now, it even is now owned by Oracle which was a giant to everyone's platforms.  The fact that Google is ran on Java, and Oracle owns Java...  No one is going to run from the platforms Oracle supports because they will all be built to host Java applications.

My best advice to anyone at least any newcomer to IT and software engineering is to learn one language really good and in depth, don't fall for a trick, a joke, a scandal as to what language to learn.  Because in the end they are all the same.  The only differences are compiled(C++/JAVA) vs. non-compiled and interpreted(Ruby/Pthon/Powershell) vs. non-interpreted languages at the operating system level.

Each language has a set of libraries, api, or header file that give you abilities over other languages depending on how well you can use google.  Which knowing what I know now, I should of choose Java first which I did and now I find myself coding Android  which uses java in the MainActivity.java of mostly all apps.



I once worked for CSC via a State Department contract, and I really liked these very smart guys named: Adam, Jason, Efrem, Moody, and Bill I would use the MacBook on scripting and fell in love with both virtualbox and homebrew.  The wide range of tools CSC gave us with the remote option for 4 days a week.
The fact that they gave us that, it gave me the ability to learn, and build them some of the most robust systems within Amazon's Cloud.

Too bad, things did not workout with the company, but I will always remember TekMasters (which owned the contract with CSC) and the awesome opportunities that they gave me.




Anyways enjoy this journey with me as I give you everything you need to find a rewarding job in DevOps as a software engineer.  If you are converting from systems-engineering or making a career change into IT.


Preface is that I believe in the DRY (Don't repeat yourself) method as well as the KISS (Keep it simple and stupid).

I wont be able to touch every technology as I am not an expert and I will not pretend to be.  However I am always interested in an argument where I can learn from.  So your input of information will be very appreciated.  However I ask that you send them to: hawaiideveloper@gmail.com




My Strongest skill is:


I can admit when I am wrong


The most important ability and request I always ask future employers is:



 - Do they mind that I still attend school ( as I am always and will remain a student)

 - Do they offer remote or 4x12 ( as I am constantly resting from the learning and delivery of products Constant Integration /Constant Delivery)

- Will there be travel because I love hotels and planes!




What I will be touching on going forward is my knowledge of:
Systems Architecture, Customer Satisfaction by leading them to the (cheaper, efficient solutions, with proven stability and reliability as well-known off the shelf OTSS solutions.

If the solution does not exist, I am then going to show you how I would create what it is that you/they want.

Meaning: DevOps (Software_as_Infrastructure, Solutions_that_work) = Developer and Engineer combined as one person or team.

AWS, Docker,  Java, Android, Sprinting, Python, Ruby, Jenkins, and Graddle.

Favorite products are:


Ansible
Android
AWS 
Python
Redhat
Ruby
vmWare


 The products above have enabled me to create anything anywhere for free!
However my services are not. 



visit my site at: http://coreymalbright.com



I created this for a friend and future employers.


Programming Experience: 

My experience has been in C++, JAVA, Ruby, and Python.  I consider myself a coder by need and not by necessity.  If something already exists and it costs pennies a day to use, I wont recreate it unless an employer sees the need for a custom solution.

So with today's technologies, weblogic and Ruby seem to do so much.  Java being my path of 2nd choice due to the ease and familiarity of Ruby and Python.

I traded lots of knowledge (Linux, and Windows) to chase programming.  So each day I loose what I don't use.  So putting this blog up will be used to refresh my memory up to the time of writing this article.

Examples of my Python Development experience can be found here:

I put about  60% into research 30% into a proof of concept and 10% into the actual code.  I do not memorize (DRY method) commands well so I have learned to document my work throughly because technology moves super FAST!!!!

Why I choose Ruby and Python:

My preference only, not for everyone!

Python as it is native to the Linux Operating system in such a way I have given-up trying to learn all commands (which depend from distro to distro) however I focus on the frame of which Linux was built on and I am able to Create, Remove, Update and Delete CRUD information in a way that it would take a series of commands to accomplish.  I will touch more on Python later

Ruby is also an interpreted language in much that OSX has the IRB built in.  The best thing about ruby is that users/developers refer to GEMs like C++/Java refer to libraries and APIs.

Generating controllers and views, one can have a fully dynamic website that can control applications through a web interface.

There is a gem called cocaine which was developed by thought bot  where one can use command line applications via python.  This simply means that if you can set your controller to launch python scripts.  The possibility of launching ansible and docker could re-create a platform way more powerful than AWS and all of its workings by simple mouse clicks.

Checkout UlyssesOS on my Github for more information.

Examples of my Ruby Development experience can be found here



Why You should learn how to scrape Data for Mobile Platforms:



90% of most well-established organizations have built their empires off of data that already exists.  If you learn how to code with systems like weblogic, or use properly formatted HTML code and data from things like XML, JSON, CSV, etc.


SOA - Is like a human being connected to a keyboard, web services are a classic example of SOA.



Service-oriented architecture's main purpose of RESTful Web services

Restful and SOAP web services is:

SOAP is used to scrap data so that a user can see their financial data in programs like quicken, or Android applications that give flight schedules or even hotel reservations.

WSDL - WebService Description languages like XML, JSON


Infrastructure as Code - allows repetitive tasks to be simplified by scripts which called Automation

Dynamic web page projects enterprise application within eclipse for WSDL (JAVA related) runtime environment of J2EE 3.0 with dynamic web module to - SOAP Web services - WebLogic Server 10g R3 - weblogic run time and using Enterprise Application Project (reusable jar files)EAR

I however avoid Asymmetrical code like XML so that I am not spending unneeded time to debug software. For Top to Bottom solutions.

I prefer JSON and Restful states within ruby to assist in the easier read format that looks like this:  code_review

Most 3-tier (Client, Webserver, Database) applications can benefit with HA and Restful state applications. 


What we don't know:

I do not know everything about everything.  Databases are my weaker area, but I guess that is why AWS invented RDS.


It is better to login to Google and look up a word than to try to memorize that word for the sake of one argument.  Therefore I rather lookup the argument:

grep -r -H "the_argument_you_keep_referring_too" /


The above script will search an entire machine for "the argument" and display all files in the entire Linux system where "the argument exists"  and display all files containing that argument.

If you have a bad memory and need a symlink(shortcut) type this:

ln -s /path/of/file/you/want/a/link/to/filename.sh /path/where/you/want/the/shortcut(symlink)/something.sh

If your really good, you can use this in Ansible and literally create your own search engine among an entire infrastructure.


Java, Spring and Hibernate:


Again my perception, but not not the set way of doing things. When Ruby exists and Python fills the void.  But web applications still use this older technology as well as XML which we already later discussed.

Object relational mapping is accomplished by Hibernate
Spring is used more for configuration model for modern Java-based enterprise applications...  aka another Model View Controller MVC.
Java everyone knows is a programming language that actually needs a complier.  It is okay, but I feel uncomfortable asking users to install something before they can use it. 

How To Migrate a SaaS into AWS or any major Billion Dollar Application worth putting it there without an outage:


The setup of AWS should be as-if you are migrating to the cloud and if you are already on AWS and want to setup High-Availability Cloud in case of a serious outage like: 911, earthquake, hurricane, or some fool/saboteur  who accidentally cuts the all rails leading to the datacenter that your particular region within Amazon Web Services account.



Option 1:  Round-robin (Not the best but will do)

Setup 2 AD/ADFS(federation services) , DCs or 2 BIND/NIS - with the lowest possible TTL likely to be 5 minutes (point of failure is set at 6 minutes) estimated at 99.98631% uptime per month.



Option 2: BGP (The best and preferred solution)

BGP is setup with 2 or more routers ususally supporting Harware Security Management HSM and an advertised consolidated block of IPs broadcasting as one single IP.  Almost as if you were using a proxy.
RIRs is basically the power of being Godaddy or Network Solutions.  AKA setup to Regions to replicate through two or more Cloud HSM(cloudHSM) with securities of key management or AWS management services.

Setup AWS Direct Connect to ensure proper replication of all Storage, DB, and Systems.



Below is a diagram of BGP I got the diagram straight from cisco as it explains both external and internal BGP (iBGP & eBGP)  its funny because (ie)... means etc.





Ansible Weekly Tasks that eliminate the most common (Linux / Microsoft) Server Tasks:

Explanation of Ansible in my own words is here

- Backup all Baremetal components and logs and verify functioning (SMTP,SMS)
- Eliminate files no longer needed in downloads, logs, and temp folders
- Produce reports for end-user activity and metrics of use (delete users, change password, change permissions forward profile to Archive)
- Check Databases are not reaching size limits and do not exceed 50% of allowed storage (Check systems like Unisphere etc.) kick alert to trigger and have Ansible respond by archiving or expanding strorage after 50% is breached.

"  ansible-playbook CoreyAlbright-playbook.yml -f 7   "  (run on 7 at a time CoreyAlbright's playbook) code_here


ANT:

Main benefit of Ant is its control of the build process - a build process is:
That is, the creation of anything that has a result.  But to have a process then you are referring to:  

Taken from Wikipedia:
Build automation is the process of automating the creation of a software build and the associated processes including: compiling computer source code into binary code, packaging binary code, and running automated tests.  

 

ANT vs. Maven vs. Gradle(with groovy) "Java related examples:

Micro-managed structure and division of code vs. Cumbersome XML bloated projects files to do the simplest of tasks....  Or use Gradle:

 

I prefer gradle because the guy that had your job yesterday.... and only he knows where everything is/was,  

Gradle will help you put it back the way it was, and it will show you what it depends on

Youtube video on Gradle:

https://www.youtube.com/watch?v=OFUEb7pLLXw#t=124.53002

 


UlyssesOS 

My personal project used to migrate users, setup a Datacenter within any space and migrate all information, security, and infrastructure to ANY Cloud with a push of a button and two IP address as well as login information:

I can not say more out of fear my friends will beat me up, but know my friends(team) have done the impossible in over 5 environments.  Although its still a work in progress, it is one of the most powerful tools I have ever created.

The companies who turned me down and who did not want to buy on were: Amazon, DataPipe, and vmWare.  No matter how many times I interviewed there, I never met some skill they were looking for whether it be personality, or talent.

  AWS (IaaS)


If you need quick pricing go here:  http://calculator.s3.amazonaws.com/index.html

Lambda - event driven code to react on conditions met

Glacier - slower cheaper and archival storage (rest state)

Cloud Front helps balance public web calls without strain on network

S3 - SSDs faster, more expensive active date (in transit data)

AWS Technologies Mostly Used:

Amazon Redshift to analysis data in a columnar storage technology for DB tunning

EC2 - aws vms

VPCs - Virtual Private Cloud/networks

RDS - making the maintenance and operations of a DB really simple


Continuous Delivery (CD) Tools (Docker / Vagrant)


Vagrant -  reproducible, and portable work environments (examples are here)

Docker -  enables development and IT operations teams to build, ship, and run distributed applications anywhere. (example of Zimbra container)

Jenkins (originated from Hudson after Oracle bought it) - CI Server (pipeline)  and version control system and link its tests to a build server and finally feedback not too mention finding bugs

Storage knowledge of:


SAN(SSDs) - block - usually connected via fiber (EMC VNX/VMAX, HP 3PAR, NETAPP)

NAS(Mechanical) - file - usually connected via copper

CloudHSM - https://www.youtube.com/watch?v=hCxkWGAWJCM



Limited knowledge of Network Engineering:


OSI - Layer and the basic job description of a CCNA will be up to you to look at as I usually call cisco support (they have the best support I know of) when you are deploying their equipment.

Just know what you are trying to do first and then diagram it.  The diagram needs to look similar to this:





Appendix A References used:


SOAP Web Services
https://www.youtube.com/watch?v=gtmAwuH3hqA



Cloud HSM:
https://www.youtube.com/watch?v=hCxkWGAWJCM


SAN Argument
http://searchstorage.techtarget.com/feature/Purchasing-an-enterprise-SAN-Top-tier-products-compared

Vagrant
 http://www.vagrantbox.es/



Honorable Mentions:

Clojure - another programming language I have not mastered, but I am aware that some out there are using it largely.
Terms to remember:

Asynchronous - of or requiring a form of computer control timing protocol in which a specific operation begins upon receipt of an indication (signal) that the preceding operation has been completed.


 At rest and in-transit data needs to be encrypted for all regulatory information
 At A





Any vulgar language or demeaning comments will get you blocked and your comment erased, bottom line it will be a waste of your time.


Checkout my Github if you are just entering DevOps, it will help you get there a little quicker
Ruby ~ FizzBuzz:

(1..600).each do |num| #do every number 1 through 60

if num % 3 == 0 && num % 5 == 0  #for every number divisable by 3 && 5 print fizzbuzz
  puts 'fizzbuzz'
 elsif num % 3 == 0 # for any number divisable by 3 print fizz
  puts 'fizz'
 elsif num % 5 == 0 # for any number divisable by 5 print buzz
  puts 'buzz'
 else
  puts num  # otherwise print the number
  end
 end


 Python ~ FizzBuzz:

def CoreyzFizzBuzz(number):

    if number % 5 == 0 and number % 3 == 0:  #no remainders and is true for 5 and 3
        return 'FizzBuzz'
    elif number % 5 == 0:
        return 'Buzz'
    elif number % 3 == 0:
        return 'Fizz'
    else:
        return str(number) #expects string but int will be pushed

print "\n".join(CoreyzFizzBuzz(number) for number in xrange(0, 61))