Comments (11)
I see. I'm clear now as to how to proceed. Thanks a ton!
Once we're able to set it up, I'll post task definitions so that they can help other folks on here who're deploying it on AWS ECS.
from dispatch-docker.
I agree it's a bit confusing, this repo contains the whole system (app server, scheduler, database, etc.). If you'd just like to know how to build the app itself it would be best to look at the Dockerfile in the main repo here:
https://github.com/Netflix/dispatch/blob/master/docker/Dockerfile
We don't currently host anything on docker hub and expect the images to be rebuilt locally by the user atm.
As far as guidance around how to install without docker. We don't have documentation around this but you should be able to see the steps in the docker file.
Dispatch is a pretty simple app to install, it's just a python web app and a frontend UI, if you already have node installed a `pip install -e ." in the Dispatch main repo will install the app and build the frontend for you.
Happy to answer any other questions that may come up.
from dispatch-docker.
So I'm trying to create ECS tasks for each of the docker-compose service components. Towards that end, I was wondering what's the purpose of the core
docker image? On localhost
, when I do docker-compose up -d
, I see web
and scheduler
, I don't however see core
.
So will I need a separate ECS task for core
as well?
from dispatch-docker.
The core
image is just so I don't have to build the same image twice. Since the scheduler and the web service are the same code base I have them both depend on core
(building it once).
I'm not sure if the same logic would apply to ECS as well.
from dispatch-docker.
@sfc-gh-pkommini would you mind sharing the task definitions? Thank you
from dispatch-docker.
@rilutham Happy to share the task definitions. I'm still getting it setup but I can share what I have so far. I'll try to clear any sensitive material and share it later today.
from dispatch-docker.
@sfc-gh-pkommini really appreciates your help. When setup Dispatch on ECS, what is the minimum env key that should exist to get Dispatch run properly (creating incident > get notified on Slack / create JIRA ticket/ notify stakeholders)
from dispatch-docker.
[
{
"command": [
"database",
"upgrade"
],
"environment": ${envs},
"essential": false,
"image": "${app_image}",
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/aws/ecs/dispatch-migrator",
"awslogs-region": "${aws_region}",
"awslogs-stream-prefix": "ecs"
}
},
"name": "migrator",
"secrets": ${secrets}
},
{
"command": [
"dispatch plugins install && dispatch server start dispatch.main:app --host=0.0.0.0"
],
"entryPoint": [
"sh",
"-c"
],
"dependsOn": [
{
"containerName": "migrator",
"condition": "SUCCESS"
}
],
"environment": ${envs},
"essential": true,
"image": "${app_image}",
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/aws/ecs/dispatch-web",
"awslogs-region": "${aws_region}",
"awslogs-stream-prefix": "ecs"
}
},
"name": "web",
"portMappings": [
{
"containerPort": ${container_port},
"hostPort": ${container_port},
"protocol": "tcp"
}
],
"secrets": ${secrets}
},
{
"command": [
"scheduler",
"start"
],
"dependsOn": [
{
"containerName": "migrator",
"condition": "SUCCESS"
}
],
"environment": ${envs},
"essential": true,
"image": "${app_image}",
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/aws/ecs/dispatch-scheduler",
"awslogs-region": "${aws_region}",
"awslogs-stream-prefix": "ecs"
}
},
"name": "scheduler",
"secrets": ${secrets}
}
]
@rilutham This is the dispatch task definition template dispatch.json.tpl
I use with terraform. The ${}
are the variables passed into the task definition.
The terraform that creates the task definition is as follows:
# Task definition template file
data "template_file" "dispatch" {
template = file("./templates/ecs/dispatch.json.tpl")
vars = {
app_image = var.app_image
host_port = var.host_port
container_port = var.container_port
fargate_cpu = var.fargate_cpu
fargate_memory = var.fargate_memory
aws_region = var.aws_region
envs = data.template_file.envs.rendered
secrets = data.template_file.secrets.rendered
}
}
# Dispatch Web Service
resource "aws_ecs_task_definition" "dispatch" {
family = "dispatch-task"
execution_role_arn = aws_iam_role.ecs_task_execution_role.arn
network_mode = "awsvpc"
requires_compatibilities = ["FARGATE"]
cpu = var.fargate_cpu / 2
memory = var.fargate_memory / 2
container_definitions = data.template_file.dispatch.rendered
depends_on = [module.dispatch_db]
tags = {
name = "${var.app_name}-task-definition"
environment = var.env
}
}
It's setup such that the migrator runs first and both the scheduler and web containers are dependent on the migrator's 'SUCCESS'.
Hope this helps. Sorry for the delay. :)
from dispatch-docker.
Thank you for showing your task definition @sfc-gh-pkommini . Which docker image that you pushed to ECR? Is it using Dockerfile from https://github.com/Netflix/dispatch/blob/master/docker/Dockerfile , build it in local env and push to ECR? Or you have another way to do this?
from dispatch-docker.
git clone https://github.com/Netflix/dispatch
docker build -t dispatch .
- push to ecr
- run the ECS service that uses the ECR image
from dispatch-docker.
Okay, I used the same way to build the docker image @sfc-gh-pkommini . Thanks a lot.
from dispatch-docker.
Related Issues (20)
- Link 404's in .env.example HOT 2
- Fresh installation is failing with missing relation "dispatch_core.organization" HOT 6
- install.sh failing HOT 14
- fatal: password authentication failed for user HOT 5
- 2400MB of Memory in Docker is not enough to run install.sh HOT 2
- Running install.sh gives undefined table error : dispatch_user_organization HOT 2
- Building core service failing in docker-compose HOT 8
- Bug in install.sh relation "dispatch_core.organization" does not exist HOT 2
- Challenge setting up Slack integration HOT 5
- How to define dispatch organization & project names for Slack plug-in HOT 2
- Docker container won't build on aarch64 HOT 3
- Remove core or clarify how it works HOT 5
- Requesting an Open Source License file in this repository
- Docker Compose version requirement failing for 2.0.0+ HOT 2
- [just a report] unable to build with docker-compose v1 HOT 2
- basic ./install.sh crashes building container on step 49/49 HOT 4
- AttributeError: 'int' object has no attribute 'upper' HOT 4
- cant able to start dispatch HOT 1
- Basic Install Failing to Build "Core" HOT 10
- Docs bug - not allowed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dispatch-docker.