I am using this template to create my EC2 instance. By default it installs Amazon Linux, how can I change this template to use REHEL 7.4 OS?
https://s3-us-east-2.amazonaws.com/cloudformation-templates-us-east-2/WordPress_Single_Instance.template
Thanks
SR
Need to update the mapping with this AMI for Redhat Linux 7.4
"us-east-2" : { "HVM64" : "ami-cfdafaaa" },
Related
To be able to run Linux containers on a Windows 2016 host we followed this tutorial. The issue we're having is that we can't seem to enable the experimental features. In the docs it says:
To enable experimental features in the Docker CLI, edit the config.json file and set experimental to enabled.
File C:\ProgramData\docker\config\config.json:
{
"experimental": "enabled",
"debug": true
}
After restarting the Docker service (Restart-Service docker) and running docker info we sill see the flag Experimental: false:
Operating System: Windows Server 2016 Standard Version 1607 (OS Build 14393.3686)
OSType: windows
Architecture: x86_64
Docker Root Dir: C:\ProgramData\docker
Experimental: false
How is it possible to enable the Docker experimental features on a Windows Server 2016?
Even when I try set the environment variable and restart powershell and the docker service it doesn't register within docker info:
[Environment]::SetEnvironmentVariable("DOCKER_CLI_EXPERIMENTAL", "enabled", "Machine")
After logging in to docker with docker login the file "C:\Users\bob\.docker\config.json". When adding the key it's still not registered after service restart:
{
"auths": {
"https://index.docker.io/v1/": {
"auth": "xxxxx"
}
},
"HttpHeaders": {
"User-Agent": "Docker-Client/19.03.5 (windows)"
},
"experimental": "enabled",
"debug": true
}
You put your configuration to a file with name config.json. But according to docs correct file name is daemon.json.
Full path to config file must be: C:\ProgramData\docker\config\daemon.json
From all of the answers above, only adding --experimental parameter in services -> docker -> Path to executable worked. You can change it using regedit.exe
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\docker
key ImagePath value "C:\Program Files\docker\dockerd.exe" --experimental --run-service if you have any other starting parameters you should keep them.
You can do it using sc (in powershell sc.exe)
I followed the Canonical tutorial for linux containers on Windows, and got stuck trying to pull the correct ubuntu (linux not windows) image (then found your question about setting experimental). If you ask the dockerd.exe for parameters it will accept (dockerd.exe --help) one of the options is --experimental.
Setting --experimental on the dockerd invocation worked for me.
If you can configure the invocation of your daemon with --experimental (rather than inside a configuration file), this could solve your problem.
Try setting the environment variable with:
[Environment]::SetEnvironmentVariable("DOCKER_CLI_EXPERIMENTAL", "enabled")
This worked on my linux cluster where specifying User or Machine seemed to result in the variable being ignored..
I found out that it simply won't run on Windows Server 2016 as stated here:
Docker Desktop has changed its way to leverage WSL2 for running Linux containers on Windows 10. The plan for Docker EE is unclear as Docker Inc. has sold it to Mirantis. https://github.com/docker/for-win/issues/6470#issuecomment-633883063
So if you plan to run both Linux and Windows containers in production, you may want to look for other options, such as Kubernetes.
It turns out the Linux Containers on Windows (lcow) Server is a preview feature of both Windows Server, version 1709 and Docker EE. It won’t work on Windows Server 2016 of which the version is older than 1709.
Here is my json file
# cat s6.json
{
"ImageId": "ami-0b33d91d",
"InstanceType": "i2.xlarge",
"KeyName": "xxx"
}
And I can use this command...
# aws ec2 request-spot-instances --spot-price "1.03" --instance-count 1 --type "one-time" --launch-specification file://s6.json
The above command works as expected. But if I change the Image ID to windows ami-ab33d3bd I get this error...
An error occurred (InvalidInput) when calling the RequestSpotInstances
operation: Unsupported product.
I can however request a regular on-demand instance without any problem. So this command works...
# aws ec2 run-instances --image-id ami-ab33d3bd --count 1 --instance-type i2.xlarge --key-name xxx
Does it mean that Windows instances are not available on spot?
From EC2-Spot FAQs:
Q. Which operating systems are available as Spot instances?
Linux/UNIX and Windows Server are available. Windows Server with SQL
Server is not currently available.
The AMI ami-ab33d3bd is a Windows Server 2008 with SQL Enterprise which is not supported for Spot.
Is any one aware of public AMI for Mule 3.x.x CE. I am looking for options to deploy CE Mule on Amazon EC2. Any pointers will be helpful.
Don't know about any public AMI.
But you could easily create your own.
Amazon Linux AMIs have openjdk pre-installed.
It's not officially supported, but it's still able to run Mule CE.
Just do:
wget http://dist.codehaus.org/mule/distributions/mule-standalone-3.2.1.tar.gz
tar xzvf mule-standalone-3.2.1.tar.gz
cd mule-standalone-3.2.1
bin/mule start
Hope this helps.
Is there any way to use euca2ools natively on Windows or through Cygwin or is there any other tool compatible with eucalyptus which I could run under Windows ?
You can use the AWS CLI with Eucalyptus, e.g. for EC2:
aws --endpoint-url http://myeuca:8773/services/Eucalyptus ec2 describe-instances
the example assumes you have already configured credentials.
From the Amazon EC2 console (or even if I do it through API tools on a box using a file), I paste:
#!/bin/bash -ex
# tell the world what we've done!
echo 'thisisthetoken' > /home/ec2-user/testuserdata
Into the user-data text box. When the instance boots (the Amazon Linux AMI), the file is not in the directory. Am I missing something so basic?
I'm sure that's newest AMI from Amazon. You can also test Ubuntu AMI from www.alestic.com.
/var/log/messages or /etc/log/syslog logs user-data executions.
There was a bug in the original AMI; the current Amazon Linux AMI's work with the same user-data script.
your AMI should support user-data (most alestic.com images do)