2024. december 4., szerda

WSL Idiocracy 1. - Check if installed

Currently I'm writing an automated install script for Azure DevOps self-hosted Linux agent running inside a WSL2 environment on my local Windows machine. Yes, I know the idea itself is weird in the Microsoft's ClickOps word, but I'm a DevOps engineer so I will force it to work.
On the road achieving it there is some idiotic ideas of the WSL what I want to write about.

My first thought, you can check the WSL installation status from in the Windows features list. It can be achieved from PowerShell:


Just guess the WSL is installed on my PC, or not!
According to the DISM it is not installed.
But if I list the running Linux systems:


My WSL based AZDO agent is already running.
How this is possible? The DISM is not the only way to install WSL. You can install it with the following command:

wsl --install --no-distribution --web-download

The internet sources suggest to use wsl -l -v but that just show the running Linux instances. If you install it with the command above, the list will be empty.
What I figured out is the following:

$WSL_STATUS = wsl --status
if($WSL_STATUS) {
    Write-Host "WSL already installed"
} else {
    Write-Host "WSL not installed"
}

Why? The status will be empty if not installed and will report the WSL default version and other settings if installed.
Why this is required? The installation of the WSL engine itself require reboot. As I'm writing an automated script it is crucial to know if I need reboot or not.

Continued...

2024. november 18., hétfő

New arrivals 13.

