dockerized-browser-streamer icon indicating copy to clipboard operation
dockerized-browser-streamer copied to clipboard

What are the pre-requisites for this application

Open amarmashruwala opened this issue 2 years ago • 6 comments

Hi, What are the prerequisites to build and run this application on an EC2 instance?

Thank you.!

amarmashruwala avatar Feb 21 '23 22:02 amarmashruwala

You only need a Docker or Podman or anything else that can run container images.

This example was build to be run on ECS or EKS (Kubernetes).

Envek avatar Feb 22 '23 15:02 Envek

Ok thanks, if you run it on ECS, do you set a delay in between start of ecs service and running of the task? I have noticed if the ecs or ec2 service is not fully up and running, and the container is run the sync goes off. How do you set a delay between start of ecs service and start of the task?

Also how do you debug and make changes to the .sh file that is already deployed in ECS? Thanks

Thanks

amarmashruwala avatar Mar 05 '23 19:03 amarmashruwala

Usually it is one container per streaming job. It starts when streaming need to be started and shuts down on stop.

If you need to make changes, you rebuild the image, so new containers will use it (and old ones will continue running on older version).

How do you set a delay between start of ecs service and start of the task?

I don't. There is ability to programmatically run containers in ECS whenever you need it. You can use Step Functions to start and control ECS tasks with a streamer container.

See:

  1. https://docs.aws.amazon.com/step-functions/latest/dg/sample-project-container-task-notification.html
  2. https://cloudonaut.io/resilient-task-scheduling-with-ecs-fargate-cron-scheduled-task/
  3. https://docs.aws.amazon.com/step-functions/latest/apireference/API_StartExecution.html

Also how do you debug?

See debugging section in the readme. https://github.com/Envek/dockerized-browser-streamer#debugging


Please note that this example is not production ready, and has never reached production.

Envek avatar Mar 06 '23 10:03 Envek

Ok do you mean it is usually 1 cluster per service and task, or do you deploy a single cluster and run multiple services from that single cluster. Each service uses a different set of environment variables from the Systems manager Parameter store?

amarmashruwala avatar Mar 10 '23 20:03 amarmashruwala

1 cluster per service, that service will be launching and stopping as many tasks as there are streaming “rooms” in a given moment of time.

Envek avatar Mar 13 '23 01:03 Envek

Can each task use different environment variables from the Systems Manager Parameter Store?

amarmashruwala avatar Mar 16 '23 21:03 amarmashruwala