Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: How have you reduced the pain of moving code between systems?
2 points by takinola on July 19, 2017 | hide | past | favorite | 1 comment
I find the process of moving code between systems (eg from Dev to Staging to Production) to be (unnecessarily) finicky. No matter how much care is taken to harmonize the various environments, very often, subtle bugs creep in. I would like to set up my deployment such that I can be confident that code behaves exactly the same on any of the systems. How do you manage your deployment to ensure consistency across systems?



Configuration management systems, continuous deployment and orchestration. I have things setup so everything on the server(s) is managed through configuration management. I would recommend having the following environments setup and managed through configuration management (development, testing, staging, production), no need to do manual code pushed and configurations anymore. In staging this is normally where you would have a final review if the amount of code being pushed out is high or it is a new high profile feature that you may want to manually check out before it gets pushed out if you did not want the process to be 100% automated.

I run my code through a continuous deployment system that pushes code that I believe is ready to a testing server where my tests are run. If that goes well, then the code is pushed to a staging server where a similar or duplicate setup of production is orchestrated for each build. Once things look good and pass all the functional, behavioral and other custom automated testing and benchmarking it is automatically pushed out to production. Then production tests are run that are non damaging and check to insure that the new changes are actually implemented, if there are any issues the push can be automatically rolled back along with a report issued on the why it was rolled back along with a listing of any performance or unforeseen security issues that may have occurred.

I will at times have two staging environments if it is a website ( one that uses internal content links and proxies if behind a CDN/proxy service and one that goes through a staging proxy/CDN so I can test for any changes between two. For anything else I like to have an internal and staging setup to insure the probability of a hardware/middleware component causing an issue is decreased.

These multiple environments are little to no issue because they are all automatically setup either from scratch or a pre-built configuration managed image to speed up the orchestration time.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: