Skip to content

Commit

Permalink
Merge pull request #72 from fabric-testbed/rcbeta7
Browse files Browse the repository at this point in the history
Rcbeta7
  • Loading branch information
cscarp authored Mar 21, 2023
2 parents 22bbd51 + 4eb2a97 commit dad2819
Show file tree
Hide file tree
Showing 143 changed files with 2,776 additions and 17,945 deletions.
42 changes: 1 addition & 41 deletions instrumentize/ansible/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,52 +31,12 @@ Tip: If you need to acces multiple racks at the same time try: `ssh -L 100,rack_
-----
## Install Fabric Central Monitoring



* Run `ansible-playbook playbook_get_fabric_deployment_files.yml`. This will download the fabric-hosts and vars file from fabric-deployment repo and place them into `tmp_deployment_files` directory.
* Install using the following. If you do not have an ansible config file you will need to add `--vault-password-file <vault_password_file>`
* For central metrics `ansible-playbook -i tmp_deployment_files/fabric-hosts playbook_fabric_central_install.yml --diff`
* For dev central metrics `ansible-playbook -i tmp_deployment_files/fabric-hosts playbook_fabric_dev_central_install.yml --diff`
* Once you are done you may remove the downloaded files using `ansible-playbook playbook_remove_fabric_deploymnet_files.yml`. Be cautious not to remove any hosts or variable files you created or altered.
* Once you are done you may remove the downloaded files deleting the `instrumentize/ansible/temp_deployment_files` directory. Be cautious not to remove any hosts or variable files you created or altered.


-----
## Install Prometheus Monitoring on a GENI Slice

### Initial Testing Instructions
These instructions are for testing and assume you have access to a slice with public ips, you have your GENI key, and you have created the private_vars files.

Need to create the inventory file for the GENI slice and the corresponding variables file. Use the resulting geni_slice_hosts.ini and geni_slice_vars to install the system to the slice.

To install from a machine on which you have geni keys use:

* Install Everything `ansible-playbook --key-file "~/.ssh/id_geni_ssh_rsa" -i hosts/geni_slice_hosts.ini --extra-vars "@private_vars/geni_slice_vars.yml" playbook_geni_slice_install.yml --diff`

* Install Just the Monitor `ansible-playbook --key-file "~/.ssh/id_geni_ssh_rsa" -i hosts/geni_slice_hosts.ini --extra-vars "@private_vars/geni_slice_vars.yml" playbook_geni_slice_install.yml --diff --tags monitor`

* Install Just the Exporters `ansible-playbook --key-file "~/.ssh/id_geni_ssh_rsa" -i hosts/geni_slice_hosts.ini --extra-vars "@private_vars/geni_slice_vars.yml" playbook_geni_slice_install.yml --diff --tags exporters`

### GENI test after ansible scripts are run.
#### Prometheus
Go to the monitor node's Prometheus web UI at https://<monitor_node_ip>:9090
You will have to type in the username and password that you set in the variable file.
Click on the "Status" drop down and choose "Targets". Assuming the system has been up for a few minutes all of the target's state should be a green UP.
Click on the "Graph" link and type "up" in the search box. Click "Execute". You should see a ping job for each node, a node jobe for each node and then the docker adn prometheus jobs.

#### Grafana
Go to the Grafana web UI at https://<monitor_node_ip>/grafana
Type in "admin" for the user and the password you set in the variables file.
Click on the compass icon to the left to open the Explore page. Type "up" for the metrics query the click "Run Query". You should see the same list you saw in the Prometheus test.
Hover over the four squares icon and click Manage. Click Import. Type in "1860" and click "Load". Keep defaults but Choose "Prometheus" as the datascource in the bottom drop down. Click "Import".
Now in your Dashboards list you will See "Node Exporter Full". Open the dashboard and see if the drop down for the "Hosts" has all of the nodes for the slice.
#### Check status on Monitor node
SSH into the monitor node. Type `docker ps` to see if all the containers are running. Depending on your install variable you should have:
* prometheus
* grafana
* nginx
* blackbox
* docker_exporter

This should match what results when you run the query "docker_container_running_state" on the Explore page in Grafana.

-----
17 changes: 0 additions & 17 deletions instrumentize/ansible/playbook_complete_fabric_rack_install.yml

This file was deleted.

2 changes: 1 addition & 1 deletion instrumentize/ansible/playbook_fabric_central_install.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# Creating the Fabric Central monitoring setup.
- hosts: metrics
- hosts: metrics-p

roles:
- ../prometheus/ansible/roles/fabric_central
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
# Creating the Fabric Central Minio object store setup.
- hosts: ping-plus
roles:
- ../prometheus/ansible/roles/fabric_ping_plus

# moved to host file
# vars:
# install_name: ping-plus

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
# Creating the Fabric Dev Central monitoring setup.
- hosts: dev-metrics
- hosts: metrics-b

roles:
- ../prometheus/ansible/roles/fabric_central

# vars_files:
# - tmp_deployment_files/monitoring/private_vars/dev_central_vars.yml

This file was deleted.

11 changes: 11 additions & 0 deletions instrumentize/ansible/playbook_fabric_minio_backup_install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
# Creating the Fabric Central Minio Backup object store setup.
- hosts: minio-b

roles:
- ../minio/ansible/roles/central

# moved to hosts file
# vars:
# install_name: minio_b

11 changes: 11 additions & 0 deletions instrumentize/ansible/playbook_fabric_minio_production_install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
# Creating the Fabric Central Minio Production object store setup.
- hosts: minio-p

roles:
- ../minio/ansible/roles/central

# moved to hosts file
# vars:
# install_name: minio_p

11 changes: 11 additions & 0 deletions instrumentize/ansible/playbook_fabric_thanos_compactor_install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
# Creating the Fabric Central Minio Production object store setup.
- hosts: compactor-p

roles:
- ../prometheus/ansible/roles/fabric_compactor

# moved to hosts file
# vars:
# install_name: compactor

This file was deleted.

35 changes: 0 additions & 35 deletions instrumentize/ansible/playbook_geni_slice_install.yml

This file was deleted.

16 changes: 0 additions & 16 deletions instrumentize/ansible/playbook_remove_fabric_deployment_files.yml

This file was deleted.

16 changes: 0 additions & 16 deletions instrumentize/ansible/playbook_remove_fabric_hosts.yml

This file was deleted.

14 changes: 14 additions & 0 deletions instrumentize/minio/ansible/roles/central/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#ansible_python_interpreter: /usr/bin/python3


docker_network_name: "{{ install_name }}"
base_data_dir: "/opt/data/{{ install_name }}"
base_install_dir: "/opt/{{ install_name }}"

# Mount of data drive only has to be done the first time a VM is setup
mount_data_drive: no
minio_username: fab_minio


minio_port: 9000
minio_console_port: 9099
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Setup data dir
- name: Create Data Directory
file:
path: /opt/data
recurse: yes
state: directory
mode: 0755
owner: 0
group: 0
become: yes

- name: Create Data Partition
community.general.parted:
device: /dev/vdb
number: 1
state: present
fs_type: ext4
label: gpt
become: yes

- name: Create a ext4 filesystem on /dev/vdb1
community.general.filesystem:
fstype: ext4
dev: /dev/vdb1
state: present
become: yes

- name: Mount As /opt/data
ansible.posix.mount:
path: /opt/data
src: /dev/vdb1
fstype: ext4
state: mounted
become: yes
Loading

0 comments on commit dad2819

Please sign in to comment.