Page MenuHomeSoftware Heritage

azure: Add new storage01.euwest.azure node
ClosedPublic

Authored by ardumont on Tue, Feb 4, 3:04 PM.

Details

Summary

In the end, this will replace the storage0.euwest
This will unify properly the current provisioning way of creating node in azure.

This will be a stepping stone to create a new storage02.euwest.azure which will serve as rpc servers for both search and cassandra storage.

Test Plan

terraform init
terraform plan

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # azurerm_network_interface.storage-interface[0] will be created
  + resource "azurerm_network_interface" "storage-interface" {
      + applied_dns_servers           = (known after apply)
      + dns_servers                   = (known after apply)
      + enable_accelerated_networking = false
      + enable_ip_forwarding          = false
      + id                            = (known after apply)
      + internal_dns_name_label       = (known after apply)
      + internal_fqdn                 = (known after apply)
      + location                      = "westeurope"
      + mac_address                   = (known after apply)
      + name                          = "storage01-euwest-if"
      + network_security_group_id     = "/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/swh-resource/providers/Microsoft.Network/networkSecurityGroups/worker-nsg"
      + private_ip_address            = (known after apply)
      + private_ip_addresses          = (known after apply)
      + resource_group_name           = "euwest-server"
      + tags                          = (known after apply)
      + virtual_machine_id            = (known after apply)

      + ip_configuration {
          + application_gateway_backend_address_pools_ids = (known after apply)
          + application_security_group_ids                = (known after apply)
          + load_balancer_backend_address_pools_ids       = (known after apply)
          + load_balancer_inbound_nat_rules_ids           = (known after apply)
          + name                                          = "storageNicConfiguration"
          + primary                                       = (known after apply)
          + private_ip_address                            = (known after apply)
          + private_ip_address_allocation                 = "dynamic"
          + private_ip_address_version                    = "IPv4"
          + subnet_id                                     = "/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/swh-resource/providers/Microsoft.Network/virtualNetworks/swh-vnet/subnets/default"
        }
    }

  # azurerm_virtual_machine.storage-server[0] will be created
  + resource "azurerm_virtual_machine" "storage-server" {
      + availability_set_id              = (known after apply)
      + delete_data_disks_on_termination = false
      + delete_os_disk_on_termination    = false
      + id                               = (known after apply)
      + license_type                     = (known after apply)
      + location                         = "westeurope"
      + name                             = "storage01"
      + network_interface_ids            = (known after apply)
      + resource_group_name              = "euwest-servers"
      + tags                             = {
          + "environment" = "Storage"
        }
      + vm_size                          = "Standard_D8Sv3"

      + boot_diagnostics {
          + enabled     = true
          + storage_uri = "https://swhresourcediag966.blob.core.windows.net"
        }

      + identity {
          + identity_ids = (known after apply)
          + principal_id = (known after apply)
          + type         = (known after apply)
        }

      + os_profile {
          + admin_username = "tmpadmin"
          + computer_name  = "storage01"
          + custom_data    = (known after apply)
        }

      + os_profile_linux_config {
          + disable_password_authentication = true

          + ssh_keys {
              + key_data = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDZarzgHrzUYspvrgSI6fszrALo92BDys7QOkJgUfZa9t9m4g7dUANNtwBiqIbqijAQPmB1zKgG6QTZC5rJkRy6KqXCW/+Qeedw/FWIbuI7jOD5WxnglbEQgvPkkB8kf1xIF7icRfWcQmK2je/3sFd9yS4/+jftNMPPXkBCxYm74onMenyllA1akA8FLyujLu6MNA1D8iLLXvz6pBDTT4GZ5/bm3vSE6Go8Xbuyu4SCtYZSHaHC2lXZ6Hhi6dbli4d3OwkUWz+YhFGaEra5Fx45Iig4UCL6kXPkvL/oSc9KGerpT//Xj9qz1K7p/IrBS8+eA4X69bHYYV0UZKDADZSn ardumont@yavin4"
              + path     = "/home/tmpadmin/.ssh/authorized_keys"
            }
          + ssh_keys {
              + key_data = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDZ1TCpfzrvxLhEMhxjbxqPDCwY0nazIr1cyIbhGD2bUdAbZqVMdNtr7MeDnlLIKrIPJWuvltauvLNkYU0iLc1jMntdBCBM3hgXjmTyDtc8XvXseeBp5tDqccYNR/cnDUuweNcL5tfeu5kzaAg3DFi5Dsncs5hQK5KQ8CPKWcacPjEk4ir9gdFrtKG1rZmg/wi7YbfxrJYWzb171hdV13gSgyXdsG5UAFsNyxsKSztulcLKxvbmDgYbzytr38FK2udRk7WuqPbtEAW1zV4yrBXBSB/uw8EAMi+wwvLTwyUcEl4u0CTlhREljUx8LhYrsQUCrBcmoPAmlnLCD5Q9XrGH nicolasd@darboux id_rsa.inria.pub"
              + path     = "/home/tmpadmin/.ssh/authorized_keys"
            }
        }

      + storage_data_disk {
          + caching                   = (known after apply)
          + create_option             = (known after apply)
          + disk_size_gb              = (known after apply)
          + lun                       = (known after apply)
          + managed_disk_id           = (known after apply)
          + managed_disk_type         = (known after apply)
          + name                      = (known after apply)
          + vhd_uri                   = (known after apply)
          + write_accelerator_enabled = (known after apply)
        }

      + storage_image_reference {
          + offer     = "Debian"
          + publisher = "credativ"
          + sku       = "10"
          + version   = "latest"
        }

      + storage_os_disk {
          + caching                   = "ReadWrite"
          + create_option             = "FromImage"
          + disk_size_gb              = (known after apply)
          + managed_disk_id           = (known after apply)
          + managed_disk_type         = "Premium_LRS"
          + name                      = "storage01-osdisk"
          + os_type                   = (known after apply)
          + write_accelerator_enabled = false
        }
    }

