Laur IVAN

Run Restricted Groovy API in Jenkins

Posted by in IT, Tutorial

The more recent versions of Jenkins have improved on security. Unfortunately, a side-effect is that scripts which were running before would fail now. An example is:

… which would list the projects defined in Jenkins. Fortunately, you can have access to theis API via the In-process Script Approval plugin (which is installed by default). If the script (pipeline) is versioned or executed in the sandbox, then you’ll need to approve method by method. If the script is not versioned, then you have the option to execute it outside the…read more

Fix Missing In-process Script Approval in Jenkins

Posted by in IT, Tutorial

Normally, when you have a script or a method to be approved, you should see the In-process Script Approval entry in your Jenkins’ configuration: Unfortunately, the In-process Script Approval entry in Jenkins’ configuration is not always shown, even though we have items to be approved. I found that installing the Permissive Script Security and briefly enabling it would solve the problem. On linux (Ubuntu), you need to edit /etc/default/jenkins and add

Then, you need to restart Jenkins for the security plugin to be disabled. I executed one of the…read more

Fix Jenkins Ignored Plugin “Check Now”

Posted by in IT, Tutorial

TL;DR: Check if a browser extension is blocking your request when you click Check Now While playing more with jenkins, I’ve encountered an error while requesting Check Now for plugin updates: it seemed that my request got ignored. I’ve tried different URLs (with and without HTTPS, stable or not) with the same result: my request seemed to be ignored. I’ve assumed first there’s a proxy error or some limitation on the server side. The logs however didn’t reveal anything. Then, I’ve checked the browser side and I’ve found that my…read more

Update Jenkins on Ubuntu

Posted by in IT, Tutorial

I’ve got an installation of Jenkins on a Ubuntu 14.04.5 LTS which I needed to update. In order to do so I did the following: Download the new version (2.107 at the moment of writing this post). In /home/user/backup/ execute:

Backup the old version (Jenkins war is installed in /usr/share/jenkins):

Overwrite the old jenkins.war:

Restart jenkins

Now, you’re all set and you can start updating the plugins. HTH, A little experiment: If you find this post and ad below useful, please check the ad out :-)

Monitor ethOS Distro with Elastic Search – 3

Posted by in IT, Software, Tutorial

Once we’ve set up the data sending from out ethOS machine, we can check that ElasticSearch collects data. With GET /ethos/_count, we get something like:

If the count is greather than 0, we can start analysing the data. Metrics I am currently measuring only machine. Therefore, I’ve set up some simple measurements: Hash rate Temperature Network Fan speed Hash rate I am measuring the average sum of all GPUs’ hash rates and the trend: I’ve built this with Timelion and the code is:

As you can see, there…read more

Monitor Docker Logs with ELK – 2

Posted by in IT, Tutorial

This second post in the series provides a starting point for visualising the log data. It makes some assumptions that logs are collected in a way described by the first part, so I would suggest to read through it if you haven’t already. Verify First, make sure you have some data logged in: You should have at least two indices:

The Discover tab in Kibana should display some records. If it doesn’t please adjust the Time Range (top right at the time of writing). Tip: I set up a…read more

Monitor Docker Logs with ELK – 1

Posted by in IT, Tutorial

Following my attempts to monitor ethOS data via ElasticSearch and Kibana, I’ve thought it would be a good idea to start monitoring the logs produced by my various docker instances. This first part deals with configuring ELK and logspout. Prerequisites I assume the following: ELK is installed. You can do it either as a set of Docker images (oh, the meta!) or just plain package install. The receiver machine is configured. E.g., if you’re on windows, create a firewall rule opening TCP port 35000 (corresponding to the config). Once this…read more

Monitor ethOS Distro with Elastic Search – 2

Posted by in IT, Software, Tutorial

Following the previous post, we are now in position to install the monitoring code on the monitoried machine, of course. The easiest way is to download the code on the machine in /home/ethos. Following steps will assume you have the unpacked code in

Once you have downloaded the code, you need to add the location of the ElasticSearch server to the local.conf:

Dissecting the scripts The scripts are written in PHP, like ethOS‘s own scripts. I did that for two reasons: Take advantage of the already written code…read more

Monitor ethOS Distro with Elastic Search – 1

Posted by in IT, Software

TL;DR: It’s possible to monitor your ethos distro install on an ElasticSearch instance. I like EthOS. I like its panel too, but at the time of writing it had some issues on updating values This was somewhat unfortunate because it’s the same time when I set up my rig so monitoring without typing show stats every minute or so was quite important. So, I’ve proceeded to try and find a replacement for the panel. Initially, I’ve thought to develop my own solution with something like django, but since I’m not…read more

Docker Exec Path-based Commands

Posted by in IT, Tutorial

TL;DR: Use sh -c “command with arguments” I’ve tried to execute

in order to see the size used by a container’s logs. Unfortunately, this resulted in an error along the lines: du: C:/Program Files/Git: No such file or directory This means that my git bash prompt interpreted the / itself. In order to get around this limitation, you need to run:

HTH, A little experiment: If you find this post and ad below useful, please check the ad out :-)