Portainer; k6; Inoreader Feed Rules
Fear not, stout patrons! I shall not let my weekend’s obsessive compulsive WebR disorder stay me from my mission to provide a Bonus Drop!
Having said that, I’ve typed alot this weekend. So, while this is most certainly a Bonus Drop by the strictest definition, it is also going to lean on the side of brevity1, since #4 is finally well enough to celebrate with a belated birthday dinner.
Portainer
While I prefer text and the command line, GUIs do serve a useful purpose in many contexts.
We’re doing some serious container work at work, and one of my cow-orkers clued me into Portainer (GH) — a “a lightweight service delivery platform for containerized applications that can be used to manage Docker, Swarm, Kubernetes and ACI environments. It is designed to be as simple to deploy as it is to use. The application allows you to manage all your orchestrator resources (containers, images, volumes, networks and more) through a ‘smart’ GUI and/or an extensive API.”.
No need to docker pull anymore. No forgetting the order of host/container IP/port order when trying to redirect incoming network traffic; no digging through notes to re-remember how to set up container volumes.
Even I have to admit it’s pretty handy.
It includes a graphical overview of your Docker environment, which makes it stupid easy to see what containers are running, what images are available, and how container networks are configured.
Forget the CLI incantation to bring up logs or performance statistics? Well, it comes with slick views of resource monitoring, container logs, and image management.
This is a pretty spiffy guide to give you more of an idea of how it works, but Portainer’s docs aren’t too bad either.
And, there’s nearly 100 repos tagged as being relevant to the community edition (which is what I’ve linked to), so the actual community seems pretty healthy.
They do have a paid tier if your organization goes gaga over Portainer after you show it to them.
k6
In Drop #215, we mentioned hey, a simple Golang web load tester. Today, we look at another Golang load testing tool that has more batteries included than all the Teslas sold to-date.
k6 (GH) is a modern load-testing tool, built on Grafana Labs’ “years of experience in the performance and testing industries. It’s built to be powerful, extensible, and full-featured. The key design goal is to provide the best developer experience.”
They use the phrase “like unit testing, for performance”, and that’s a really cool way to think about it, and the concept of load testing.
If you don’t define a service-level agreement (SLA) for things, you won’t spend the time to ensure they’re working. It’s just human nature. Even when there are SLAs, do you really want to be told by your customers, students, or employees (the users, not the IT/dev folks) when there are problems? Or, do you want to get ahead of the game and test things to make sure they’re working. This can identify a burgeoning issue before your process fails.
Sure, we may unit test code, and even deployments. But how many of us regularly test performance.
I want to include their pitch because it really does do a good job making their case. It’s too long to indent, so I’ll mark the start/end (they’re not my words, and I don’t even want a hint of it looking like I am claiming that):
<pitch>
Configurable load generation. Even lower-end machines can simulate lots of traffic.
Tests as code. Reuse scripts, modularize logic, version control, and integrate tests with your CI.
A full-featured API. The scripting API is packed with features that help you simulate real application traffic.
An embedded JavaScript engine. The performance of Go, the scripting familiarity of JavaScript.
Multiple Protocol support. HTTP, WebSockets, gRPC, and more.
Large extension ecosystem. You can extend k6 to support your needs. And many people have already shared their extensions with the community!
Flexible metrics storage and visualization. Summary statistics or granular metrics, exported to the service of your choice.
This is what load testing looks like in the 21st century.
Example script
import http from "k6/http";
import { check, sleep } from "k6";
// Test configuration
export const options = {
thresholds: {
// Assert that 99% of requests finish within 3000ms.
http_req_duration: ["p(99) < 3000"],
},
// Ramp the number of virtual users up and down
stages: [
{ duration: "30s", target: 15 },
{ duration: "1m", target: 15 },
{ duration: "20s", target: 0 },
],
};
// Simulated user behavior
export default function () {
let res = http.get("https://test-api.k6.io/public/crocodiles/1/");
// Validate response status
check(res, { "status was 200": (r) => r.status == 200 });
sleep(1);
}</pitch>
While it will take more effort to get up to speed, you can do way more with this tool than you can with hey.
Inoreader Feed Rules
If you don’t use Inoreader for RSS feeds, your tool of choice may offer similar functionality. I’ve only recently started to use the Feed Rules functionality, and it’s a game changer.
I have numerous alerts firing for when there are new posts from critical sources, and the filtering rules let me have precise control over when they fire and what they do.
One of the most useful triggers is to send an alert to the Inoreader app on my iOS devices (this has just about removed all use of Pushover), but it can also do that via web push. I’ve also started having it issue webhooks for when there are new CISA KEV updates and the aforementioned WebR has a new release.
Inoreader does a fantastic job explaining all this in their blog post.
FIN
Thanks, once more, for your support! ☮
#portainer #docker #kubernetes #hey #k6 #loadtesting #inoreader #pushover rss
Looking back on that statement, I think I failed at brevity.
Leave a comment