Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Move slugbuilder-hook from cookbook into bin #376

Closed
gabrtv opened this issue Dec 10, 2013 · 5 comments
Closed

Move slugbuilder-hook from cookbook into bin #376

gabrtv opened this issue Dec 10, 2013 · 5 comments
Milestone

Comments

@gabrtv
Copy link
Member

gabrtv commented Dec 10, 2013

Right now the slugbuilder-hook is an ERB template in the deis-cookbook. As @tombh pointed out, it would be easier to hack on if we moved it to bin, and retrieved @controller_dir and @slug_dir from the shell environment.

Note that the hook is run as the git user, so there may be some hoops to jump through re: permissions.

tombh added a commit to tombh/deis that referenced this issue Dec 16, 2013
tombh added a commit to tombh/deis-cookbook that referenced this issue Dec 16, 2013
…controller_env.sh primarily for use by slugbuilder. deis/deis#376
@tombh
Copy link
Contributor

tombh commented Dec 16, 2013

These commits are work in progress, it should be complete I just haven't tested it. Which brings me back to #319. I still don't think the docs are clear on how to run the tests. For a start they miss out the step of using venv and installing the dev_requirements.txt. But also it doesn't say where to run the tests; the host machine or the VM. I would say the VM makes the most sense, but then we have to deal with the problem of local_settings.py being setup for production. Could we add --settings=deis.settings to the Makefile? Eg; ./manage.py test --settings=deis.settings --noinput api cm provider web.

Right now I'm stuck with the problem of having the permission to create the test database. I tried editing pg_hba.conf but no luck. I'll keep plugging away, but I gotta shoot now.

Oh and whilst I remember when updating my controller VM with chef-client it didn't run the pip install -r requirements.txt block, even though there were a lot of new dependencies (I hadn't updated the VM in a few weeks). This caused errors elsewhere in the converge. I guess this should be in a separate issue, but I just didn't want to forget it later on.

@bacongobbler
Copy link
Member

But also it doesn't say where to run the tests; the host machine or the VM. I would say the VM makes the most sense, but then we have to deal with the problem of local_settings.py being setup for production.

Whatever environment you're working in should work for you. I do this all locally (Virtualenv and Sublime Text keyboard shortcuts FTW). I've worked on projects where any change you make to the code has to be scp'd up to the development server just to test your changes... Not pretty. Just my two cents though :)

@tombh
Copy link
Contributor

tombh commented Dec 18, 2013

@bacongobbler oh yeah, I know what you mean about the pain of SCP :'( Hooray for ST shortcuts and Travis CI!

BTW I've made a stab at tweaking the tests to run in a vagrant environment #408. Very much just ideas to consider.

tombh added a commit to tombh/deis-cookbook that referenced this issue Jan 3, 2014
…controller_env.sh primarily for use by slugbuilder. deis/deis#376
@tombh
Copy link
Contributor

tombh commented Jan 3, 2014

I fixed it. All it need was to move the write_file() call inside the iteration loop tombh/deis-cookbook@c063e08

@mboersma
Copy link
Member

mboersma commented Jan 3, 2014

Excellent. I will try again to test and merge this tonight.

@gabrtv gabrtv closed this as completed Jan 9, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants