Gitlab Runner Error: sudo: no tty present and no askpass program specified

After issuing the first build on a dynamically created Container I came across the following build error when running a command with sudo.

sudo: no tty present and no askpass program specified

The error is caused by trying to run a command with sudo, however the calling user has not been authorised to use sudo. The error isn’t helpful, and doesn’t really spell out where to go, but adding the calling user to the sudoers file will save the day.

Solution

Open up the sudoers file for editing in your favorite editor.

vi /etc/sudoers

And add your gitlab runner user to the bottom. If you installed your gitlab runner from the official apt repositories then your gitlab-runner process will run under the gitlab-runner user.

Add the following to the bottom of the file:

gitlab-runner ALL=(ALL) NOPASSWD: ALL

Retry your build and you should be back in business!

 


Scripted Install of Oracle Java 8 on Ubuntu 16.04

Please see Install Oracle Java In Debian/ Ubuntu using apt-get for more information.

apt install -y software-properties-common
apt-add-repository -y ppa:webupd8team/java
apt update
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections
apt install -y oracle-java8-installer

 


Rename a Proxmox Host

Category : How-to

Renaming a Linux server’s hostname is usually a trivial task, and that’s no Different to a Proxmox server providing it’s not part of a cluster. If your machine is in a cluster then things get a bit more complicated and that’s a blog subject for another day.

For a single node machine it’s simple – Proxmox is Debian under the hood so simply follow the usual Debian process:

Change the hostname file to contain your new hostname

vi /etc/hostname

To save having to restart, you can also run the hostname command to implement the change on a running machine. Otherwise you’ll need to reboot your server to pick up the change.

hostname [NEW_HOSTNAME]

Next, edit your /etc/hostname file and change all occurrences of the old hostname with the new one.


Proxmox 5.0 is now available

Category : Tech News

proxmox logo gradToday, the Proxmox VE team have released a new version of Proxmox, incrementing the major version to 5.0!

The new version packs in a raft of new features, the headline being the new Replicated Storage feature which enables batch style synchronisation of local storage volumes across servers.

You can download the ISO from https://www.proxmox.com/en/downloads/item/proxmox-ve-5-0-iso-installer

Highlights of the 5.0 release:

  • Based on Debian Stretch 9.0
  • Kernel 4.10.15
  • QEMU 2.9
  • LXC: update to 2.0.8
  • New asynchronous Storage Replication feature (needs ZFS, technology preview)
  • New/updated LXC templates (Debian, Ubuntu, CentOS, Fedora, OpenSUSE, Arch Linux, Gentoo and Alpine)
  • Updated/improved noVNC console]
  • Ceph v12.1.0 Luminous (technology preview), packaged by Proxmox
  • Live migration with local storage
  • GUI improvements
    • USB und Host PCI address visibility
    • improved bulk and filtering options
  • Improved installation ISO
  • Importing Qemu/KVM_Virtual_Machines#_importing_virtual_machines_from_foreign_hypervisors
  • Improved reference documentation with screenshots
  • Countless bug fixes and package updates

Upgrade

Before updating, make sure all your VM’s have been stopped, both LXC and KVM. Ensure you have the required repository entries for apt. You’ll either need a valid license key or to add the less stable pve-no-subscription repository.

Update your apt for Debian, edit /etc/apt/sources.list and replace it with:

deb http://ftp.at.debian.org/debian stretch main contrib

# security updates
deb http://security.debian.org stretch/updates main contrib

And your Proxmox repository source /etc/apt/sources.list.d/pve-enterprise.list to the below. See Proxmox 3.1 package/ updates manager (this also works for version 5.x) for more information.

deb https://enterprise.proxmox.com/debian/pve stretch pve-enterprise

Run the below commands on each server in your cluster.

apt-get update
apt-get dist-upgrade

Restart all Proxmox servers to complete the installation.


OBI formatting grand totals – without XML!

Recently I needed to have some conditionally formated grand total rows in OBI. I remember years ago hacking around with the XML which is far from ideal. I then realised it could be done another way, here is the example:

 

Create an analysis with a measure column:

Apply the conditional format on the Actual % column

This should result in the following analysis

This is the special bit, add a new calculated item on the column where you want the total

Select the Function (aggregation Rule) and add in all of the values

Now the totals will be applied to the analysis

You can format this calculated row using the format option on the calculated item window


Visit our advertisers

Quick Poll

Which type of virtualisation do you use?
  • Add your answer

Visit our advertisers