Source: https://api.octoperf.com/doc/on-premise-infra/tutorials/offline-deployment/

# Deploy On-Premise Infra on an offline server

This tutorial explains how to setup OctoPerf's On-Premise Infra on an offline server.

## Prerequisites

This tutorial requires:

- A computer with docker installed and an Internet access preferably with the same OS than the offline server (for compatibility purposes),
- A possibility to transfer files to the offline server:
    - you have access remotely to the offline server from your local machine: ```scp``` or any alternative can be used to transfer files to the remote server
    - you have no connection at all to the offline server: you need to transfer files physically - for example using a USB key 

If one of these elements is missing it will not be possible to perform an offline installation of OctoPerf's On-Premise Infra. 

## Overview

The tutorials will teach you how to deploy an OctoPerf's On-Premise Infra offline. This involves:

- [Docker](https://www.docker.com/) offline installation,
- [docker-compose](https://docs.docker.com/compose/) offline installation,
- Download OctoPerf's [HTTP Offline version](https://api.octoperf.com/doc/on-premise-infra/download/enterprise-edition-offline.zip),
- Download OctoPerf's docker images as a file.

For each one of these files, we will proceed to transfer the package to the offline server and then run the installation process as usual.

The next sections of this tutorial will be divided between the [On-Premise Infra](https://api.octoperf.com/doc/on-premise-infra/) installation and the [On-Premise Agents](https://api.octoperf.com/doc/on-premise-agent/) installation, both have similar prerequisites, but the agent machines will require less files to be transferred so we handle them in a different section.

## On-Premise Infra installation

### Docker

Docker provides an installation procedure that relies on [downloading a package.](https://docs.docker.com/engine/install/ubuntu/#install-from-a-package)

Just make sure to transfer the package to the offline server before you unpack it. Docker will be required for the next steps of this procedure so make sure to install it first.

### Docker compose

Make sure you have the docker compose plugin installed:

```bash
ubuntu@pop-os:~$ docker compose version 
Docker Compose version v2.16.0

```

if the plugin is not installed, please follow the [instructions here](https://docs.docker.com/compose/install/linux/).

### On-Premise Infra config files

The Zip containing all the required configuration files is [available here](https://api.octoperf.com/doc/on-premise-infra/download/enterprise-edition.zip). This file will be used by *docker-compose* to execute and configure all the required components.

### On-Premise Infra docker images

We are going to use [docker save](https://docs.docker.com/engine/reference/commandline/save/) to download the required images into a [.tar](https://en.wikipedia.org/wiki/Tar_(computing)) file. The command lines below are for [version 18.0.0 of OctoPerf](https://api.octoperf.com/doc/release-notes/).

!!! warning
     To get the latest version of these images check our [changelog](https://api.octoperf.com/doc/release-notes/) or the docker-compose.yml file inside the [enterprise-edition.zip](https://api.octoperf.com/doc/on-premise-infra/download/enterprise-edition.zip). The Traefik load balancer image version is also located in this docker-compose.yml file. Do not use the tag "latest" as it may cause some inconsistencies.

If you haven't pulled the images locally, make sure to do so first:

```bash
for image in octoperf/enterprise-edition:18.0.0 octoperf/octoperf-ui:18.0.0 octoperf/enterprise-documentation:18.0.0 octoperf/utility-server:18.0.0 octoperf/mcp-server:18.0.0 elasticsearch:8.19.23 traefik:v3; do docker pull $image; done
```

Alternatively you can simply launch the [makefile](https://api.octoperf.com/doc/on-premise-infra/#start-the-application) in order to get all the images downloaded and use `docker images -a` to list them.

Then use docker save to make a [tar file](https://en.wikipedia.org/wiki/Tar_(computing)) out of all of them:

```bash
docker save -o enterprise.tar octoperf/enterprise-edition:18.0.0 octoperf/octoperf-ui:18.0.0 octoperf/enterprise-documentation:18.0.0 octoperf/utility-server:18.0.0 octoperf/mcp-server:18.0.0 elasticsearch:8.19.23 traefik:v3
```

Now we must transfer the `enterprise.tar` file to the offline host and execute the [docker load](https://docs.docker.com/engine/reference/commandline/load/) command:

```bash
docker load -i enterprise.tar
```

### Installation

Now that all the prerequisites are in place, you can proceed  with the usual [installation procedure](https://api.octoperf.com/doc/on-premise-infra/#quick-setup).

## Agent installation

### Docker

Docker provides an installation procedure that relies on [downloading a package.](https://docs.docker.com/engine/install/ubuntu/#install-from-a-package)

Just make sure to transfer the package to the offline server before you unpack it. Docker will be required for the next steps of this procedure so make sure to install it first.

### Agent docker images

We are going to use [docker save](https://docs.docker.com/engine/reference/commandline/save/) to download the required images into a [.tar](https://en.wikipedia.org/wiki/Tar_(computing)) file. Here's the command line for [version 18.0.0 of OctoPerf](https://api.octoperf.com/doc/release-notes/).

!!! warning
    Make sure to check our [changelog](https://api.octoperf.com/doc/release-notes/) to get the latest version of these images. Do not use the tag "latest" as it may cause some inconsistencies in case we have released a preview of our next version.

If you haven't first pulled the images locally, make sure to do so first:

```bash
for image in octoperf/docker-agent:18.0.0 octoperf/jmeter-standard:18.0.0 octoperf/jmeter-webdriver:18.0.0; do docker pull $image; done
```

Then use docker save to make a [tar file](https://en.wikipedia.org/wiki/Tar_(computing)) out of all of them:

```bash
docker save -o agent.tar octoperf/docker-agent:18.0.0 octoperf/jmeter-standard:18.0.0 octoperf/jmeter-webdriver:18.0.0
```

Now we must transfer the `agent.tar` file to the offline host and execute the [docker load](https://docs.docker.com/engine/reference/commandline/load/) command:

```bash
docker load -i agent.tar
```

!!! info
    Add the image of each engine your tests use to these three commands: `octoperf/jmeter-playwright` for Playwright virtual users, and `octoperf/k6` for [K6 virtual users](https://api.octoperf.com/doc/design/create-virtual-user/import-k6-scripts/), at the version of the other images.

### Installation

Now that all the prerequisites are in place, you can proceed  with the usual [installation procedure](https://api.octoperf.com/doc/on-premise-agent/provider-type/on-premise/#start-an-agent).
