How-To's Archives - Root Level Technology

Category: How-To's Archives - Root Level Technology

Clair Image Scan Setup in a Codefresh Pipeline

Clair image scanning provides a report on known vulnerabilities in a docker image. Adding this to your Codefresh CI/CD pipeline means you can view threats and start automating your responses to them. This can be as simple as showing a report with the listed vulnerabilities to the development team, to something as complex as rolling back deployment to the last approved build if the vulnerabilities exceed your desired guidelines.   In order to use the Clair Scan you must have your own Clair Scan service setup ahead of time. You can then pass the docker image to your Clair Scan service during your CodeFresh Pipeline Setup. The report will need to be saved in a storage bucket and a link […]

Continue reading

Turn on your Predictive Scaling for EC2 now!

If you have an autoscaling group in AWS, you have a need for Predictive Scaling. Predictive Scaling is exactly what it sounds like: Machine Learning being applied to your auto scaling metrics through a service provided by Amazon. This service looks at metrics provided from your existing Auto-Scaling group metrics including CPU use or custom-defined metrics. These metrics are weighed against Amazon’s own data to build a forecast for resource usage by your EC2 instances. The more data points available for machine learning, the better your results. AWS’s predictive scaling only requires 24 hours of data to start making predictions, but those predictions will get better the more data is available. Predictive Scaling is a free service and can be […]

Continue reading

Creating a Private Hybrid Kubernetes Cluster Pt. 2

To pick up where I left off in the previous post, I had just finished attempting to create a cluster using Windows Server 1709 and 1607. In each of these I was able to get the cluster created, but there were still some issues that prevented the cluster from being usable with Windows workloads (e.g., Windows containers wouldn’t start, meaning that the cluster was no better than a Linux-only cluster).   Then, I acquired the most recent 1803 Windows Server. I went back and re-tried it using Rancher.   After a couple of minor hiccups (getting Docker installed and running was a bit more difficult than expected: https://docs.microsoft.com/en-us/virtualization/Windowscontainers/quick-start/quick-start-Windows-server https://blog.docker.com/2016/09/build-your-first-docker-Windows-server-container/), I saw a curious error when first attempting to join the […]

Continue reading

Creating a Private Hybrid Kubernetes Cluster Pt. 1

This is the first of a two-part post detailing my work to create a private hybrid Kubernetes Cluster.   I was asked recently to set up a hybrid Kubernetes (K8s) cluster so that it could run both Windows and Linux workloads. Full disclosure: I’m highly opinionated that anything that Windows can do Linux can do better. However, despite my opinions, customers are allowed to make choices with which I disagree, so I got to work. When undertaking a project like this, I generally try to do it once in a development environment, which helps me identify and resolve issues ahead of time, before working on customer resources.   And so we begin.   The customer wanted to run all of […]

Continue reading

How to deal with master node failure in a MongoDB cluster with a replica set

When MongoDB cluster is set up with replica set, one of the secondaries will take the role of the primary when Master is down. In case of a failure, the switch should be processed automatically. One of the remaining secondaries calls for an election to select a new primary and automatically resume normal operations.     The median time before a cluster elects a new primary should not typically exceed 12 seconds, assuming default replica configuration settings. This includes time required to mark the primary as unavailable and call and complete an election. You can tune this time period by modifying the settings.electionTimeoutMillis replication configuration option. Factors such as network latency may extend the time required for replica set elections […]

Continue reading