Skip to content

Commit 41b0d75

Browse files
committed
Removed deprecated options
Changed docker samples (environment variables) Changed Telemetry (allow extra config data, normalize keys to lowercase) Signed-off-by: JOSE FUXA <[email protected]>
1 parent e669110 commit 41b0d75

File tree

15 files changed

+868
-1023
lines changed

15 files changed

+868
-1023
lines changed

docker-compose.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ services:
2929
- shared.env
3030
environment:
3131
- EVENTSTORE_GOSSIP_SEED=172.30.240.12:2113,172.30.240.13:2113
32-
- EVENTSTORE_INT_IP=172.30.240.11
32+
- EVENTSTORE_REPLICATION_IP=172.30.240.11
3333
- EVENTSTORE_CERTIFICATE_FILE=/etc/eventstore/certs/node1/node.crt
3434
- EVENTSTORE_CERTIFICATE_PRIVATE_KEY_FILE=/etc/eventstore/certs/node1/node.key
3535
- EVENTSTORE_ADVERTISE_HOST_TO_CLIENT_AS=127.0.0.1
36-
- EVENTSTORE_ADVERTISE_HTTP_PORT_TO_CLIENT_AS=2111
36+
- EVENTSTORE_ADVERTISE_NODE_PORT_TO_CLIENT_AS=2111
3737
ports:
3838
- 2111:2113
3939
networks:
@@ -51,11 +51,11 @@ services:
5151
- shared.env
5252
environment:
5353
- EVENTSTORE_GOSSIP_SEED=172.30.240.11:2113,172.30.240.13:2113
54-
- EVENTSTORE_INT_IP=172.30.240.12
54+
- EVENTSTORE_REPLICATION_IP=172.30.240.12
5555
- EVENTSTORE_CERTIFICATE_FILE=/etc/eventstore/certs/node2/node.crt
5656
- EVENTSTORE_CERTIFICATE_PRIVATE_KEY_FILE=/etc/eventstore/certs/node2/node.key
5757
- EVENTSTORE_ADVERTISE_HOST_TO_CLIENT_AS=127.0.0.1
58-
- EVENTSTORE_ADVERTISE_HTTP_PORT_TO_CLIENT_AS=2112
58+
- EVENTSTORE_ADVERTISE_NODE_PORT_TO_CLIENT_AS=2112
5959
ports:
6060
- 2112:2113
6161
networks:
@@ -73,11 +73,11 @@ services:
7373
- shared.env
7474
environment:
7575
- EVENTSTORE_GOSSIP_SEED=172.30.240.11:2113,172.30.240.12:2113
76-
- EVENTSTORE_INT_IP=172.30.240.13
76+
- EVENTSTORE_REPLICATION_IP=172.30.240.13
7777
- EVENTSTORE_CERTIFICATE_FILE=/etc/eventstore/certs/node3/node.crt
7878
- EVENTSTORE_CERTIFICATE_PRIVATE_KEY_FILE=/etc/eventstore/certs/node3/node.key
7979
- EVENTSTORE_ADVERTISE_HOST_TO_CLIENT_AS=127.0.0.1
80-
- EVENTSTORE_ADVERTISE_HTTP_PORT_TO_CLIENT_AS=2113
80+
- EVENTSTORE_ADVERTISE_NODE_PORT_TO_CLIENT_AS=2113
8181
ports:
8282
- 2113:2113
8383
networks:

samples/server/docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ services:
77
- EVENTSTORE_CLUSTER_SIZE=1
88
- EVENTSTORE_RUN_PROJECTIONS=All
99
- EVENTSTORE_START_STANDARD_PROJECTIONS=true
10-
- EVENTSTORE_HTTP_PORT=2113
10+
- EVENTSTORE_NODE_PORT=2113
1111
- EVENTSTORE_INSECURE=true
1212
- EVENTSTORE_ENABLE_ATOM_PUB_OVER_HTTP=true
1313
ports:

