jalogut / magento2-deployer-plus

Tool based on deployer.org to perform zero downtime deployments of Magento 2 projects
GNU General Public License v3.0
200 stars 59 forks source link

Where to install #10

Closed pdenissen closed 6 years ago

pdenissen commented 6 years ago

Hi,

As a noob I try to figuring out how to install the deployment tool. Do I have to install this in the Magento root? Or outside the root?

It would be a little more clear if I know where to cd to. This also applies to the setup part. Where should the file deploy.php copied to?

I hope you can make it a little more clear for noobs like me ;-)

Thank you in advanced!

osrecio commented 6 years ago

Hi @Hobbit78 ,

For me you have 2 key sites where to install this deployment tool (surely there are other options, I speak of the ones I have implemented):

Option 1. Within the project (Magento)

You need install via composer composer require "jalogut/magento2-deployer-plus" In this case you should follow the instructions of the Readme:

PROS

CONS

Option 2. On the server that is responsible for the deployment (gateway / bastion / etc)

You need an artifact previously generated from your Magento. (<bin_dir>/dep build)

PROS

CONS


Here you have my 5 cents of my experience with magento2-deployer-plus.

IMHO It is essential to have a CI/CD server to deploy magento, therefore, I recommend option 1.

jalogut commented 6 years ago

@osrecio thank you very much for taking the time to clarify the different installation options.

@Hobbit78 I would also suggest you to go for option 1. You can deploy from your local or from a CI/CD system as you wish. Just be sure you have ssh access to the server on the machine where you deploy from. You need that because deployer will start executing actions on the server via ssh when you execute the deployment commands.

For more general information about how deployer works, please see the deployer documentation here:

This tool is just a recipe with tailored tasks for Magento2 based on the deployer tool

jalogut commented 6 years ago

Do I have to install this in the Magento root? Or outside the root?

You have to install it with composer. Then, the tool will be available on your vendor_dir

Where should the file deploy.php copied to?

The README.md refers all actions to your project root. So you should have the deploy.php file on your project root

jalogut commented 6 years ago

Hi @Hobbit78

Did that help? If you do not have further questions, we might close this issue.

ghost commented 6 years ago

Hi Jalogut,

Hobbit78 here ;-)

Well haven't work it yet because lack of time. But the manual provided by @osrecio seems very clear. I think I can work from there. You can close the issue.

Thanks a lot. Very happy with it.

lfolco commented 5 years ago

Sorry to respond to a closed ticket, but I'm also having trouble figuring out directory structure. Where does the Magento code go within this project? When working locally, for example, would it just go in a directory called magento? Where should the magento_dir variable point to? Local or remote?

jalogut commented 5 years ago

Hi @Ifolco, magento_dir is the relative path to the folder containing the magento files from your project root. So if you place the magento installation directly in your project root, the value would be .. However if you have magento code in a subdirectory, the value of magento_dir has to be the name of this subdirectory.