Plan: 2 to add, 0 to change, 0 to destroy.

Diff Detail

Repository
rSPRE sysadm-provisioning
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ardumont created this revision.Tue, Feb 4, 3:04 PM
ardumont retitled this revision from azure: Add new storage01.euwest.azure node destined to azure: Add new storage01.euwest.azure node.Tue, Feb 4, 3:04 PM
ardumont edited the test plan for this revision. (Show Details)
ardumont edited the test plan for this revision. (Show Details)Tue, Feb 4, 3:10 PM
ardumont edited the test plan for this revision. (Show Details)
ardumont updated this revision to Diff 9369.Tue, Feb 4, 3:16 PM

Add both admin keys to authorized_keys

ardumont updated this revision to Diff 9370.Tue, Feb 4, 3:24 PM
  • Rename vaultNicConfiguration to storageNicConfiguration
  • Use vm size same as storage0.euwest: Standard_D8Sv3

You terraform log says "Standard_B2s", but the diff requests Standard_D8Sv3. How come?

A bit confused as terraform wants to destroy cassandra resources.

I'm guessing @olasd didn't commit his changes to create them.

You terraform log says "Standard_B2s", but the diff requests Standard_D8Sv3. How come?

because i did not re-update the plan description after modifying it.

A bit confused as terraform wants to destroy cassandra resources.

I'm guessing @olasd didn't commit his changes to create them.

i suppose so.

vlorentz added inline comments.Tue, Feb 4, 3:34 PM
azure/terraform/storage.tf
50–57

I don't think we need a data disk

ardumont added inline comments.Tue, Feb 4, 3:35 PM
azure/terraform/storage.tf
36

matching storage0.euwest.azure's vm

ardumont updated this revision to Diff 9372.Tue, Feb 4, 3:37 PM

No need for data disk

ardumont added inline comments.Tue, Feb 4, 3:37 PM
azure/terraform/storage.tf
50–57

yes, i think so too.

vlorentz accepted this revision.Tue, Feb 4, 3:42 PM
This revision is now accepted and ready to land.Tue, Feb 4, 3:42 PM
ardumont edited the test plan for this revision. (Show Details)Tue, Feb 4, 5:16 PM
ardumont edited the test plan for this revision. (Show Details)Tue, Feb 4, 6:13 PM
ardumont updated this revision to Diff 9378.Tue, Feb 4, 6:14 PM

Rebase on latest code

ardumont edited the summary of this revision. (Show Details)Wed, Feb 5, 12:04 PM
ardumont updated this revision to Diff 9385.EditedWed, Feb 5, 12:06 PM
  • Migrate to new dsl (for_each)
  • Use the right debian template name
  • Remove unnecessary disk definition (which failed the template creation)
  • Rename the resource to the correct name euwest-server`s`
  • Use the correct vm name Standard_D8s_v3

Creation went smoothly for storage01.euwest.azure up to puppet run \m/

This revision was automatically updated to reflect the committed changes.