Automating minikube configuration to log in to a Docker Private Registy.
In CI, I am using minikube for local testing on my nodes. In the name of repeatable builds, I completely rebuild minikube after each build (minikube delete, minikube start). I am also using an internal Docker Private Registry (DPR or DTR). Same methodology applies if you are using Google Container Registry or the Amazon equivalent. In order to authenticate to DPR, I am using the registry-creds addon. It is normally configured interactively:
$ minikube addons configure registry-creds
Do you want to enable Docker Registry? [y/n]: y
It then asks you some questions and expects user input.
Automating
I want this automated, as it will be running several times an hour. The addon config does not take any parameters, so I'm taking a different approach. The configure step creates some credentials in k8s, and it is possible to transfer them from one cluster to another. This is how I am doing it:
Continue reading "Automating minikube configuration to log in to a Docker Private Registy."
Upgrading a non-LTS Ubuntu installation after EOL»
If you don't upgrade a non-LTS release (eg: 21.10) to a supported version before End-Of-Life, you will be dealing with a rather awkward user experience. Here is what happens:
$ do-release-upgrade
Please install all available updates for your release before upgrading.
Yet if you atempt to install updates, that fails:
$ apt dist-upgrade -y
Err:5 ...
Upgrading a non-LTS Ubuntu installation after EOL»
If you don't upgrade a non-LTS release (eg: 21.10) to a supported version before End-Of-Life, you will be dealing with a rather awkward user experience. Here is what happens:
$ do-release-upgrade
Please install all available updates for your release before upgrading.
Yet if you atempt to install updates, that fails:
$ apt dist-upgrade -y
Err:5 ...
Preserving a Static Copy of Atlassian Jira (and Confluence) as a Jekyll Site»
Last month an old Jira installation I own was compromised via a recent vulnerability. This is bound to happen. Keeping a public product like that secure would require very frequent patching, which is a lot of maintenance. Fortunately, this installation is only a historical record of a popular open-source project (current development uses github issues). In other words, I can get away with ...
Bootstrapping S3/CloudFront with LetsEncrypt»
Let's assume that you want to do the following:
Host the contents of your S3 bucket via YOUR.DOMAIN.COM
Use CloudFront
Use a LetsEncrypt cert
"What's the problem?" , you may ask. There are plenty of tutorials for this stuff. Not exactly. A CloudFront Distribution will not let you add a CNAME until you have an SSL cert, but you can't use certbot to auto-provision an SSL ...
Adventures in Modifying a UPS for external DC power and LiFePO4 batteries»
I have an ancient APC Smart-UPS 1400 RMNET. It's a very nice UPS, but I have frequent multi-hour power outages and battery life becomes a problem. I have these issues:
Short battery runtime , especially as batteries age
Lead-acid batteries require frequent replacement and quickly lose capacity (and there are 4 of them)
UPS will not accept 110v from a cheap generator ...
PowerShell on Linux doesn't find modules when run through Puppet»
I'm running PowerShell on Linux for the sake of using PowerCLI . An interesting thing happens: when pwsh is run interactively, in a terminal, the following works fine when PowerCLI is already installed:
pwsh -c 'Get-InstalledModule VMware.PowerCLI'
When puppet runs it - it doesn't find the module:
Get-Package: ...
Gradle Toolchains Support - different JVMs for compile and test»
I'm testing a product that needs to be compiled with JDK 8 but tested (sometimes) on JDK 11. This is now possible to do with maven surefire (although that took some effort). With gradle, I was doing it as follows, which is terrible, even if the path comes from configuration:
// The old way: test { executable = '/some/hardcoded/path/to/java' } ...
Puppet recipe for setting up autossh via systemd»
I've always set up autossh in /etc/rc.local , but with CentOS 8 that doesn't work well (things start too early, etc). Luckily, there is a nicer way using systemd templates. Essentially, all you have to do is create one symlink and one config file per instance of autossh.
Example:
Make a config file
/etc/autossh/mything.conf:
OPTIONS=-N -M 20000 ...
Using puppet to set Windows Computer Description»
My company's security department decided to assign Antivirus exclusion policies based on the value of the windows computer description. That means that I need to set computer descriptions ( net config server /srvcomment:"new description" ) to the same value on a whole bunch of windows machines. Doing that by hand is unappealing, and I already have puppet, so here is a simple solution: ...
Replacing Dishwasher Circulation Pump Bearings without buying a whole new unit»
I have a DW80j3020us/AA Samsung dishwasher. It has been producing a loud noise for some time, and the noise kept getting worse. It was a matter of time before it either seized or melted the motor. The reason I know that the problem is with the circulation pump is that the noise is only audible while it's washing (circulating), not while draining or filling. Clearly the problem could be the ...
Android doing Optimizing app 1 of 1 on every boot»
The message appears for a good 15 minutes every time my phone boots up. I followed the usual suggestions (wipe cache partition), and that didn't help
Figuring out what app is causing this issue is the hard part. I did it with logcat (I happened to have the Android Studio installed, so logcat is a tab, and it displays the log automatically as the plugged-in phone is booting). You ...
Disabling Windows Recycle Bin with Puppet on all versions of Windows»
And when I say "All versions of Windows" I mean that I tested it on Server 2008, 2012 and 2016.
This was oddly hard to figure out, and most tutorials either apply to only one version of windows or to outdated tools. The best way to do this that I found was using Local Group Policy. Now, how to automate this? The puppet local group policy module didn't work at all when I tried it ...