What are the pre-requisites for this application
Hi, What are the prerequisites to build and run this application on an EC2 instance?
Thank you.!
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).
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
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:
- https://docs.aws.amazon.com/step-functions/latest/dg/sample-project-container-task-notification.html
- https://cloudonaut.io/resilient-task-scheduling-with-ecs-fargate-cron-scheduled-task/
- 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.
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?
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.
Can each task use different environment variables from the Systems Manager Parameter Store?