dancryer / PHPCI

PHPCI is a free and open source continuous integration tool specifically designed for PHP.
BSD 2-Clause "Simplified" License
2.42k stars 441 forks source link

Intent to implement: Deployment module #1125

Open maveius opened 8 years ago

maveius commented 8 years ago

I would like to implement Deployment module. Idea:

Configuration in phpci.yml file like:

setup:
   deploy: 
        plan: "deploy-production"

will run "deploy-production" after build.

gansky-alexander commented 8 years ago

Hello, i would like to build that too. Can you explain, how phpci will update project, if we have ssh and installed git on remote server?

maveius commented 8 years ago

Why phpci need to update project ?

maveius commented 8 years ago

Do you know bamboo?

maveius commented 8 years ago

I would like to do deployment like bamboo. After the SSH connection we can run the comands on remote server or run self-written script in bash or python ?

maveius commented 8 years ago

Upload files by SCP

maveius commented 8 years ago

We can pack all files from directory of project to (in example) project.tar.gz and copy this to remote server by scp command and run commands (or script) than you define in deployment plan. Phpci will be connect by SSH to your remote server defined in deployment plan. And runs the commands.

gansky-alexander commented 8 years ago

No, i dont know bamboo. So, if i want to deploy project i should to write some script which will do all work on server, right?

About last post: why we need some crud? we can do that via phpci.yml.

maveius commented 8 years ago

So, if i want to deploy project I should to write some script which will do all work on server, right?

Yes, That's Right! Or You can write some script in PHPCI Deployment Plan

why we need some crud? we can do that via phpci.yml.

Yes, but phpci.yml is parsed on commit or on demand by "build" button yes? And PHPCI run everythings what you configured in phpci.yml when is triggered.

It' was not good idea, because we don't need deploy on every commit or any time after success build. Developer or Tester should self-decide when builds is ok and accepted by client and then He or She run deploy on demend with push the button "deploy now", not every time after build success

gansky-alexander commented 8 years ago

okay, i got your point

maveius commented 8 years ago

Another argument is create a very good tool in one app like "One ring to rule them all". I can build some version (from branch) and when I decide then build can be deploy to server test or production I use "deploy button" - Continuous Integration and Deployment management system.

I fork project and when I'm done I try to create a pull request ok ?

gansky-alexander commented 8 years ago

I am not an owner of this project, i just have some thoughts to make somethink like that. I think you should to ask @dancryer

maveius commented 8 years ago

Can You Help Me too in this module ? And I have got some link for you:

https://www.youtube.com/watch?v=acRyXUVVHtg

gansky-alexander commented 8 years ago

Yep, it is nice to have somethink like that, but is looks like it is an just build process, not deployment. And we still needed some server side util.

I think it would be simple to make next:

maveius commented 8 years ago

On bamboo You can create build plan with deploy commands or create antoher deployment plan in "Deployment project".

I think that it is not good because you need to create two projects for one business project ( one for build and one for deployment )

This is deployment screen: https://confluence.atlassian.com/bamboocloud/files/737183354/DeploymentProjectSummary.png

maveius commented 8 years ago

I think it would be simple to make next: create server side util which will listen some port; configure bitbucket service or webhook and when we merge our changes to master we ping our deploy util, next it make all work;

May be it is simple at this moment but could You imaging situation when You may have 1000 projects and 100 remote server and you prepare 1000 deploy script on 100 server and distrubuted You have to connect to 100 remote servers and run milions of commands to check what you would like deploy and prepare deploy script for all project on server and again You need to reconnect by ssh to another server and do the same ?

Your solution is ok for one project and one remote server but think about other developers who wants to manage all servers in one web-app.

gansky-alexander commented 8 years ago

I aggre with you, but for now i want to get little stop for that for thinking.