Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What are the pre-requisites for this application #1

Open
amarmashruwala opened this issue Feb 21, 2023 · 6 comments
Open

What are the pre-requisites for this application #1

amarmashruwala opened this issue Feb 21, 2023 · 6 comments

Comments

@amarmashruwala
Copy link

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

Thank you.!

@Envek
Copy link
Owner

Envek commented Feb 22, 2023

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).

@amarmashruwala
Copy link
Author

amarmashruwala commented Mar 5, 2023

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

@Envek
Copy link
Owner

Envek commented Mar 6, 2023

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.

@amarmashruwala
Copy link
Author

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?

@Envek
Copy link
Owner

Envek commented Mar 13, 2023

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.

@amarmashruwala
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants