3

I have written a set of bash + crontab scripts that basically let me take a new linux server and deploy a git repo to it. All fine and good, but it's a rather piecemeal process and am wondering if there are some pointers on a more professional/polished version of this kind of workflow?

Or am I missing the boat? is there a better low/no budget way of deploying servers+apps on cloud VM's I should look into?

EDIT Regarding config management tools like Salt or Ansible, I am trying to avoid going down this route because it (appears) to be a multi-week effort to learn these tools enough to decide if it's going to meet my needs. I'm not a full-time devops and prefer to have as few moving parts as possible. Though if I'm wrong in this assertion, please do let me know!

JasonS
  • 183
  • 7
  • 2
    there is a variety of continual integration tools (travis, jenkins) and configuration management tools (ansible, salt, chef, puppet) that would make your life better – chicks Nov 13 '15 at 14:34
  • thanks @Chicks, I tried taking a look at config mgmnt like ansible but it looks to be a multi-week effort to learn them enough to decide if I should use it, and I'm not a fulltime devops so trying to avoid going down that route. – JasonS Nov 13 '15 at 14:58
  • 3
    You can learn the basics of Ansible in an afternoon. – ceejayoz Nov 13 '15 at 15:03
  • 1
    No, you can learn the basics of Ansible in five minutes. – Michael Hampton Nov 13 '15 at 16:23
  • 1
    Michael and ceejayoz are correct that ansible is easy to get going with, but it should be worth noting that getting to a *professional* level with these things could take weeks of testing and practice. The time saved from manually doing these things over and over seems more than worth that investment to me. If you're so discouraged about making that investment then I guess you can live with *amateur* workflows. :) – chicks Nov 13 '15 at 18:30

1 Answers1

1

I would absolutely saying you need to go to a config management solution, because I would consider that the professional solution. My preferred one is Ansible because its pretty easy to learn and setup, and requires only ssh access to servers.

Ansible has a git module that can clone a repo to what ever directory you require, and you can copy a private key over very easily to the new server if necessary. It also has modules to copy files and run scripts, and pretty much whatever you need.

I built an Ansible playbook to create Rackspace cloud servers and configure them- including checking out a git repo for web code and setting up nginx to use that as the webfoot.

I understand you'll have to take some time to learn it, but that time will be well spent because it will save you time in the future. You already have some scripts, and porting those over to ansible- even if at first you just call the scripts- is exceedingly easy. It will not be a multi week process to learn. Start slow and build it up- you don't have to try to do too much at once.

apple4ever
  • 51
  • 4