Self-hosted code re...
 
Notifications
Clear all

Self-hosted code repository in the home lab

11 Posts
4 Users
2 Likes
253 Views
Brandon Lee
(@brandon-lee)
Posts: 543
Member Admin
Topic starter
 

@t3hbeowulf @malcolm-r @jnew1213 @termv @ghaleon I wanted to see what code repositories you guys are using in the home lab. Experimenting with any cool CI/CD? Infrastructure as Code?

 
Posted : 18/03/2024 4:04 pm
JNew1213
(@jnew1213)
Posts: 25
Eminent Member
 

Nothing in regard to repositories here.

I have a VM set up to experiment with Ansible, even had it build a VM for me once. That's the extent of anything IaC or DevOps here. Well, I do have some Docker stuff running if that still counts as DevOps, but no plans to expand what I have.

I'm afraid I am too old or too dense for Git, and all that related stuff. I enjoy the design and engineering parts of things and leave the operations side to those folks interested in that aspect.

 
Posted : 18/03/2024 4:20 pm
Brandon Lee
(@brandon-lee)
Posts: 543
Member Admin
Topic starter
 

@jnew1213 You seem like a very sharp guy and I bet the devop'sy stuff would be right down your alley. But I understand too. I think there are a lot of great aspects to engineering and design as well as ops too. I am getting more into DevOps though and IaC wth professional projects I'm working on. 

Speaking of projects, working on anything cool in the lab lately? New hardware to play around with? It is going to be a neat year to see what other hardware comes down the pipes on the server and mini PC front.

 
Posted : 18/03/2024 10:04 pm
JNew1213
(@jnew1213)
Posts: 25
Eminent Member
 

My first job in IT (before it was called IT) was, in part, as a COBOL programmer. IBM mainframe and WANG VS with mainframe connectivity. The programming aspect of the job I didn't like. Writing, anything, is a creative task for me, and I have to be in the mood to get anything done.

Beside that, I wasn't very good at it.

Next job, I ended up as, partly, a BASIC programmer. Not the fun Commodore PET BASIC, but the more serious cousin, that "Professional Development" stuff. I didn't much care for that either, though I loved BASIC programming in high school... on the Commodore PET.

So, I figured programming was not for me and I transitioned over time into tech support and networking. I've never looked back. Abandoning anything to do with code was the smartest thing I could have done, career-wise and "life-wise," if you will, because surely I would have killed myself had I pursued programming.

I did take a C course in the early or mid-eighties. That just confirmed that I was not meant for that kind of thing.

So, no. I have a clear, personally mandated avoidance of anything DevOps.

Anyway, projects here have gotten out of hand and progress isn't being made on most of them in any appreciable way.

I did complete a silly "project" (more like a task, really) to outfit any of my UPSes here that could take a management module with one. That turned out to be three of five devices. All three CyberPower UPSes got a remote management card and are now controllable, to some extent, over the network. One UPS additionally got a temperature and humidity sensor. Kind of fun. One more thing I can manage that I don't really need to. But, hey, I added a tile for the utility to my dashboard (Dashy).

My KVM project was abandoned, with the 8-port TESmart KVM and cables packed up and put away about a week ago. Today, I got word of back pay coming this month (along with a tax refund), so today I ordered a new PiKVM to front the TESmart KVM the way the BliKVM I was working with couldn't. So, the project is resurrected! The TESmart will mount in the rear of the rack and connect to 7 tiny/mini/micro machines (my vSAN and "remote" clusters) as well as a newly built Plex server.

Oh, yeah. The Plex server. That's new. So, my big Plex server runs on a Synology DS3615xs NAS. The NAS has an old Core i3 processor in it and the media is co-resident on that machine, so that all fits nicely. However, beside running out of space on the device, drive bay 5 has gone bad. It's really coming time for a new NAS. Another rack mount, like my RS1619xs+.

All Synology's rack mount devices are Xeon or AMD based. Neither works for transcoding in Plex, so the next Plex server is going to be Windows. I looked at moving Plex from the DS3615xs to a new Windows machine. That move is nearly impossible to do correctly and, with the way Plex stores, literally, hundreds of thousands of folders and artifacts, the move would take a very, very long period of time, during which Plex would either have to be down, or I would have to take the chance of inconsistencies in the data being copied.

