Using load-tests as quality gate in Jenkins pipelines

Over years JMeter has always been a valuable tool in my box when dealing with performance testing. But when we’ve integrated those tests with our CI/CD-pipeline we always had hard times to control the pipeline outcome based on the performance results. In other words, let the test results act as a quality gate for either promoting the build-artfiact along the pipeline or not. ...

August 14, 2019 · 4 min · schoeffm

Linux User Management

Cheatsheet for Linux User Management Handling users # adds a new user called 'schoeffm' useradd -m -s /bin/zsh -G docker schoeffm # └┬┘└────┬─────┘└─┬─────┘ # │ │ │ # │ │ └─> List of groups the user # │ │ should be a member of # │ └─> login shell of the new account # └────────> also create a home directory for this # account # Assigns a new UID to <─────┐ # this account │ # ┌──┴──┐ usermod -aG docker -s /bin/zsh -L|U -u 4711 schoeffm # └───┬────┘ └───┬─────┘ └─┬─┘ # │ │ └─> Lock or Unlock user # │ └─> set new login shell for account # └────────────> append to the list of groups # without 'a' this will replace # the group list userdel not explicitly shown here since it’s comprehensible....

August 10, 2019 · 3 min · schoeffm

Linux Permission Management

Cheatsheet for Linux Permission Management Standard Permissions There are three basic permissions which are read, write and execute. And they can be granted to a specific user (so if you are not that user those permissions do not apply to you) a group of users (if you’re not a member of that group those permissions do not apply to you) to all other users (so if the first two do not apply - these are then the permissions you’ll have on the respective file/directory) This is also the order in which linux checks the permissions....

August 6, 2019 · 4 min · schoeffm

Testing Web Components

Testing web-components in isolation can be a challenging task. The (current) usual suspects in this area still lack support for the standard and thus cannot be used (at least at the time of this writing). Also, the web is swamped by posts about frameworks and thus finding good example projects or tutorials is also challenging.Finally, we found, at least for our project, a good solution which does the job and whose setup I’d like to write down/preserve (find the corrsponding code in this repo). ...

August 2, 2019 · 6 min · schoeffm

Tcpdump Common Commands

When debugging network related issues the CLI tool tcpdump is a valuable assistant. I usually use a variation of this base command: sudo tcpdump -A -i lo0 -n -s0 -v port 8080...

July 30, 2019 · 2 min · schoeffm

Response streaming between JAX-RS and Web-Components (Part 2)

In part one we had a look at a JAX-RS endpoint that streams its content to the requesting client. Now I’d like to show how the fetch-API can be used to consume that streamed content in a web component. ...

July 28, 2019 · 4 min · schoeffm

Response streaming between JAX-RS and Web-Components (Part 1)

When dealing with JAX-RS resources are normally assembled completely in memory before being put onto the wire for transmission. If the resulting response fits into one single chunk the transmission is accomplished in one go - if the content is bigger than 16kB it will be split into several chunks of that size. You can see the difference in the response headers where a one-go-transmission contains the Content-Length-header (where the server announces the size of the content to be transmitted) while a chunked transmission lacks the Content-Length header but contains a Transfer-Encoding: chunked header. ...

July 27, 2019 · 3 min · schoeffm

Easy en-/decoding using base64

When dealing with Kubernetes secrets or when testing REST-services using i.e. curl it’s nice to have a fast’n’easy way of de- and encoding characters using base64. ...

July 13, 2019 · 1 min · schoeffm

SSH Config Format

Dealing with SSH-connections can become cumbersome quickly especially when configurations change frequently, too. Luckily, you can pre-configure most of a connections settings in a user specific config-file located in your ~/.ssh-folder called config. ...

June 24, 2019 · 2 min · schoeffm

API versioning using vender specific media types in JAX-RS

Content Negotiation in JAX-RS allows you to leverage the information in the client requests Accept header to map that request to a specific handler-method within your application. In combination with vendor-specific media types this approach can be used for versioning of an API. ...

June 10, 2019 · 2 min · schoeffm