Skip to content

Commit 70d73c9

Browse files
Ticket #109 : support etcd
1 parent 71ec661 commit 70d73c9

52 files changed

Lines changed: 297 additions & 2621 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

FaasNet.EventMesh.sln

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 17
4-
VisualStudioVersion = 17.1.32328.378
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.31624.102
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "02. Core Layer", "02. Core Layer", "{6E495E0A-0DC8-4E42-8C58-3C48506D3D24}"
77
EndProject
@@ -13,8 +13,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FaasNet.EventMesh.Runtime.T
1313
EndProject
1414
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FaasNet.EventMesh.Runtime", "src\EventMesh\FaasNet.EventMesh.Runtime\FaasNet.EventMesh.Runtime.csproj", "{01F03240-2025-4F1B-B1F6-76A8FD694784}"
1515
EndProject
16-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FaasNet.EventMesh.Runtime.Website", "src\EventMesh\FaasNet.EventMesh.Runtime.Website\FaasNet.EventMesh.Runtime.Website.csproj", "{0E50F0C2-5E8B-4F4F-90B5-CC9EE62805B1}"
17-
EndProject
1816
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FaasNet.EventMesh.Client", "src\EventMesh\FaasNet.EventMesh.Client\FaasNet.EventMesh.Client.csproj", "{3A26857C-8F60-4BC2-8B9C-56BEE26B59BF}"
1917
EndProject
2018
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Exporter.OpenTelemetryProtocol", "src\EventMesh\OpenTelemetry.Exporter.OpenTelemetryProtocol\OpenTelemetry.Exporter.OpenTelemetryProtocol.csproj", "{33040232-E628-448D-B85F-BC68D757D24B}"
@@ -53,14 +51,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FaasNet.EventMesh.Seed.VpnB
5351
EndProject
5452
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FaasNet.EventMesh.Common", "src\EventMesh\FaasNet.EventMesh.Common\FaasNet.EventMesh.Common.csproj", "{6884598F-5743-4A2A-B3B9-679FEDA81D6B}"
5553
EndProject
56-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "01. Console", "01. Console", "{E26134A4-0C4E-4362-A5A0-712254365135}"
57-
EndProject
5854
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FaasNet.EventMesh.FirstConsole", "src\EventMesh\FaasNet.EventMesh.FirstConsole\FaasNet.EventMesh.FirstConsole.csproj", "{394401D8-D005-49E1-A735-47284C034D44}"
5955
EndProject
6056
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FaasNet.EventMesh.SecondConsole", "src\EventMesh\FaasNet.EventMesh.SecondConsole\FaasNet.EventMesh.SecondConsole.csproj", "{FBD50A91-127A-44F7-BF12-4666448086B9}"
6157
EndProject
6258
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FaasNet.EventMesh.Protocols.WebSocket", "src\EventMesh\FaasNet.EventMesh.Protocols.WebSocket\FaasNet.EventMesh.Protocols.WebSocket.csproj", "{01F8C927-42A6-48E2-99E0-E203B3EE534A}"
6359
EndProject
60+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "01. Discoveries", "01. Discoveries", "{8B617B76-FFD2-4DBE-921E-B7DB73309530}"
61+
EndProject
62+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FaasNet.RaftConsensus.Discovery.Etcd", "src\RaftConsensus\FaasNet.RaftConsensus.Discovery.Etcd\FaasNet.RaftConsensus.Discovery.Etcd.csproj", "{D581D830-5A97-451F-96C5-8AC513EC308D}"
63+
EndProject
64+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FaasNet.EventMesh.Service", "src\EventMesh\FaasNet.EventMesh.Service\FaasNet.EventMesh.Service.csproj", "{21CC76FF-FA0A-4FF2-A0A1-78A8C107FCEE}"
65+
EndProject
66+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "04. Installer Layer", "04. Installer Layer", "{F9148CB9-8CA8-43BA-85F2-46C94AF624D7}"
67+
EndProject
6468
Global
6569
GlobalSection(SolutionConfigurationPlatforms) = preSolution
6670
Debug|Any CPU = Debug|Any CPU
@@ -75,10 +79,6 @@ Global
7579
{01F03240-2025-4F1B-B1F6-76A8FD694784}.Debug|Any CPU.Build.0 = Debug|Any CPU
7680
{01F03240-2025-4F1B-B1F6-76A8FD694784}.Release|Any CPU.ActiveCfg = Release|Any CPU
7781
{01F03240-2025-4F1B-B1F6-76A8FD694784}.Release|Any CPU.Build.0 = Release|Any CPU
78-
{0E50F0C2-5E8B-4F4F-90B5-CC9EE62805B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
79-
{0E50F0C2-5E8B-4F4F-90B5-CC9EE62805B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
80-
{0E50F0C2-5E8B-4F4F-90B5-CC9EE62805B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
81-
{0E50F0C2-5E8B-4F4F-90B5-CC9EE62805B1}.Release|Any CPU.Build.0 = Release|Any CPU
8282
{3A26857C-8F60-4BC2-8B9C-56BEE26B59BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
8383
{3A26857C-8F60-4BC2-8B9C-56BEE26B59BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
8484
{3A26857C-8F60-4BC2-8B9C-56BEE26B59BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -151,14 +151,21 @@ Global
151151
{01F8C927-42A6-48E2-99E0-E203B3EE534A}.Debug|Any CPU.Build.0 = Debug|Any CPU
152152
{01F8C927-42A6-48E2-99E0-E203B3EE534A}.Release|Any CPU.ActiveCfg = Release|Any CPU
153153
{01F8C927-42A6-48E2-99E0-E203B3EE534A}.Release|Any CPU.Build.0 = Release|Any CPU
154+
{D581D830-5A97-451F-96C5-8AC513EC308D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
155+
{D581D830-5A97-451F-96C5-8AC513EC308D}.Debug|Any CPU.Build.0 = Debug|Any CPU
156+
{D581D830-5A97-451F-96C5-8AC513EC308D}.Release|Any CPU.ActiveCfg = Release|Any CPU
157+
{D581D830-5A97-451F-96C5-8AC513EC308D}.Release|Any CPU.Build.0 = Release|Any CPU
158+
{21CC76FF-FA0A-4FF2-A0A1-78A8C107FCEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
159+
{21CC76FF-FA0A-4FF2-A0A1-78A8C107FCEE}.Debug|Any CPU.Build.0 = Debug|Any CPU
160+
{21CC76FF-FA0A-4FF2-A0A1-78A8C107FCEE}.Release|Any CPU.ActiveCfg = Release|Any CPU
161+
{21CC76FF-FA0A-4FF2-A0A1-78A8C107FCEE}.Release|Any CPU.Build.0 = Release|Any CPU
154162
EndGlobalSection
155163
GlobalSection(SolutionProperties) = preSolution
156164
HideSolutionNode = FALSE
157165
EndGlobalSection
158166
GlobalSection(NestedProjects) = preSolution
159167
{AA3F0C66-7575-47D9-B45E-6B38F78E632D} = {2A14F697-FFC8-402F-82B4-8128FE897DC9}
160168
{01F03240-2025-4F1B-B1F6-76A8FD694784} = {6E495E0A-0DC8-4E42-8C58-3C48506D3D24}
161-
{0E50F0C2-5E8B-4F4F-90B5-CC9EE62805B1} = {20A0BD99-A4F3-4FD5-A6FA-1935D7464DB8}
162169
{3A26857C-8F60-4BC2-8B9C-56BEE26B59BF} = {6E495E0A-0DC8-4E42-8C58-3C48506D3D24}
163170
{33040232-E628-448D-B85F-BC68D757D24B} = {3A7C8C56-A93C-4722-9397-EF82EB5E4655}
164171
{1186F448-3722-443F-A0C8-A0D4216D23D9} = {3A7C8C56-A93C-4722-9397-EF82EB5E4655}
@@ -175,11 +182,13 @@ Global
175182
{E90801D3-9D40-4B3F-AA3F-4015C03262A5} = {225E35C4-C3C2-4319-96BF-CBF86DCB5C46}
176183
{BC11A4F8-00BE-431C-9F15-75D4F8106DFF} = {B7CDEBEF-C508-4EFA-BEC9-9D9D6E5D80C5}
177184
{FC1A6988-7E69-492A-B7EF-73E481D80FEB} = {B7CDEBEF-C508-4EFA-BEC9-9D9D6E5D80C5}
178-
{6884598F-5743-4A2A-B3B9-679FEDA81D6B} = {E26134A4-0C4E-4362-A5A0-712254365135}
179-
{E26134A4-0C4E-4362-A5A0-712254365135} = {20A0BD99-A4F3-4FD5-A6FA-1935D7464DB8}
180-
{394401D8-D005-49E1-A735-47284C034D44} = {E26134A4-0C4E-4362-A5A0-712254365135}
181-
{FBD50A91-127A-44F7-BF12-4666448086B9} = {E26134A4-0C4E-4362-A5A0-712254365135}
185+
{6884598F-5743-4A2A-B3B9-679FEDA81D6B} = {20A0BD99-A4F3-4FD5-A6FA-1935D7464DB8}
186+
{394401D8-D005-49E1-A735-47284C034D44} = {20A0BD99-A4F3-4FD5-A6FA-1935D7464DB8}
187+
{FBD50A91-127A-44F7-BF12-4666448086B9} = {20A0BD99-A4F3-4FD5-A6FA-1935D7464DB8}
182188
{01F8C927-42A6-48E2-99E0-E203B3EE534A} = {225E35C4-C3C2-4319-96BF-CBF86DCB5C46}
189+
{8B617B76-FFD2-4DBE-921E-B7DB73309530} = {7A13262A-D1E6-4210-BA95-03A0741CBFA4}
190+
{D581D830-5A97-451F-96C5-8AC513EC308D} = {8B617B76-FFD2-4DBE-921E-B7DB73309530}
191+
{21CC76FF-FA0A-4FF2-A0A1-78A8C107FCEE} = {F9148CB9-8CA8-43BA-85F2-46C94AF624D7}
183192
EndGlobalSection
184193
GlobalSection(ExtensibilityGlobals) = postSolution
185194
SolutionGuid = {B9BD3B8C-B2C9-468F-BF54-66BFE9B565EC}

default.ps1

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ task compile -depends clean {
4545

4646
# Publish assets
4747
task publishCLI {
48-
exec { dotnet publish $source_dir\Clients\FaasNet.CLI\FaasNet.CLI.csproj -c $config -o $result_dir\cli }
48+
# exec { dotnet publish $source_dir\Clients\FaasNet.CLI\FaasNet.CLI.csproj -c $config -o $result_dir\cli }
4949
}
5050

5151
task publishDocker {
@@ -60,6 +60,14 @@ task publishDocker {
6060
exec { dotnet publish $source_dir\EventMesh\FaasNet.EventMesh.Runtime.Website\FaasNet.EventMesh.Runtime.Website.csproj -c $config -o $result_dir\services\EventMeshServer }
6161
}
6262

63+
task publishEventMeshService {
64+
exec { dotnet publish $source_dir\EventMesh\FaasNet.EventMesh.Service\FaasNet.EventMesh.Service.csproj -c Release -o $result_dir\eventMeshService }
65+
}
66+
67+
task deployEventMeshService {
68+
exec { sc.exe create "EventMesh Service" binpath="$result_dir\eventMeshService\FaasNet.EventMesh.Service.exe" }
69+
}
70+
6371
# Pack
6472
task pack -depends release, compile {
6573
exec { dotnet pack $source_dir\Function\FaasNet.Function\FaasNet.Function.csproj -c $config --no-build $versionSuffix --output $result_dir }

src/EventMesh/FaasNet.EventMesh.Common/ConsoleHelper.cs

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
using FaasNet.EventMesh.Client.Messages;
44
using FaasNet.EventMesh.Protocols;
55
using FaasNet.EventMesh.Seed;
6-
using FaasNet.RaftConsensus.Client;
76
using FaasNet.RaftConsensus.Core;
8-
using FaasNet.RaftConsensus.Core.Models;
9-
using FaasNet.RaftConsensus.Core.Stores;
107
using Microsoft.Extensions.DependencyInjection;
118
using System;
129
using System.Collections.Generic;
@@ -26,7 +23,6 @@ public class ConsoleHelper
2623

2724
public static async Task Start(int seedPort, int amqpPort = 5672, int webSocketPort = 2803)
2825
{
29-
// Supporter WS-Socket.
3026
_seedPort = seedPort;
3127
_amqpPort = amqpPort;
3228
_webSocketPort = webSocketPort;
@@ -83,11 +79,7 @@ private static async Task StartNode(INodeHost node, int nbNodes)
8379

8480
node.NodeStarted += (s, e) =>
8581
{
86-
if (node.Port == _seedPort) return;
87-
using (var gossipClient = new GossipClient("localhost", _seedPort))
88-
{
89-
gossipClient.JoinNode("localhost", node.Port);
90-
}
82+
9183
};
9284
}
9385

@@ -255,16 +247,6 @@ private static INodeHost BuildNodeHost(int port, bool isSeed = false)
255247
var serviceProvider = serverBuilder.Services
256248
// .AddLogging(l => l.AddConsole())
257249
.BuildServiceProvider();
258-
// if(isSeed)
259-
{
260-
var nodeStateStore = serviceProvider.GetRequiredService<INodeStateStore>();
261-
var clusterStore = serviceProvider.GetRequiredService<IClusterStore>();
262-
if (!clusterStore.GetAllNodes(CancellationToken.None).Result.Any())
263-
{
264-
clusterStore.AddNode(new ClusterNode { Port = _seedPort, Url = "localhost" }, CancellationToken.None).Wait();
265-
}
266-
}
267-
268250
return serviceProvider.GetRequiredService<INodeHost>();
269251
}
270252

src/EventMesh/FaasNet.EventMesh.Runtime.Website/App.razor

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/EventMesh/FaasNet.EventMesh.Runtime.Website/EventMeshRuntimeMigration.cs

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/EventMesh/FaasNet.EventMesh.Runtime.Website/FaasNet.EventMesh.Runtime.Website.csproj

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/EventMesh/FaasNet.EventMesh.Runtime.Website/MessageBrokerMigration.cs

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)