So I built a new 1U rack mount ESXi box to run a single Windows Plex VM. I used a Core i5-13500 in an ASRock mini-ITX motherboard with Intel 2.5Gb Ethernet onboard, and passed through an Nvidia Tesla P4 card I had laying around. Now I am slowly recreating/duplicating the Plex environment from the NAS onto this new server. Turns out the 13th gen Core i5 is faster than my 12th gen Core i9 desktop PC. Go figure.

I am working with a new UniFi Express unit with WiFi 6, trying to get it on my network, with much difficulty. I don't need its gateway functions. I just want it to host my UniFi Network Application, which is now running in a Windows VM, and act as an access point, replacing the 60-odd watt monster of an access point I now have.

There's been a VLAN project going on here, started and stopped and restarted. Using UniFi equipment again, up through my USW Pro Aggregation switch which needs to do VLAN and subnet routing and keeping my firewall as the gateway for everything to the Internet. Normally in a UniFi setup, you would use one of their gateways to do all the routing. I want/need to route though the switch due to the fact that I have 10Gb and 25Gb subnets to route.

Lastly, I think, is a project to replace my firewall, a Sophos XG 125, with a Protectli device running Sophos XG Home Edition. The hardware firewall costs over $500/year for updates and service, where the Home version offers much of, or more than, what the $500 yearly fee offers. Interestingly, if you go shopping for a firewall, they never mention the free Home version. Just the pretty hardware they're selling with a yearly renewal. Hmmmmm. Why is that?

I have the Protectli, and installed XG Home and it boots to a blank screen. Heaven forbid it should work the first time.

There's actually so much going on that I created a free account at Monday.com (we use it at work, and I kind of hate it), to track this stuff. I am not sure if the tracking actually helps, but it's another dashboard with pretty colors to be managed, so that must be good.

Oh, in an earlier post I mentioned using Ansible to create a VM. I misspoke. It was actually Terraform. I have a desire to learn both tools to... I don't know what end. But they're good to learn if the frustration doesn't drown out the fun.

Speaking of which, I am battling TrueNAS here. Never again anything but Synology!!! The device is joined to Active Directory and I can't get shares to be seen or used with domain accounts. Whoever designed that software should be disemboweled, drawn and quartered.

Thank you for letting me indulge!

 

*** End of line

 
Posted : 18/03/2024 10:47 pm
(@t3hbeowulf)
Posts: 27
Eminent Member
 

I haven't set up a source repository at home yet but it is on my task list. I primarily use Github now with private repos for internal configs. I have always wanted to keep everything offline so that I'm not dependent on an internet connection to save/restore things. 

For pipelines and CI/CD, I use Jenkins LTS to schedule or trigger various tasks such as ansible runs, rsync backups and code builds. Everything I use GitHub for could easily be done in GitLab or Gitea.  I'm glad you followed up with demonstrating how to set them up, thank you!

 
Posted : 19/03/2024 8:27 pm
Brandon Lee reacted
Brandon Lee
(@brandon-lee)
Posts: 543
Member Admin
Topic starter
 

@t3hbeowulf Great insights on what you are doing in the home lab. I am going to stand up Jenkins at home next to get more familiar with it as well. I have played around with it in the past, and is definitely the "everything and the kitchen sink" solution out there. Are you triggering your backups and such using Jenkins agents?

 
Posted : 20/03/2024 8:42 am
(@t3hbeowulf)
Posts: 27
Eminent Member
 

Yes. I configured the Jenkins 'built-in node' (formally called 'master') in a docker container and I also created 3 "agents" in separate containers. These containerized agents do code builds and trigger ansible runs, etc. I use Jenkins agents on various machines in the house as well to initiate backups to the NAS. (Linux --> rsync, Windows --> Robocopy)

I have 1 special agent in a dedicated VM that is used for data backup. That VM is a "data hub" of NFS, passthrough USB devices, SSH mounts and samba mounts and is used for moving files around between systems.

For example: 

My main NAS has a "Photos" share exposed via samba and NFS. The samba share is for the rest of the house to back up and look through photos. The NFS share is connected to the "data hub" VM and Jenkins facilitates copying data from the Main NAS (via NFS) to a backup NAS (via an SSH mount) using rsync. 

