Deployment Script vs. Rultor

  • 1419 words
  • 6 minutes to read
  • comments
badge

When I explain how Rultor automates deployment/release processes, very often I hear something like:

But I already have a script that deploys everything automatically.

This response is very common, so I decided to summarize my three main arguments for automated Rultor deployment/release processes in one article: 1) isolated docker containers, 2) visibility of logs and 3) security of credentials.

Read about them and see what Rultor gives you on top of your existing deployment script(s).

Anti-Patterns in OOP

  • 41 words
  • a minute to read
  • comments

RESTful API and a Web Site in the Same URL

  • 846 words
  • four minutes to read
  • comments

Look at GitHub RESTful API, for example. To get information about a repository you should make a GET request to api.github.com/repos/yegor256/rultor. In response, you will get a JSON document with all the details of the yegor256/rultor repository. Try it, the URL doesn't require any authentication.

To open the same repository in a nice HTML+CSS page, you should use a different URL: github.com/yegor256/rultor. The URL is different, the server-side is definitely different, but the nature of the data is exactly the same. The only thing that changes is a representation layer.

In the first case, we get JSON; in the second—HTML.

How about combining them? How about using the same URL and the same server-side processing mechanism for both of them? How about shifting the whole rendering task to the client-side (the browser) and letting the server work solely with the data?

Simple Java SSH Client

  • 251 words
  • a minute to read
  • comments

An execution of a shell command via SSH can be done in Java, in just a few lines, using jcabi-ssh:

String hello = new Shell.Plain(
  new SSH(
    "ssh.example.com", 22,
    "yegor", "-----BEGIN RSA PRIVATE KEY-----..."
  )
).exec("echo 'Hello, world!'");

jcabi-ssh is a convenient wrapper of JSch, a well-known pure Java implementation of SSH2.

How We Run as a Non-Root Inside Docker Container

  • 132 words
  • a minute to read
  • comments

Docker starts a process inside its container as a "root" user. In some cases, this is not convenient though. For example, initdb from PostgreSQL doesn't like to be started as root and will fail. In rultor.com, a DevOps team assistant, we're using Docker as a virtualization technology for every build we run.

Here is how we change the user inside a running container, right after it is started.

How to Publish to RubyGems, in One Click

  • 350 words
  • two minutes to read
  • comments

When I release a new version of jgd, a Ruby gem, to RubyGems.org, it takes 30 seconds of my time. Here is how I released a bug fix for version 1.5.1, in GitHub issue #6:

figure

As you see, I gave a command to Rultor, and it released a new version to RubyGems. I didn't do anything else.

Now let's see how you can do the same. How you can configure your project so that the release of its new version to RubyGems.org takes just a few seconds of your time.

How to Deploy to CloudBees, in One Click

  • 506 words
  • two minutes to read
  • comments

When I deploy a new version of stateful.co, a Java web application, to CloudBees, it takes 30 seconds of my time. Maybe even less. Recently, I deployed version 1.6.5. You can see how it all happened, in GitHub issue #6:

figure

As you see, I gave a command to Rultor, and it packaged, tested and deployed a new version to CloudBees. I didn't do anything else.

Now let's see how you can do the same. How you can configure your project so that the deployment of its new version to CloudBees takes just a few seconds of your time.

The Art of Software Testing by Glenford Myers

  • 1182 words
  • five minutes to read
  • comments
badge

"The Art of Software Testing" by Glenford J. Myers, Tom Badgett and Corey Sandler is one of my favorite books concerning testing and software engineering in general. In this article, I will provide an overview of the book, as well as highlight the ideas and quotes that I found to be the most interesting.

How to Release to Maven Central, in One Click

  • 647 words
  • three minutes to read
  • comments

When I release a new version of jcabi-aspects, a Java open source library, to Maven Central, it takes 30 seconds of my time. Maybe even less. Recently, I released version 0.17.2. You can see how it all happened, in GitHub issue #80:

figure

As you see, I gave a command to Rultor, and it released a new version to Maven central. I didn't do anything else.

Now let's see how you can do the same. How you can configure your project so that the release of its new version to Maven Central takes just a few seconds of your time.

Fluent JDBC Decorator

  • 280 words
  • two minutes to read
  • comments
badge

This is how you fetch text from a SQL table with jcabi-jdbc:

String name = new JdbcSession(source)
  .sql("SELECT name FROM employee WHERE id = ?")
  .set(1234)
  .select(new SingleOutcome<String>(String.class));

Simple and straight forward, isn't it? The library simplifies interaction with relational databases via JDBC, avoiding the need to use ORM.