How to configure prometheus.yml file to scrape application metrics? - amazon-ec2

I want to display performance metrics of the docker compose application with prometheus. Application is runnin on AWS EC2 instance. I am planning to use cAdvisor to scare them. My question is: Should I add all the services of the application in prometheus.yml file with target ports? or should I only configure cAdvisor?

Related

Kubernetes dynamic ingress for multitenant application

I'm have a multitenant SaaS application that I'm migrating to kubernetes from a VM infrastructure, in the application the client can connect his own domain by setting the cname we provide.
I'm trying to achieve that in kubernetes the steps I am thinking of is
1- create ingress yaml files and store them in PVC
2- trigger a job from my deployment
3- inside the job run kubectl apply on the ingress yaml files
is there a better approach? is it good practice to run k8s commands from inside my application?

Spring DiscoveryClient in local environment

Assuming I have two services: customerService and orderService. Both are Springboot applications contained in its own dockerfile.
In production they should be managed using Kubernetes. So there could be mutliple instances of each service. As the services should be able to call each other via REST I want to use ServiceDiscovery to get the destination of a service instance of the respective other type (e.g. customerService wants to get host, port, etc. of a running orderService instance).
I want to achieve this by using an injected DiscoveryClient in my Spring Boot services.
I understand how this works in production as there is the Kubernetes cluster the DiscoveryClient communicates with.
But how does this work in a local environment where there is no Kubernetes but only Docker running?
I think you should be looking into Kubernetes services instead of using an injected Discovery client.
For Service discovery and load-balancing, you can use Services in Kubernetes. From Kubernetes documentation:
An abstract way to expose an application running on a set of Pods as a
network service. With Kubernetes, you don't need to modify your
application to use an unfamiliar service discovery mechanism.
Kubernetes gives Pods their own IP addresses and a single DNS name for
a set of Pods and can load-balance across them.
By this, you can also avoid the overhead of maintaining discovery server instances and their availability.
How does this work in a local environment where there is no Kubernetes but only Docker running?
You can use spring profiles for picking this URL based on your environment.
For example, you'll have two spring configuration files (application-dev, application-prod) and in the dev file the URL for the second application would be localhost relative and in the prod file, the URL would be the DNS which you'll get as a part of Kubernetes service setup. So use the profile dev while running in local and prod while running in production(or an appropriate profile for your Kubernetes environment).

How to deploy Spring Cloud Data Flow on AWS EKS

Are there any document for deploying Spring Cloud Data Flow on AWS EKS? I am looking for example or guide video about this problem.
There are no special instructions for running SCDF on EKS or any other K8s distribution. As far as you have a K8s cluster and the necessary service accounts, you will be able to provision SCDF on a given namespace.
You can either use the release-tagged deployment YAMLs directly or the SCDF's Bitnami Helm chart. Depending on your customization needs, you'll find the deployment YAMLs more flexible, though.

Deploy zalenium on AWS cloud environment

We have a requirement to spin more than 50 selenium containers parallelly on zalenium. The current infrastructure we have doesn't support this requirement. I want to know if anyone deployed zalenium on cloud environment and used ECS or EKS services to achieve this?

Using Netflix Conductor Orchestration on AWS ECS

We are currently working on a approach which will work with collaboration of multiple microservices to provide us with solution.
Dataflow example:
These services will be deployed in ECS with ALB in front of it. I want to stitch together a workflow for the system and needed help with the following:
We plan to use Route 53 DNS service for the Service Discovery. I know that conductor uses Eureka client for service discovery. Is it possible just to swap out of use DNS based implementation rather than Eureka??
Can Conductor be deployed as docker images in an ECS cluster? Can I create this internal to ECS cluster and not deploy it on EC2 servers? Any documentation that will help? Do we maintain Docker Images or we need to create our own?

Resources