how to deploy an EKS cluster application on AWS marketplace - amazon-web-services

I want to make my application available on the AWS marketplace. My application is composed of an EKS cluster and then multiple helm chart used to deploy my micro-services (using argocd at the moment).
I am not sure which delivery method to use, I want to use a cloudformation template stack to deploy the EKS infrastructure and the helm chart ?
Should I use a lambda function to call my application deployment service once the initial cloudformation stack is deployed (EKS cluster created) ?

Related

AWS CDK share ECS cluster between multiple microservice repo

My app container multiple microservice. Each service is in different github repo. Each microservice repo contain CDK code to create ECS service and task defination.
I have one repo called common. This repo containe python CDK code to create VPC and ECS cluster.
Now how any service repo use the infrastructure created by common repo ??

RabbitMQ installation on Amazon Web Services EKS

Does AWS Elastic Kubernetes Service have the same concept as Google Kubernetes Engine apps via a marketplace? I'm looking to deploy RabbitMQ and previously accomplished this on GKE.
Otherwise, it looks like there's a helm chart or I can manually do this via the container on dockerhub.
No, you need top deploy it by your own.
AWS does have a marketplace where you can utilize various AMI's or deploy a certified Bitnami RabbitMQ image. You can see that for yourself here: https://aws.amazon.com/marketplace
The downside is that this isn't something available for AWS EKS and as a result we will have to install/maintain this ourselves. That could look something like using the stable/rabbitmq-ha chart with anti-affinity across AZ's, quorum queues, and EBS.
Learn more about helm here:
https://helm.sh/docs/intro/using_helm/
Learn more about the rabbitmq helm chart here: https://hub.helm.sh/charts/stable/rabbitmq-ha

How to deploy an application to EC2 instances(with Autoscaling) using Jenkins?

I have a Jenkins job and custom-built pipeline already functioning to deploy my Java application using Jboss to an EC2 server in AWS(by using the static IP of the instance). Now I plan to enable the Autoscaling feature for my EC2 instance.
What would be the best practices to make continuous deployments to these scaled EC2 instances maintaining the application's stability?
Here is the workflow I follow using Jenkins.
Create a Jenkins Pipeline that does a build and pushes to Amazon S3 - In an artifact bucket
Create a CodeDeploy application that deploys to the autoscaling group (not tag)
Create a CodePipeline application that polls for the S3 object, and when receved triggers CodeDeploy.
The great thing about CodeDeploy when attached to autoscaling groups is it creates a lifecycle hook. Whenever a new instance is deployed to the autoscaling group it will automatically deploy the latest version of code.

What's the easiest way to deploy a a Multiservices Spring/Python project on the AWS?

I have created a Multiservices Spring/Python project. What's the easiest way to deploy it on the AWS cloud with 4 machines?
You can use multiple Services to achieve the same :
ElasticBeanstalk: If you have you code then you upload it on ElasticBeanstalk and any newer version just upload it on the Beanstalk and choose the deployment method it will automatically be deployed on the machine. You can choose the whatever number of instances you want to spin along with LoadBalancer and more.
Documentation here
CodePipeline: Have your code pushed into CodeCommit or Github or S3 and let it use CodeCommit, CodeBuild and CodeDeploy to deploy it on your EC2 server.
Documentation here
CloudFormation: This service you can use to spin up your services just through code. It is called Infrastructure as Code. Write code and spin up the instances.
Documentation here

Jenkins: Deploy application to an EC2 instance

I've been working on a cloud formation template for my environment. I end up with a
VPC
Subnet x2
Autoscaling group
Launch configuration (EC2 instances on AWS Linux AMI)
Application load balancer
Codedeploy (for deployments)
But I incurred problem with CodeDeploy configuration with Cloud Formation, as not all features are possible for EC2 instances. After configuring manually CodeDeploy, I get an error while deploying such as "too few unhealthy instances" after which created instances are not destroyed even if rollback is enabled. I'm using right now only one EC2 instance for application, but planning in future to scale.
Is there an alternative for CodeDeploy? I'm interested to trigger deploy from Jenkins Machine.
For above your requirements, I strongly suggest that using aws elastic beanstalk is better way to deploy codes to aws. Because we could manage those in elastic beanstalk and for code deployment, use codeship is also better way to mange deployment integrated with github instead of aws code deployment.
Ensure that you have assigned the correct IAM role for the EC2 instance by going to the "Instance Settings". This will ensure that your deployment occurs smoothly without throwing that error.
You can also configure the deployment to EC2 using CodeDeploy through jenkins.
Steps to follow:
AWS CodeDeploy:
Create a new CodeDeploy application.
Enter a suitable application name and choose "EC2/On premises" as the compute pleatform.
Add a deployment group under the application. For eg: "test".
Choose in-place deployment.
Add service role as "Codedeploy development".
This will allow codedeploy to interact with other AWS services.
Choose a suitable deployment configuration preferably : "OneAtATime"
if deploying to a single EC2 instance.
Environment configuration :
Choose the EC2 instance in which you want to deploy the application
Jenkins:
On Jenkins, create a job with a suitable application name.
In the "Post Build Action" section, click on "Add Post Build Action"
Jenkins - post build configuration
Choose : "Deploy an application to AWS CodeDeploy"
Enter the CodeDeploy and S3 details in the section
S3 bucket will contain all the builds which is used to deploy onto EC2 using Codedeploy