Detect Amazon VM (Windows) - windows

Is there any way to programmatically detect that my C/C++ Windows application is running on an Amazon Cloud server? E.g., any APIs, WScripts, or environment variables? Thanks.

Make a HTTP GET against http://169.254.169.254/latest/meta-data/ on the instance.
On EC2(windows or *nix), you will receive information about the instance
See:
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html

Related

How to host Moqui on AWS EC2

Is there a way to host Moqui on AWS? I was trying to host Moqui using a EC2 instance but couldn't figure out a way to connect them.
The Run and Deploy document on moqui.org has a section for a simple recommended deployment using ElasticBeanstalk and RDS:
https://www.moqui.org/m/docs/framework/Run+and+Deploy#AWSElasticBeanstalkandRDS
With more details about how you want to set things up on AWS the answer to how might vary from this.
For clustered setups things get more involved to get the right settings for Hazelcast AWS discovery and it is best to use an external ElasticSearch server like an AWS ElasticSearch instance and configure Moqui using environment variables to use the Java REST Client mode instead of the Embedded Node mode. Settings for the moqui-hazelcast and moqui-elasticsearch components can be seen in the MoquiConf.xml file in each component.

Windows Server Containers in Google Kubernetes Engine (GKE)

I'd like to run Windows containers in GKE.
Is it possible to use Windows Server Containers OS in Google Kubernetes Engine?
I see Windows Server Containers OS is available in Compute Engine and seems that Kubernetes support is available for Windows.
It is possible to run Windows containers, but only as a container in a Compute Engine VM instance.
I would refer you to this article in the GCP blog. Please be aware that there a few known issues that you should read before deploying Windows containers in Windows VM instances.
For GKE, there is currently a Feature Request. Other customers have asked to include future support for Windows containers in GKE. This is a request through official means. Google will consider the need based on its feasibility, or the number of customers who ask for it, but they can't guarantee an implementation or provide you with an ETA for it.

Kubernetes windows agent

Hey I'm running a Kubernetes cluster on Azure using ACS.
My question is if there is any way to add a Windows agent to the cluster without completely rebuilding the cluster?
I know this is possible for Linux distro's depending on what you use but I wonder if anyone knows a way to do this for Windows agents?
If you have deployed your cluster using the Azure portal then you can simply follow the instructions here https://learn.microsoft.com/en-us/azure/container-service/container-service-scale
But if you have deployed using the ACS engine and ARM template then currently there is an issue that it does not creates the acs resource.

How do I configure an Azure role to connect to Windows Azure Storage Emulator using custom ports?

I needed to customize my storage emulator ports to deal with a system process that uses the same default ports. That all works fine.
Now, how do I update my Azure service role's configuration to use the updated ports?
Untested, but would something like this work? From http://msdn.microsoft.com/en-us/library/ee758697.aspx:
BlobEndpoint=myBlobEndpoint;QueueEndpoint=myQueueEndpoint;TableEndpoint=myTableEndpoint;AccountName=myAccountName;AccountKey=myAccountKey

Windows services on EC2?

Can you install and run your own windows services on ec2? Does it have MSMQ?
Yes, you can. You can also install MSMQ, and I can confirm that it works perfectly.
First you need to create an EBS volume, using a snapshot of the appropriate Windows installation media:
Install windows services on EC2 http://img515.imageshack.us/img515/9644/aws.png
Then simply attach the EBS volume to your Windows instance. At this stage, you would be able to install any Windows service, such as MSMQ and IIS, that did not come pre-installed with the original AMI.
You could also take advantage of Amazon Simple Queue Service. It's exposed as a webservice so you could easily communicate with it from your Windows Service or virtually any other platform/technology.
Yes, you can install any software that you like.
I don't know for sure if MSMQ is available or not. If you don't get a specific answer here you could post on the AWS forums, or if you have an account, fire up an instance and test it out (e.g. using this AMI).

Resources