I am trying to autoscale my jenkins nodes and I want my jenkins nodes to be in ECS cluster as EC2 ubuntu 20.04 machines. I created an custom ubuntu 20.04 AMI with docker, ecs-agent and other software I require and when I was in create cluster wizard there I can only see Amazon Linux AMI, I can't see my custom AMI to spin up the AWS ECS EC2 cluster. What I am I missing here?
Did you try creating an EC2 instance using your AMI and importing it to your cluster as an External Instance? Hope this will help troubleshoot your issue.
More Info Here
Related
I am trying to setup AWS Nitro Enclave with ECS using AWS Cloudformation but I am struggling with assigning a launch template to an ECS service.
As far as I know, we can specify a launchType with the value of EC2 while creating the ECS Service but there is no way to manipulate the launch parameters.
Any help with examples will be appreciated.
The Nitro Enclave is part of the EC2 server. An ECS service is just a docker container running on the EC2 server. The EC2 server has to already be up and running (with things like Nitro Enclave already configured) before the ECS service is started on the server. The launchType parameter of the ECS Service just specifies if it should run on Fargate or EC2.
You can't configure your cluster's EC2 servers through an ECS service configuration. You would configure the EC2 servers in the ECS cluster through the cluster's Capacity Provider configuration. Specifically, since you are using EC2 instead of Fargate, you would need to configure the capacity provider with an EC2 auto-scaling group which is configured with an EC2 launch template that handles the Nitro Enclave setup.
To be clear, I've never heard of anyone using Nitro Enclaves with ECS, and I don't think you can actually run ECS services inside the Nitro Enclave. At most you could have ECS services running on the same server that also has a Nitro Enclave running some other process.
I have an EC2 instance which is currently stopped and I created an AMI from it. It has the ECS and Docker services installed and enabled to start at boot. How can I create an ECS task to clone this AMI and have the ECS service create more EC2 instances from the AMI as needed?
The ECS tasks appear to only allow me to create EC2 instances from Docker containers. Is there a way to create them from AMI images?
I am trying to creating a microservice using spring boot and trying to deploy using AWS ECS cloud service. I Have doubts in deployment using ECS. In ECS there is a facility of EC2 launch type.
Here my doubt is that, when I am using ECS EC2 launch type, can I choose my own Ubuntu machine instances? I need to know whether the ECS provide provision to launch with my own Ubuntu machine?
Yes, you can use your own Ubuntu AMI, but it requires a little bit of work. Here are the requirements:
A modern Linux distribution running at least version 3.10 of the Linux kernel.
The Amazon ECS container agent (preferably the latest version). For more information, see Amazon ECS Container Agent.
A Docker daemon running at least version 1.5.0, and any Docker runtime dependencies. For more information, see Check runtime dependencies in the Docker documentation.
So, apart from installing Docker, you need o install and configure the ECS Agent. You will find the instructions here. See section 'To install the Amazon ECS container agent on a non-Amazon Linux EC2 instance'
Once you have your AMI built, you just create your cluster and then launch the instances into it.
We are currently using an amazon ebs-backed packer configuration in our CI. Now we are trying to upgrade ec2 instances to t2 instances. But it only supports HVMs.
While trying to configure packer, I noticed that the ami_virtualization_type property is not available on the ebs-backed config configuration documentation.
Is there a way to use HVM on ebs-backed config?
I think this is a function of the source AMI - for example the official Ubuntu 14.04 AMI ami-df6a8b9b in us-west-1 is specifically labeled as HVM.
I've read that AWS does not support Kubernetes and builds their own Docker orchestration engine EC2 Container Service. However, on Kubernetes getting-started -page there is a guide on how to run Kubernetes on AWS:
https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/getting-started-guides/aws.md
Which is right?
You can install Kubernetes on a normal Amazon EC2 server.
The new container service is a separate offering by Amazon, called ECS.
EDIT: AWS released in 2018 a new container service for Kubernetes called EKS: https://aws.amazon.com/eks/
Amazon Elastic Container Service for Kubernetes (Amazon EKS) makes it easy to deploy, manage, and scale containerized applications using Kubernetes on AWS. Amazon EKS runs the Kubernetes management infrastructure for you across multiple AWS availability zones to eliminate a single point of failure.
Kubernetes provides scripts to simple setup a cluster on a set of EC2 machines. The setup does pretty much everything needed to get started quickly.
Here is the link: https://github.com/GoogleCloudPlatform/kubernetes/blob/release-1.0/docs/getting-started-guides/aws.md
Yes its possible to setup Kubernetes on AWS See:http://kubernetes.io/v1.0/docs/getting-started-guides/aws.html
You can also manually setup Kubernetes on AWS by launching a EC2 instance
Foe setting in Redhat ami https://access.redhat.com/articles/1353773
(Note: Kubernetes needs flannel network to be setup for managing networking between docker containers running on different hosts(minions)
Amazons Container Service is unrelated to Kubernetes.
There are 3 main options for installing Kubernetes on AWS:
CoreOS have a cli for installing and managing kubernetes on aws: https://coreos.com/kubernetes/docs/latest/kubernetes-on-aws.html
Kubernetes have some scripts for setting up a cluster on AWS: http://kubernetes.io/docs/getting-started-guides/aws/
Manual installation on EC2. Lots of options here: http://kubernetes.io/docs/getting-started-guides/#cloud
As an aside minikube is now a thing which is nice for running locally to try stuff out:
http://kubernetes.io/docs/getting-started-guides/minikube/
AWS recently launched EKS, which provides a managed k8s master nodes. This should be
what you are looking for.
Yes. You can use kubeadm to install kubernetes on EC2 instances.
There are other tools also available.
KOPS
EKS
Kubeadm