shared.env

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
EVENTSTORE_CLUSTER_SIZE=3
22
EVENTSTORE_RUN_PROJECTIONS=All
3-
EVENTSTORE_INT_TCP_PORT=1112
4-
EVENTSTORE_HTTP_PORT=2113
3+
EVENTSTORE_REPLICATION_PORT=1112
4+
EVENTSTORE_NODE_PORT=2113
55
EVENTSTORE_TRUSTED_ROOT_CERTIFICATES_PATH=/etc/eventstore/certs/ca
66
EVENTSTORE_DISCOVER_VIA_DNS=false
7-
EVENTSTORE_ENABLE_ATOM_PUB_OVER_HTTP=true
7+
EVENTSTORE_ENABLE_ATOM_PUB_OVER_HTTP=true

src/EventStore.Core.Tests/Helpers/MiniClusterNode.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ public MiniClusterNode(string pathname, int debugIndex, IPEndPoint internalTcp,
127127
NodeIp = ExternalTcpEndPoint.Address,
128128
ReplicationPort = InternalTcpEndPoint.Port,
129129
NodePort = HttpEndPoint.Port,
130-
DisableInternalTcpTls = false,
131130
ReplicationHeartbeatTimeout = 2_000,
132131
ReplicationHeartbeatInterval = 2_000,
133132
EnableAtomPubOverHttp = true,

src/EventStore.Core.Tests/Helpers/MiniNode.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,9 @@ public MiniNode(string pathname,
163163
.Build()),
164164
}.Secure(new X509Certificate2Collection(ssl_connections.GetRootCertificate()),
165165
ssl_connections.GetServerCertificate())
166-
.WithInternalSecureTcpOn(IntTcpEndPoint)
167-
.WithExternalSecureTcpOn(TcpEndPoint)
168-
.WithHttpOn(HttpEndPoint);
166+
.WithReplicationEndpointOn(IntTcpEndPoint)
167+
.WithExternalTcpOn(TcpEndPoint)
168+
.WithNodeEndpointOn(HttpEndPoint);
169169

170170
var inMemConf = new ConfigurationBuilder()
171171
.AddInMemoryCollection(new KeyValuePair<string, string>[] {
@@ -178,7 +178,7 @@ public MiniNode(string pathname,
178178
}).Build();
179179

180180
if (advertisedExtHostAddress != null)
181-
options = options.AdvertiseHttpHostAs(new DnsEndPoint(advertisedExtHostAddress, advertisedHttpPort));
181+
options = options.AdvertiseNodeAs(new DnsEndPoint(advertisedExtHostAddress, advertisedHttpPort));
182182

183183
options = inMemDb
184184
? options.RunInMemory()

src/EventStore.Core.XUnit.Tests/Configuration/ClusterNodeOptionsTests/when_building/with_cluster_node_and_custom_settings.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ protected override ClusterVNodeOptions WithOptions(ClusterVNodeOptions options)
131131
return options
132132
.Insecure()
133133
.WithExternalTcpOn(new IPEndPoint(IPAddress.Loopback, 11130))
134-
.WithInternalTcpOn(new IPEndPoint(IPAddress.Loopback, 11120))
134+
.WithReplicationEndpointOn(new IPEndPoint(IPAddress.Loopback, 11120))
135135
.AdvertiseExternalHostAs(new DnsEndPoint("196.168.1.1", 11131))
136-
.AdvertiseHttpHostAs(new DnsEndPoint("196.168.1.1", 21130));
136+
.AdvertiseNodeAs(new DnsEndPoint("196.168.1.1", 21130));
137137
}
138138

