-
Notifications
You must be signed in to change notification settings - Fork 2
09 10 feat sparkles adds xai service #135
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
base: main
Are you sure you want to change the base?
Changes from all commits
b9fc3fe
3e3241c
996d7a7
24e1f24
f732952
f2a87b0
dc8c781
85e3578
9549458
eeec2f0
fc9a7e9
49ea448
f727759
f7bd70e
736614a
f5f8302
d418523
98bb1c1
d7e0c63
edabf38
c8a228e
bd9d2cc
bb922e2
57a60c6
ab576e7
61fb24c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| --- | ||
| xai_metrics_port: 33005 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,3 +8,4 @@ metrics_port: | |
| autonomi: 33002 | ||
| hychain: 33003 | ||
| storagechain: 33004 | ||
| xai: 33005 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| --- | ||
| xai_cmd: "{{ depin_cmd | default('install') }}" | ||
| xai_version: 1.1.14 | ||
| xai_download_url: "https://github.com/xai-foundation/sentry/releases/latest/download/sentry-node-cli-linux.zip" | ||
| xai_install_path: "/opt/xai/{{ xai_version }}" | ||
| xai_node_count: 1 | ||
| xai_node_port: 8545 | ||
|
|
||
| xai_programs: | ||
| - name: sentry-node-cli-linux | ||
| url: "{{ xai_download_url }}" | ||
| checksum: "" | ||
| install_path: "{{ xai_install_path }}" | ||
| symlink: /usr/local/bin/xai | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| --- | ||
| - name: Install programs using core.installer | ||
| ansible.builtin.include_role: | ||
| name: depin.core.installer | ||
| vars: | ||
| programs: "{{ xai_programs }}" | ||
|
|
||
| - name: Create program folder | ||
| become: true | ||
| ansible.builtin.file: | ||
| state: directory | ||
| owner: root | ||
| group: root | ||
| mode: '0755' | ||
| dest: "{{ item.install_path }}" | ||
| loop: "{{ xai_programs }}" | ||
|
|
||
| - name: Download binary to tmp | ||
| become: true | ||
| ansible.builtin.unarchive: | ||
| remote_src: true | ||
| src: "{{ item.url }}" | ||
| dest: /tmp | ||
| loop: "{{ xai_programs }}" | ||
| failed_when: false | ||
|
|
||
| - name: Find binary | ||
| become: true | ||
| ansible.builtin.find: | ||
| paths: | ||
| - /tmp | ||
| patterns: "{{ item.name }}" | ||
| use_regex: true | ||
| get_checksum: true | ||
| recurse: true | ||
| loop: "{{ xai_programs }}" | ||
| register: _downloads | ||
|
|
||
| - name: Install node | ||
| become: true | ||
| block: | ||
| - name: Copy required files | ||
| ansible.builtin.copy: | ||
| remote_src: true | ||
| src: "{{ (_downloads.results[loop.index0]['files'] | first).path }}" | ||
| dest: "{{ item.install_path }}" | ||
| mode: '0755' | ||
|
|
||
| - name: Symlink binary to path | ||
| become: true | ||
| ansible.builtin.file: | ||
| src: "{{ item.install_path }}/{{ item.name }}" | ||
| path: "{{ item.symlink }}" | ||
| mode: '0755' | ||
| owner: root | ||
| group: root | ||
| state: link | ||
| force: true | ||
| loop: "{{ xai_programs }}" | ||
|
|
||
| - name: Start node | ||
| ansible.builtin.include_tasks: | ||
| file: commands/start.yml |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| - name: Uninstall | ||
| ansible.builtin.include_tasks: commands/uninstall.yml | ||
|
|
||
| - name: Install | ||
| ansible.builtin.include_tasks: commands/install.yml | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| ## stop and start service | ||
| - name: Stop | ||
| ansible.builtin.include_tasks: commands/stop.yml | ||
|
|
||
| - name: Start | ||
| ansible.builtin.include_tasks: commands/start.yml |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing command There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can't do this without test license keys and wallet |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| --- | ||
| # Run the XAI Sentry Node CLI | ||
|
Comment on lines
+1
to
+2
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Spotted by Graphite Reviewer There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we have no license keys |
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing command There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can't do this without test license keys and wallet |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| --- | ||
| # Stop XAI Sentry Node service | ||
|
Comment on lines
+1
to
+2
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Spotted by Graphite Reviewer There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the same - without license keys impossible to write and check start/stop |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| --- | ||
| # Stop the service before uninstalling | ||
| - name: Disable systemd service | ||
| ansible.builtin.include_tasks: commands/stop.yml | ||
|
|
||
| # Remove the binary file for XAI Sentry Node | ||
| - name: Remove XAI Sentry Node work directory | ||
| file: | ||
| path: /opt/xai | ||
| state: absent | ||
|
|
||
| - name: Remove XAI Sentry Node binary | ||
| file: | ||
| path: /usr/local/bin/xai | ||
| state: absent | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| - name: XAI {{ xai_cmd }} | ||
| vars: | ||
| cmd_file: "{{ role_path }}/tasks/commands/{{ xai_cmd }}.yml" | ||
| when: cmd_file is file | ||
| ansible.builtin.include_tasks: | ||
| file: "{{ cmd_file }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
checksumfield is empty, which bypasses an important security check. Adding a SHA256 checksum for the XAI Sentry Node binary would protect against supply chain attacks and ensure binary integrity during downloads. Consider obtaining the official checksum from the XAI Foundation release page.Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.