We want to build a distributable development environment for FarCry with a number of core features:
works across Windows, Linux and OSX development workstations
only requires a few instructions from a README to get going
doubles as a deployment pipeline for updating your production code
It’s part of our goal to have a maximum 4 hour window to project productivity for any employee (no matter how new).
Stack
While FarCry supports a myriad of deployment configurations, we’re focused on a stack that resembles our ideal production environment. More variants will come in time.
Base stack includes:
Latest Ubuntu LTS (currently Trusty64)
Tomcat 8
NGINX
Lucee 4.5
mySQL 5.5
Deployment
Our deployment scripts all assume you have code stored in GIT repos, and that they only require a single ssh key (or anon) to get access to them.
The FarCry project format has an ./install folder that can be filled with sample data, and a deploy.txt describing project dependencies. We want to leverage these options to automate the installation of projects.
Progress
Daemonites have been involved in a lot of devops projects over the last couple of years. We’d hoped to bring you an instant “FarCry In A Box” style of development environment for a while, but its been hard to make our scripting environments generic enough for public consumption.
@blair and @modius spent the last week cherry picking the best options from our various deployments. We trying to build a generic set of ansible-roles to drive both vagrant and ec2 deployments (and potentially any sort of deployment). We think we may have cracked it.
If you would like to help us get a universal FarCry Workbench up and running, please take a look at the prototype at http://github.com/modius/farcry-env-chelsea and give us your feedback.
If I can get a confirmation as a reply from a few different folks that this comes up with a running environment, I’d be grateful Just let me know your developer environment; for example, works great on OSX (Yosemite).
Vagrant Install
This only needs to be the once per workstation. If you already have a working Vagrant environment you can skip this part (except the vagrant-hostmanager plugin).
Requires an existing installation of the standard Daemonite Vagrant Workbench, then just fire up a terminal:
git clone https://github.com/modius/farcry-env-chelsea.git
cd farcry-env-chelsea
git submodule update --init
vagrant up
note: depending on your environment you may need to put in your password for the vagrant-hostmanager plugin to write to your hosts file
Wait… it takes time
It can take a little while to come up for the very first time, especially if your internet connection is average. Don’t do this from a mobile.
got to get ubuntu/trusty64 image if its your first time
there’s a few downloads (nginx, mysql, lucee installer) to get through
a few github pulls; though these should be quick
double check the terminal that its not waiting on your password to write out the hosts file!
Once you are through the downloads, it can take about 20 minutes to provision for the very first time. Once its provisioned its as fast as starting up a virtual – so pretty quick.
In the meantime, care to comment on why you guys use Ansible for provisioning? Having only used Chef and manually written shell scripts, I’m curious to hear your opinion of Ansible and what it offers over Chef.
Ah… that’s missing refObjects entries which is the default state post install – we probably need to add an ?updateall=projectkey to the initial load to fix that.
What do we think the default, non-secure passwords for the workbench should be?
farcry is what we typically use for non-secured defaults for FarCry webapp, but we also default to vagrant or nothing for other infrastructure. Perhaps they should all be the same in this instance.
Uploading images to the image library seems broken as well. The UI appears to upload the image fine, but it 404s
I do see the images I uploaded in the www/images/dmImage/* directories though. So its uploading, something else is breaking the link. Maybe the spaces in the filename?
which doesn’t work. If I replace the “+” with a space or %20 it works fine.
Check your nginx config and the rewrite rules. Make sure that “+” is listed in the rewrite rule. I know the default “suggested” Friendly URL rewrite rule is missing the “+” character
I think either farcry or vagrant is fine. farcry has been the default for FarCry installations for a while so FC devs will be used to that. Anyone who has used Vagrant will be used to having “vagrant” be the password for everything.
So, I don’t think it matters much which you choose, but I think it should be the same for all (FC webtop, Lucee admins, mysql root pw, or create a vagrant/vagrant, farcry/farcry user in mysql too, etc). That way we don’t have to guess. “Oh, I use ‘farcry’ here, but here its ‘vagrant’”.
Agreed. I’d love it if core renamed the files so they did not contain spaces. I get content editors uploading them all the time, and while it doesn’t usually cause too many issues, it sometimes does.
COAPI conflicts are all optional database indexation suggestions – i don’t think we deploy these as part of an ?updateall=projectkey… perhaps we should be.
OK, I didn’t look specifically, thought it might have been related to the error I saw from the front end. I think a clean database install after provisioning, including indexes would be good, but you’re right, they’re optional.
If you are a sucker for punishment, you might want to try an alternative workbench using Fandango project. Ideally I want to have a super light-weight repo that just configs the environment and is easy to copy and set up so that anyone can have their own project workbench.
git clone https://github.com/modius/farcry-env-fandango.git
cd farcry-env-fandango
git submodule update --init
vagrant up
Note requires an existing installation of the standard Daemonite Vagrant Workbench.