139139
[Test]
@@ -158,7 +158,7 @@ protected override ClusterVNodeOptions WithOptions(ClusterVNodeOptions options)
158158
{
159159
return options
160160
.Insecure()
161-
.WithInternalTcpOn(new IPEndPoint(IPAddress.Any, 11120))
161+
.WithReplicationEndpointOn(new IPEndPoint(IPAddress.Any, 11120))
162162
.WithExternalTcpOn(new IPEndPoint(IPAddress.Any, 11130))
163163
.AdvertiseExternalHostAs(new DnsEndPoint("10.0.0.1", 11131));
164164
}
@@ -186,9 +186,9 @@ protected override ClusterVNodeOptions WithOptions(ClusterVNodeOptions options)
186186
{
187187
return options
188188
.Insecure()
189-
.WithHttpOn(new IPEndPoint(IPAddress.Any, 21130))
189+
.WithNodeEndpointOn(new IPEndPoint(IPAddress.Any, 21130))
190190
.WithExternalTcpOn(new IPEndPoint(IPAddress.Any, 11130))
191-
.WithInternalTcpOn(new IPEndPoint(IPAddress.Loopback, 11120));
191+
.WithReplicationEndpointOn(new IPEndPoint(IPAddress.Loopback, 11120));
192192
}
193193

194194
[Test]
@@ -214,11 +214,11 @@ protected override ClusterVNodeOptions WithOptions(ClusterVNodeOptions options)
214214
{
215215
return options
216216
.Insecure()
217-
.WithHttpOn(new IPEndPoint(IPAddress.Loopback, 21130))
217+
.WithNodeEndpointOn(new IPEndPoint(IPAddress.Loopback, 21130))
218218
.WithExternalTcpOn(new IPEndPoint(IPAddress.Loopback, 11130))
219-
.WithInternalTcpOn(new IPEndPoint(IPAddress.Any, 11120))
219+
.WithReplicationEndpointOn(new IPEndPoint(IPAddress.Any, 11120))
220220
.AdvertiseExternalHostAs(new DnsEndPoint("10.0.0.1", 11131))
221-
.AdvertiseHttpHostAs(new DnsEndPoint("10.0.0.1", 21131));
221+
.AdvertiseNodeAs(new DnsEndPoint("10.0.0.1", 21131));
222222
}
223223

224224
[Test]

src/EventStore.Core.XUnit.Tests/Configuration/ClusterNodeOptionsTests/when_building/with_default_settings.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,6 @@ public void should_have_default_endpoints()
3939
Assert.AreEqual(new IPEndPoint(IPAddress.Loopback, 2113), _node.NodeInfo.HttpEndPoint);
4040
}
4141

42-
[Test]
43-
public void should_use_tls()
44-
{
45-
Assert.IsFalse(_options.Interface.DisableInternalTcpTls);
46-
}
47-
4842
[Test]
4943
public void should_set_command_line_args_to_default_values()
5044
{
@@ -110,12 +104,6 @@ public void should_have_default_secure_endpoints()
110104
Assert.AreEqual(httpEndPoint.ToDnsEndPoint(), _node.GossipAdvertiseInfo.HttpEndPoint);
111105
}
112106

