Tracking deployed application's files

强颜欢笑 提交于 2019-12-23 17:26:39

问题


What do you guys use to deploy and application and track their files in production? I mean tracking if the file was not changed directly in the server?

thanks


回答1:


I have been using Git for 3 years to track /usr/local on a HPC production cluster.

For 2.2G (mostly binaries) it takes 1 minute running git log -n 1; git status (over NFS!) to convince myself that the files were not modified after deployment. On local disk the scan would take seconds. If change did happen, I see which files and diffs (if it's not binary).




回答2:


I wouldn't track those files through a VCS on the server.
Normally (except for simple webapp deployment), you don't have any "unnecessary" tool on a production server past the ones you actually need to run the app (i.e.: certainly not a VCS).

A Version Control System is there up until the pre-production environment, for you to get a specific tag to deploy.
But once that tag is used to get your files, then a deployment process takes place:

  • replace the variables from your generic config files with production-specific values
  • stop the production processes
  • copy and deploy the files onto the production server
  • restart
  • monitor...

So I would set an external (i.e. not directly managed by a VCS) job to compare a versioned file and the corresponding deployed file.



来源:https://stackoverflow.com/questions/3863964/tracking-deployed-applications-files

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!