Skip to content
Ivan Mincik edited this page May 5, 2020 · 8 revisions

LINZ's Ubuntu Software Repository is the main source of Linux extra packages used by LINZ's Ubuntu server and desktop machines.

Repository is hosted on Packagecloud.

Supported Linux Distributions

  • Ubuntu Trusty (14.04)
  • Ubuntu Xenial (16.04)
  • Ubuntu Bionic (18.04)

Repository Branches

  • test : public test/staging repository
  • prod : public production repository (copy of tested packages)
  • private-test : private test/staging repository
  • private-prod : private production repository (copy of tested packages)

Usage

Both private and public repositories are implemented in LINZ ansible-deployment project. If you want to use these repositories, use following process.

PostgreSQL Repository

LINZ's repository depends on PostgreSQL packages installed from apt.postgresql.org.

  • Add apt.postgresql.org repository before adding the LINZ one
$ sudo apt-get install wget ca-certificates
$ wget \
    --quiet \
    -O - \
    https://www.postgresql.org/media/keys/ACCC4CF8.asc \
  | sudo apt-key add -
$ sudo sh \
    -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" \
       > /etc/apt/sources.list.d/pgdg.list'

Public Repository Installation

  • Repository installation via Bash script
$ curl -s https://packagecloud.io/install/repositories/linz/prod/script.deb.sh \
  | sudo bash

If more transparent installation is needed, repository can be installed using following manual steps:

  • Installation of required tools
$ sudo apt-get install -y \
    curl \
    gnupg \
    apt-transport-https
  • GPG key installation
$ curl -L https://packagecloud.io/linz/prod/gpgkey \
  | sudo apt-key add -
  • Add output of following command in to /etc/apt/sources.list.d/linz_prod.list file
echo "deb https://packagecloud.io/linz/prod/ubuntu/ $(lsb_release -cs) main"
  • Packages cache update
$ sudo apt-get update

Private Repository Installation

  • Get repository access toke from Packagecloud admins (Ivan Mincik)

  • Set token variable (start command with two spaces to avoid recording in shell history)

$ [TWO-SPACES] export PKC_TOKEN=<TOKEN>
  • Repository installation via Bash script
$ curl -s https://${PKC_TOKEN}:@packagecloud.io/install/repositories/linz/private-prod/script.deb.sh \
  | sudo bash

If more transparent installation is needed, repository can be installed using following manual steps:

  • Installation of required tools
$ sudo apt-get install -y \
    curl \
    gnupg \
    apt-transport-https
  • Get GPG key URL
$ UNIQUE_ID=`hostname -f` \
  && \
  curl "https://${PKC_TOKEN}:@packagecloud.io/install/repositories/linz/private-prod/gpg_key_url.list?os=ubuntu&dist=$(lsb_release -cs)&name=${UNIQUE_ID}"
  • Add output of following command in to /etc/apt/sources.list.d/linz_private-prod.list file
$ UNIQUE_ID=`hostname -f` \
  && \
  curl "https://${PKC_TOKEN}:@packagecloud.io/install/repositories/linz/private-prod/config_file.list?os=ubuntu&dist=$(lsb_release -cs)&name=${UNIQUE_ID}"
  • Packages cache update
$ sudo apt-get update

Packages Installation (both private and public)

Package installation is straightforward.

$ sudo apt-get install <PACKAGE-NAME>