io7m | single-page | multi-page | epub | Looseleaf User Manual
2. Model
Previous
Front Matter
Up
4. Configuration
Next

# 3. Installation

- 3.1. Overview
- 3.2. OCI Images
- 3.3. Maven Central
- 3.4. Upgrading
  - 3.4.1. 2.0.0 → 3.0.0

## 3.1. Overview

1
The looseleaf package is available from several sources:

### 3.1.2. Sources

- OCI Images
- Maven Central

3
Regardless of the distribution method, the looseleaf package will contain a command named looseleaf that acts as the main entrypoint to all of the package's functionality. The looseleaf command expects an environment variable named LOOSELEAF_HOME to be defined that points to the installation directory. See the documentation for the installation methods below for details.

## 3.2. OCI Images

1
The looseleaf package can be installed from quay.io using docker or podman.

### 3.2.2. Docker/Podman Pull

    $ docker pull quay.io/io7mcom/looseleaf:3.0.0

    $ podman pull quay.io/io7mcom/looseleaf:3.0.0

3
The image is configured such that LOOSELEAF_HOME=/looseleaf, with the looseleaf command existing at /looseleaf/bin/looseleaf. The image is configured with the expectation that users will mount a volume at /looseleaf/etc containing a configuration file and space for the looseleaf database file. The container can otherwise be run without any privileges, and with a read-only root filesystem.

### 3.2.4. Run

    $ podman run --read-only --volume /x/y/z:/looseleaf/etc:Z -i -t quay.io/io7mcom/looseleaf:3.0.0 looseleaf
    info: Usage: looseleaf [options] [command] [command options]
    ...

## 3.3. Maven Central

1
A distribution package can be found at Maven Central.
2
The looseleaf command requires that a Java 17+ compatible JVM be accessible via /usr/bin/env java.
3
Verify the integrity of the distribution zip file:

### 3.3.4. Verify

    $ gpg --verify com.io7m.looseleaf.cmdline-3.0.0-distribution.zip.asc
    gpg: assuming signed data in 'com.io7m.looseleaf.cmdline-3.0.0-distribution.zip.asc'
    gpg: Signature made Tue 28 Jun 2022 15:01:56 GMT
    gpg:                using RSA key 3CCE59428B30462D10459909C5607DA146E128B8
    gpg:                issuer "contact@io7m.com"
    gpg: using pgp trust model
    gpg: Good signature from "io7m.com (2022 maven-rsa-key) <contact@io7m.com>" [unknown]

5
Unzip the zip file, and set LOOSELEAF_HOME appropriately:

### 3.3.6. Extract

    $ unzip com.io7m.looseleaf.cmdline-3.0.0-distribution.zip
    $ export LOOSELEAF_HOME=$(realpath looseleaf)
    $ ./looseleaf/bin/looseleaf
    info: Usage: looseleaf [options] [command] [command options]
    ...

## 3.4. Upgrading

## 3.4.1. 2.0.0 → 3.0.0

1
In 3.0.0, the looseleaf package added support for SQLite as the new default database implementation underlying the key/value store. Support for MVStore is still present, but deprecated.
2
Data should be migrated out of existing databases and into new SQLite databases using the migrate-database command.
2. Model
Previous
Front Matter
Up
4. Configuration
Next
io7m | single-page | multi-page | epub | Looseleaf User Manual