I need to deploy PHP and Python code and the appropriate environment (web server, db server) to remote Windows systems, and I don't know what toolchain would be the equivalent to ssh
, scp
, bash
and the like.
So, basically, what I need to be able to do is the following:
- access remote Windows with the appropriate privileges in a secure manner, like I routinely do with
ssh
(I don't even know whether that would be a text or graphic interface on Windows). - remotely install software: Apache or IIS, MySQL or Postgres, Python or PHP
- copy files from remote (the application we're deploying)
- remotely configure the machine to run regular tasks (e. g. checking for updates to the application)
- automate tasks like downloading files from a designated place
The main question is probably how I get onto the machine securely in the first place, and then the rest is general Windows admin knowledge, which probably is too broad a scope to fit into one question.
I have years of experience with maintaining Linux boxes and I have used tools of varying sophistication on those, ranging from plain scp
ing of PHP files to deployment of Java application containers and even full VMs with Vagrant.
On Windows, I'm a complete noob, and I don't even know where to start. I have installed Apache, MySQL , PHP on a desktop machine maybe twice in my life, that's about it.
Bonus points for things that work from a Linux machine at my end, but I could run a VM and do everything from there.
PowerShell is the preeminent scripting language for Windows administration, local or remote.
There are some tools available for calling and using PowerShell from *nix, like Pash. I've never used any of them so I can't speak to their abilities, completeness, or polish.
Secure remote access: OpenVPN + RDP? If you are brave enough, you could install Cygwin + OpenSSH server.
You may want to look at puppet for windows which should help you with a lot of automation and software installation (msi). I believe the puppetmaster has to be on linux and a puppet agent will run on windows.
Hm, it is funny noone talks about the heavies here.
For me it is SCOM, SCCM - System Center Operations and Configuration Manager.
Installs, performance tracking, notification on problems - all in there.
IIS runs PHP and most other FastCGI apps pretty well if an ISAPI filter exists for it. That being said, I would almost look at using the Web Farm Framework, a module for IIS, as well as maybe the Web Deploy toolset.
Essentially you setup a master server that you configure the way you want it from IIS settings to MySQL and PHP and then simply configure IIS to serve pages for that application. Once this is all setup you can simply turn on other "secondary" servers in the farm and they will automatically sync all of the application and server settings.
In addition if a Web Platform Installer package exists for certain components like PHP and MySQL it will automatically install and patch those for you as well. Last but not least the system will ensure that each machine also has the identical level of Windows Updates which could throw things off here and there.
One of the cool things about it is like @ChrisS mentions, PowerShell is the scripting environment for Windows, and to that extent the Web Farm Framework also has PowerShell cmdlets to ease remote administration of the service itself.
There are a whole bunch of help docs here. Note the current verson is 2.2
I am not sure if it would be a good fit, but Nagois might work for you too. I know they have some remote deployment tools, along side with monitoring.
Essentially, you want to run RDP over a VPN. So establish a vpn to the box by whatever means (hamachi/open vpn etc.) and then run an RDP client to connect to the box.
For my purposes I use a web gateway to establish the vpn (Adito) and then run an RDP app that I have published inside the gateway.
While powershell is an excellent tool for the Windows admin, it still needs a secure connection, and installing software strictly by means of Powershell (without the gui desktop) would be unnecessarily difficult.