Editor’s Note: This post comes from the blog of Sugar Operations Guru Wyatt Walter, where he talks about a cookbook he created to talk about the process of deploying SugarCRM using Opscode Chef.
After delaying cleanup on the code for a week or two, I’ve published my cookbook for deploying SugarCRM CE using Opscode Chef. The cookbook utilizes the community cookbooks from Opscode for deploying the standard LAMP stack on a machine, grabs a copy of the latest stable build of SugarCRM CE from Github, and creates a silent installer file for super-easy installation of SugarCRM.
Some quick notes on setup:
Usage is super easy, especially with a general knowledge of Chef. I’m not going to dive into setting up Chef, they’ve got some great documentation for that.
You’ll need to pull down the php, apache2, mysql, openssl, and git community cookbooks from Opscode and upload to your organization as well.
Then, you can just download the sugarcrm cookbook and upload to your organization:
knife cookbook site vendor sugarcrm
knife cookbook upload sugarcrm
Then, add the sugarcrm recipe to whatever node or role you desire. For me, I created a role for sugarcrm:
$ knife role show sugarcrmchef_type: role default_attributes: description: env_run_lists: json_class: Chef::Role name: sugarcrm override_attributes: run_list: recipe[sugarcrm]
You can either bootstrap a new VM / cloud instance or apply the role to an existing machine and do a run of chef-client.
For my example, I created a new EC2 instance based on Ubuntu (can be any OS that the Opscode community cookbooks support):
knife ec2 server create -r 'role[sugarcrm]' --image ami-7000f019 -d ubuntu10.04-apt -S mykey -x ubuntu -i ~/.ssh/mykey.pem
Then, you can navigate to your server’s FQDN/sugarcrm in your browser to complete the install. Not to worry, the cookbook configures a config_si.php (si = silent installer), so no need to know any details about your install.
Once complete, you’ll reach the login page. Default login is admin/admin (which can be overridden with override attributes in the role/node).