Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions build/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ services:
- rabbitmq
- redis
ports:
- "9000:80"
- "9000:9000"
- "8080:8080"
environment:
- LB_ADDRS=lb:80
- LB_ADDRS=lb:9000
- SERVICE_NAME=codebox-broker
- TRACING_SAMPLING=1

Expand All @@ -24,7 +24,7 @@ services:
depends_on:
- redis
ports:
- "9001:80"
- "9001:9000"
environment:
- SERVICE_NAME=codebox-lb

Expand Down
4 changes: 2 additions & 2 deletions cmd/broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ As there is no authentication, always run it in a private network.`,
Flags: []cli.Flag{
&cli.IntFlag{
Name: "port", Aliases: []string{"p"}, Usage: "port for grpc server",
EnvVars: []string{"PORT"}, Value: 8000,
EnvVars: []string{"PORT"}, Value: 9000,
},
&cli.IntFlag{
Name: "uwsgi-port", Usage: "port for uwsgi server",
Expand All @@ -58,7 +58,7 @@ As there is no authentication, always run it in a private network.`,
// Broker Server options.
&cli.StringSliceFlag{
Name: "lb-addrs", Usage: "load balancer TCP addresses",
EnvVars: []string{"LB_ADDRS"}, Value: cli.NewStringSlice("127.0.0.1:8000"),
EnvVars: []string{"LB_ADDRS"}, Value: cli.NewStringSlice("127.0.0.1:9000"),
},
&cli.IntFlag{
Name: "lb-retry", Usage: "number of retries on failed lb run",
Expand Down
2 changes: 1 addition & 1 deletion cmd/lb.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ As there is no authentication, always run it in a private network.`,
Flags: []cli.Flag{
&cli.IntFlag{
Name: "port", Aliases: []string{"p"}, Usage: "port for grpc server",
EnvVars: []string{"PORT"}, Value: 8000,
EnvVars: []string{"PORT"}, Value: 9000,
},

// File Repo options.
Expand Down
2 changes: 1 addition & 1 deletion cmd/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ var workerCmd = &cli.Command{
},
&cli.StringFlag{
Name: "lb-addr", Aliases: []string{"lb"}, Usage: "load balancer TCP address",
EnvVars: []string{"LB_ADDR"}, Value: "127.0.0.1:8000",
EnvVars: []string{"LB_ADDR"}, Value: "127.0.0.1:9000",
},

// User Cache options.
Expand Down
4 changes: 2 additions & 2 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ envsubst() {

deploy_broker() {
# Deploy broker.
LB_ADDRS=$(seq -s, -f "codebox-lb-%02g.default:80" 1 $LB_TOTAL_NUM)
LB_ADDRS=$(seq -s, -f "codebox-lb-%02g.default:9000" 1 $LB_TOTAL_NUM)
export LB_ADDRS=${LB_ADDRS%,}
REPLICAS=$(kubectl get deployment/codebox-broker -o jsonpath='{.spec.replicas}' 2>/dev/null || echo "${BROKER_MIN}")
export REPLICAS
Expand Down Expand Up @@ -149,7 +149,7 @@ for (( LB_NUM=1; LB_NUM <= LB_TOTAL_NUM; LB_NUM++ )); do


# Deploy workers.
LB_ADDR=codebox-lb-internal-${LB_NUM}.default:8000
LB_ADDR=codebox-lb-internal-${LB_NUM}.default:9000
export LB_ADDR
REPLICAS=$(kubectl get deployment/codebox-worker-"${LB_NUM}" -o jsonpath='{.spec.replicas}' 2>/dev/null || echo "${SCALING_MIN}")
export REPLICAS
Expand Down
2 changes: 1 addition & 1 deletion deploy/yaml/broker-deployment.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ spec:
cpu: 250m
ports:
- name: grpc
containerPort: 8000
containerPort: 9000
- name: uwsgi
containerPort: 8080
- name: http-metrics
Expand Down
2 changes: 1 addition & 1 deletion deploy/yaml/broker-service.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
targetPort: uwsgi
- name: grpc
protocol: TCP
port: 80
port: 9000
targetPort: grpc
- name: http-metrics
protocol: TCP
Expand Down
2 changes: 1 addition & 1 deletion deploy/yaml/lb-deployment.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spec:
cpu: 1000m
ports:
- name: grpc
containerPort: 8000
containerPort: 9000
- name: http-metrics
containerPort: 9080
env:
Expand Down
2 changes: 1 addition & 1 deletion deploy/yaml/lb-service.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
ports:
- name: grpc
protocol: TCP
port: 80
port: 9000
targetPort: grpc
- name: http-metrics
protocol: TCP
Expand Down