Friday, June 3, 2016

Speedy Deployments And The Meaning Of Devops

Okay, so here's the project on my mind.  Create and provision a local Fumblina server.  Deploy a simple web app to it.  Time the setup process.  Why?  Because Devops!

The key tools in use are as such...

  1. 64-bit Linux Mint
  2. Virtual Box 4.3 
  3. Ansible 1.5
  4. Vagrant 1.7
  5. Git 1.9

Technically, this whole arrangement works just as well with a standard Ubuntu desktop distro with Virtualbox 5.  But whatever!  We hit the stopwatch start button and off we go.

The Server Setup

We need a local server.  There's a project called "basemachine" on my Github that would help.  So that gets git cloned over and started up like this...


cote@mymachine ~/PycharmProjects $ git clone https://github.com/pcote/basemachine.git
Cloning into 'basemachine'...
remote: Counting objects: 14, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 14 (delta 0), reused 0 (delta 0), pack-reused 11
Unpacking objects: 100% (14/14), done.
Checking connectivity... done.
cote@mymachine ~/PycharmProjects $ cd basemachine/
cote@mymachine ~/PycharmProjects/basemachine $ vagrant up


Conveniently, there is a Vagrant box image installed locally so that saves us some time.  But still, it is going to take a few minutes to make and provision this server.  On to other things while this job bakes.

A Skeleton Web Application

While we're busy provisioning, there's a generic web application skeleton in Github to get.  We're also going to need the contents copied into an actual project folder called "DomEditor".  Here it goes!


cote@mymachine ~/PycharmProjects $ git clone https://github.com/pcote/appskeleton.git
Cloning into 'appskeleton'...
remote: Counting objects: 38, done.
remote: Compressing objects: 100% (24/24), done.
remote: Total 38 (delta 6), reused 36 (delta 4), pack-reused 0
Unpacking objects: 100% (38/38), done.
Checking connectivity... done.
cote@mymachine ~/PycharmProjects $ cd appskeleton/
cote@mymachine ~/PycharmProjects/appskeleton $ cp -R * ../DomEditor/
cote@mymachine ~/PycharmProjects/appskeleton $ cd ../DomEditor/
cote@mymachine ~/PycharmProjects/DomEditor $



We switch over to that and get app-specific things setup.  There's a folder in the Ansible role that needs renaming by the way.  It needs to match the name we gave this app.

cotejrp@mymachine ~/PycharmProjects/DomEditor/roles $ mv myapp domeditor

Very good.  So now, we deal with configuration with the deployvarsdev.json file.  

{
    "hostname": "all",
    "domain":"domeditor.com",
    "appname":"domeditor",
    "mysql_root_password":"rootPassword",
    "proxyport":3032
}


Careful for that mysql_root_password by the way.  That variable has to be the same here as it is in basemachine's Vagrantfile.  Yes, the setup is stupid and the root password should be established in one place rather than two.  For the time being, we just accept that the value must match lest the Ansible playbook barf on you later.

Oh yeah.... The /etc/hosts file needs a domain name alias to localhost.  That's going to have to match the domain variable set in our json file.  So this line goes into hosts....

127.0.0.1       domeditor.com

Time to check on the base machine provisioning.  Ding!  It's done.  Time to move forward with application deployment.

Application Deployment

Deployment needs one more thing.  Time to open up provisiondev.sh for a little editing...  

#!/bin/sh
basemachine=/path/to/base/machine
inventory=$basemachine/.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory
privatekey=$basemachine/.vagrant/machines/default/virtualbox/private_key

ansible-playbook -u vagrant -i $inventory --private-key=$privatekey --extra-vars="@deployvarsdev.json" playbook.yml


See that basemachine variable near the top?  We replace that with the path to wherever we git cloned the basemachine folder to in the first place.  Something like this does the trick nicely.

basemachine=$HOME/PycharmProjects/basemachine/


And there's that.  Time to run this deployment script....

cote@mymachine ~/PycharmProjects/DomEditor $ ./provisiondev.sh 

A couple seconds pass.  Script completes.  Open up this url in a browser...

http://domeditor.com:8080/

And once we see the message "This is an angularjs stub page." in the browser, we know we're done.

Total Time Elapsed: 4 minutes 39 seconds.

Could it be faster?  Maybe.  One of these days, I'll have to figure that one out.

Digression: What Does Devops Mean Anyways?

A conversation with a friend raised the question of exactly how one defines the term "devops".  It depends on who you ask.  I can think of it in terms of management reality, my reality, and wishful thinking.

