Skip to content
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

Change hetzner module name #341

Merged
merged 2 commits into from
Sep 19, 2024

Conversation

DaMandal0rian
Copy link
Contributor

@DaMandal0rian DaMandal0rian commented Sep 19, 2024

PR Type

enhancement


Description

  • Changed module source path from hetzner to ovh in main.tf.
  • Added Terraform configuration files for OVH, including backend, outputs, and variables.
  • Introduced provisioning scripts for various node types: bootstrap, domain, farmer, and general nodes.
  • Configured SSH connections and Docker installations for node setup.
  • Defined output variables for node IPv4 addresses and operator peer multiaddr.

Changes walkthrough 📝

Relevant files
Configuration changes
1 files
backend.tf
Add Terraform cloud configuration for OVH resources           

resources/ovh/backend.tf

  • Added Terraform cloud configuration for organization subspace-sre.
  • Defined workspace name using variable workspace_name.
  • +10/-1   
    Enhancement
    10 files
    main.tf
    Update module source path to OVH                                                 

    resources/ovh/main.tf

    • Updated module source path from hetzner to ovh.
    +1/-1     
    outputs.tf
    Define outputs for node IPv4 addresses and operator peer 

    resources/ovh/outputs.tf

  • Added multiple output variables for node IPv4 addresses.
  • Included operator peer multiaddr output.
  • +31/-1   
    variables.tf
    Update default private key path to OVH                                     

    resources/ovh/variables.tf

    • Changed default private_key_path from hetzner to ovh.
    +1/-1     
    bootstrap_node_domain_provisioner.tf
    Add provisioning for bootstrap nodes in domain                     

    templates/terraform/ovh/bootstrap_node_domain_provisioner.tf

  • Added resources to set up, prune, and start bootstrap nodes for
    domain.
  • Included SSH connection configuration and Docker setup.
  • +178/-1 
    bootstrap_node_provisioner.tf
    Add provisioning for bootstrap nodes                                         

    templates/terraform/ovh/bootstrap_node_provisioner.tf

  • Added resources to set up, prune, and start bootstrap nodes.
  • Configured SSH connection and Docker installation.
  • +164/-1 
    domain_node_provisioner.tf
    Add provisioning for domain nodes                                               

    templates/terraform/ovh/domain_node_provisioner.tf

  • Added resources to set up, prune, and start domain nodes.
  • Configured SSH connection and Docker installation.
  • +179/-1 
    farmer_node_provisioner.tf
    Add provisioning for farmer nodes                                               

    templates/terraform/ovh/farmer_node_provisioner.tf

  • Added resources to set up, prune, and start farmer nodes.
  • Configured SSH connection and Docker installation.
  • +170/-1 
    node_provisioner.tf
    Add provisioning for nodes                                                             

    templates/terraform/ovh/node_provisioner.tf

  • Added resources to set up, prune, and start nodes.
  • Configured SSH connection and Docker installation.
  • +166/-1 
    outputs.tf
    Define outputs for node IPv4 addresses                                     

    templates/terraform/ovh/outputs.tf

    • Added output variables for various node IPv4 addresses.
    +25/-1   
    variables.tf
    Define variables for OVH Terraform templates                         

    templates/terraform/ovh/variables.tf

  • Defined variables for network, scripts, and node configurations.
  • Included sensitive variable for tf_token.
  • +121/-1 

    💡 PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    Copy link

    PR Reviewer Guide 🔍

    ⏱️ Estimated effort to review: 4 🔵🔵🔵🔵⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Key issues to review

    Module Path Change
    The module source path change from 'hetzner' to 'ovh' should be thoroughly tested to ensure that all dependencies and configurations are correctly aligned with the new infrastructure provider.

    Security Concern
    The use of 'sudo' and direct manipulation of root directories in provisioning scripts can lead to security vulnerabilities if not properly managed and scoped.

    Hardcoded Paths
    The script paths and other configurations are hardcoded, which reduces flexibility and maintainability of the code. Consider using variables or configuration files.

    Error Handling
    There is no error handling in the remote-exec provisioners. It's crucial to handle potential errors during script execution to avoid runtime failures.

    Copy link

    github-actions bot commented Sep 19, 2024

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    @DaMandal0rian DaMandal0rian merged commit 0cdaefc into mainnet-testnet-infra Sep 19, 2024
    2 checks passed
    @DaMandal0rian DaMandal0rian deleted the change-hetzner-module-name branch September 19, 2024 11:28
    DaMandal0rian added a commit that referenced this pull request Sep 19, 2024
    * create child module for mainnet
    
    * create tfvars example
    
    * add provisioner scripts
    
    * changes to provisioner scripts
    
    * delete autoid bootstrap node script since will make reusable
    
    * rename to use one domain bootstrap node
    
    * change domain labels
    
    change label name
    
    * change LE directory path for certificate
    
    * rename files to indexer nodes
    
    * add root module for mainnet network primitives
    
    * dns changes
    
    * testnet network-primitives changes to labels
    
    * change provisioners to reuse the same domain compose scripts
    
    * create separate domain node provisioners and fix labels
    
    * hetzner module refactor
    
    * disable comments on resources
    
    * Change hetzner module name (#341)
    
    * change module name to ovh
    
    * rename hetzner to ovh
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    1 participant