Skip to content

Commit

Permalink
Merge pull request #31 from trento-project/improve-docs
Browse files Browse the repository at this point in the history
Improve general docs
  • Loading branch information
rtorrero authored Apr 22, 2024
2 parents 769bfa0 + b774840 commit 6e88da0
Show file tree
Hide file tree
Showing 15 changed files with 283 additions and 222 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,5 @@ poetry.toml
# End of https://www.toptal.com/developers/gitignore/api/python,ansible,vagrant

extra-vars.json
inventory*
/inventory*
/vars.json
363 changes: 142 additions & 221 deletions README.md

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions examples/dedicated-nodes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
This example portrays a configuration where all nodes are deployed on different machines. In this deployment:
- `vitellone` is the hostname where `trento-server` gets deployed
- `vitellone-pg` is where `postgres` gets deployed
- `vitellone-mq` is where `rabbitmq` gets deployed
- `vitellone-metrics` is where `prometheus` gets deployed

Agent nodes are *not* deployed with this configuration.
22 changes: 22 additions & 0 deletions examples/dedicated-nodes/inventory.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
all:
children:
trento-server:
hosts:
vitellone:
ansible_host: "your-host"
ansible_user: "your-user"
postgres-hosts:
hosts:
vitellone-pg:
ansible_host: "your-host"
ansible_user: "your-user"
rabbitmq-hosts:
hosts:
vitellone-mq:
ansible_host: "your-host"
ansible_user: "your-user"
prometheus-hosts:
hosts:
vitellone-metrics:
ansible_host: "your-host"
ansible_user: "your-user"
11 changes: 11 additions & 0 deletions examples/dedicated-nodes/vars.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"web_postgres_host": "vitellone-pg",
"wanda_postgres_host": "vitellone-pg",
"rabbitmq_host": "vitellone-mq:5671",
"web_postgres_password": "pass",
"wanda_postgres_password": "wanda",
"rabbitmq_password": "trento",
"prometheus_url": "http://localhost:9090",
"web_admin_password": "adminpassword",
"trento_server_name": "yourserver.com"
}
3 changes: 3 additions & 0 deletions examples/external-services/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This example portrays a configuration where only `trento-server` is deployed, while the configuration points to external services outside of the
scope of this playbook. In this deployment:
- `vitellone` is the hostname where `trento-server` gets deployed
7 changes: 7 additions & 0 deletions examples/external-services/inventory.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
all:
children:
trento-server:
hosts:
vitellone:
ansible_host: "your-host"
ansible_user: "your-user"
16 changes: 16 additions & 0 deletions examples/external-services/vars.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"web_postgres_password": "trentoansible1",
"wanda_postgres_password": "trentoansible1",
"web_postgres_host": "yourexternalpg.com",
"wanda_postgres_host": "yourexternalpg.com",
"rabbitmq_host": "yourexternalrabbit.com:5671",
"rabbitmq_password": "trentoansible1",
"web_postgres_user": "postgres",
"wanda_postgres_user": "postgres",
"rabbitmq_username": "trentoansible",
"prometheus_url": "http://localhost:9090",
"web_admin_password": "adminpassword",
"trento_server_name": "your-servername.com",
"nginx_ssl_cert": "-----BEGIN CERTIFICATE-----\nMIIEKTCCAxGgAwIBAgIUbIzbLpJrkKk8vs1oLzFDpPL...",
"nginx_ssl_key": "-----BEGIN CERTIFICATE-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDNdvcVnqJAY32h..."
}
5 changes: 5 additions & 0 deletions examples/install-agents/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
This example portrays the deployment of some agent nodes. In this deployment:
- hana01: Agent deployment
- hana02: Agent deployment

In order to use this deployment, first install a `trento-server` instance to obtain an API key and set it in the `vars.json`. Nothing else is deployed.
9 changes: 9 additions & 0 deletions examples/install-agents/inventory.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
all:
children:
agents:
hana01:
ansible_host: "your-hana01-host"
ansible_user: root
hana02:
ansible_host: "your-hana02-host"
ansible_user: root
5 changes: 5 additions & 0 deletions examples/install-agents/vars.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"trento_server_url:": "http://localhost",
"rabbitmq_host": "localhost",
"trento_api_key": "api-key-obtained-from-server"
}
9 changes: 9 additions & 0 deletions examples/single-node/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
This example portrays a single-node configuration, where all nodes are deployed on the same machine. In this deployment:
- `vitellone` is the hostname where `trento-server` gets deployed

Agent nodes are *not* deployed with this configuration.

Two variants are available:
- vars-with-alerting.json: In this example, we set up alerting and set the SMTP configuration. Alerts should arrive at the
provided email.
- vars.json: No alerting enabled.
22 changes: 22 additions & 0 deletions examples/single-node/inventory.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
all:
children:
trento-server:
hosts:
vitellone:
ansible_host: "your-host"
ansible_user: "your-user"
postgres-hosts:
hosts:
vitellone:
ansible_host: "your-host"
ansible_user: "your-user"
rabbitmq-hosts:
hosts:
vitellone:
ansible_host: "your-host"
ansible_user: "your-user"
prometheus-hosts:
hosts:
vitellone:
ansible_host: "your-host"
ansible_user: "your-user"
15 changes: 15 additions & 0 deletions examples/single-node/vars-with-alerting.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"web_postgres_password": "pass",
"wanda_postgres_password": "wanda",
"rabbitmq_password": "trento",
"prometheus_url": "http://localhost:9090",
"web_admin_password": "adminpassword",
"trento_server_name": "your-server-name",
"enable_alerting": "true",
"alert_sender": "alert-sender-mail",
"alert_recipient": "alert-receiver-mail",
"smtp_server": "smtp-server-adress",
"smtp_port": "smpt-port",
"smtp_user": "smtp-user",
"smtp_password": "smtp-password"
}
8 changes: 8 additions & 0 deletions examples/single-node/vars.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"web_postgres_password": "pass",
"wanda_postgres_password": "wanda",
"rabbitmq_password": "trento",
"prometheus_url": "http://localhost:9090",
"web_admin_password": "adminpassword",
"trento_server_name": "your-server-name"
}

0 comments on commit 6e88da0

Please sign in to comment.