Here are a few "new" test equipment just arrived to my lab. I can tell that I almost have everything I dreamed about. Actually I have to go back to my electronics journey (There other things I'd like to achieve until I get there, but looks like, back on track)


From up to down:

HP 53132A Universal Counter


I already have an Agilent 53131A. I not really need this higher precision one, but as I had the opportunity to upgrade for not too much money. The 53131A has the HS oven. It will move to this one.

YEW (Yokogawa) 2533 Power Meter


I wanted to have a power meter for a while, but the cost of those was not acceptable for a home lab. I got this one for a reasonable price. Also, this is a 3 phase unit, what is a plus.
This is capable to work up to 600V but the power supply is 115V unit, so not compatible with the 230V mains here. Fortunately a few years ago, by mistake I built an external 115V AC supply (nothing fancy just a small transformer in an appropriate box, with the required connectors and mains switch), what come handy now.

HP 4284A Precision LCR meter


This is an awesome piece of kit. I wanted to have a continuous tuning high frequency LCR meter for a while. This is capable to work until 1MHz what is much better than my current HP U1733C.

2024. október 26., szombat

Reorganizing lab 7.

I reached a milestone in my lab. I can state now that the project I started regarding my tables are finished. Added a shelf, lighting zillions of power distributors, reinforced the tables with additional cross bars at the back, and many more.
From now on, other projects are coming. Still not electronics. Now I'll focus on the IT infrastructure and on the top of it regaining the 3D printing capability. Additional posts on the way.
Now, here are few pictures about the result.








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 ...

2024. augusztus 31., szombat

Reorganizing lab 2.

After having hard time to remove the rust and the graphite covering from the iron parts during the week, Today finally I was able to put back the rust. 🤣

 
Just joking. I found redish brown base coating. 😉
I'm planing the black cover paint for tomorrow.


2024. augusztus 28., szerda

Reorganizing the lab 1.

Most of this years spare time activities went with other tings than electronics, 3D printing and my lab itself.
The result is an extreme chaos down here. A few weeks ago I decided to start to work on this.
The first was to dig out myself from the things around here. The second I decided to build the shelves on the top of my desks to generate some free spaces.
Bought everything needed. Wood panels, table legs (this will support the shelves), some iron profiles to reinforce the front of the shelves as I'm not willing to put support on the center front. Also want to reinforce the table legs as those has extreme wobbling.
The work begun. Cleaned two of my four desks.
The iron profiles are cut and drilled.


Next is sanding, painting those.

2024. július 2., kedd

My new toys (New Arrivals 12)

I started, to reorganize my worshop. In the way I gave some present to myself for my birthday. 😁
Siglent function generator - will replace my older Hantek
Siglent 12 bit resolution oscilloscope
Rigol function generator power amplifier
The shiny new Bus Pirate 5.

2024. január 9., kedd

I'm back - Thingiverse



A few month ago I stopped to work on my hobby projects. I had many other things in my mind, changed my life a bit, restarted my photography hobby and so on.

In December I started to think about to continue my things, first in 3D printing, but not too much happened (I'll write about it later).

A few years ago when I involved myself in the 3D printing also registered an account on Thingiverse.

I published there a few things: https://www.thingiverse.com/suf/designs

After a while (not really remember exactly when) Thingiverse accused me with a copyright fraud and disabled my account. To understand, all of the designs I published designed by myself and not connected to any copyright protected thing, so I still don't understand why.

I took several attempts to recover my account - unsuccessfully, then I gave up.

Yesterday I got two notifications that somebody commented one of my designs and remixed it. It was interesting as I didn't se such in the last years.

Just tired to login. And miraculously it let me in.

I don't know what happened but I'm happy on it anyways. I just guess it has some connection with the recent events described here: https://3dprintingcenter.net/ultimaker-announces-a-major-update-to-the-thingiverse-platform/

Anyways, I'm happy with it. I feel that an indication to come back in many ways.

2023. szeptember 16., szombat

Building my rack(s)

In my previous lab, I had a small (27U) rolling rack at the side of my desk. When it finally got its shape, I started to move to my new lab. The equipment removed the rack disassembled.




I was a bit depressed on this as I had the feeling I'll never be able to put this together once again.
As I was reading things on the Facebook, I seen a guy trying to sell a whole bunch of outdated Cisco networking equipment. Nobody was interested, there came ugly comments on it, to throw the whole thing to the trash.
I seen a potential on something. Those Cisco units were installed into rack. So I wrote to him, if the rack containing the switches are on sale.
So I've two Rittal 42U height 600x800 racks for $100 each. I had some cleaning, metal work and paint repair with it (full repaint wasn't required, it has almost no rust just some dirt). One set of the vertical rails are not compatible, one rail mount was missing. Also I wanted open frame rack, so removed all of the doors, side panels, back panels.
Also I wanted to be able to move it on some rollers, but not every direction, just strictly need to pull out from the wall to be able to access the back. So I made legs with bearings as rollers.
In the last week finally put back most of the equipment to it (some not fit, it will be go into the other rack when I'll able to find time to rebuild the back vertical rails.


One of my problems with the rack, how to access the equipment connectors on the back, from the front of the rack. I wanted something modular to be able to put various type of connectors to it.
Built a 1,5U unit onto the top of the previous rack from aluminum extrusion a 3D print. It failed. Wasn't precise enough, won't fit things I wanted to put in.
I was thinking about some Panduit modular patch panels, but never bought it. So just left it.
I put this thing to a side for years.
When I started to build my new rack a few month ago, I just seen something interesting on the net. Asked the owner, what he was using. It turned out, It is a Middle Atlantic Products UCP series modular kit: https://www.legrandav.com/products/accessories/connector_panels/ucp_hinged_frame_kit/ucp-sf
It has two issues for me: It is not on sale in Europe, it uses imperial screws what isn't easy to source here.
I designed and built a 3D printed 3U height modular front panel. It can accommodate 16 modules. It is great, I put it into the rack already, with the breakouts of the four channel HP 6627A power supply.


This could be the final solution, but...
...when it was already built just realized, there exists something called Eurorack Modular Synths. It perfectly match with my ideas. I bought two set of rails.


The 19" rack mount was not included, but by surprise, the original endpieces are already 3D printed


The plan is to design a new endpiece with rack ears.
In the first rack, I'll keep my original design, but in the further rack or racks I'll switch to EuroRack.
In the last few years I was mainly working with Kubernetes. For this I previously built a K3S cluster from 5 Pine A64 SBCs. It broke down (dead SD cards), but I intend to rebuild it.
I thought, it would be a great idea to put these units into the modular front panel. Designed a holder for it.



Didn't print it when the design was ready as my printer had issues, later I didn't find time for it.

To be honest, I done not too much in my electronics project during the summer. The PCBWay asked, if I have problems - absolutely not - and suggested why I don't try out their 3D printing and CNC machining capability.

I was thinking this is a perfect opportunity for this. Made a quotation to this in PETG and some small part in resin. I can tell you, I was shocked. Mainly in the resin prices.
If the things I'm trying to print with a resin printer coming on these prices, absolutely nothing justify keeping my resin printer in the future.
Now the quotation is on. I'll write about the experience and my further way in 3D printing when the printed parts arrive into my hands for inspection.

2023. szeptember 5., kedd

Fluke 787 "Repair"

Big thank you for DuraLeak.

"i purchased this at an estate sale.  i don't know if it works or how to turn it on.  but as it is right now i have pushed every button and nothing comes on the screen.  so because of that i am selling it for parts or repair."


Perfectly working Fluke 787 Processmeter for $143 delivered to Hungary


I need some future tests, but looks ok, for the first sight.

2023. augusztus 27., vasárnap

Dumpster Dive - "woodwork"

A few days ago, I found this nice table frame next to the dumpster.




From the paper box next to it I seen some broken glass, so I suspect it was a glass table before, but the tabletop broken. The owner just thrown it away. Actually it has no issues other than the missing top.
Yesterday I went around the city for some shopping.
Find a 120x70 LDF (not that shitty paper filled crap they mainly sell nowadays) tabletop in the IKEA (it is exactly 15cm larger than the frame in every direction) and bought some aluminum L extrusion in the Bauhaus.
Todays work:



Ooops, a scratch I made while putting it onto the tabletop



I found the function it also - Resin 3D printing and ultrasound cleaning station

Also accommodate some chemicals

and the 3D printer spare parts

Excess paint

And even some free space also left



2023. augusztus 22., kedd

Photography

There is some (re)addition to my hobbies.

A few years ago (mainly at the film based era), I was seriously involved in the amateur photography. Went nowhere without an SLR camera. A few years ago, this swept away a bit. There are many reason behind it. I guess the main reason was the better and better cameras in the smart phones.

Anyway, I was never completely satisfied with the performance of it. It was good for documenting my electronics projects but... It was good for my daily needs but...

Then the COVID came. It bring with it a closing down the things. Working in IT with cloud technologies bring almost zero need to go to into an office. My main hobby (still will be) electronics is connected to my lab, what is a closed space. Actually days passed by without going out to the street.

It looks like two and a half year was the limit to me to be able to tolerate this kind of lifestyle. Enough.

So a few weeks ago, I took out my photo equipment from the locker and started to use it. With it, go out to the city, to countryside, just for taking pictures. I love this feeling.

I also plan to move from phone to this equipment also for other photo/video related activities. For this plan, I started to upgrade my set a bit. It doesn't mean buying new equipment. Much more started to collect 2nd hand tools. Added an FX camera (Nikon D610) to be able to utilize the lenses from my film era. Added macro lenses for my object photography goals.

The current set:

My new photography journey starts here.



2023. június 28., szerda

Keithley 2700 - Repair 2.

After some serious issues with the local post, Today the new mains transformer of the 2700 landed in my hands.

So I measured a bit, then installed into the unit.



Actually it was pretty straightforward. Everything connected, assembled.
After some warmup I compared with my 7.5 digit Keithley 2010. It looks like spot on (the Digistant source not really able to keep with them).