yiiframework.com icon indicating copy to clipboard operation
yiiframework.com copied to clipboard

Vagrant configurations for getting started with Yii

Open Deele opened this issue 9 years ago • 12 comments
trafficstars

I would love to see some vagrant configuration sets with auto-install procedure, that would be almost single-step solution, with initialization and migrations started automatically in deployment. In addition to that, vagrant is multi-platform system, so it is very user friendly.

Developers who are already familiar with vagrant would exactly know where to look for server specifications, what software is required to run it. And for all other people, they would be introduced with whole new tool set, that is capable to provide elegant development environment.

In addition to that, it would remove frustrating setup of testing environment that is barely documented.

Related issue #49

Deele avatar Jan 21 '16 21:01 Deele

frustrating setup of testing environment that is barely documented.

Probably because it is already set up ?

It is part of both basic and advanced project templates and is ready to be used. Which is why it is barely documented.

I'd love to see the community contribute vagrant configuration sets - I suspect that there already is some scripts out there made by the community.

jacmoe avatar Jan 21 '16 21:01 jacmoe

Vagrant.. why not Docker?

Should the install page link to Vagrant scripts and Docker images?
Is probably a good idea.

Although, I think a community wiki page about it would be better.

jacmoe avatar Jan 21 '16 21:01 jacmoe

related to https://github.com/yiisoft/yii2-app-advanced/pull/105. If we provide such images officially, we have to at least support docker and vagrant. not sure if there is something else that is also very popular.

cebe avatar Jan 21 '16 21:01 cebe

Vagrant, because I'm familiar with it and know that it works. I heard that Docker has problems with some stuff that yii uses, related to composer or other stuff, I don't know for sure.

I think, we should provide options to add deployment configuration for every system out there, if contributes are found. Maybe, a special section in download page.

Testing should be better documented to welcome new users.

Deele avatar Jan 21 '16 21:01 Deele

There is nothing wrong with docker, we are currently building a testing setup based on docker to test against various DB configurations and system versions. So it would be easy to create a development ready docker thing.

cebe avatar Jan 21 '16 21:01 cebe

I am writing a blog post about using Yii with Deployer and have made a Yii2 basic app project template with Deployer support here: https://github.com/jacmoe/yii-app-basic-deployer

As an alternative to Vagrant/Docker, a Deployer based setup is more universal and extremely lightweight - and can be used to easily generate Vagrant/Docker things from.

jacmoe avatar Jan 21 '16 21:01 jacmoe

related to https://github.com/yiisoft/yii/issues/3186

cebe avatar Feb 11 '16 14:02 cebe

I am still not sure how this would benefit the project because what people need is a docker image / vagrant 'thingie' that carries os, web server, db server and php and composer installed.

It would make no sense to have yii pre installed - obviously - because we do that on a per project basis.

There are lots of ready made web dev Docker/Vagrant images/stuff "out there" so all we have to do is link to them.

jacmoe avatar Feb 11 '16 19:02 jacmoe

OK, so having written that, perhaps Docker/Vagrant with the following:

  • Web server
  • DB server
  • FTP server
  • Git
  • Composer global install with the asset plugin installed
  • Codeception globally installed for easy testing

That image should have the web server set up with virtual hosts so that it is easy to create projects on it with the correct permisions (add user to the www group, or similar)

I have a feeling that there are tons of Docker/Vagrant images/scripts out there that could be modified to have Composer/Asset Plugin installed and good to go.

I have no experience with Docker/Vagrant so a volunteer would be nice.

jacmoe avatar Feb 11 '16 19:02 jacmoe

Personally, I would prefer a Docker image because it is more robust and easier to use than Vagrant.

jacmoe avatar Feb 11 '16 19:02 jacmoe

There are no "image" required, just configuration files. And in addition, there will be nothing pre-installed. "Configuration" contains instructions (could be in simple shellscript format, or even Ansible playbook) that describes what software should be installed and how it should be configured. Setup is automated.

The purpose of that is to help newbie developers ability to use all of features of yii (some of them are not available on Windows systems), provide ready environment for testing, and provide ready environment, where to expand.

It benefits developers of Yii, teaches them more than application framework, it teaches them to be The Developers that are able to create quality software and if sold correctly, that will enhance strength of Yii community.

Deele avatar Feb 11 '16 20:02 Deele

Nothing installed? I fail to see how this would benefit anyone. There are tons of Vagrant scripts and Docker images out there - I fail to see why the Yii team should be bothered to cater for newbie Windows users who can't figure out how to get a Linux box running in a container on their development machine.

jacmoe avatar Feb 11 '16 21:02 jacmoe