2024. október 11., péntek

Project - Network





The second stage of rebuilding my lab is to have a solid Ethernet and Wi-Fi network.
On this road I bought a few network devices: used HP 2530 series PoE switches.
Built a setup with VLANs separating the home, the planed home automation, guest, etc. networks.
Had some fight with my Mikrotik router to properly support VLANs (still just barely understand its approach of VLAN settings).
I also had Wi-Fi routers, access points (TP-Link and Ubiquiti) laying around. All of them finally converted to OpenWRT.
And the biggest relive that my long hated HP 1920-24G switch also turned to an OpenWRT device (I guess this is a leftover from the 3Com acquisition by HP and the interface is far from the familiar convenient HP UIs):


This correcting my mistake of buying it.
So, most of the logical network setup of my flat and lab is done, just the Multi-SSID Wi-Fi setup and the client device reorganization is left.


 

2024. október 9., szerda

Reorganizing lab 6.

The project of rebuilding my tables are finished.

I still try to figure out what goes where but it is not as messy it was a few days ago.



I think it is time for picking a new project while still moving my stuff.

2024. szeptember 29., vasárnap

Reorganizing lab 5.

 The good:

How it looks like Today. Three out of four tables complete. Even my lab computer is its final location. Currently I'm writing this on that computer.
The bad: No more time to work on it in the next week or bit more.
And the ugly:

This is the leftover. I need to handle this. I just hope that after reorganization this will disappear.


2024. szeptember 27., péntek

Reorganizing lab 4.

This can be called as a milestone for my lab bench project. My corner table, with additional top shelf and integrated lighting is ready.
One done, additional three to go. But as I already finished many part of the other tables/shelves, it will not take too much more time to finish.



2024. szeptember 17., kedd

Reorganizing lab 3.

Continued to work on the shelf in the lab.
All of the shelfs are sanded most of it finished (3 out of 4)


This week will be off from my lab, I have other, mainly office work related tasks. Hopefully next week I can finish this with the final assembly - but most of the cases, this is too optimistic statement. 😂

2024. szeptember 14., szombat

Burabu find

Today I was on Burabu (local hamfest).
Scored these things:







The Mean Well supply for 1500Ft (less than €4), and all of the other things for 10.000Ft (~€25).
I got those just for the enclosure or maybe the power supply.
Looked around. I found loop power amplifier for €877 on the internet. Most probably its real value is far from this. I just thinking if it can be sold online for substantial money, or just scrap it as I planned when bought it.

2024. szeptember 4., szerda

Terraform, AzApi, Sql Managed Instance, DTC and it's consequences

Something from my daily work (It is possible, that I will more about it as I see daily issues).
I got an assignment to enhance out Azure SQL Managed Instances Terraform deployment module with DTC (Yes, it is a good question, why on earth this outdated technology is still needed).
For the DTC you will need two resources added to your managed instance. One is the DTC configuration, the other is the serverTrustGroup what determine which of your managed instances trust each other for the distributed transaction.
As I not even surprised, none of the above exists in the Terrafrom AzureRM provider, so you need to use AzAPI provider for it.
The DTC setting itself is a piece of cake - if you have experience using the AzAPI resources you can easily handle it.
The trustGroup is a different animal.
Here you can find the Microsoft documentation for it: https://learn.microsoft.com/en-us/azure/templates/microsoft.sql/2023-05-01-preview/locations/servertrustgroups?pivots=deployment-language-terraform
You just add the resource and done...


resource "azapi_resource" "symbolicname" {
type = "Microsoft.Sql/locations/serverTrustGroups@2023-05-01-preview"
name = "string"
parent_id = "string"
body = jsonencode({
properties = {
groupMembers = [
{
serverId = "string"
}
]
trustScopes = [
"string"
]
}
})
}



Not exactly. The name, groupMembers, trustScopes are explained in the documentation. The parent_id is not exactly. The documentation said:
"The ID of the resource that is the parent for this resource.
ID for resource of type: locations"
What this means to you?
Usually in the Azure "location" is used as the synonym of "region" - here: wrong
Even, if it would be the region, where should it be located in the management group/subscription/resource group hierarchy?
Anyway, as a normal Azure resource, it should be located in a resource group. Ok, add the resource group ID there. The Terraform give back this error:
"Error: `parent_id is invalid`: expect ID of `Microsoft.Sql/locations`"
What a hack is this Microsoft.Sql/locations ?
Looked through the internet. Yes it is part of the object hierarchy of the serverTrustGroups but, as resource it doesn't exists.
Ok. Deploy the Trust Group manually. Done it. On the portal you can't see the JSON of it.
Try other way.
Try to get it back via AZ CLI:


az sql stg list -g <resource group name> --instance-name <name>


The result:


[
{
"groupMembers": [
{
"serverId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/<resource group name>/providers/Microsoft.Sql/managedInstances/sql-test-01"
},
{
"serverId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/<resource group name>/providers/Microsoft.Sql/managedInstances/sql-test-02"
}
],
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/<resource group name>/providers/Microsoft.Sql/locations/West Europe/serverTrustGroups/trust-group",
"name": "trust-group",
"resourceGroup": " <resource group name>",
"trustScopes": [
"GlobalTransactions",
"ServiceBroker"
],
"type": "Microsoft.Sql/locations/serverTrustGroups"
}
]


Now, can you see?
After this, our code will look like something this:


resource "azapi_resource" "trust-group" {
  type = "Microsoft.Sql/locations/serverTrustGroups@2023-05-01-preview"
  name = var.trust_group_name
  parent_id = "${var.resource_group_id}/providers/Microsoft.Sql/locations/${var.region}"
  body = jsonencode({
    properties = {
    groupMembers = [for ServerID in var.groupMembers : { "serverId" = ServerID }]
    trustScopes = var.trustScopes
    }
  })
}



And I try not to judge the quality of the Microsoft documentation ...