8 ms·
Every time someone comes up it with a "cool" way to deploy via Git, it turns out their definition of "deployment" is nothing more than dumping something on a se
by rickmb 14y ago
Every time someone comes up it with a "cool" way to deploy via Git, it turns out their definition of "deployment" is nothing more than dumping something on a server. It completely ignores every aspect of deployment other than putting the files somewhere else, which is 5% of the work and 1% of the complexity of deployment.
That's not even a sufficient professional scenario for anything but the simplest of non-essential website. Hell, this won't even do for the simplest of WordPress sites.
BTW, who on earth still uses FTP?
- wilhil 14y agoI hope you just mean for source control... FTP is used all the time!
- astrodust 14y agoLike telnet, this protocol should be dead. It's an enormous liability.
- masklinn 14y ago> BTW, who on earth still uses FTP? Does sftp[0] count? [0] http://tools.ietf.org/html/draft-ietf-secsh-filexfer-13 http://tools.ietf.org/html/draft-ietf-secsh-filexfer-13
- archivator 14y agoThe commonalities between SFTP and FTP end with the three letters in the acronyms. SFTP, unlike FTP with its passive mode and whatnot, is actually a decent protocol.
- masklinn 14y agorickmb did not come even remotely close to specifying on which grounds he was asking his question. He might be a proponent of "if it's not automated [via capistrano/fabric/etc...] it's not deployed" for all I know.
- stefantalpalaru 14y agoI deploy via git with a more complex post-update hook that runs tests before pushing into the production repo and all the other commands needed for my Django setup.
- doc4t 14y agoIncidentally I just asked a related question yesterday: http://news.ycombinator.com/item?id=4256265 http://news.ycombinator.com/item?id=4256265 I am currently trying to figure out a more clever way to deploy my code. I would love if you would share some thoughts on some general strategy and possible tools. I am using jenkins and git.
- davedx 14y agoWe use Dreadnot with chef, it works pretty nicely.
- jabo 14y agoI use Capistrano to deploy PHP web apps and I love it. It basically checkouts stuff from the git repo, minifies and bundles the JS files, uploads the assets to the CDN and tags the repo with the version string. Though Capistrano has been traditionally a ruby deployment tool, it works well for any type of deployment. You just need to override or not use some of the Ruby-specific stuff. Deploying to multiple servers is ridiculously easy with Capistrano.
- valisystem 14y agoFor both of your interrogation, old fashioned PHP devs used to (and I do not doubt that some still) deploy that way.
- risratorn 14y agoTo be honest, most of them do so because it's the only option present on most shared hosting platforms. (S)FTP is for most of us the only option when deploying a simple site to the client's hosting. Ofcourse it would be cool if all of our clients would host on a PAAS platform like Orchestra or PHPFog but that's not the case by a long shot i'm afraid.
- damncabbage 14y agoA year and a half ago I worked at a place that had a Deployment Spreadsheet. Each file was carefully FTP'd from the shared development area to the live site, and then marked off on the sheet with the date that it had been deployed, and with what feature. Each new deployment meant either adding a new set of rows to the spreadsheet for a new feature, or for updates to existing features going back and finding an earlier instance of the file in the list and bumping the date on that. Because of the shared nature of the CMS across different websites, we couldn't svn up in the CMS directory without destroying the current known state of the site. We also couldn't svn up outside of the subdirectory we were working on, as everyone else working on that site was working off the same network share. Everything was done very gingerly. The day one of the developers came up with a method to take a list of files from the spreadsheet, tar them up and FTP them to the server for later extraction, he was overjoyed and very, very proud. I got out of there, swore off PHP and its community entirely. I got tired of checking for a baseline of automated deployment, automated testing, version control, and individual dev systems at every single job I applied for; Ruby people don't look at you funny when you mention these things. Addendum: I personally know a developer currently working for a famous local radio brand who directly works on the live website network via an FTP plugin. He has to contend with other developers dumping the contents of archives directly into his public folder. (For context, this is all in Sydney, Australia.)
- acdha 14y ago
- mattacular 14y agoUh what? People still use FTP all the time. Just not for deployments.
- masto 14y agoI couldn't agree more. Deployment via SCM tool is a terrible idea. The first thing to do when starting a project, no matter how small, is to set up a continuous integration server with a clear build and deploy process.
- ynniv 14y agoYou can deploy Tomcat apps using a post-commit hook as well. Add your server as a non-origin remote, and it's a quick way to update a Clojure/ring site. For added predictabIlity, you can deploy a specific branch.
- ajross 14y agoThis bit has completely lost me. Why on earth would you want to do non-trivial munging in a post-commit hook instead of just writing and running a "deploy" script like everyone else does. You can run that over ssh, even, preserving the "fire once" behavior of doing a git push from the build system.
- ynniv 14y agoCopying a .war to /var/lib/tomcat/webapps and restarting tomcat is non-trivial? Perhaps your deploy script is more complicated than it should be. I don't understand your distaste with deploying via git over ssh instead of bash over ssh.
- kbolino 14y agoYou haven't needed to restart Tomcat since at least Tomcat 5.5, if not earlier. Tomcat automatically polls for changes to the WAR file and updates accordingly.
- emmelaich 14y agoThat's the theory, but I've found many reasons to restart that I just do it automatically these days. The reasons are not limited to stupid webapps, jni, log4j stuff that outlives a deployment and ends up consuming all of PermGen.
- kbolino 14y agoAn interesting point. I get the part about "stupid webapps" (e.g. loading a configuration file once and never checking it again), but I find the PermGen part surprising. Would you care to provide more detail? I thought that PermGen was garbage collected in modern JVMs; furthermore, wouldn't the new version of the application still use (roughly) the same classes/methods and thus (roughly) the same space?
- StacyC 14y agoBTW, who on earth still uses FTP? I use Transmit to FTP updated files to my web server. Then I send smoke signals to my colleagues to inform them of the changes, and document the updates on a papyrus using quill and ink. Should I be doing it differently?
- astrodust 14y agoYou'd get better results if you lit signal fires. Smoke signals don't work very well at night or on overcast days. I've also found that using parchment makes updates more durable as they weather better.
- antman 14y agoParchment only. Papyrus has a standing export restriction from the issuing superpower (Egypt circa 200BC), so if it becomes a superpower again you could be extradited for disobeying the law of a that foreign country that attempted to force an unfair business advantage to the rest of the world.
- glesica 14y agoI actually assumed "smoke signals" was some sort of Mac app that I didn't know about (it actually sounds like it could be a 37 Signals product). I even wondered if "papyrus" was a team-management wiki or the like. Then I got to "quill and ink" and realized you were joking.
- numbsafari 14y agoHe wasn't joking. "Quill and ink" was a Microsoft prototype tablet.
- kingatomic 14y agoUnfortunately, some of my smaller clients have shared hosting packages which means FTP is still the only game in town.
- lukeschlather 14y agoAny shared host worth their salt has sftp and shell access for easy automated deployment.
- tlrobinson 14y agoMore complex deployment processes can be kicked off in the post-receive hook. I think it's useful to have deployment integrated with your SCM. You have a complete history of deployments. You can easily roll back to any version. You can deploy from any machine which has your SCM tool installed.
- emmelaich 14y agoJust one problem besides metadata and dynamic changes is that git (and hg) don't version empty directories at all. Sometimes this matters: http://stackoverflow.com/questions/6554910/i-am-failing-to-run-mule-3-on-the-command-line http://stackoverflow.com/questions/6554910/i-am-failing-to-r...
- damncabbage 14y agoThis is usually "fixed" with a .gitkeep file in the deliberately-empty directory. (Yes, it's a hack.)
- emmelaich 14y agoYes, or a README. But this doesn't work for Mule; for some directories it autodetects and attempts to run it (whatever that means for that directory).
- donavanm 14y agoJoke if you like. I know of (literally) billions of dollars of revenue that are dependent on FTP. Legacy systems are crazy hard to kill off.