Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
An AWS EKS Cluster can be created using the AWS CLI or eksctl commands. And AWS is supporting both of them. Both of them at the end of day creates a EKS cluster.
When to use what? I am not able to find any differences between the two.aws
AWS CLI is an imperative way to do it. With eksctl you can use both imperative and declarative way (e.g. when using yaml-manifests).
In addition, you can create EKS cluster declaratively when using CloudFormation EKS cluster or Terraform AWS EKS module.
What is best for you depends on your situation. For laboratory exploration, it is easiest to use imperative commands. But when you are setting up something like a production environment, you want your changes version controlled in e.g. git - so a declarative way to work is a better fit.
What declarative method to use depends on if you e.g. also provision other AWS resources. It is easiest to use same tool for all your infrastructure, e.g. CloudFormation for everything or Terraform for everything. An advantage with Terraform is that it is available for other cloud providers as well, e.g. both AWS and GCP.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed last month.
Improve this question
I have been looking around for best practices provisioning a server but have yet to find one. The problem I am trying to solve is configuring an nginx.conf file in the new server setup by Terraform. So I guess my question is: Is Terraform actually used to install packages and configure the server after it is spun up? Or am I supposed to use something else entirely alongside Terraform (i.e Chef)? In the Terraform docs it mentioned removing support for Chef, Puppet and Ansible. It also mentions using the "provisioner" block for this functionality is frowned upon.
I have tried using the Terraform resource user_data block and a custom provisioning shell script to do this, but this just seems pretty hacky and difficult to read. I would like to stay away from using a pre-defined AMI as well, which I have also tried.
Specifying user_data is about the best you can do with Terraform for this type of thing. EC2 user-data support is implemented using cloud-init. There is a cloud-init Terraform Provider that helps you create user-data scripts and templates, which helps a lot with the readability.
If that isn't to your liking, then you have to look elsewhere, such as using something like Ansible, or possibly AWS Systems Manager, to install/configure your EC2 instances. However, these would be disconnected from Terraform so you may need to use a provisioner to trigger them after a Terraform apply.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I need to setup Hashicorp vault on aws with cross region setup in HA. And I gotta do it with complete automation , what would be the best IAC tool , Cloudformation- I found very less documentation on this for vault setup. Or Terraform - ?
has some one achieved it by complete automation method on aws. ?
Terraform is not a Configuration Management tool, It's an IaC tool. You can use Terraform to create underline infrastructure for your Vault setup and it should not use to provision applications in the infrastructure. Of course, you can install applications in your EC2s using exec remote provisioner, but you should use provisioners as the last resort.
So I think of using Terraform for creating the infrastructure of the Vault setup. But you need to use some other tools like Ansible or Puppet to provision software in your infrastructure. Using IaC tools for configuration management will create major technical confusion in the long run.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
We are building a small micro service architecture which we would like to deploy to AWS.
The number of services is growing, so we need solution that allows scaling (horizontal).
What's the best way to build this on AWS? We don't have too much experience with docker, we used EC2 based stuff in the past.
I'm thinking about something like:
Use ECR, create a private docker repository. We push release images there.
Use ECS to automatically deploy those images.
Is this correct? Or should we go for Kubernetes instead? Which one is better?
Our needs:
Automated deployments based on docker images
Deploy to test and prod environments
Prod cluster should be able to handle multiple instances of certain services with load balancing.
Thanks in advance for any advice!
AWS container service team member here. Agreed with others that answers may potentially be very skewed to personal opinions. If you come in with good AWS knowledge but no container knowledge I would suggest ECS/Fargate. Note that deploying on ECS would require a bit of CloudFormation mechanics because you need to deploy a number of resources (load balancers, IAM roles, etc) in addition to ECS tasks that embeds your containers. It could be daunting if not abstracted.
We have created a few tools that allows you to offload some of that boiler plating. In order of what I would suggest for your use case:
Copilot which is a CLI tool that can prepare environments and deploy your app according to specific patterns. Have a look here
Docker Compose integration with ECS. This is a new integration we built with Docker that allows you to start from a simple Docker Compose file and deploy to ECS/Fargate. See here.
CDK is a sw development framework to define your AWS infrastructure as code. See here. These are the specific CDK ECS patterns if you want to go down that route.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I am trying to develop a Spring Cloud microservices using Spring MVC and Spring boot. And I would like to deploy in AWS cloud. When I exploring the AWS I found the computing service EC2 and Storage services EBS and Elastic Beanstalk. I found that when creating EC2 getting a default EBS volume.
Here my doubt is that when I deploying my Spring Cloud microservice in Tomcat environment. I also need to create a RDS instance for my microservice, can I choose S3 as storage?
And also I need to deploy my Angular 2 application using S3 and static web site hosting method. So can I use separate buckets for both microservices and Angular application hosting?
I am new to AWS and cloud service platform.
On S3 you can save files; its more like extensible storage as a sevice.
RDS is like RDBMS as a service..
Surely you can use separate buckets ; or different folders in same buckets.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
What is the difference between provisioning using AWS CloudFormation UserData vs. Ansible?
I know that in relation to Puppet for example, it enforces provisioning rules even when a change is done (changes it back to reflect the manifest).
But are there more differences which are worth taking into consideration?
To clarify, "UserData" is part of an EC2 instance, not part of CloudFormation itself. EC2 instances can be launched with User Data, which can be used by the AMI to perform dynamic operations on startup. If CloudFormation is used to launch an EC2 instance, it can provide User Data to the EC2 instance by setting the UserData property on the AWS::EC2::Instance Resource.
Typically, user data is processed by Cloud-Init, and is typically formatted as a simple User-Data Script which is just a shell script that gets invoked on the instance when it is first launched.
That said, 'Shell script vs. Ansible' is an apples-to-oranges comparison. Whether or not Ansible is the appropriate software for your use-case depends on whether you need to use the extra layers of abstraction built into Ansible versus a standard shell script to provision what's needed on your instance. Read the Ansible Documentation and decide for yourself.
It is worth mentioning that aside from the normal 'push' method of running Ansible to provision your instance via SSH, you can also run Ansible in an inverted, 'Ansible-pull' mode, using a User-Data Script to perform the initial 'bootstrap' installation on the EC2 instance.
The short answer is: Use CloudFormation or Terraform
Ansible is a configuration managment tool for many diffrent purposes. The most significant diffrence to many of the other tools is, that is is working in a push mode, so there are no agents on the remote server polling for changes.
It is great when it's about installing packages, creating files and so on.
CloudFormation is desinged to create AWS enviroments. This is good if you onyl use Amazon and nothing else.
Ansible can do the job, but i would recommend to use a tool like CloudFormation or Terraform. The Ansible modules for this are ok, but tools like Terraform have a fokus on creating enviroments and they are much smarter when doing the job.