UCLALibrary / packer-samvera

A build of Samvera/Hyrax using Packer and the 'ansible-samvera' roles
BSD 3-Clause "New" or "Revised" License
1 stars 3 forks source link

Allow `cap deploy` to deploy from the developer's box directly #54

Open ksclarke opened 6 years ago

ksclarke commented 6 years ago

Cap deploy deploys from a github repo. So, a developer who wants to test a Gemfile change, for instance, needs to commit code up to a new branch in the Hyrax GitHub repo and then run cap deploy with a branch name:

BRANCH=my_branch bundle exec cap localhost deploy

There used to be a deploy_via that allowed deploying via copying but that's been removed in Capistrano 3.

Possible solution: One could configure the environment to build from the local machine's git repo so that deploy will work even if you're at a place without network access. Cf. https://stackoverflow.com/questions/5532323/how-to-configure-capistrano-to-deploy-from-local-git-repository

This ticket is to add that functionality, but in the meantime we should document what happens when cap deploy is run so it's not confusing for new devs like myself when they don't see their dev box's Gemfile edits being deployed on their dev machine.

ksclarke commented 6 years ago

We want to be able to use this for localhost only probably. If we're going to be deploying to a remote UCLA server it's okay to have to push what we deploy up to a GitHub branch. Overriding the variables should be able to do be done in the config/deploy/localhost.rb (through changes to the ansible roles that packer-samvera uses). The production and test machines also will be using localhost deploys though so the role task that make these changes to localhost.rb need to be tagged for dev box use only.