-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(deployment): add Prometheus support for monitoring
Closes #337
- Loading branch information
1 parent
ec84a60
commit 713f63a
Showing
12 changed files
with
114 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Agoric testnet Deployment | ||
|
||
**NOTE: This private package does not create secure public testnets by default. We recommend that public validators use their own well-understood, diversified means of deployment.** | ||
|
||
You can use this package to configure privately-accessible testnets, such as on your local workstation's Docker, or a local-to-your organization LAN. | ||
|
||
If you want to create a publically-accessible testnet you will at least need to: | ||
|
||
1. Configure your nodes' firewalls so that only the necessary ports are accessible. | ||
2. Set up your provisioning server (node0) to expose the provisioner only on HTTPS with some form of authentication. | ||
3. **Do more, which we are not sure of** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ | |
gather_facts: yes | ||
strategy: free | ||
vars: | ||
- service: ag-chain-cosmos | ||
- NODEJS_VERSION: 12 | ||
roles: | ||
- prereq |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
|
||
- hosts: all | ||
user: root | ||
gather_facts: no | ||
strategy: free | ||
vars: | ||
- service: node-exporter | ||
- user: root | ||
- to_remove: | ||
- /etc/systemd/system/node-exporter.service | ||
roles: | ||
- stop | ||
- remove |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
|
||
- hosts: all | ||
user: root | ||
gather_facts: no | ||
strategy: free | ||
vars: | ||
- PROM_NODE_EXPORTER_VERSION: 0.18.1 | ||
- service: node-exporter | ||
- execline: /usr/local/sbin/node_exporter | ||
- chdir: / | ||
- user: root | ||
roles: | ||
- prometheus-prereq | ||
- install | ||
- stop | ||
- start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
packages/deployment/ansible/roles/prometheus-prereq/tasks/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
- name: Download Prometheus exporter | ||
delegate_to: localhost | ||
get_url: | ||
url: "https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-{{ PROM_NODE_EXPORTER_VERSION }}.linux-amd64.tar.gz" | ||
dest: "/root/node_exporter{{ PROM_NODE_EXPORTER_VERSION }}.tgz" | ||
|
||
- name: Extract Prometheus exporter | ||
delegate_to: localhost | ||
unarchive: | ||
src: "/root/node_exporter{{ PROM_NODE_EXPORTER_VERSION }}.tgz" | ||
dest: "/root" | ||
creates: "/root/node_exporter-{{ PROM_NODE_EXPORTER_VERSION }}.linux-amd64/node_exporter" | ||
|
||
- name: Install Prometheus exporter | ||
copy: | ||
src: "/root/node_exporter-{{ PROM_NODE_EXPORTER_VERSION }}.linux-amd64/node_exporter" | ||
dest: "/usr/local/sbin/node_exporter" | ||
mode: 0755 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
* to configure Prometheus endpoints on your deployed testnet nodes: | ||
1. for validator (i.e. Tendermint) on TCP port 26660 /metrics | ||
- to enable: `date | ag-chain-cosmos shell -c 'tee MYTESTNET/prometheus-tendermint.txt'` | ||
- takes effect on next `NETWORK_NAME=MYTESTNET ag-chain-cosmos bootstrap --bump` | ||
- to disable: `ag-chain-cosmos shell -c 'rm MYTESTNET/prometheus-tendermint.txt'` | ||
- takes effect on next `NETWORK_NAME=MYTESTNET ag-chain-cosmos bootstrap --bump` | ||
2. for host-level (i.e. node_exporter) on TCP port 9100 /metrics | ||
- to enable: `ag-chain-cosmos play prometheus-node-enable` | ||
- to disable: `ag-chain-cosmos play prometheus-node-disable` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
For each PR, add a file to this directory named $ISSUENUMBER.txt , and | ||
describe any downstream-visible changes in it (one per line). For libraries, | ||
this should include anything a developer using this library needs to know | ||
when they upgrade to the new version (API changes, new features, significant | ||
bugs fixed). If the PR only makes internal changes (refactorings, | ||
documentation updates), you should still add a file, but leave it empty. | ||
|
||
These files will be concatenated together and added to the NEWS.md file | ||
during the release process. Their filenames will be used to indicate which | ||
issues were closed in the release. | ||
|
||
See the top-level developer docs for more details. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters