Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beaconchain Mobile App as a Node Monitoring option to Stereum #1459

Merged
merged 34 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
b5a052c
update the fetching
mabasian Sep 8, 2023
ab01562
fix the new api for the testers
mabasian Sep 8, 2023
96730f3
Revert "fix the new api for the testers"
mabasian Sep 8, 2023
1dffb78
Revert "update the fetching"
mabasian Sep 8, 2023
71102a0
Merge branch 'stereum-dev:main' into main
mabasian Sep 8, 2023
9a3d819
Merge branch 'stereum-dev:main' into main
mabasian Sep 11, 2023
130db8e
Merge branch 'stereum-dev:main' into main
mabasian Sep 12, 2023
635809f
Merge branch 'stereum-dev:main' into main
mabasian Sep 12, 2023
8d433dd
Merge branch 'stereum-dev:main' into main
mabasian Sep 15, 2023
84102a2
Merge branch 'stereum-dev:main' into main
mabasian Sep 19, 2023
49fced4
add beaconcha row to notif modal
mabasian Sep 20, 2023
85de6bb
validators added to the modal
mabasian Sep 20, 2023
6a54bad
add the beaconcha link to go
mabasian Sep 20, 2023
45c976a
update the beaconchain modal
mabasian Sep 20, 2023
bf74756
add the inputs in the modal
mabasian Sep 22, 2023
3af2250
fix the beaconchain modal and frontend is done
mabasian Sep 22, 2023
fb4bad0
add internationalization to the modal
mabasian Sep 22, 2023
b960292
fix the frontend
mabasian Sep 22, 2023
33d32e0
Merge branch 'stereum-dev:main' into main
mabasian Sep 22, 2023
e130f52
Merge branch 'stereum-dev:main' into main
mabasian Sep 26, 2023
b268354
Merge branch 'stereum-dev:main' into main
mabasian Sep 27, 2023
863009d
Merge branch 'stereum-dev:main' into main
mabasian Sep 29, 2023
197f019
Merge branch 'stereum-dev:main' into main
mabasian Oct 2, 2023
1479050
Merge branch 'stereum-dev:main' into main
mabasian Oct 4, 2023
55478c5
Merge branch 'stereum-dev:main' into main
mabasian Oct 4, 2023
7ee678b
Merge branch 'stereum-dev:main' into main
mabasian Oct 4, 2023
f628255
Merge branch 'stereum-dev:main' into main
mabasian Oct 4, 2023
278952c
Merge branch 'stereum-dev:main' into main
mabasian Oct 11, 2023
be8a141
Merge branch 'stereum-dev:main' into main
mabasian Oct 18, 2023
48d56f7
Merge branch 'stereum-dev:main' into main
mabasian Oct 19, 2023
e61ea3f
Merge branch 'stereum-dev:main' into main
mabasian Oct 19, 2023
79ffbf2
Merge branch 'stereum-dev:main' into main
mabasian Oct 20, 2023
2b6056c
Added Metrics Exporter
PatrickRL Oct 20, 2023
b4493c2
Merge branch 'main' into beaconchainMob
mabasian Oct 20, 2023
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions launcher/src/backend/ServiceManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { StringUtils } from "./StringUtils";
import { ServiceVolume } from "./ethereum-services/ServiceVolume";
import { Web3SignerService } from "./ethereum-services/Web3SignerService";
import { NotificationService } from "./ethereum-services/NotificationService";
import { MetricsExporterService } from "./ethereum-services/MetricsExporterService";
import { ValidatorEjectorService } from "./ethereum-services/ValidatorEjectorService";
import { KeysAPIService } from "./ethereum-services/KeysAPIService";
import YAML from "yaml";
Expand Down Expand Up @@ -140,6 +141,8 @@ export class ServiceManager {
services.push(Web3SignerService.buildByConfiguration(config));
} else if (config.service == "NotificationService") {
services.push(NotificationService.buildByConfiguration(config));
} else if (config.service == "MetricsExporterService") {
services.push(MetricsExporterService.buildByConfiguration(config));
} else if (config.service == "ValidatorEjectorService") {
services.push(ValidatorEjectorService.buildByConfiguration(config));
} else if (config.service == "KeysAPIService") {
Expand Down Expand Up @@ -889,6 +892,9 @@ export class ServiceManager {
case "NotificationService":
return NotificationService.buildByUserInput(args.network, args.installDir + "/notification");

case "MetricsExporterService":
return MetricsExporterService.buildByUserInput(args.network);

case "ValidatorEjectorService":
return ValidatorEjectorService.buildByUserInput(args.network, args.installDir + "/validatorejector");

Expand Down Expand Up @@ -1454,4 +1460,9 @@ export class ServiceManager {
}
await this.nodeConnection.sshService.exec(`rm ${workingDir}/data/validator/key-manager/local/*.lock`)
}

async beaconchainMonitoringModification(data){
console.log(data.selectedVal +" "+ data.apiKey +" "+ data.machineName);
// NOT YET IMPLEMENTED
}
}
48 changes: 48 additions & 0 deletions launcher/src/backend/ethereum-services/MetricsExporterService.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import { NodeService } from "./NodeService";
import { ServiceVolume } from "./ServiceVolume";

export class MetricsExporterService extends NodeService {
static buildByUserInput(network) {
const image = "gobitfly/eth2-client-metrics-exporter";
const service = new MetricsExporterService();
const volumes = [
new ServiceVolume("/sys", "/host/sys", "ro"),
new ServiceVolume("/proc", "/host/proc", "ro"),
new ServiceVolume("/", "/host/rootfs", "ro"),
];

service.init(
"MetricsExporterService", //service
service.id, // id,
1, // configVersion
image, // image,
"latest", // imageVersion,
[
`--server.address=https://beaconcha.in/api/v1/client/metrics?apikey=<API_KEY>&machine=<MACHINE_NAME>`,
`--system.partition=/host/rootfs`,
`--beaconnode.type=prysm`,
`--beaconnode.address=http://stereum-<SERVICE_ID>:8080/metrics`,
`--validator.type=prysm`,
`--validator.address=http://stereum-<SERVICE_ID>:8081/metrics`,
], // command,
["/bin/eth2-client-metrics-exporter"], // entrypoint,
{
HOST_PROC: "/host/proc",
HOST_SYS: "/host/sys",
}, // env,
[], // ports,
volumes, // volumes,
null, // user,
network // network,
);
return service;
}

static buildByConfiguration(config) {
const service = new MetricsExporterService();

service.initByConfig(config);

return service;
}
}
4 changes: 4 additions & 0 deletions launcher/src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,10 @@ ipcMain.handle("IpScanLan", async () => {
return await nodeConnection.IpScanLan();
});

ipcMain.handle("beaconchainMonitoringModification", async (event, args) => {
return await serviceManager.beaconchainMonitoringModification(args)
});

// Scheme must be registered before the app is ready
protocol.registerSchemesAsPrivileged([{ scheme: "app", privileges: { secure: true, standard: true } }]);

Expand Down
Loading
Loading