-
Notifications
You must be signed in to change notification settings - Fork 104
feat(l1,l2): create Ansible automation script to deploy on servers without docker #3173
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?
Conversation
Lines of code reportTotal lines added: Detailed view
|
…exporter support for prometheus scraping.
…erts copy from local to remote.
ansible/inventory.ini
Outdated
@@ -0,0 +1,3 @@ | |||
[l1] | |||
35.163.105.41 ansible_python_interpreter=/usr/bin/python3 |
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.
Should this be here? Maybe the whole file should be gitignored?
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.
Yeah, i'll add the file to gitignore.
ansible/explorer_backend.yml
Outdated
- name: Clone Explorer repository | ||
git: | ||
repo: "{{ explorer_url }}" | ||
dest: "{{ explorer_dir }}" | ||
version: stable | ||
vars: | ||
ansible_ssh_user: app |
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.
Fails due to lack of permissions. Maybe explorer_url is expanded with the first user (admin)?
--eth.maximum-allowed-max-fee-per-gas {{ eth_max_allowed_fee_per_gas }} \ | ||
--eth.maximum-allowed-max-fee-per-blob-gas {{ eth_max_allowed_fee_per_blob_gas }} \ | ||
--committer.commit-time {{ committer_commit_time }} \ | ||
--eth.rpc-url {{ eth_testnet_rpc }} https://sepolia.infura.io/v3/{{ infura_api_key }} |
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.
Avoid hardcoding the network name
ansible/explorer_frontend.yml
Outdated
- name: Clone Explorer repository | ||
git: | ||
repo: "{{ explorer_url }}" | ||
dest: "{{ explorer_dir }}" | ||
version: stable | ||
force: yes |
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.
Fails with:
FAILED! => {"changed": false, "msg": "Failed to checkout branch stable", "rc": 1, "stderr": "Already on 'stable'\n\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting '.git/hooks/post-checkout'.\n\n", "stderr_lines": ["Already on 'stable'", "", "This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting '.git/hooks/post-checkout'.", ""], "stdout": "Your branch is up to date with 'origin/stable'.\n", "stdout_lines": ["Your branch is up to date with 'origin/stable'."]}
ansible/metrics.yml
Outdated
local: "{{ playbook_dir }}/../crates/blockchain/metrics/provisioning/grafana_provisioning/" | ||
remote: "/etc/grafana/provisioning/" | ||
alerts: | ||
local: "{{ playbook_dir }}/../crates/blockchain/metrics/provisioning/grafana_provisioning/alerting" |
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 metrics folder was moved to the root directory.
[Service] | ||
ExecStart=/usr/local/bin/yarn start | ||
|
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.
Fails because no working directory is set.
ansible/metrics.yml
Outdated
- name: Reset connection | ||
meta: reset_connection | ||
|
||
- name: Check if Grafana is installed |
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.
Can fail if the ssh server hasn't started yet
Description
Deploy Ethrex automatically, for servers