Kubernetes 101: Deploying a web application and database
The DevOps world seems to have been taken over by Kubernetes during the past few years. And rightfully so, I believe, as it is a great piece of software that promises and delivers when it comes to managing deployments of complex systems.
Kubernetes is hard though. But it’s all good, I’m not a DevOps engineer. As a software developer, I shouldn’t care about any of that. Or should I? Well… Yes. I know that very well after being thrown head first into a project that heavily involves Kubernetes, without knowing the first thing about it.
Even if I wasn’t in the role of a DevOps engineer, as a software developer, I had to work with it in order to set up dev environments, troubleshoot system issues, and make sound design and architectural decisions.
After a healthy amount of struggle, I eventually gained some understanding on the subject. In this blog post I’ll share what I learned. My hope is to put out there the things I wish I knew when I first encountered and had to work with Kubernetes.
So, I’m going to introduce the basic concepts and building blocks of Kubernetes. Then, I’m going to walk you through the process of containerizing a …
!-->kubernetes docker dotnet postgres containers
Fixing a PostgreSQL cluster that has no superuser
Normally in a newly-created PostgreSQL database cluster there is a single all-powerful administrative role (user) with “superuser” privileges, conventionally named postgres
, though it can have any name.
After the initial cluster setup you can create other roles as needed. You may optionally grant one or more of your new roles the superuser privilege, but it is best to avoid granting superuser to any other roles because you and your applications should generally connect as roles with lower privilege to reduce the risk of accidental or malicious damage to your database.
Let’s break something 😎
Imagine you have a cluster with two or more superuser roles. If you accidentally remove superuser privilege from one role, you can simply connect as the other superuser and re-grant it.
But if you have a cluster where only the single postgres
role is a superuser, what happens if you connect as that role and try to remove its superuser privilege?
$ psql -U postgres postgres
psql (14.1)
Type "help" for help.
postgres=# \du
List of roles
Role name | Attributes | Member of …
postgres security tips
Setting up SSH in Visual Studio Code
Visual Studio Code is a powerful code editor that can create a customized IDE for your development. VS Code’s default configuration is great for working locally but lacks the functionality to give the same experience for remote SSH development. Enter the extension Remote SSH.
Installation
Installing the Remote SSH extension is really easy! First you access the Extension Marketplace with Ctrl+Shift+X
or by clicking View > Extensions
in the menu, then you just search for and select Remote - SSH
.
Setting up your SSH config file
To configure your connection, you’ll need to add a few lines to your SSH config. Click the green Open a Remote Window
icon on the bottom left corner:
Select Open SSH Configuration File...
and select the config file you want to use. I use the Linux default, /home/$USER/.ssh/config
. Add the Host, HostName, and User as required and save:
Host MySite
HostName site.endpointdev.com
User couragyn
Connecting
Click the green Open a Remote Window
icon on the bottom left corner, select Connect to Host...
, and pick your desired host, in this case MySite
. If your public SSH key isn’t on the remote server, you will be prompted to enter a …
ssh tips vscode
Word diff: Git as wdiff alternative
The diff
utility to show differences between two files was created in 1974 as part of Unix. It has been incredibly useful and popular ever since, and hasn’t changed much since 1991 when it gained the ability to output the now standard “unified context diff” format.
The comparison diff
makes is per line, so if anything on a given line changes, in unified context format we can tell that the previous version of that line was removed by seeing -
at the beginning of the old line, and the following line will start with +
followed by the new version.
For example see this Dockerfile that had two lines changed:
$ diff -u Dockerfile.old Dockerfile
--- Dockerfile.old 2022-01-05 22:16:21 -0700
+++ Dockerfile 2022-01-05 23:08:55 -0700
@@ -2,7 +2,7 @@
WORKDIR /usr/src/app
-# Bundle app source
+# Bundle entire source
COPY . .
-RUN /usr/src/app/test.sh
+RUN /usr/src/app/start.sh
That works well for visually reviewing changes to many types of files that developers typically work with.
It can also serve as input to the patch
program, which dates to 1985 and is still in wide use as a counterpart to diff
. With patch
we can apply changes to a file and avoid the need to send …
git terminal vscode intellij-idea tips
Generate PDF with Chrome, Puppeteer, and Serverless Stack
Function as a Service (FaaS) solutions are becoming more and more mainstream today. The FaaS model allows developers to not have to worry about managing infrastructure and instead focus on writing the application logic. In the FaaS model, developers write individual functions that run specific tasks that are deployed together on a FaaS platform, including but not limited to Amazon Web Services (AWS), Azure, and Google Cloud Platform (GCP).
These functions don’t always run like a traditional application server does, waiting for a request. Instead, these FaaS platforms only spin up instances of these functions whenever there is traffic and will shut them back down once there are no more requests after a given period of time. This helps make FaaS a really cheap platform while traffic is low. It is a good approach for on-demand tasks that are part of the application but not necessarily the most common path in a customer’s everyday journey within the application.
The tools
In this tutorial, we’re going to be looking at implementing PDF download with Chrome, Puppeteer, and Serverless Stack, but first, let’s have a brief introduction of the tools that we are …
!-->automation aws chrome cloud pdf serverless
VisionPort: A Breakdown
In late 2021, End Point Corporation’s immersive technology team officially launched VisionPort. Evolved from End Point’s Liquid Galaxy, VisionPort allows presenters to share content between embedded displays, managed devices, and wireless controllers, all from the tap of a finger. VisionPort was created to incorporate relevant conferencing and office technologies with a powerful and impactful video wall solution.
Unique to VisionPort is the method that allows for full-resolution applications — synchronized, with geometrically adjusted instances — regardless of the number of displays. This technique avoids the fish-eye distortion commonly seen on conventional video walls created by stretching content beyond its typical aspect ratio, and ensures that the highest quality content can be delivered to viewers.
The platform also integrates with other displays placed in the room, enabling users to control the experience of the visualizations presented for their participants.
A person acting as Meeting Director can both interact with and guide multiple inbound video streams via an intuitive interface on an iPad or other tablet controller. With the appropriate setup, directing someone’s …
visionport
Ecommerce customer names with interesting Unicode characters
One of our clients with a busy ecommerce site sees a lot of orders, and among those, sometimes there are unusual customer name and address submissions.
We first noticed in 2015 that they had a customer order come in with an emoji in the name field of the order. The emoji was 😏 and we half-jokingly wondered if that was a new sign of fraud.
Over the following 3 years only a few more orders came in with various emoji in customer’s names, but in mid-2018 emoji started to appear increasingly frequently until now one now appears on average every day or two.
Why the sudden appearance of emoji in 2015? It correlates with the rapid shift to browsing the web and shopping on mobile devices. Mobile visits now represent more than half of this client’s ecommerce traffic.
Most people in 2015 didn’t even know how to type emoji on a desktop or laptop computer, but mobile touchscreen keyboards began showing emoji choices around that time, so the mobile explanation makes sense. And mobile keyboard autocorrect also sometimes offers emoji in addition to words, making them even more common in the past few years.
Just for fun I wanted to automatically find all such …
!-->ecommerce unicode sql postgres
VisionPort Success at Auburn University
Auburn University’s Liquid Galaxy/VisionPort installation was the first of its kind, built into a stunning wooden cabinet. A technological showpiece that is a highlight of Auburn’s campus, the VisionPort platform is used to showcase incredible imagery and presentations created by students and faculty alike.
Auburn’s Liquid Galaxy/VisionPort is located on the first floor of the RBD (Ralph Brown Draughon) Library. As stated on Auburn’s Library webpage, “It provides a one-of-a-kind platform for 3D geospatial visualization, panoramic images, video, tours, and more in a shared immersive environment. Auburn holds the distinction of being one of the few institutions in the Southeast to make this unique and innovative resource available to its patrons.”
Chris Mixon is Auburn University’s Information Technology Specialist in the Media & Digital Resource Lab. He works closely with University groups to develop content, and also works with End Point’s support team as needs arise. As Chris has shared, “we are doing great things with this platform!” Among other projects, Chris is working with instructors and students in Urban Design Studio (CPLN 7200) and Science Communication (ESSI …
visionport clients education