Welcome
My name is Ulysses. Sr. Cloud Engineer at Cardinal Health.
About This Website
This is my static site based on Hugo.
My name is Ulysses. Sr. Cloud Engineer at Cardinal Health.
This is my static site based on Hugo.
I ran supportconfig on a system the other day and it took all night. I gave up and killed it. So, here are a few options that you can try to speed things up. supportconfig -o OFILES,CRASH,FILES,PROC,NFS,LDAP,SSSD Hope that helps.
GCP has new generation of disks for demanding and mission-critical applications. Hyperdisks is not available on all VMs, but they are usually available on large machine types. You create a Hyperdisk from scratch and attach it to an existing VM or convert a current disk by way of a snapshot. Here’s the script to convert it an existing disk to Hyperdisk from a snapshot. There are 3 types of Hyperdisks ...
Here’s a little script to display my internal and external IP addresses. #!/bin/bash main() { my_int_ip=$(ip addr show enp4s0 | grep -w 'inet' | awk '{print $2}') my_ext_ip=$(curl -s -4 ifconfig.me) echo 'External IP: ' $my_ext_ip echo 'Internal IP: ' $my_int_ip } main Output: External IP: xxx.xxx.xxx.xxx Internal IP: 192.168.0.100
My Ubiquiti router stopped working several months ago after many years of working almost flawlessly. I replaced it with an older Linksys E4200 router that I found in a plastic container in in the garage. The Linksys router has been stable, but it’s showing its age. It was released back in January of 2011. I thought about replacing my router with another Ubiquiti, but I can’t complain since the Linksys E4200 is working just fine. The other night I upgraded and changed the firmware and installed OpenWrt, an open-source firmware based on a Linux operating system that runs on many older routers. OpenWrt gives my router extensibility by providing features that you typically find only on high-end devices. It also gives me higher security since there are many added features. Firmware updates are published regularly which you’ll never receive on older routers since many hardware manufacturers no longer support their old routers. Performance is much better. Stability is another plus. And most of all, the price is right. OpenWrt is free. If you want to give an old router some life, give OpenWrt a try. By the way, you can get an old E4200 router in eBay for $15.00.
Here’s the traditional way of displaying a list of dashes across the screen. echo "====================" Here’s the short cut. printf -- '=%.s' {1..20}; echo Explanation: first I’m using printf instead of echo. printf is a little bit better when it comes to formatting. The – option tells printf to ignore the rest of the remaining arguments so it renders properly. The character before the % percentage is the one being repeated. In this case, we are repeating “=.” 1-20 is the number of times the character before the % percentage is repeated. That’s it.
If you are running a gcloud commands, it will be good to know if a user is still logged in. In some corporate settings, authentication is set to time out after a number of hours. The following lines of code checks if a user is still loggedin and displays a message to reauthenticate if logged out. In reality the script runs a list of GCP projects, but limits the output to just one line. The output is sent to a file. If the first line is equal to “Reauthentication required.”, then there’s a message telling the user to login again. If the first line has an error, it means the user is not logged in. It also tells the user to login again. Here’s the code. ...
Previously, I was showing both dates and titles on the main index page. Here’s the date format if I’ll ever need it again. {% raw %} {% endraw %}
Vim is a terminal editor in Linux, Mac and Windows system if it’s installed. To be really efficient in using vim, you’ll need to master a few very important keystrokes. So, here’s a list of common vim keystrokes that can improve your vim experience. Cursor movement h - move cursor left l - move cursor right k - move cursor up j - move cursor down H - move cursor to top of screen M - move cursor to middle of screen L - move cursor to bottom of screen w - jump forward to the start of a word e - jump forward to the end of a word b - jump backwards to the start of a word 0 - jump to the start of the line $ - jump to the end of the line gg - go to the first line of the document G - go the last line of the decoment Insert mode ...
In my [previous post]({% post_url 2024-01-12-terraform-gcp-vm-alias-ip %}), I’ve provisioned a vm with an alias ip using terraform. In this post, I will do the same but will use gcloud commands. First, let’s reserve an internal ip address. gcloud compute addresses create host-alias-ip \ --addresses 10.10.10.10 --region us-central1 \ --subnet projects/projectid/regions/us-central1/subnetworks/subnet-us-central1 \ --project projectid To allocate automatically, leave out –addresses. gcloud compute addresses create host-alias-ip \ --region us-central1 \ --subnet projects/projectid/regions/us-central1/subnetworks/subnet-us-central1 \ --project projectid To check reservations, list all in the project. ...
How to build a VM in GCP with a secondary alias IP. Assuming that you already have a compute and a local block in your Terraform file. Go to the locals block and add the local variables you’ll need. locals { project = "projectId" hostname = "yourhostname" } Reserve an internal ip address by adding the google_compute_address block to your Terraform file. resource "google_compute_address" "alias-ip" { name = "${local.hostname}-alias-ip" region = "us-central1" address_type = "INTERNAL" subnetwork = local.subnetwork } Inside your existing compute instance block, add the alias_ip_range to the network interface block. ...