Header

Case Study: Accelerating Windows Server Deployments with DeployHQ

.NET, Devops & Infrastructure, Tips & Tricks, and Tutorials

Post Image

Challenge:

A software development company, "Innovate Solutions," faced a common challenge: efficiently deploying their Windows Server 2022-based applications hosted on Amazon Web Services (AWS). Their existing manual deployment process was time-consuming, error-prone, and hindered their ability to deliver updates quickly. They needed a solution that would:

  • Automate deployments to their Windows Server 2022 instances on AWS LightSail.
  • Reduce the risk of human error during deployments.
  • Enable faster and more frequent releases.
  • Integrate seamlessly with their existing Git repository.

Solution:

Innovate Solutions chose DeployHQ, a deployment automation platform, to streamline their workflow. Here's how they configured their environment:

1- Setting up Windows Server 2022 on AWS:

  • They launched Amazon LightSail instances running Windows Server 2022.
  • They configured the necessary firewall rules to allow inbound traffic for SSH (port 22) and their application's web traffic (port 80 or 443).
  • Following best practices, they configured the networking settings for the Lighthouse instances.

    aws-windows-2022

2- Installing and Configuring OpenSSH:

  • They recognized that DeployHQ primarily uses SSH for communication with servers.
  • On their Windows Server 2022 instances, they installed OpenSSH Server using the following PowerShell commands (you can connect using RDP):
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Start-Service sshd
Set-Service -Name sshd -StartupType Automatic        
  • They configured the sshd_config file to secure SSH access (e.g., by disabling password authentication and using key-based authentication).

    windows-openssh

3- Connecting DeployHQ to the Server:

  • In their DeployHQ project, they added a new server, providing the Windows Server 2022 instance's IP address, SSH port, username, and either a password or SSH private key (for AWS LightSail the user will be Administrator and the password can be retrieved from the AWS Console)
  • They specified the deployment path on the Windows Server where their application files would be deployed (e.g., a directory under C:\inetpub\wwwroot).
  • You will need to have the setup of your IIS for example pointing to that folder, so it can refresh after each deployment.

4- Configuring Automatic Deployments:

  • They connected their Git repository (e.g., GitHub) to their DeployHQ project.
  • They set up automatic deployments to trigger whenever code was pushed to a specific branch (e.g., the main branch).
  • They used DeployHQ's features to define deployment hooks, which allowed them to run custom scripts before or after the deployment process (e.g., to restart their application's application pool in IIS: Restart-WebAppPool -Name "YourAppPoolName").

Results:

By implementing DeployHQ with their Windows Server 2022 environment on AWS, Innovate Solutions achieved significant improvements:

  • Automated Deployments: Deployments that once took hours of manual effort were now fully automated, triggered by a simple Git push.
  • Reduced Errors: The automated process eliminated the risk of human error, ensuring consistent and reliable deployments.
  • Faster Release Cycles: They were able to release new features and bug fixes much more frequently, accelerating their development velocity.
  • Increased Efficiency: Developers could focus on writing code rather than managing deployments, boosting overall productivity.
  • Improved Collaboration: DeployHQ provided a centralised platform for managing deployments, improving visibility and collaboration among team members.

Conclusion:

This case study demonstrates how DeployHQ can effectively streamline Windows Server 2022 deployments on AWS. By automating the deployment process, Innovate Solutions was able to improve their development workflow, reduce errors, and deliver value to their customers faster. The combination of Windows Server 2022, AWS LightSail, and DeployHQ provided a robust and efficient solution for their deployment needs.

A little bit about the author

Facundo | CTO | DeployHQ | Continuous Delivery & Software Engineering Leadership - As CTO at DeployHQ, Facundo leads the software engineering team, driving innovation in continuous delivery. Outside of work, he enjoys cycling and nature, accompanied by Bono 🐶.

Tree

Proudly powered by Katapult. Running on 100% renewable energy.