For a manager, it's about improvement in team dynamics.  Developers are paid to change I.T. systems.  Operations people are paid to keep everything stable.  These job definitions naturally put these two camps at odds.  The idea of devops in this context is to get developers and ops people on the same page to reduce the conflict.

For a solo act like myself, devops is about self-reliance.  There are no operations people in my world.  Naturally, it is my responsibility to set up, modify, and maintain those servers myself.  Devops tools like Ansible and Vagrant just happen to make that business easier for me.

Lastly, there is the wishful thinking vision of devops.  It's that dream of sitting down in a quiet environment to work.  You check out the project from the local Git server.  You do a "vagrant up".  Bang!  There's a virtual version of the same server as what ops is managing in production.  That's what you get to develop against.  It sure would make change change control discussions easier.  One can dream.

106 comments:

  1. Thanks for sharing the very useful info about DevOps and please keep updating........

    ReplyDelete
  2. I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in DEVOPS, kindly contact us http://www.maxmunus.com/contact
    MaxMunus Offer World Class Virtual Instructor led training on DEVOPS. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
    For Demo Contact us.
    Saurabh Srivastava
    MaxMunus
    E-mail: saurabh@maxmunus.com
    Skype id: saurabhmaxmunus
    Ph:+91 8553576305 / 080 - 41103383
    http://www.maxmunus.com/


    ReplyDelete
  3. Thanks a lot for sharing, Contains A to Z concepts.. and looking for the best Devops training in Chennai with certification from us. we have experienced Devops experts offer Devops course training with industry exposure. Check Here https://goo.gl/aJxcmw

    ReplyDelete
  4. Thanks for sharing and help full for DevOps this Article . Please Updating me

    ReplyDelete
  5. It's Very Informative Blog... Thanks for Posting...
    DEVOPS

    ReplyDelete
  6. I really appreciate the good quality content you are posting here for free.
    Devops Training in Hyderabad

    ReplyDelete
  7. Thanks for the information. The information you provided is very helpful for DevOps Training. Nice blog. I understood the concept DevOps very well. This blog is very informative.

    ReplyDelete
  8. It is very interesting to learn from to easy understood. Thank you for giving information. Please let us know and more information get post to link.

    jira online training

    ReplyDelete
  9. If you want to Learn salesforce CRM Course Contact Navya from onlineitguru. onlineitguru Is one of the Leading Training institute to Offer salesforce Online course. For more Details Call@8885448788.

    ReplyDelete
  10. Online Assignment Help Tasmania - Australia Best Tutor is responsible for providing an excellent range of Online Assignment help Tasmania to the students pursuing different subjects as part of their studies.

    Read More : http://prsync.com/australia-best-tutor/get-good-grades-by-using-the-online-assignment-help-tasmania-2589126

    ReplyDelete
  11. Each department of CAD have specific programmes which, while completed could provide you with a recognisable qualification that could assist you get a job in anything design enterprise which you would really like.

    AutoCAD training in Noida

    AutoCAD training institute in Noida


    Best AutoCAD training institute in Noida

    ReplyDelete
  12. This is a 2 good post. This post gives truly quality information.



    RPA Training in Hyderabad

    ReplyDelete
  13. It's very nice blog. I'm so happy to gain some knowledge from here.


    MSBI Training in Hyderabad

    ReplyDelete
  14. Thanks for sharing such a amazing post with us and keep blogging...

    DevOps Online Training

    ReplyDelete
  15. Hello,
    Thank You The Hundred Minute Hack for the post update regularly.KernelTraining is one of the leading DevOps training institutes. Recently i completed my software course in KernelTraining, good Institute where you can get good knowledge by real-time experts. I would strongly recommend KernelTraining. for more details please go through the link: DevOps Training In Hyderabad

    ReplyDelete

  16. Very good information about DevOps clear explanation thanks for sharing
    anyone want to learn advance devops tools or devops online training visit:
    DevOps Online Training

    ReplyDelete
  17. Great post! I am actually getting ready to across this information, It’s very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.Best Devops Training Institute In Hyderabad | Best Devops Online Training Institute In India | Best Data Science Training Institute In Hyderabad | Best Data Science Online Training Institute In India

    ReplyDelete
  18. The Information Shared Is Venerable Time Passed On reading The Articles Please keep up dating us Devops Training In Hyderabad

    ReplyDelete
  19. very informative blog and useful article thank you for sharing with us , keep posting learn more Technology

    Tableau online Training

    Android Training

    Data Science Course

    Dot net Course

    iOS development course

    ReplyDelete
  20. Thanks for Sharing this great article..Its really nice and useful for us… keep sharing..
    DevOps Training In Hyderabad

    ReplyDelete
  21. The information which you have provided is very good. It is very useful who is looking for Devops Learning

    ReplyDelete
  22. Thank you for providing such an awesome article and it is a very useful blog for others to read.

    Oracle ICS Online Training

    ReplyDelete
  23. Thanks for providing a useful article containing valuable information. start learning the best online software courses.

    Workday Online Training


    ReplyDelete
  24. It is very good and very informative. There is a useful information in it.Thanks for posting...
    DevOps Training In Hyderabad

    ReplyDelete
  25. I just loved your article on the beginners guide to starting a blog.If somebody take this blog article seriously in their life, he/she can earn his living by doing blogging.thank you for thizs article. best devops online training

    ReplyDelete
  26. Good to become visiting your weblog again, it has been months for me. Nicely this article that i've been waited for so long. I will need this post to total my assignment in the college, and it has exact same topic together with your write-up. Thanks, good share.

    Data Science Course in Malaysia
    Big Data Analytics Malaysia
    Data Analytics Course Malaysia

    ReplyDelete
  27. wow, great, I was wondering how to cure acne naturally. and found your site by google, learned a lot, now i’m a bit clear. I’ve bookmark your site and also add rss. keep us updated.big data analytics course malaysia
    data science course malaysia
    data analytics courses
    360DigiTMG

    ReplyDelete
  28. This Was An Amazing ! I Haven't Seen This Type of Blog Ever ! Thankyou For Sharing, data science training in Hyderabad

    ReplyDelete
  29. wonderful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article. This article resolved my all queries.
    Data science Interview Questions
    Data Science Course

    ReplyDelete
  30. This Was An Amazing ! I Haven't Seen This Type of Blog Ever ! Thankyou For Sharing, data science certification

    ReplyDelete
  31. Cool stuff you have and you keep overhaul every one of us

    Correlation vs Covariance

    ReplyDelete
  32. I believe that your blog will surely help the readers who are really in need of this vital piece of information. Waiting for your updates
    AWS training in chennai | AWS training in annanagar | AWS training in omr | AWS training in porur | AWS training in tambaram | AWS training in velachery

    ReplyDelete
  33. This Was An Amazing ! I Haven't Seen This Type of Blog Ever ! Thankyou For Sharing, data sciecne course in hyderabad

    ReplyDelete
  34. Thanks a lot for sharing such a good source with all, i appreciate your efforts taken for the same. I found this worth sharing and must share this with all.


    Dot Net Training in Chennai | Dot Net Training in anna nagar | Dot Net Training in omr | Dot Net Training in porur | Dot Net Training in tambaram | Dot Net Training in velachery

    ReplyDelete
  35. If people that write articles cared more about writing great material like you, more readers would read their content. It's refreshing to find such original content in an otherwise copy-cat world. Thank you so much.
    Best Data Science training in Mumbai

    Data Science training in Mumbai

    ReplyDelete
  36. This Was An Amazing ! I Haven't Seen This Type of Blog Ever ! Thankyou For Sharing, data sciecne course in hyderabad

    ReplyDelete
  37. This Was An Amazing ! I Haven't Seen This Type of Blog Ever ! Thankyou For Sharing, data science certification

    ReplyDelete
  38. This Was An Amazing ! I Haven't Seen This Type of Blog Ever ! Thankyou For Sharing, data science online training

    ReplyDelete
  39. This Was An Amazing ! I Haven't Seen This Type of Blog Ever ! Thankyou For Sharing, data science course

    ReplyDelete
  40. This Was An Amazing ! I Haven't Seen This Type of Blog Ever ! Thankyou For Sharing, data scientist course in hyderabad with placement

    ReplyDelete
  41. This is the exact information I am been searching for, Thanks for sharing the required information with the clear update and required points. To appreciate this I like to share some useful information I’ll bookmark your weblog and check again here regularly. I am quite sure I will learn much new stuff right here!
    Salesforce Training in Chennai | Certification | Online Course | Salesforce Training in Bangalore | Certification | Online Course | Salesforce Training in Hyderabad | Certification | Online Course | Salesforce Training in Pune | Certification | Online Course | Salesforce Online Training | Salesforce Training

    ReplyDelete
  42. This Was An Amazing ! I Haven't Seen This Type of Blog Ever ! Thankyou For Sharing, data science training in Hyderabad

    ReplyDelete
  43. Very interesting blog Thank you for sharing such a nice and interesting blog and really very helpful article.
    Data Science Course in Hyderabad

    ReplyDelete
  44. This is a wonderful article, Given so much info in it, These type of articles keeps the users interest in the website, and keep on sharing more ... good luck.

    Simple Linear Regression

    Correlation vs Covariance

    ReplyDelete
  45. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article. This article inspired me to read more. keep it up.
    Correlation vs Covariance
    Simple linear regression
    data science interview questions

    ReplyDelete
  46. Really nice and interesting post. I was looking for this kind of information and enjoyed reading this one. Keep posting. Thanks for sharing.

    Simple Linear Regression

    Correlation vs covariance

    KNN Algorithm

    Logistic Regression explained

    ReplyDelete
  47. Really nice and interesting post. I was looking for this kind of information and enjoyed reading this one. Keep posting. Thanks for sharing.

    data science interview questions

    ReplyDelete
  48. Amazing Article ! I would like to thank you for the efforts you had made for writing this awesome article. This article inspired me to read more. keep it up.
    Correlation vs Covariance
    Simple Linear Regression
    data science interview questions
    KNN Algorithm
    Logistic Regression explained

    ReplyDelete
  49. I have to search sites with relevant information on given topic and provide them to teacher our opinion and the article.

    Simple Linear Regression

    Correlation vs Covariance

    ReplyDelete
  50. This comment has been removed by the author.

    ReplyDelete
  51. I want to leave a little comment to support and wish you the best of luck.we wish you the best of luck in all your blogging enedevors.
    data analytics course in bangalore

    ReplyDelete
  52. This is a brilliant article, Given such a great amount of data in it, These kind of articles keeps the clients enthusiasm for the site, and continue sharing more
    data analytics course

    ReplyDelete
  53. Techforce services is a Salesforce Consulting Services in Australia Specialising in delivering end to end Salesforce solutions ,Consulting, Implementation DevOps partners in australia We deliver applications and services more rapidly and reliably, but it’s more than a methodology – it cuts to the very core.Salesforce Data Analytics let us help you become a data driven organisation and ensure your data is working hard for your business This includes implementi
    Techforce services in Australia
    Salesforce Consulting Services in Australia
    Salesforce Staff Augmentation in Australia
    Salesforce Data Analytics
    DevOps Partners in Australia
    Managed Projects Salesforce Australia

    ReplyDelete
  54. Impressive blog to be honest definitely this post will inspire many more upcoming aspirants. Eventually, this makes the participants to experience and innovate themselves through knowledge wise by visiting this kind of a blog. Once again excellent job keep inspiring with your cool stuff.

    Data Science Course in Raipur

    ReplyDelete
  55. Terrific post thoroughly enjoyed reading the blog and more over found to be the tremendous one. In fact, educating the participants with it's amazing content. Hope you share the similar content consecutively.

    Data Analytics training in Raipur

    ReplyDelete
  56. Honestly speaking this blog is absolutely amazing in learning the subject that is building up the knowledge of every individual and enlarging to develop the skills which can be applied in to practical one. Finally, thanking the blogger to launch more further too.

    Data Analytics Course in bhilai

    ReplyDelete
  57. Thanks for posting the best information and the blog is very important.digital marketing institute in hyderabad

    ReplyDelete
  58. Thanks for posting the best information and the blog is very important.artificial intelligence course in hyderabad

    ReplyDelete
  59. Really nice and interesting post. I was looking for this kind of information and enjoyed reading this one.
    data scientist training and placement

    ReplyDelete
  60. Wonderful blog found to be very impressive to come across such an awesome blog. I should really appreciate the blogger for the efforts they have put in to develop such an amazing content for all the curious readers who are very keen of being updated across every corner. Ultimately, this is an awesome experience for the readers. Anyways, thanks a lot and keep sharing the content in future too.

    Data Science Course in Bhilai

    ReplyDelete
  61. Extraordinary blog went amazed with the content that they have developed in a very descriptive manner. This type of content surely ensures the participants to explore themselves. Hope you deliver the same near the future as well. Gratitude to the blogger for the efforts.

    Data Science Training

    ReplyDelete
  62. Stupendous blog huge applause to the blogger and hoping you to come up with such an extraordinary content in future. Surely, this post will inspire many aspirants who are very keen in gaining the knowledge. Expecting many more contents with lot more curiosity further.

    Data Science Certification in Bhilai

    ReplyDelete
  63. This is my first time visiting here. I found so much entertaining stuff in your blog, especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the leisure here! Keep up the good work. I have been meaning to write something like this on my website and you have given me an idea.
    data scientist training in hyderabad

    ReplyDelete
  64. I will really appreciate the writer's choice for choosing this excellent article appropriate to my matter.Here is deep description about the article matter which helped me more.
    data scientist course in hyderabad

    ReplyDelete
  65. This is a great article thanks for sharing this informative information. I will visit your blog regularly for some latest posts. I will visit your blog regularly for Some latest posts.
    best aws training in hyderabad

    ReplyDelete
  66. Extraordinary blog went amazed with the content that they have developed in a very descriptive manner. This type of content surely ensures the participants to explore themselves. Hope you deliver the same near the future as well. Gratitude to the blogger for the efforts.

    Data Science Training

    ReplyDelete
  67. Stupendous blog huge applause to the blogger and hoping you to come up with such an extraordinary content in future. Surely, this post will inspire many aspirants who are very keen in gaining the knowledge. Expecting many more contents with lot more curiosity further.

    Data Science Certification in Bhilai

    ReplyDelete
  68. Thanks for sharing this information. I really like your blog post very much. You have really shared a informative and interesting blog post .
    data science online training in hyderabad

    ReplyDelete
  69. I was taking a gander at some of your posts on this site and I consider this site is truly informational! Keep setting up.. data scientist course in mysore

    ReplyDelete
  70. Really nice and interesting post. I was looking for this kind of information and enjoyed reading this one. Keep posting. Thanks for sharing.data scientist course in bhubaneswar

    ReplyDelete
  71. Truly overall quite fascinating post. I was searching for this sort of data and delighted in perusing this one. Continue posting. Much obliged for sharing.data scientist course in bhopal

    ReplyDelete
  72. Amazingly by and large very interesting post. I was looking for such an information and thoroughly enjoyed examining this one. Keep posting. An obligation of appreciation is all together for sharing.data science course in bhubaneswar

    ReplyDelete
  73. I have bookmarked your site since this site contains significant data in it. You rock for keeping incredible stuff. I am a lot of appreciative of this site.

    ReplyDelete
  74. 360DigiTMG, the top-rated organisation among the most prestigious industries around the world, is an educational destination for those looking to pursue their dreams around the globe. The company is changing careers of many people through constant improvement, 360DigiTMG provides an outstanding learning experience and distinguishes itself from the pack. 360DigiTMG is a prominent global presence by offering world-class training. Its main office is in India and subsidiaries across Malaysia, USA, East Asia, Australia, Uk, Netherlands, and the Middle East.

    ReplyDelete
  75. I needed to leave a little remark to help you and wish you a decent continuation. Wishing you the good luck for all your blogging endeavors. data analytics course in kanpur

    ReplyDelete
  76. Impressive. Your story always bring hope and new energy. Keep up the good work.
    cyber security training malaysia

    ReplyDelete
  77. I'm genuinely getting a charge out of scrutinizing your richly formed articles. Apparently you consume a huge load of energy and time on your blog. I have bookmarked it and I am expecting scrutinizing new articles. Continue to do amazing.business analytics course in ghaziabad

    ReplyDelete
  78. This post is easy to peruse and acknowledge without forgetting about any subtleties. Extraordinary work! diploma in digital marketing malaysia

    ReplyDelete
  79. This was incredibly an exquisite implementation of your ideas data analytics course in surat

    ReplyDelete
  80. Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end. best micronutrients for plants

    ReplyDelete
  81. Actually I read it yesterday but I had some thoughts about it and today I wanted to read it again because it is very well written. data science course in chennai

    ReplyDelete
  82. I have express a few of the articles on your website now, and I really like your style of blogging. I added it to my favorite’s blog site list and will be checking back soon…data scientist course in chennai”

    ReplyDelete
  83. Developers nowadays have to build a proper understanding of data analysis tools to get a job in an organization.
    data science training in bhubaneswar

    ReplyDelete
  84. It is perfect chance to make a couple of game plans for the future and the opportunity has arrived to be sprightly. I've scrutinized this post and if I may I have the option to need to suggest you some interesting things or recommendations. Perhaps you could create next articles insinuating this article. I have to examine more things about it! Project Management Course

    ReplyDelete
  85. Data Science is the best emerging technology that fetches jobs irrespective of the pandemic outcomes. Avail Data Science training and reach the epitome of success. data analytics course in bhopal

    ReplyDelete