Skip to content

Commit

Permalink
currently finishing gcs configurations (potentially)
Browse files Browse the repository at this point in the history
  • Loading branch information
Killpit committed Oct 2, 2024
1 parent fce68ed commit 8efb8d4
Show file tree
Hide file tree
Showing 4 changed files with 139 additions and 0 deletions.
34 changes: 34 additions & 0 deletions aleo/monitoring-server-terraform/gcs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
provider "google" {
project = "<YOUR_PROJECT_ID>"
region = "us-central1"
}
resource "google_storage_bucket" "elk_backup" {
name = "elk-backups-bucket"
location = "US"
force_destroy = true
}

resource "google_storage_bucket_object" "logstash_logs" {
name = "logstash_logs/latest_logstash_logs.tar.gz"
source = "/path/to/local/logstash/logs/latest_logstash_logs.tar.gz" # Path on your local machine where logs are stored
bucket = google_storage_bucket.elk_backup.name
content_type = "application/gzip"
}

resource "google_storage_bucket_object" "es_snapshots" {
name = "es_snapshots/latest_es_snapshot.tar.gz"
source = "/path/to/local/elasticsearch/snapshots/latest_es_snapshot.tar.gz" # Path on your local machine where snapshots are stored
bucket = google_storage_bucket.elk_backup.name
content_type = "application/gzip"
}

resource "google_storage_bucket_object" "kibana_dashboards" {
name = "kibana_dashboards/latest_kibana_dashboards.json"
source = "/path/to/local/kibana/dashboards/latest_kibana_dashboards.json" # Path on your local machine where dashboards are exported
bucket = google_storage_bucket.elk_backup.name
content_type = "application/json"
}

output "bucket_url" {
value = google_storage_bucket.elk_backup.url
}
42 changes: 42 additions & 0 deletions aleo/node-terraform/gcs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
resource "google_storage_bucket" "validator_backup" {
name = "aleo-backup" # Replace with a unique bucket name
location = "US" # Replace with your desired location

versioning {
enabled = true # Enable versioning for backups
}

lifecycle {
prevent_destroy = true # Prevent accidental deletion of the bucket
}
}

# Create a folder for Validator Keys
resource "google_storage_bucket_object" "validator_keys" {
name = "validator_keys/" # Folder for validator keys
bucket = google_storage_bucket.validator_backup.name
}

# Create a folder for Configuration Files
resource "google_storage_bucket_object" "config_files" {
name = "configuration_files/" # Folder for configuration files
bucket = google_storage_bucket.validator_backup.name
}

# Create a folder for Blockchain Data
resource "google_storage_bucket_object" "blockchain_data" {
name = "blockchain_data/" # Folder for blockchain data
bucket = google_storage_bucket.validator_backup.name
}

# Create a folder for Wallet Data
resource "google_storage_bucket_object" "wallet_data" {
name = "wallet_data/" # Folder for wallet data
bucket = google_storage_bucket.validator_backup.name
}

# Create a folder for Recovery Information
resource "google_storage_bucket_object" "recovery_info" {
name = "recovery_information/" # Folder for recovery information
bucket = google_storage_bucket.validator_backup.name
}
21 changes: 21 additions & 0 deletions mina/monitoring-server-terraform/gcs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
resource "google_storage_bucket" "static" {
name = "mina-monitoring"
location = "US"
storage_class = "STANDARD"

uniform_bucket_level_access = true
}

resource "google_storage_bucket_object" "prometheus_snapshot" {
name = "prometheus-snapshot.tar.gz"
source = "/path/to/snapshot.tar.gz"
content_type = "application/gzip"
bucket = "mina-monioring"
}

resource "google_storage_bucket_object" "grafana_dashboard" {
name = "grafana-dashboard.json"
source = "/path/to/dashboard.json"
content_type = "application/json"
bucket = "mina-monitoring"
}
42 changes: 42 additions & 0 deletions mina/node-terraform/gcs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
resource "google_storage_bucket" "validator_backup" {
name = "mina-backup" # Replace with a unique bucket name
location = "US" # Replace with your desired location

versioning {
enabled = true # Enable versioning for backups
}

lifecycle {
prevent_destroy = true # Prevent accidental deletion of the bucket
}
}

# Create a folder for Validator Keys
resource "google_storage_bucket_object" "validator_keys" {
name = "validator_keys/" # Folder for validator keys
bucket = google_storage_bucket.validator_backup.name
}

# Create a folder for Configuration Files
resource "google_storage_bucket_object" "config_files" {
name = "configuration_files/" # Folder for configuration files
bucket = google_storage_bucket.validator_backup.name
}

# Create a folder for Blockchain Data
resource "google_storage_bucket_object" "blockchain_data" {
name = "blockchain_data/" # Folder for blockchain data
bucket = google_storage_bucket.validator_backup.name
}

# Create a folder for Wallet Data
resource "google_storage_bucket_object" "wallet_data" {
name = "wallet_data/" # Folder for wallet data
bucket = google_storage_bucket.validator_backup.name
}

# Create a folder for Recovery Information
resource "google_storage_bucket_object" "recovery_info" {
name = "recovery_information/" # Folder for recovery information
bucket = google_storage_bucket.validator_backup.name
}

0 comments on commit 8efb8d4

Please sign in to comment.