-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[WIP] Rewritten vagrant configuration #68
Conversation
Cool! I'm not familiar with Chef nor Puppet. So if anyone can help with reviewing this - that would be great! Thanks Norbert! |
I'd like to jump into this discussion. Chef vs. PuppetI support using Chef for selfish reasons; I have more experience with Chef. But I also believe Chef is a much stronger utility, because Chef is pure Ruby, whereas Puppet has a special Puppet Configuration Language. People who know Ruby can jump right in. Further, while I'm admittedly ignorant on the php presence in the Puppet community, I know that there is good stuff happening for PHP in Chef (https://github.com/jolicode/chef-cookbook-php?source=c). DevOps ApproachI've also been working on cleaning up the DevOps setup for my personal use. I'm using subtrees to separate the development and system administration concerns. (https://github.com/Eponymi/sylius-sys for sysadmin, https://github.com/Eponymi/sylius-proj for dev, then a "main" repo that bridges between the two). It is very, very messy right now, but I've put a lot of thought into it and I think it's got the makings of a great DevOps tool for any Symfony/Composer/Capifony setup. Not only does the separation of concerns feel like "good practice", but it also enables you to have a shared folder on your local development machine that doesn't have any sysadmin stuff in it. Instead of a "/mnt/sylius" directory, you just share the host "proj/" directory with VM "/var/www" (or any web directory) and setup a vhost for Apache. No special ignore rules for Capifony, no duplication of files in the web directory of your VM; the list goes on for the separation/subtree approach. Additionally, my efforts have been towards abstraction, so that integration with a different database engine or webserver would be trivial, and hosting concerns like portability and remote node management are trivial. |
Changed sylius::run class to prevent executing database create command after each vagrant reload. |
@pjedrzejewski I have made some improvements to this PR. I consider it as a finished :P What do you think about it? |
Thanks Norbert! To be honest I'm not an expert in terms of Chef vs. Puppet, so I'd like to hear other opinions. I know that previous configuration had some little issues, so if your is working, that's for sure a big 👍. :) Ping @jakzal - I remember you have worked with puppet & Symfony - what do you think? |
@pjedrzejewski I'll review it tomorrow. Tell me one thing though. Why do you need a vagrant config? That's important to know to review it properly. Is the aim to have a consistent development environment or make starting with Sylius easier for newcomers? :) |
@jakzal not sure what maintainers' intentions are, but I'd answer your question by saying "both." I'd like to have a config for devs to easily get started with a consistent environment (clone it, vagrant up). I'm also trying to use Vagrant + Chef for launching and provisioning production machines (using vagrant-aws and vagrant-rackspace plugins). |
One point of concern though (and it's really tiny). It'd be nice to have some automation for creating and installing fixtures for test/dev when generating a sylius development environment. Don't know if it should be handled with a composer post-install script, resources within provisioning, or something else. But I do know it would get us closer to "install and go" for development environment. |
I got a more or less working vagrant that I reuse for each project. Debian 7.0 based. Do you want a PR for this vagrant configured for sylius application ? |
@pjedrzejewski is there any decision about vagrant? Should I update this PR? |
I'm wondering if we should find some way to work with jtreminio and get this added as a puphpet configuration. |
@norzechowicz As the current Chef configuration is not working properly, I'm 👍 for using puppet. Please update the PR when you find some time, I'll merge it. Thanks! :) |
Currently, I'm generating my Vagrant files using https://puphpet.com/, that works pretty well and is easy to update and extend. |
@marcospassos https://puphpet.com/ generate ~2mb of files and I am not sure about adding them into sylius repo. Maybe we should think about devops repository for sylius based on configuration generated by https://puphpet.com/ ? @pjedrzejewski what do you think? |
@marcospassos How do you upgrade your box configuration with puphpet ? |
I just edit the manifest file. |
@norzechowicz @Djuki Can we somehow merge our efforts towards working vagrant setup? 👍 (https://github.com/Djuki/sylius-vagrant) |
@pjedrzejewski I wanted to test how MongoDB server works with Sylius. Jets chat on #sylius-dev :) I will send you PR soon. |
It looks like https://github.com/Djuki/sylius-vagrant is something more than stack of dev tools, its full environment that even clone Sylius for you. |
@norzechowicz I will create PR that don't clone Sylius because there is no need for it. It will be in Sylius repo already. |
@norzechowicz @pjedrzejewski Sylius need specific vagrant because of mongodb extension, and mongodb server, and few php libraryes. sandbox-symofiny is build on puppet not chef. I can try make this vagrant works as sandbox-symfony. (Speed up cache for dev) Also we need to use 64bit VM because Mongo have it's limits on 32bit machines. Your second choice have: I do not think that Sylius need this. sandbox symfony remove xdebug to improve speed. I think you should set list of components you need, and we can create them in chef. I am familiar with puppet too, but it looks like you chose chef to go with. |
@Djuki additional selenium software is installed only if you change $install_selenium variable value in default.pp manifest (this is disabled by default configuration). |
@norzechowicz I am still novice in Sylius but I see that sylius Require mongo php extension, and that some bundles can work with mongo collections. To work with mongodb mongo server is required. I think that as sylius dev you will need mongo server at some point for sure. I just think that is much better that Sylius build environment for self then use other over-builded vagrants. I am very agree with symofny-sandbox approach and we should build vagrant with speed up features. But once when Sylius chose chef for provision we should stick with chef. As I said I am new in Sylius and I have to learn more about this application, so I will do as you and @pjedrzejewski suggest. |
@Djuki actually I choose puppet (not chef) because I think that syntax is more readable for somebody who dont know both tools (and beacuse I know it better than chef :P). |
@norzechowicz ok. If you go with puppet you should use |
PR is updated but this is still WIP, I must check why test are failing. @Djuki @pjedrzejewski what do you think guys about using submodules? |
@norzechowicz I have nothing against using submodules. |
I would say that this can be a little bit problematic (git modules) as to setup vagrant you would need to call git that would download all the stuff (i.e. errors with travis, btw. @norzechowicz you should probably use http urls not git ones there) to be able to use it. |
@stloyd right, http urls woudl be better 👍 anyway I think that vagrant configuration can be separated into standalone repo. |
Its green ;) |
@pjedrzejewski any decisions about this PR? It would be nice to not leave it for another few months :P |
I'll be happy to merge it, but it seems that the change to logs and cache paths (kernel) broke the build on travis. It tries to use the /shm. |
My bad, sorry I thought it is good becuase there is a green success ico at last commit. Anyway now its green and all tests pass |
[WIP] Rewritten vagrant configuration
Great, thanks for your work Norbert. I think there is some more work to do in the Vagrant support area (like moving the whole config to another repo, maybe, not sure about that yet), but its great to have a working solution now. Kudos! |
@norzechowicz What is a password for MySQL root user ? You can update Readme with this information. Now I see it is empty string .. ok :) I think you should add phpmyadmin, what do you think ? |
@Djuki its empty just like in parameters.yml.dist file so you dont have to change anything during composer installation. |
i think there's no need for having phpmyadmin here as its fairly simple to configure it from host machine ;P |
[CJMAX-59] Changed logic to depend on taxon's code instead of name
At the moment it is not possible to use vagrant because of #36, missing app/bootstrap.php.cache file and few others smaller issues.
I decided to use puppet in hope that such change is not a problem. Chef syntax is completly unreadable and unfriendly for me :P