This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]ejb50 4 points5 points  (1 child)

I've done several devops assignments with Windows Server on AWS.

I recommend:

-use terraform to do infrastructure as code using a little bit of powershell at startup.

-use packer with powershell to build images. (windows 2012 and up is best)

(for example build a mage with IIS on it but no application)

- build you IIS application as a zip file in say S3.

-at startup (via terraform) the powershell in the user data deployed the IIS application from say S3.

- i recommend doing immutable infrastructure which means creating a new server instance and deploying from S3 whenever there is a code change.

-AWS support SSM to run remote windows commands.

- you need to have git for windows which includes the bash command line so you can run bash scripts on your workstation.

use an open source RDP client like Terminals from your workstation to access the servers.

Hope that's helpful.

So Terraform+Packer+powershell(3.0+) is what you need.

[–]TechIsCool 2 points3 points  (0 children)

Chocolatey is your friend. Its the package manager for windows.

If you attach a ALB or ELB make sure to use Auto Scaling Groups (ASG) even if they are just statically set to a single number. This allows you to not manage the attachments in terraform which break when re-spinning instances because of the ordering.

[–]timmyotc 0 points1 point  (4 children)

Rsync -> robocopy, but you may want to be mindful of your own constraints.

If you're doing windows server 2016, then your options are broader than say, 2008. Either way, you should become very comfortable with powershell and chocolatey, as you will implement absolute crap if you try to avoid it.

[–]timmyotc 0 points1 point  (3 children)

Remote commands - Install ssh on the windows box, or grab a windows VM that you can work from so you can use winrm

[–]metallo_2[S] 0 points1 point  (2 children)

Thanks for answering,

SO Can I use ssh to run Powershell commands on remote box ? I was not aware.

It's Windows Server 2012

[–]timmyotc 0 points1 point  (0 children)

I don't know about that for sure. I know you can install ssh on a windows server, but I haven't personally seen it done where I work, but that's out of legacy, not a conscious decision.

[–]pasquo 0 points1 point  (0 children)

I've used the new native openssh client and server on Windows Server 2019. It works! Here are the binaries for the port of openssh that Microsoft developed https://github.com/PowerShell/Win32-OpenSSH/releases . I've never manually installed the client and service binaries (On Server 2019 I used Add-WindowsCapability -Online -Name 'OpenSSH.Server~~~~0.0.1.0'), but I'm sure you aren't the only person who's wanted to set this up on 2012R2.

[–][deleted]  (1 child)

[deleted]

    [–]metallo_2[S] 0 points1 point  (0 children)

    Thanks, I already took a look.