-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Chef cookbook #1
Comments
Somewhat related: I really like what Discourse is doing, where they're using https://github.com/discourse/discourse/blob/master/docs/VAGRANT.md (with Chef) for development, but Docker (standalone, all services in one docker) for easy deployment to production. They also have individual Docker components if you want to deploy a bigger installation, but the simple case works for 99% of users. The vagrant image that they use is created like this: https://github.com/discourse/discourse/blob/master/docs/DEVELOPER-ADVANCED.md It's quite nice as the process of working on the software involves only With regards to updating the Vagrantfile, if the code to bring up nginx+puma on Ubuntu 14.04 is identical across the two projects, perhaps it would make sense to create a separate project that creates a VM image, and then use that image as the base in both projects. |
#8 switches to Ubuntu 14.04 and Apache 2.4. I also made some changes to https://github.com/articlemetrics/alm-report-cookbook, because it was failing in a few areas due to the OS and Apache updates (things like That gives us a much better base for updating to nginx/puma. I saw that you assigned yourself, is there any particular reason you want to do this? If not, I can also do it. |
Cool. I have spent some time with Vagrant/Docker yesterday, but I'm still learning. It sems that the Phusion/Passenger folks are docker experts and have built some great docker images, e.g. https://hub.docker.com/u/phusion/baseimage/ and https://hub.docker.com/u/phusion/passenger-ruby21/. The reason I assigned myself to the Vagrant/Chef work is that it is essentially the same code in alm and alm-report. We can discuss how best to do this when we talk next time. Questions:
|
In #8 I've actually switched to 14.04 (12aadd5) and it works just fine, so that can be done.
Yes, Docker sounds good. What we have now (with #8 changes) is probably good enough for Iteration 1, but a Docker-based system (in combination with Vagrant) will be better, mostly because we can also handle production deployment with Docker. The https://hub.docker.com/u/phusion/passenger-ruby21/ image sounds like a great start for any kind of Dockerization, and from what I gathered the name doesn't imply it's meant for Phusion Passenger, only that it should be "as easy as being a passenger along for the ride" :). So it's "merely" a good base image with ruby and node. Comparing Puma to Phusion Passenger, I found this interesting point by the makers of Passenger:
The open source/free version of Passenger is multi-process single-threaded, and Puma is multi-threaded all the way. For an application like alm-reports, where most of the requests are held back by network I/O, it looks like the makers of Passenger are telling us to use either Puma or the enterprise version of their server. I vote for Puma. On the other hand, doesn't seem to be a lot of support out there for Docker/Puma combination, though I didn't spend a lot of time looking yet. |
Very interesting discussion about the baseimage-docker mentioned above: https://news.ycombinator.com/item?id=7258009 The gist:
|
@jure I will change the deployment with a pull request with a deployment tomorrow, but if you need the cookbook before, be aware that it is renamed to |
Cool, I'll give it a shot. |
Had a few issues with dependencies, but it looks like I've solved them now:
Now running into an issue with the alm_report cookbook:
|
You are too fast. I'm currently doing some final testing and tweaking. There is a change in the Vagrantfile (removing the shell commands), and an update to the Cheffile that I will put into a pull request shortly. |
The two major pain points are file permissions, and ordering of actions (Chef doesn't run top to bottom, but precompiles, so you have to be careful what to expect). |
Looks like it's related to this: https://github.com/articlemetrics/ruby-cookbook/blob/master/recipes/default.rb#L10 It tries to call I've submitted a pull request to the ruby-cookbook repository. Edit: Ah! Yes, I'm almost there as well. Didn't know you would be working on the |
Can we close this, Martin, seeing as the revamped Vagrant/Chef stuff is working great? |
Update the existing Chef cookbook/Vagrantfile to use Ubuntu 14.04, nginx and puma. Most of this code can be shared with the alm application, and if fact any rails application running under nginx/puma.
The text was updated successfully, but these errors were encountered: