Skip to content

Commit b4113e3

Browse files
committed
WKBCH-12 solo cloudserver and backbeat conf updates
1 parent 7fb9cb3 commit b4113e3

File tree

5 files changed

+95
-83
lines changed

5 files changed

+95
-83
lines changed

cmd/configure.go

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@ type ConfigureCmd struct {
1515

1616
type configGenFunc func(cfg EnvironmentConfig, path string) error
1717

18-
type CloudserverTemplateData struct {
19-
EnvironmentConfig
20-
Port int
21-
MetricsPort int
22-
}
23-
2418
func (c *ConfigureCmd) Run() error {
2519
rc := RuntimeConfigFromFlags(c.EnvDir, c.Name)
2620
envPath := filepath.Join(rc.EnvDir, rc.EnvName)
@@ -113,42 +107,16 @@ func generateCloudserverConfig(cfg EnvironmentConfig, path string) error {
113107
}
114108
}
115109

116-
// Render the main config.json with port 8000
117-
templateData := CloudserverTemplateData{
118-
EnvironmentConfig: cfg,
119-
Port: 8000,
120-
MetricsPort: 8002,
121-
}
122-
123110
err := renderTemplateToFile(
124111
getTemplates(),
125112
configTemplate,
126-
templateData,
113+
cfg,
127114
filepath.Join(path, "cloudserver", "config.json"),
128115
)
129116
if err != nil {
130117
return err
131118
}
132119

133-
// Render config-destination.json with port 8001 if CRR is enabled
134-
if cfg.Features.CrossRegionReplication.Enabled {
135-
destTemplateData := CloudserverTemplateData{
136-
EnvironmentConfig: cfg,
137-
Port: 8001,
138-
MetricsPort: 8003,
139-
}
140-
141-
err = renderTemplateToFile(
142-
getTemplates(),
143-
configTemplate,
144-
destTemplateData,
145-
filepath.Join(path, "cloudserver", "config-destination.json"),
146-
)
147-
if err != nil {
148-
return err
149-
}
150-
}
151-
152120
return renderTemplateToFile(
153121
getTemplates(),
154122
"templates/cloudserver/locationConfig.json",

templates/backbeat/config.json

Lines changed: 77 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@
2323
"host": "127.0.0.1",
2424
"port": 9000
2525
},
26+
"mongo": {
27+
"replicaSetHosts":
28+
"localhost:27017,localhost:27018,localhost:27019",
29+
"writeConcern": "majority",
30+
"replicaSet": "rs0",
31+
"readPreference": "primary",
32+
"database": "metadata"
33+
},
2634
"probeServer": {
2735
"bindAddress": "localhost",
2836
"port": 4042
@@ -37,32 +45,32 @@
3745
"port": 8000
3846
},
3947
"auth": {
40-
"type": "account",
41-
"account": "bart",
48+
"type": "role",
4249
"vault": {
4350
"host": "127.0.0.1",
4451
"port": 8500,
45-
"adminPort": 8600
52+
"adminPort": 8600,
53+
"adminCredentialsFile": "/home/scality/backbeat/node_modules/vaultclient/tests/utils/admincredentials.json"
4654
}
4755
}
4856
},
4957
"destination": {
5058
"transport": "http",
5159
"bootstrapList": [
52-
{ "site": "sf", "servers": ["127.0.0.1:8001"], "echo": false },
53-
{ "site": "aws-location", "type": "aws_s3" }
60+
{ "site": "sf", "servers": ["127.0.0.1:8000"], "echo": false }
5461
],
5562
"auth": {
56-
"type": "service",
57-
"account": "service-replication",
63+
"type": "role",
5864
"vault": {
5965
"host": "127.0.0.1",
6066
"port": 8500,
61-
"adminPort": 8600
67+
"adminPort": 8600,
68+
"adminCredentialsFile": "/home/scality/backbeat/node_modules/vaultclient/tests/utils/admincredentials.json"
6269
}
6370
}
6471
},
6572
"topic": "backbeat-replication",
73+
"dataMoverTopic": "backbeat-data-mover",
6674
"replicationStatusTopic": "backbeat-replication-status",
6775
"replicationFailedTopic": "backbeat-replication-failed",
6876
"monitorReplicationFailures": true,
@@ -75,26 +83,58 @@
7583
],
7684
"queueProcessor": {
7785
"groupId": "backbeat-replication-group",
78-
"retryTimeoutS": 300,
86+
"retry": {
87+
"aws_s3": {
88+
"maxRetries": 5,
89+
"timeoutS": 900,
90+
"backoff": {
91+
"min": 60000,
92+
"max": 900000,
93+
"jitter": 0.1,
94+
"factor": 1.5
95+
}
96+
},
97+
"azure": {
98+
"maxRetries": 5,
99+
"timeoutS": 900,
100+
"backoff": {
101+
"min": 60000,
102+
"max": 900000,
103+
"jitter": 0.1,
104+
"factor": 1.5
105+
}
106+
},
107+
"gcp": {
108+
"maxRetries": 5,
109+
"timeoutS": 900,
110+
"backoff": {
111+
"min": 60000,
112+
"max": 900000,
113+
"jitter": 0.1,
114+
"factor": 1.5
115+
}
116+
},
117+
"scality": {
118+
"maxRetries": 5,
119+
"timeoutS": 300,
120+
"backoff": {
121+
"min": 1000,
122+
"max": 300000,
123+
"jitter": 0.1,
124+
"factor": 1.5
125+
}
126+
}
127+
},
79128
"concurrency": 10,
80129
"mpuPartsConcurrency": 10,
81-
"probeServer": [
82-
{
83-
"site": "aws-location",
84-
"bindAddress": "localhost",
85-
"port": "4043"
86-
}, {
87-
"site" : "us-east-1",
88-
"bindAddress": "localhost",
89-
"port": "4044"
90-
}
91-
]
130+
"probeServer": {
131+
"bindAddress": "localhost",
132+
"port": 4043
133+
}
92134
},
93135
"replicationStatusProcessor": {
94136
"groupId": "backbeat-replication-group",
95-
"retryTimeoutS": 300,
96137
"concurrency": 10,
97-
"logConsumerMetricsIntervalS": 60,
98138
"probeServer": {
99139
"bindAddress": "localhost",
100140
"port": 4045
@@ -142,7 +182,11 @@
142182
"conductor": {
143183
"backlogControl": { "enabled": true },
144184
"cronRule": "*/5 * * * * *",
145-
"concurrency": 10
185+
"concurrency": 10,
186+
"probeServer": {
187+
"bindAddress": "0.0.0.0",
188+
"port": 8552
189+
}
146190
},
147191
"bucketProcessor": {
148192
"groupId": "backbeat-lifecycle-bucket-processor-group",
@@ -156,7 +200,11 @@
156200
"factor": 1.5
157201
}
158202
},
159-
"concurrency": 10
203+
"concurrency": 10,
204+
"probeServer": {
205+
"bindAddress": "0.0.0.0",
206+
"port": 8553
207+
}
160208
},
161209
"objectProcessor": {
162210
"groupId": "backbeat-lifecycle-object-processor-group",
@@ -170,7 +218,11 @@
170218
"factor": 1.5
171219
}
172220
},
173-
"concurrency": 10
221+
"concurrency": 10,
222+
"probeServer": {
223+
"bindAddress": "0.0.0.0",
224+
"port": 8554
225+
}
174226
}
175227
}
176228
},

