Hola Carlos,
Adicionando mas a las respuestas a tu pregunta, estas son las recomendaciones dado el estado actual del delivery en tu compan~ia. Yo he tenido que implementar estas practicas en varios clientes sobre sistemas ya existente en produccion. Estos son los pasos que he aplicado:
0- Understand your operational environment and requirements:
- Is it cloud based, on-prem?
- How many servers? Dos?
- Deployment downtime ok? If so how much? (SLA driven)
- Deployment unit: machine image, OS executable, package, container, application binary?
- How long does it take as an average for the devs to complete functionality ready to deploy? If it’s too long (4 weeks) you should probably break down work in smaller pieces.
- What is the targeted release cadence? I know it might seem trivial that the more frequent the better but I’ve been on clients where they were happy with weekly or fortnightly deployments.
- More advance: staged deploy rollout?
- Automate build: code compilation, automated tests (unit, integration, if there are any), build artefact (could be one or many), publish build artefact to artefact repository (Nexus, DockerRegistry, etc: depends on the deployment unit)
- If there is no automated tests, bring this practice into the delivery process.
*** Note: This might not apply entirely in your case as your TFS build will be hopefully doing some of these steps.
2- Once you have a simple automated process that automates the build, in your case producing a ZIP file, then automate the deployment process:
- Best to drive it from the CI automation tool you use: most of them allow you to invoke scripts in different stages.
- Define environments that exercise the deployment process: Dev, Test, Staging, Production. I found the more mature the engineering practices the less environments you require (at Square we have Staging and Prod only).
- Make the CI automation tool automatically deploy upon successful build to the first environment.
- Run a small number of smoke tests (functions, end to end) to make sure nothing is broken.
3- Build a deployment pipeline using the CI automation tool of your choice to then progress the build artefact through multiple environments till it reaches production (Staging and Production deployments should be manually driven(click button) but still automated)
This is a condensation of a roadmap that will put your company in a better position with more reliable delivery. All this is achievable no matter the OS, etc, but it’s time consuming, will require changes in your process and practices and support from management.
This is also the initial steps but there's tons of techniques and practices that will improve on the deployment process which others have mentioned: infrastructure as code: Terraform, CloudFormation, AzureTemplates, orchestrations tools like Ansible, Puppet, etc, centralised logging, monitoring, alerting
In one of my last experience I contributed to fixing a BI production system that took 2 days of running around, lengthy manual steps and late nights to deploy to prod. When we finished, it took 5 minutes to deploy using a deployment pipeline, CI practices (had to introduce tests), automated build, automated DB migration, automated AWS deployment. It took us 4 months or so and lots of patience and difficult conversations. Surprisingly we had lots of pushback from old-school “architects” that thought we were being “cool”. At the end we showed the benefits.
The process might be long and challenging, pick your battles as they say, but the outcome is rewarding.
Happy New Year,
Karel
| | | | Trunk Based Development By paul-hammant A portal on this practice | | | |
| | | | The Practice of Cloud System Administration | Designing and Operating Large... | | | |