Tumgik
#someservice
engineering · 5 years
Text
Docker Registry Pruner release!
tl;dr: We are open-sourcing a new tool to apply retention policies to Docker images stored in a Docker Registry: ✨tumblr/docker-registry-pruner✨.
At Tumblr, we have been leaning into containerization of workloads for a number of years. One of the most critical components for a Docker-based build and deployment pipeline is the Registry. Over the past 5+ years, we have built a huge amount of Docker containers. We are constantly shipping new updates and building new systems that deprecate others. Some of our repos can have 100s of commits a day, each creating a new image via our CI/CD pipeline. Because of this rapid churn, we create a ton of Docker images; some of them are in production, others have been deprecated and are no longer in use. These images accumulate in our Registry, eating up storage space and slowing down Registry metadata operations.
Images can range from a few hundred MB to a few GB; over time, this can really add up to serious storage utilization. In order to reclaim space and keep the working set of images in our registry bounded, we created, and are now open-sourcing, the ✨tumblr/docker-registry-pruner✨! This tool allows you to specify retention policies for images in an API v2 compatible registry. Through a declarative configuration, the tool will match images and tags via regex, and then retain images by applying retention policies. Example policies could be something like keeping the last N days of images, keeping the latest N images, or keeping the last N versions (semantically sorted via semantic versioning).
Configuration Format
A more precise definition of how the tool allows you to select images, tags, and retention policies is below. A config is made up of registry connection details and a list of rules. Each rule is a combination of at least 1 selector and an action.
Selectors
A selector is a predicate that images must satisfy to be considered by the Action for deletion.
repos: a list of repositories to apply this rule to. This is literal string matching, not regex. (i.e. tumblr/someservice)
labels is a map of Docker labels that must be present on the Manifest. You can set these in your Dockerfiles with LABEL foo=bar. This is useful to create blanket rules for image retention that allow image owners to opt in to cleanups on their own.
match_tags: a list of regular expressions. Any matching image will have the rule action evaluated against it (i.e. ^v\d+)
ignore_tags: a list of regular expressions. Any matching image will explicitly not be evaluated, even if it would have matched match_tags
NOTE: the ^latest$ tag is always implicitly inherited into ignore_tags.
Actions
You must provide one action, either keep_versions, keep_recent, or keep_days. Images that match the selector and fail the action predicate will be marked for deletion.
keep_versions: Retain the latest N versions of this image, as defined by semantic version ordering. This requires that your tags use semantic versioning.
keep_days: Retain the only images that have been created in the last N days, ordered by image modified date.
keep_recent: Retain the latest N images, ordered by the image's last modified date.
You can see the documentation for more details, or check out the example.yaml configuration!
Tumblr uses this tool to (via Kubernetes CronJob) periodically scan and prune unneeded images from a variety of Docker repos. Hopefully this tool will help other organizations manage the sprawl of Docker images caused by rapid development and CI/CD, as well!
25 notes · View notes
nicsplace · 7 years
Photo
Tumblr media
You know what I'm talking about! 😒😑😕 In this building it shifts from 4G LTE to 3G to Roam to No Connection. SUPER frustrating!!!! #CellSignal #NoService #SomeService #WhatAboutNow #HowsThis #LionKingIt #SearchingForASignal
0 notes
techyblogger · 4 years
Photo
Tumblr media
Competitor has my main keyword as company name, how to deal with it? https://www.reddit.com/r/SEO/comments/iqo7vm/competitor_has_my_main_keyword_as_company_name/
I’m running a niche SaaS company and the most searched keyword is “someservice online”. Relatively low competition and low search volumes. A competitor has claimed the domain “someservice-online.com” and is also trading under the company name “Someservice Online” and is ranking #1.
I thought the lack of an actual brand would be a disadvantage for them since it must be impossible for Google to know if a user is looking for the service or their company. But in this case it seems like Google favours the exact domain match.
I haven’t seen many successful examples of an exact keyword domain match, so I’m wondering if it’s a good long term strategy or if it can backfire?
What would be a good strategy to compete with them and how important is the exact 100% keyword match in titles and text?
submitted by /u/fogdn [link] [comments] September 11, 2020 at 04:21PM
0 notes
itdnext · 8 years
Text
Adventures in Re-examining unit tests.
Class and method names have been changed to protect the innocent and of course intellectual property:
We’ve ported a project to a new version of the dev stack we use.
I’ve been tasked re-examining the unit tests.
I came across this:
@Test public void onMessageExceptionTest() throws JMSException  { // Arrange doThrow(new RuntimeException(<SOME_MESSAGE>)).when(someService).createServiceLog(eq(message), eq(""),eq("<SOME_TEXT"), eq(<BOOL>); // Act classUnderTest.methodCall(<SOME_PARAM>); // Assert // verify(logger).warning(eq(anyString()));
}
Notice the Assert is commented out. 
I did a second take and figured out that this person was trying to make sure that a some message was sent through if a RunTimeException occurred.  Which felt strange and then I thought I wondering if this is was something about trying to game code coverage and at the same time I could not help but wonder how would I verify something like that.  What would the code look like?
This was what I came up with, note I’m still not sure of the value of the test but I wanted to see how I could test that the values was the expected value:
@Test public void onMessageExceptionTest() throws Exception  { // Arrange doThrow(new RuntimeException(<SOME_MESSAGE>)).when(someService).createServiceLog(eq(message), eq(""),eq("<SOME_TEXT"), eq(<BOOL>); // Act        try {            classUnderTest.methodCall(<SOME_PARAM>);        }catch (RuntimeException e){        // Assert            Assert.assertEquals(<SOME_MESSAGE>, e.getMessage());        } }
1 note · View note
bet-host-blog · 7 years
Photo
Tumblr media
Online Sports Betting Forums Available
For the player, betting with a web site is an absolute must. There is simply no reason at all to accept limited hours and wagering capability that old-fashioned localbookie affords. Why sit around all week and place a bet with a line you do not want as they definitely are inaccessible to to become self-sufficient except ongame day?
Another huge advantage if you bet on sports using an situs agen judi bola services are the added features, pertaining to example sign up bonuses. For instance, someservices provide you with 25% subscription bonus, a 15% reload bonus, together with 25% Refer-a-Friend bonus! Is your local bookie going to provide you with free money every time you in order to reload your account or send him a bonus of player?
To funds online, utilize improved communication and instant information. For just about any step prior to a bookie, learn. The more information you have about theplayers and teams such as injuries with the teams, match conditions, trends and tips, the better are your chances of waging successful bets.
Players prefer bookie agents powered by price per head data processing solutions given that of them have an operating website where they can log on to for information.Most of these sites all of them the feel and simulation of the casino, that really find appealing.
The biggest stumbling block for sports bettors is the own propensity. They have a popular choice team only to discover to bet on that team the most. At first thoughtit makes sense. Talked about how much this team the most significant. You know the gamers and coaches and have a good idea how they will fare againstcertain enemy.
Lynton - Devon England known much less than Switzerland, along with the old Victorian town has much to for people that enjoy massive. Relax, it can offer a possibilityto enjoy doing right. Exmoor National Park anyone the opportunity to see the lush countryside on horseback, bicycle or walk far away.
Players are incredibly keen on looking for bookie agents whom can entrust their bets to help. With the edge provided along with software, clients can be securedthat the accounts are at ease and no third party will give you the option to connect to their personal personal information. Only those agents with an organizedservice along with technology can certainly give a 100% guarantee that your account information and data will not be leaked as they definitely have strongsecurity capabilities compared to traditional bookie agents.
0 notes