templates/cloudserver/config-v7.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"port": {{ .Port }},
2+
"port": 8000,
33
"listenOn": [],
4-
"metricsPort": {{ .MetricsPort }},
4+
"metricsPort": 8002,
55
"replicationGroupId": "RG001",
66
"restEndpoints": {
77
"localhost": "us-east-1",

templates/cloudserver/config-v9.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"port": {{ .Port }},
2+
"port": 8000,
33
"listenOn": [],
4-
"metricsPort": {{ .MetricsPort }},
4+
"metricsPort": 8002,
55
"metricsListenOn": [],
66
"replicationGroupId": "RG001",
77
"restEndpoints": {

templates/global/docker-compose.yaml

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -69,26 +69,6 @@ services:
6969
profiles:
7070
- base
7171

72-
cloudserver-destination:
73-
image: ${CLOUDSERVER_IMAGE}
74-
container_name: workbench-s3-destination
75-
network_mode: host
76-
command: node index.js
77-
environment:
78-
S3DATA: file
79-
S3METADATA: scality
80-
S3VAULT: scality
81-
BUCKETD_BOOTSTRAP: localhost:9000
82-
S3_CONFIG_FILE: /conf/config.json
83-
MPU_TESTING: 'yes'
84-
ENABLE_NULL_VERSION_COMPAT_MODE: ${CLOUDSERVER_ENABLE_NULL_VERSION_COMPAT_MODE}
85-
REMOTE_MANAGEMENT_DISABLE: true
86-
volumes:
87-
- ./config/cloudserver/config-destination.json:/conf/config.json:ro
88-
- ./config/cloudserver/locationConfig.json:/conf/locationConfig.json:ro
89-
profiles:
90-
- feature-crr
91-
9272
vault:
9373
image: ${VAULT_IMAGE}
9474
container_name: workbench-vault
@@ -170,12 +150,16 @@ services:
170150
environment:
171151
SUPERVISORD_CONF: supervisord.conf
172152
BACKBEAT_CONFIG_FILE: /conf/config.json
153+
depends_on:
154+
setup-backbeat:
155+
condition: service_completed_successfully
173156
volumes:
174157
- ./config/backbeat/supervisord.conf:/conf/supervisord.conf:ro
175158
- ./config/backbeat/config.json:/conf/config.json:ro
176159
- ./config/backbeat/config.notification.json:/conf/config.notification.json:ro
177160
- ./config/backbeat/env:/conf/env:ro
178161
- ./logs/backbeat:/logs
162+
- ./config/vault/:/secrets/:rw
179163
profiles:
180164
- feature-crr
181165
- feature-notifications
@@ -250,7 +234,15 @@ services:
250234
network_mode: host
251235
environment:
252236
KAFKA_PORT: '9092'
253-
TOPICS_TO_CREATE: backbeat-lifecycle-bucket-tasks backbeat-lifecycle-object-tasks backbeat-bucket-notification backbeat-replications backbeat-replication-status
237+
TOPICS_TO_CREATE: >
238+
backbeat-lifecycle-bucket-tasks
239+
backbeat-lifecycle-object-tasks
240+
backbeat-bucket-notification
241+
backbeat-replication
242+
backbeat-data-mover
243+
backbeat-replication-status
244+
backbeat-replication-failed
245+
backbeat-metrics-group-crr
254246
CREATE_ZOOKEEPER_PATHS: 'true'
255247
ZOOKEEPER_ENDPOINT: 127.0.0.1:2181/backbeat
256248
depends_on:

0 commit comments

Comments
 (0)