The key tools in use are as such...
- 64-bit Linux Mint
- Virtual Box 4.3
- Ansible 1.5
- Vagrant 1.7
- 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.
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.
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.
Thanks for sharing the very useful info about DevOps and please keep updating........
ReplyDeleteThanks for posting such a great article.you done a great job.
ReplyDeleteDevops Online Training
Devops Online Training in Hyderabad
Artcile was simply superb Devops Online Training Hyderabad
ReplyDeleteI 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
ReplyDeleteMaxMunus 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/
Article was very superb Devops Online Training
ReplyDeleteThanks 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
ReplyDeleteThanks for sharing and help full for DevOps this Article . Please Updating me
ReplyDeleteIt's Very Informative Blog... Thanks for Posting...
ReplyDeleteDEVOPS
I really appreciate the good quality content you are posting here for free.
ReplyDeleteDevops Training in Hyderabad
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.
ReplyDeleteIt 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.
ReplyDeletejira online training
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.
ReplyDeleteOnline 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.
ReplyDeleteRead More : http://prsync.com/australia-best-tutor/get-good-grades-by-using-the-online-assignment-help-tasmania-2589126
This is a 2 good post. This post gives truly quality information.
ReplyDeleteRPA Training in Hyderabad
It's very nice blog. I'm so happy to gain some knowledge from here.
ReplyDeleteMSBI Training in Hyderabad
Thanks for sharing such a amazing post with us and keep blogging...
ReplyDeleteDevOps Online Training
Hello,
ReplyDeleteThank 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
ReplyDeleteVery good information about DevOps clear explanation thanks for sharing
anyone want to learn advance devops tools or devops online training visit:
DevOps Online Training
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
ReplyDeleteMost Important article for Devops Training in Hyderabad
ReplyDeleteThe Information Shared Is Venerable Time Passed On reading The Articles Please keep up dating us Devops Training In Hyderabad
ReplyDeletevery informative blog and useful article thank you for sharing with us , keep posting learn more Technology
ReplyDeleteTableau online Training
Android Training
Data Science Course
Dot net Course
iOS development course
The information which you have provided is very good. It is very useful who is looking for Devops Learning
ReplyDeleteGood 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.
ReplyDeleteData Science Course in Malaysia
Big Data Analytics Malaysia
Data Analytics Course Malaysia
I enjoy it for creating the details, keep up the truly amazing perform continuing
ReplyDeletebig data in malaysia
data scientist course malaysia
data analytics courses
360DigiTMG
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
ReplyDeletedata science course malaysia
data analytics courses
360DigiTMG
Thanks for the information. DevOps Training.
ReplyDelete
ReplyDeleteI really appreciate the good quality content you are posting here for free DevOps Training in Bangalore | Certification | Online Training Course institute | DevOps Training in Hyderabad | Certification | Online Training Course institute | DevOps Training in Coimbatore | Certification | Online Training Course institute | DevOps Online Training | Certification | Devops Training Online
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!
ReplyDeleteSalesforce 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
Thank you for sharing your thoughts and knowledge on this topic.
ReplyDeleteDevOps Training institute in Ameerpet
DevOps Training in Hyderabad
DevOps Project Training
DevOps Training in Ameerpet
DevOps Training institute in Hyderabad
DevOps Course in Hyderabad
This comment has been removed by the author.
ReplyDeletegood post
ReplyDeletePower BI Training
When it comes to traditional marketing the reach for any business will be within the local area but in digital marketing or Social media, we can boost our business throughout the world.
ReplyDeleteThis 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.
ReplyDeletebest aws training in hyderabad
Thanks for sharing this information. I really like your blog post very much. You have really shared a informative and interesting blog post .
ReplyDeletedata science online training in hyderabad
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.
ReplyDelete360DigiTMG, 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.
ReplyDeleteImpressive. Your story always bring hope and new energy. Keep up the good work.
ReplyDeletecyber security training malaysia
This post is easy to peruse and acknowledge without forgetting about any subtleties. Extraordinary work! diploma in digital marketing malaysia
ReplyDeleteThis was incredibly an exquisite implementation of your ideas data analytics course in surat
ReplyDeleteDevelopers nowadays have to build a proper understanding of data analysis tools to get a job in an organization.
ReplyDeletedata science training in bhubaneswar
Nice article! Thank you for sharing with us! clothes, mens clothes, clothes online
ReplyDeleteNice article,It was very interesting to read.
ReplyDeleteDevOps classes in Pune