I have about a dozen of these jobs pointing at each dataset on the Main NAS. Both my Main NAS and Backup NAS are configured with enough space to keep all of the datasets. 

The current Jenkins setup is not totally ideal as all of the containers for Jenkins itself are on the same physical host but I am going to move them onto the cluster to take advantage of Proxmox Backups for the Jenkins infrastructure.

 
Posted : 20/03/2024 10:05 am
Brandon Lee reacted
(@termv)
Posts: 17
Eminent Member
 

In my homelab over the years I've run GitLab, the old $10 on-prem license of BitBucket Server, and Gitea.

The old $10 licenses for the Atlassian services like BitBucket and JIRA were king. They're exactly what you can expect to find at pretty much every tech company out there. It's a shame that Atlassian took those licenses away because they provided a way for people to get commercially relevant training and experience on a stack that they're likely going to end up using at their day job.

I started using GitLab when it was available as a package on Synology DSM6. Since those days it has become an *extremely* impressive turnkey development & automation stack. I'd say that GitHub holds the crown right now for the best employment-relevant stack but GitLab is actually keeping pace feature-wise. GitLab is my recommendation for anybody who is very committed self-hosting. Unfortunately I'd say that it's becoming quite bloated and it's not easy system to upgrade. Resource usage is a concern for me because I run my critical dev-stack services as VMs or containers on my Synology NAS. I think generally you need to take a hard look and see if you need such a heavyweight solution at your point in your DevOps journey.

What I'm using right now it Gitea. Gitea excels as an extremely lightweight, fast and simple to operate git server. It does have similar turnkey features as its competition such as issue management, an artifact repository and CI/CD but I'd say they're generations behind. I find the extra features to be workable but they're all disappointing in some way. For example, you can set up a kanban board but the system won't transition issues if you move them along the kanban board. Gitea is perfect for anyone who just needs a git server though. This includes anyone who is integrating other tools (eg Jenkin) instead of going the turnkey route.

 
Posted : 20/03/2024 5:28 pm
Brandon Lee
(@brandon-lee)
Posts: 543
Member Admin
Topic starter
 

@termv @t3hbeowulf Awesome insights from you both. I really enjoy see what others are doing and working on and how they have things setup in their home lab. @termv I did have that general opinion of Gitea. I like it, but it did seem to be a bit light on features compared to the more mature solutions like Jenkins and Gitlab. However, I think it is a great idea for anyone to get familiar with multiple solutions just to be comfortable with their ins and outs and quirks.

 
Posted : 20/03/2024 9:06 pm
(@termv)
Posts: 17
Eminent Member
 

I recently found out about OneDev, which is another competitor in the space. I spent a day doing an install on both Kubernetes and Docker to kick the tires.

I was pretty excited to get it up and running because their issue management system is well integrated with the code repository and the worfklow engine, triggers, tagging are all quite robust and easy to configure. Most people tend to think of git as the most important configuration management component in reality the heart of the system is issue management.

The RAM usage of OneDev is 1.3 gigs for a trivial installation with a single repository imported. My well-populated Gitea server sips only 400MB of RAM. Both systems are extremely well behaved on the CPU at idle.

Unfortunately where OneDev falls down for me is the UX/UI. Gitea is essentially a look-alike for github and therefore benefits from a lot of research and refinement. GitHub's UI feels very unintuitive at times but it is very information dense and makes very good use of screen real estate. OneDev's UI is filled with excessive padding and whitespace and honestly feels like it was designed for tiny test deployments. On a 24" 1920x1200 external monitor it will only show 11 files and 5 issues on the screen at once.  Gitea makes me feel excited to use the tool, while OneDev despite its great feature set does not. That's a real shame!

 
Posted : 23/03/2024 9:08 pm
Brandon Lee
(@brandon-lee)
Posts: 543
Member Admin
Topic starter
 

@termv that is another good shout! I haven't played around with OneDev....have seen reference to it before but need to get my hands on it. So far I haven't liked anything better than Gitlab for self-hosting, even though it does way more than I need it to. But open to trying lots of other things.

 
Posted : 25/03/2024 11:39 am