113-
[Test]
114-
public void should_use_tls()
115-
{
116-
Assert.IsFalse(_options.Interface.DisableInternalTcpTls);
117-
}
118-
119107
protected override ClusterVNodeOptions WithOptions(ClusterVNodeOptions options)
120108
{
121109
return options;

src/EventStore.Core.XUnit.Tests/Configuration/ClusterNodeOptionsTests/when_building/with_secure_tcp.cs

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class with_ssl_enabled_and_using_a_security_certificate_from_file<TLogFor
2121
protected override ClusterVNodeOptions WithOptions(ClusterVNodeOptions options)
2222
{
2323

24-
return options.WithInternalSecureTcpOn(_internalSecTcp).WithExternalSecureTcpOn(_externalSecTcp) with
24+
return options.WithReplicationEndpointOn(_internalSecTcp).WithExternalTcpOn(_externalSecTcp) with
2525
{
2626
CertificateFile = new()
2727
{
@@ -32,12 +32,6 @@ protected override ClusterVNodeOptions WithOptions(ClusterVNodeOptions options)
3232
};
3333
}
3434

35-
[Test]
36-
public void should_set_tls_to_enabled()
37-
{
38-
Assert.IsFalse(_options.Interface.DisableInternalTcpTls);
39-
}
40-
4135
[Test]
4236
public void should_set_certificate()
4337
{
@@ -73,17 +67,11 @@ public class with_ssl_enabled_and_using_a_security_certificate<TLogFormat, TStre
7367
protected override ClusterVNodeOptions WithOptions(ClusterVNodeOptions options)
7468
{
7569
return options
76-
.WithInternalSecureTcpOn(_internalSecTcp)
77-
.WithExternalSecureTcpOn(_externalSecTcp)
70+
.WithReplicationEndpointOn(_internalSecTcp)
71+
.WithExternalTcpOn(_externalSecTcp)
7872
.Secure(new X509Certificate2Collection(ssl_connections.GetRootCertificate()), _certificate);
7973
}
8074

81-
[Test]
82-
public void should_set_tls_to_enabled()
83-
{
84-
Assert.IsFalse(_options.Interface.DisableInternalTcpTls);
85-
}
86-
8775
[Test]
8876
public void should_set_certificate()
8977
{
@@ -113,8 +101,8 @@ public void SetUp()
113101
_options = new ClusterVNodeOptions()
114102
.ReduceMemoryUsageForTests()
115103
.RunInMemory()
116-
.WithInternalSecureTcpOn(internalSecTcp)
117-
.WithExternalSecureTcpOn(externalSecTcp);
104+
.WithReplicationEndpointOn(internalSecTcp)
105+
.WithExternalTcpOn(externalSecTcp);
118106
try
119107
{
120108
_ = new ClusterVNode<TStreamId>(_options, LogFormatHelper<TLogFormat, TStreamId>.LogFormatFactory,

src/EventStore.Core.XUnit.Tests/Configuration/ClusterNodeOptionsTests/when_building/with_single_node_and_custom_settings.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ public class with_custom_ip_endpoints<TLogFormat, TStreamId> : SingleNodeScenari
5757
protected override ClusterVNodeOptions WithOptions(ClusterVNodeOptions options)
5858
{
5959
return options
60-
.WithHttpOn(_httpEndPoint)
61-
.WithExternalSecureTcpOn(_externalTcp)
62-
.WithInternalSecureTcpOn(_internalTcp);
60+
.WithNodeEndpointOn(_httpEndPoint)
61+
.WithExternalTcpOn(_externalTcp)
62+
.WithReplicationEndpointOn(_internalTcp);
6363
}
6464

6565
[Test]
@@ -154,12 +154,12 @@ public class with_custom_advertise_as<TLogFormat, TStreamId> : SingleNodeScenari
154154
protected override ClusterVNodeOptions WithOptions(ClusterVNodeOptions options)
155155
{
156156
return options
157-
.WithHttpOn(_httpEndpoint)
158-
.WithExternalSecureTcpOn(_extTcpEndpoint)
159-
.WithInternalSecureTcpOn(_intTcpEndpoint)
157+
.WithNodeEndpointOn(_httpEndpoint)
158+
.WithExternalTcpOn(_extTcpEndpoint)
159+
.WithReplicationEndpointOn(_intTcpEndpoint)
160160
.AdvertiseInternalHostAs(new DnsEndPoint($"{InternalIp}.com", _intTcpEndpoint.Port + 1000))
161161
.AdvertiseExternalHostAs(new DnsEndPoint($"{ExternalIp}.com", _extTcpEndpoint.Port + 1000))
162-
.AdvertiseHttpHostAs(new DnsEndPoint($"{ExternalIp}.com", _httpEndpoint.Port + 1000));
162+
.AdvertiseNodeAs(new DnsEndPoint($"{ExternalIp}.com", _httpEndpoint.Port + 1000));
163163
}
164164

165165
[Test]

0 commit comments

Comments
 (0)