From a773609b736292853d84591504d51fccfb6f750e Mon Sep 17 00:00:00 2001 From: NeoPlays <80448387+NeoPlays@users.noreply.github.com> Date: Tue, 26 Aug 2025 11:33:02 +0200 Subject: [PATCH 1/8] REMOVE: NotificationService --- .github/workflows/test-molecule.yml | 4 +- controls/defaults/stereum_defaults.yaml | 3 - .../molecule/notifications/converge.yml | 61 -------------- .../molecule/notifications/playbook.yml | 7 -- .../molecule/notifications/prepare.yml | 83 ------------------- .../molecule/notifications/verify.yml | 43 ---------- .../tasks/configure-grafana.yml | 34 -------- controls/roles/manage-service/tasks/main.yml | 6 -- .../update-changes/molecule/243/converge.yml | 10 +++ .../molecule/243}/create.yml | 10 --- .../molecule/243}/destroy.yml | 2 +- .../molecule/243}/molecule.yml | 11 +-- .../update-changes/molecule/243/playbook.yml | 7 ++ .../update-changes/molecule/243/prepare.yml | 59 +++++++++++++ .../update-changes/molecule/243/verify.yml | 32 +++++++ .../tasks/2.4.3/remove_notifiations.yaml | 16 ++++ .../tasks/2.4.3/updates-243.yaml | 11 +++ controls/roles/update-changes/tasks/main.yml | 4 + launcher/src/backend/ConfigManager.js | 2 +- launcher/src/backend/Monitoring.js | 14 ---- launcher/src/backend/OneClickInstall.js | 12 +-- launcher/src/backend/ServiceManager.js | 6 -- .../ethereum-services/NotificationService.js | 46 ---------- launcher/src/background.js | 4 - .../components/modals/NotifModal.vue | 54 +----------- .../components/drawer/DrawerFilter.vue | 2 +- .../UI/node-page/sections/SidebarSection.vue | 8 +- launcher/src/store/ControlService.js | 4 - launcher/src/store/services.js | 30 ------- launcher/src/store/setups.js | 2 +- 30 files changed, 154 insertions(+), 433 deletions(-) delete mode 100644 controls/roles/manage-service/molecule/notifications/converge.yml delete mode 100644 controls/roles/manage-service/molecule/notifications/playbook.yml delete mode 100644 controls/roles/manage-service/molecule/notifications/prepare.yml delete mode 100644 controls/roles/manage-service/molecule/notifications/verify.yml delete mode 100644 controls/roles/manage-service/tasks/configure-grafana.yml create mode 100644 controls/roles/update-changes/molecule/243/converge.yml rename controls/roles/{manage-service/molecule/notifications => update-changes/molecule/243}/create.yml (88%) rename controls/roles/{manage-service/molecule/notifications => update-changes/molecule/243}/destroy.yml (95%) rename controls/roles/{manage-service/molecule/notifications => update-changes/molecule/243}/molecule.yml (63%) create mode 100644 controls/roles/update-changes/molecule/243/playbook.yml create mode 100644 controls/roles/update-changes/molecule/243/prepare.yml create mode 100644 controls/roles/update-changes/molecule/243/verify.yml create mode 100644 controls/roles/update-changes/tasks/2.4.3/remove_notifiations.yaml create mode 100644 controls/roles/update-changes/tasks/2.4.3/updates-243.yaml delete mode 100755 launcher/src/backend/ethereum-services/NotificationService.js diff --git a/.github/workflows/test-molecule.yml b/.github/workflows/test-molecule.yml index 6d1d302e3a..89ba857003 100644 --- a/.github/workflows/test-molecule.yml +++ b/.github/workflows/test-molecule.yml @@ -71,6 +71,7 @@ jobs: { role: "update-changes", test: "232" }, { role: "update-changes", test: "235" }, { role: "update-changes", test: "242" }, + { role: "update-changes", test: "243" }, ] fail-fast: false concurrency: molecule-test-${{ matrix.tests.role }}-${{ matrix.tests.test }} @@ -496,8 +497,7 @@ jobs: # {role: "manage-service", test: "nethermind-lighthouse"}, #{ role: "manage-service", test: "nethermind-nimbus" }, # {role: "manage-service", test: "nethermind-prysm"}, - # {role: "manage-service", test: "nethermind-teku"}, - { role: "manage-service", test: "notifications" }, + # {role: "manage-service", test: "nethermind-teku"} ] fail-fast: false concurrency: molecule-test-${{ matrix.tests.role }}-${{ matrix.tests.test }} diff --git a/controls/defaults/stereum_defaults.yaml b/controls/defaults/stereum_defaults.yaml index 9871034e6a..d07cba2482 100644 --- a/controls/defaults/stereum_defaults.yaml +++ b/controls/defaults/stereum_defaults.yaml @@ -1,8 +1,6 @@ stereum_static: defaults: controls_install_path: /opt/stereum - cloud: - notifications_api_key: 4cTLZL8gcZ5knP49murPh2qaZSchryfHraHQHFDPuuA8jqJLrSdr7Bd4s4TSSVBW updates: lane: stable unattended: @@ -36,7 +34,6 @@ stereum_static: grafana: "10.1.5" node_exporter: v1.6.1 prometheus: v2.47.2 - notifications: v1.1.0 devnet: # consensus clients diff --git a/controls/roles/manage-service/molecule/notifications/converge.yml b/controls/roles/manage-service/molecule/notifications/converge.yml deleted file mode 100644 index 2d160db831..0000000000 --- a/controls/roles/manage-service/molecule/notifications/converge.yml +++ /dev/null @@ -1,61 +0,0 @@ ---- -- name: Converge - hosts: all - vars_files: - - ../../../../defaults/stereum_defaults.yaml - vars: - grafana_service: 62aa1873-7b62-410b-ae8e-2cd8615165b9 - notification_service: 1738844e-3164-47de-85a8-ac7d07f2ee31 - - tasks: - # notification service - - block: - - set_fact: - stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" - - name: "Include manage-service" - include_role: - name: "manage-service" - vars: - stereum_args: - manage_service: - save: true - state: started - configuration: - service: NotificationService - id: "{{ notification_service }}" - image: "stereum/notifications:{{ stereum_static.defaults.versions.notifications }}" - env: - STEREUM_SERVER_URL: https://notifications.stereum.cloud - PORT: "3000" - QRCODE_FILENAME: /opt/app/qrcode/qrcode.png - STEREUM_APIKEY: "{{ stereum_static.defaults.cloud.notifications_api_key }}" - KEY_FILENAME: /opt/app/qrcode/keys.json - user: "2000" - volumes: - - "/opt/app/services/{{ notification_service }}/qrcode:/opt/app/qrcode/" - network: prater - # grafana service - - block: - - set_fact: - stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" - - name: "Include manage-service" - include_role: - name: "manage-service" - vars: - stereum_args: - manage_service: - save: true - state: started - configuration: - service: GrafanaService - id: "{{ grafana_service }}" - image: "grafana/grafana:{{ stereum_static.defaults.versions.grafana }}" - ports: - - 127.0.0.1:3000:3000/tcp - command: "/run.sh" - user: "2000" - volumes: - - "/opt/app/services/{{ grafana_service }}/grafana/provisioning:/etc/grafana/provisioning" - - "/opt/app/services/{{ grafana_service }}/grafana/data:/var/lib/grafana" - - "/opt/app/services/{{ grafana_service }}/grafana:/etc/grafana" - network: prater diff --git a/controls/roles/manage-service/molecule/notifications/playbook.yml b/controls/roles/manage-service/molecule/notifications/playbook.yml deleted file mode 100644 index 35611ef86a..0000000000 --- a/controls/roles/manage-service/molecule/notifications/playbook.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -- name: Converge - hosts: all - tasks: - - name: "Include manage-service" - include_role: - name: "manage-service" diff --git a/controls/roles/manage-service/molecule/notifications/prepare.yml b/controls/roles/manage-service/molecule/notifications/prepare.yml deleted file mode 100644 index 7a281fad0a..0000000000 --- a/controls/roles/manage-service/molecule/notifications/prepare.yml +++ /dev/null @@ -1,83 +0,0 @@ ---- -- name: Prepare - hosts: all - roles: - - role: "../" - vars_files: - - ../../../../defaults/stereum_defaults.yaml - vars: - prometheus_service: cb6ff2c4-0d45-4f58-97b1-f61d2c8ba79f - prometheus_node_exporter_service: eab71712-17b3-4338-911b-d976570359dc - - tasks: - - name: Install python for Ansible (Ubuntu) - apt: - update_cache: yes - name: pip - become: true - changed_when: false - when: ansible_distribution == "Ubuntu" - - - name: Install python for Ansible (CentOS 8) - raw: yum install -y python38 tar && yum remove -y python36 - become: true - changed_when: false - when: ansible_distribution == "CentOS" - - - include_role: - name: "setup" - - - include_role: - name: "configure-firewall" - - # prometheus service - - block: - - set_fact: - stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" - - name: "Include manage-service" - include_role: - name: "manage-service" - vars: - stereum_args: - manage_service: - save: true - state: started - configuration: - service: PrometheusService - id: "{{ prometheus_service }}" - image: "prom/prometheus:{{ stereum_static.defaults.versions.prometheus }}" - ports: - - 127.0.0.1:9090:9090/tcp - env: {} - command: sh -c "/bin/prometheus --config.file=/etc/prometheus/prometheus.yml --web.enable-lifecycle" - entrypoint: [] - user: "2000" - volumes: - - "/opt/app/services/{{ prometheus_service }}/data/prometheus:/prometheus" - - "/opt/app/services/{{ prometheus_service }}/config:/etc/prometheus" - network: prater - - # prometheus node exporter service - - block: - - set_fact: - stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" - - name: "Include manage-service" - include_role: - name: "manage-service" - vars: - stereum_args: - manage_service: - save: true - state: started - configuration: - service: PrometheusNodeExporterService - id: "{{ prometheus_node_exporter_service }}" - image: "prom/node-exporter:{{ stereum_static.defaults.versions.node_exporter }}" - ports: [] - env: {} - command: ["--path.rootfs=/host"] - entrypoint: ["/bin/node_exporter"] - user: "2000" - volumes: - - /:/host:ro,rslave - network: prater diff --git a/controls/roles/manage-service/molecule/notifications/verify.yml b/controls/roles/manage-service/molecule/notifications/verify.yml deleted file mode 100644 index f493f9f9df..0000000000 --- a/controls/roles/manage-service/molecule/notifications/verify.yml +++ /dev/null @@ -1,43 +0,0 @@ ---- -- name: Verify - hosts: all - gather_facts: false - tasks: - - uri: - url: http://localhost:3000/api/alertmanager/grafana/config/api/v1/alerts - body_format: json - register: alertmanager_list - - debug: - msg: "{{ alertmanager_list }}" - - assert: - that: - - alertmanager_list.json.alertmanager_config.receivers | selectattr("name", "equalto", "stereum-notifier") | list | length == 1 - - shell: docker ps - register: stereum_docker_ps - - debug: - msg: "{{ stereum_docker_ps }}" - - assert: - that: - - stereum_docker_ps.stdout.find("grafana/grafana") != -1 - - stereum_docker_ps.stdout.find("prom/prometheus") != -1 - - stereum_docker_ps.stdout.find("stereum/notifications") != -1 - - stereum_docker_ps.stdout.find("prom/node-exporter") != -1 - - (stereum_docker_ps.stdout|regex_findall("Up")|length) == 4 - - docker_container_info: - name: stereum-1738844e-3164-47de-85a8-ac7d07f2ee31 - register: notification_container - - debug: - msg: "{{ notification_container }}" - - assert: - that: - - notification_container.container.NetworkSettings.Networks.stereum.Aliases is search("notifications") - - - stat: path=/opt/app/services/62aa1873-7b62-410b-ae8e-2cd8615165b9/grafana/provisioning/alerting/HardwareAlerts.yaml - register: grafana_alerts - - debug: - msg: "{{ grafana_alerts }}" - - name: Check for grafana alert files - assert: - that: - - grafana_alerts.stat.exists -# EOF diff --git a/controls/roles/manage-service/tasks/configure-grafana.yml b/controls/roles/manage-service/tasks/configure-grafana.yml deleted file mode 100644 index 3fa744df4c..0000000000 --- a/controls/roles/manage-service/tasks/configure-grafana.yml +++ /dev/null @@ -1,34 +0,0 @@ -- name: Check if stereum-notifier contact point exists - uri: - url: "http://localhost:3000/api/v1/provisioning/contact-points" - method: GET - return_content: yes - status_code: 200 - register: contact_points - until: contact_points.status is defined and contact_points.status == 200 - retries: 5 - delay: 2 - -- name: Ensure stereum-notifier contact point exists - uri: - url: "http://localhost:3000/api/v1/provisioning/contact-points" - method: POST - body_format: json - headers: - Content-Type: application/json - body: | - { - "name": "stereum-notifier", - "type": "webhook", - "settings": { - "url": "http://notifications:3000/api/webhooks/grafana", - "httpMethod": "POST", - "uploadImage": false - } - } - status_code: 202 - register: _wait_result - until: _wait_result.status is defined and _wait_result.status == 202 - retries: 5 - delay: 2 - when: "'stereum-notifier' not in contact_points.content" diff --git a/controls/roles/manage-service/tasks/main.yml b/controls/roles/manage-service/tasks/main.yml index 25814b2544..d6fb8a507f 100644 --- a/controls/roles/manage-service/tasks/main.yml +++ b/controls/roles/manage-service/tasks/main.yml @@ -183,10 +183,4 @@ stereum_service_configuration.image is match("prom/prometheus:*") and (stereum.manage_service.state == "started" or stereum.manage_service.state == "restarted") - - include_tasks: configure-grafana.yml - when: > - stereum_service_configuration.image is match("grafana/grafana:*") and - (stereum.manage_service.state == "started" or stereum.manage_service.state == "restarted") and - stereum_service_configuration.overwrite | default(true) - when: stereum.manage_service.state is defined diff --git a/controls/roles/update-changes/molecule/243/converge.yml b/controls/roles/update-changes/molecule/243/converge.yml new file mode 100644 index 0000000000..3f84cb4a24 --- /dev/null +++ b/controls/roles/update-changes/molecule/243/converge.yml @@ -0,0 +1,10 @@ +--- +- name: Converge + hosts: all + vars_files: + - ../../../../defaults/stereum_defaults.yaml + + tasks: + - name: "Include update-changes" + include_role: + name: "update-changes" diff --git a/controls/roles/manage-service/molecule/notifications/create.yml b/controls/roles/update-changes/molecule/243/create.yml similarity index 88% rename from controls/roles/manage-service/molecule/notifications/create.yml rename to controls/roles/update-changes/molecule/243/create.yml index c0bccae41e..b39bd9e1a1 100644 --- a/controls/roles/manage-service/molecule/notifications/create.yml +++ b/controls/roles/update-changes/molecule/243/create.yml @@ -52,16 +52,6 @@ retries: 300 with_items: "{{ server.results }}" - - name: Attach Server to Subnetwork(s) - hcloud_server_network: - network: "{{ item.network.name }}" - server: "{{ item.name }}" - ip: "{{ item.network.ip }}" - api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" - state: "present" - loop: "{{ molecule_yml.platforms }}" - when: molecule_yml.platforms is search('network') - - name: Populate instance config dict set_fact: instance_conf_dict: { diff --git a/controls/roles/manage-service/molecule/notifications/destroy.yml b/controls/roles/update-changes/molecule/243/destroy.yml similarity index 95% rename from controls/roles/manage-service/molecule/notifications/destroy.yml rename to controls/roles/update-changes/molecule/243/destroy.yml index c43b533082..3a5a8a2465 100644 --- a/controls/roles/manage-service/molecule/notifications/destroy.yml +++ b/controls/roles/update-changes/molecule/243/destroy.yml @@ -42,7 +42,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/manage-service/molecule/notifications/molecule.yml b/controls/roles/update-changes/molecule/243/molecule.yml similarity index 63% rename from controls/roles/manage-service/molecule/notifications/molecule.yml rename to controls/roles/update-changes/molecule/243/molecule.yml index 5d9d67231a..7cc637260c 100644 --- a/controls/roles/manage-service/molecule/notifications/molecule.yml +++ b/controls/roles/update-changes/molecule/243/molecule.yml @@ -4,14 +4,9 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--notifications--ubuntu-22.04" - hostname: ubuntu + - name: "update-changes--2.4.3--ubuntu-24.04" server_type: cx22 - image: ubuntu-22.04 -# - name: "manage-service--notifications--centos-stream-8" -# hostname: "centos" -# server_type: cx22 -# image: centos-stream-8 + image: ubuntu-24.04 provisioner: name: ansible config_options: @@ -29,6 +24,6 @@ scenario: - create - prepare - converge - #- idempotence + - idempotence - verify - destroy diff --git a/controls/roles/update-changes/molecule/243/playbook.yml b/controls/roles/update-changes/molecule/243/playbook.yml new file mode 100644 index 0000000000..710c596cf6 --- /dev/null +++ b/controls/roles/update-changes/molecule/243/playbook.yml @@ -0,0 +1,7 @@ +--- +- name: Converge + hosts: all + tasks: + - name: "Include update-changes" + include_role: + name: "update-changes" diff --git a/controls/roles/update-changes/molecule/243/prepare.yml b/controls/roles/update-changes/molecule/243/prepare.yml new file mode 100644 index 0000000000..e022c61908 --- /dev/null +++ b/controls/roles/update-changes/molecule/243/prepare.yml @@ -0,0 +1,59 @@ +--- +- name: Prepare + hosts: all + roles: + - role: "../" + vars_files: + - ../../../../defaults/stereum_defaults.yaml + + tasks: + - name: Install python for Ansible (Ubuntu) + apt: + update_cache: yes + name: pip + state: present + become: true + changed_when: false + when: ansible_distribution == "Ubuntu" + + - name: Install python for Ansible (CentOS 8) + raw: yum install -y python38 tar && yum remove -y python36 + become: true + changed_when: false + when: ansible_distribution == "CentOS" + + - include_role: + name: "setup" + + - include_role: + name: "configure-firewall" + + - name: "Include manage-service" + block: + - name: set id for notification service + set_fact: + notification_service: "1738844e-3164-47de-85a8-ac7d07f2ee31" + - set_fact: + stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" + - name: "Include manage-service" + include_role: + name: "manage-service" + vars: + stereum_args: + manage_service: + save: true + state: started + configuration: + service: NotificationService + id: "1738844e-3164-47de-85a8-ac7d07f2ee31" + image: "stereum/notifications:v1.1.0" + env: + STEREUM_SERVER_URL: https://notifications.stereum.cloud + PORT: "3000" + QRCODE_FILENAME: /opt/app/qrcode/qrcode.png + STEREUM_APIKEY: "FOO_BAR" + KEY_FILENAME: /opt/app/qrcode/keys.json + user: "2000" + volumes: + - "/opt/stereum/notification-1738844e-3164-47de-85a8-ac7d07f2ee31/qrcode:/opt/app/qrcode/" + network: prater diff --git a/controls/roles/update-changes/molecule/243/verify.yml b/controls/roles/update-changes/molecule/243/verify.yml new file mode 100644 index 0000000000..51e7890a4c --- /dev/null +++ b/controls/roles/update-changes/molecule/243/verify.yml @@ -0,0 +1,32 @@ +--- +- name: Verify + hosts: all + gather_facts: false + tasks: + # config + - find: path=/etc/stereum/services + register: stereum_services_dir + - debug: + msg: "{{ stereum_services_dir }}" + - assert: + that: + - stereum_services_dir.matched == 0 + + # docker container + - shell: docker ps -a + register: stereum_docker_ps + - debug: + msg: "{{ stereum_docker_ps }}" + - assert: + that: + - "'stereum/notifications' not in stereum_docker_ps.stdout" + + # data dir + - stat: path=/opt/stereum/notification-1738844e-3164-47de-85a8-ac7d07f2ee31 + register: notification_data_dir + - debug: + msg: "{{ notification_data_dir }}" + - assert: + that: + - notification_data_dir.stat.exists == false +# EOF diff --git a/controls/roles/update-changes/tasks/2.4.3/remove_notifiations.yaml b/controls/roles/update-changes/tasks/2.4.3/remove_notifiations.yaml new file mode 100644 index 0000000000..f37ee4e296 --- /dev/null +++ b/controls/roles/update-changes/tasks/2.4.3/remove_notifiations.yaml @@ -0,0 +1,16 @@ +--- +- name: Read service file + slurp: + src: "{{ config_file.path }}" + register: service_configuration_raw + +- name: Parse service's configuration + set_fact: + service_configuration: "{{ service_configuration_raw['content'] | b64decode | from_yaml }}" + +- name: Remove Notification Service if present + when: service_configuration.service == "NotificationService" + include_role: + name: delete-service + vars: + service: "{{ service_configuration.id }}" diff --git a/controls/roles/update-changes/tasks/2.4.3/updates-243.yaml b/controls/roles/update-changes/tasks/2.4.3/updates-243.yaml new file mode 100644 index 0000000000..8c6423fc9b --- /dev/null +++ b/controls/roles/update-changes/tasks/2.4.3/updates-243.yaml @@ -0,0 +1,11 @@ +--- +- name: Find service configs + find: + paths: "/etc/stereum/services" + register: service_config_files + +- name: Include Notification Service Removal + include_tasks: remove_notifiations.yaml + loop: "{{ service_config_files.files }}" + loop_control: + loop_var: config_file diff --git a/controls/roles/update-changes/tasks/main.yml b/controls/roles/update-changes/tasks/main.yml index 06c1ed921e..83870dc065 100644 --- a/controls/roles/update-changes/tasks/main.yml +++ b/controls/roles/update-changes/tasks/main.yml @@ -9,4 +9,8 @@ - name: Include 2.4.2 Update Scripts include_tasks: "2.4.2/updates-242.yaml" ignore_errors: yes + +- name: Include 2.4.3 Update Scripts + include_tasks: "2.4.3/updates-243.yaml" + ignore_errors: yes # EOF diff --git a/launcher/src/backend/ConfigManager.js b/launcher/src/backend/ConfigManager.js index fe002b36e0..1c5ebe1a56 100644 --- a/launcher/src/backend/ConfigManager.js +++ b/launcher/src/backend/ConfigManager.js @@ -7,7 +7,7 @@ export class ConfigManager { this.nodeConnection = nodeConnection; this.serviceManager = null; this.multiSetupPath = "/etc/stereum/multisetup.yaml"; - this.commonServices = ["PrometheusService", "GrafanaService", "PrometheusNodeExporterService", "NotificationService"]; + this.commonServices = ["PrometheusService", "GrafanaService", "PrometheusNodeExporterService"]; } setServiceManager(serviceManager) { this.serviceManager = serviceManager; diff --git a/launcher/src/backend/Monitoring.js b/launcher/src/backend/Monitoring.js index a67ddc1977..517d8862ef 100755 --- a/launcher/src/backend/Monitoring.js +++ b/launcher/src/backend/Monitoring.js @@ -2,7 +2,6 @@ import { ServiceManager } from "./ServiceManager"; import { ValidatorAccountManager } from "./ValidatorAccountManager"; import { StringUtils } from "./StringUtils.js"; import { SSHService } from "./SSHService.js"; -import * as QRCode from "qrcode"; import * as log from "electron-log"; import * as crypto from "crypto"; import * as fs from "fs"; @@ -104,19 +103,6 @@ export class Monitoring { } } - async getQRCode() { - const services = await this.serviceManager.readServiceConfigurations(); - const notifyService = services.find((s) => s.service === "NotificationService"); - if (notifyService) { - const volume = notifyService.volumes.find((v) => v.servicePath == "/opt/app/qrcode"); - if (volume && volume.destinationPath) { - const data = await this.nodeConnection.sshService.exec(`cat ${volume.destinationPath}/keys.json`); - if (data.stdout) return await QRCode.toDataURL(data.stdout); - } - } - return new Error("Couldn't read QRCode Data"); - } - async checkStereumInstallation(nodeConnection) { if (!nodeConnection) { nodeConnection = this.nodeConnection; diff --git a/launcher/src/backend/OneClickInstall.js b/launcher/src/backend/OneClickInstall.js index ec4d393458..66d630e823 100755 --- a/launcher/src/backend/OneClickInstall.js +++ b/launcher/src/backend/OneClickInstall.js @@ -305,11 +305,6 @@ export class OneClickInstall { this.extraServices.push(this.serviceManager.getService("GrafanaService", args)); } - if (constellation.includes("NotificationService")) { - //NotificationService - this.extraServices.push(this.serviceManager.getService("NotificationService", args)); - } - if (constellation.includes("KeysAPIService")) { //KeysAPIService this.extraServices.push( @@ -673,7 +668,7 @@ export class OneClickInstall { this.clearSetup(); this.setup = setup; this.network = network; - let services = ["GrafanaService", "PrometheusNodeExporterService", "PrometheusService", "NotificationService"]; + let services = ["GrafanaService", "PrometheusNodeExporterService", "PrometheusService"]; // const selectedCC_VC = this.chooseClient(["PRYSM", "LIGHTHOUSE", "NIMBUS", "TEKU", "LODESTAR"]); const selectedCC_VC = (() => { @@ -711,7 +706,6 @@ export class OneClickInstall { "GrafanaService", "PrometheusNodeExporterService", "PrometheusService", - "NotificationService", ]; switch (setup) { @@ -727,9 +721,7 @@ export class OneClickInstall { services.push("FlashbotsMevBoostService", "CharonService"); break; case "stereum on arm": - services = services.filter( - (s) => !["GrafanaService", "PrometheusNodeExporterService", "PrometheusService", "NotificationService"].includes(s) - ); + services = services.filter((s) => !["GrafanaService", "PrometheusNodeExporterService", "PrometheusService"].includes(s)); break; case "archive": break; diff --git a/launcher/src/backend/ServiceManager.js b/launcher/src/backend/ServiceManager.js index cdcb401752..991e172a11 100755 --- a/launcher/src/backend/ServiceManager.js +++ b/launcher/src/backend/ServiceManager.js @@ -25,7 +25,6 @@ import { ServicePort, servicePortProtocol, changeablePorts } from "./ethereum-se 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"; @@ -164,8 +163,6 @@ export class ServiceManager { services.push(FlashbotsMevBoostService.buildByConfiguration(config)); } else if (config.service == "Web3SignerService") { 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") { @@ -1169,9 +1166,6 @@ export class ServiceManager { case "Web3SignerService": return Web3SignerService.buildByUserInput(args.network, [], args.installDir + "/web3signer"); - case "NotificationService": - return NotificationService.buildByUserInput(args.network, args.installDir + "/notification"); - case "MetricsExporterService": return MetricsExporterService.buildByUserInput(args.network); diff --git a/launcher/src/backend/ethereum-services/NotificationService.js b/launcher/src/backend/ethereum-services/NotificationService.js deleted file mode 100755 index 491e8c78f8..0000000000 --- a/launcher/src/backend/ethereum-services/NotificationService.js +++ /dev/null @@ -1,46 +0,0 @@ -import { NodeService } from "./NodeService.js"; -import { ServiceVolume } from "./ServiceVolume.js"; - -export class NotificationService extends NodeService { - static buildByUserInput(network, dir) { - const service = new NotificationService(); - service.setId(); - const workingDir = service.buildWorkingDir(dir); - - const image = "stereum/notifications"; - - const dataDir = "/opt/app/qrcode"; - - const volumes = [new ServiceVolume(workingDir + "/qrcode", dataDir)]; - - service.init( - "NotificationService", //service - service.id, // id, - 1, // configVersion - image, // image, - "v1.1.0", // imageVersion, - null, // command, - null, // entrypoint, - { - STEREUM_SERVER_URL: "https://notifications.stereum.cloud", - PORT: "3000", - QRCODE_FILENAME: dataDir + "/qrcode.png", - STEREUM_APIKEY: "4cTLZL8gcZ5knP49murPh2qaZSchryfHraHQHFDPuuA8jqJLrSdr7Bd4s4TSSVBW", - KEY_FILENAME: dataDir + "/keys.json", - }, // env, - [], // ports, - volumes, // volumes, - null, // user, - network // network, - ); - return service; - } - - static buildByConfiguration(config) { - const service = new NotificationService(); - - service.initByConfig(config); - - return service; - } -} diff --git a/launcher/src/background.js b/launcher/src/background.js index 3e7abc15fd..c6d82db2af 100755 --- a/launcher/src/background.js +++ b/launcher/src/background.js @@ -501,10 +501,6 @@ ipcMain.handle("getValidatorState", async (event, args) => { return await monitoring.getValidatorState(args); }); -ipcMain.handle("getQRCode", async () => { - return await monitoring.getQRCode(); -}); - ipcMain.handle("checkActiveValidators", async (event, args) => { return await validatorAccountManager.checkActiveValidators( args.files, diff --git a/launcher/src/components/UI/base-header/components/modals/NotifModal.vue b/launcher/src/components/UI/base-header/components/modals/NotifModal.vue index 1144ce27e2..1053fb72e1 100755 --- a/launcher/src/components/UI/base-header/components/modals/NotifModal.vue +++ b/launcher/src/components/UI/base-header/components/modals/NotifModal.vue @@ -2,7 +2,7 @@
-
+
{{ $t("notifModal.addNotif") }}
@@ -10,15 +10,7 @@ {{ $t("notifModal.chooseNotif") }}
    -
  • -
    - notif logo -
    -
    - {{ $t("notifModal.stereumMonitor") }} (Mobile App) -
    -
  • -
  • +
  • notif logo
    @@ -29,33 +21,6 @@
{{ $t("notifModal.close") }}
-
- -
-
- 1# {{ $t("notifModal.stepOne") }} - 2# {{ $t("notifModal.stepTwo") }} - 3# {{ $t("notifModal.stepThree") }} - 4# {{ $t("notifModal.stepFour") }} - 5# {{ $t("notifModal.stepFive") }} -
-
-
-
- -
-
-
-
- {{ $t("notifModal.close") }} -