Minimal Bare Metal Deployment

Introduction

This description gives a brief overview and can be used as basic template for running the ocis binary. It does not cover extended deployment tasks or how to manage trusted certificates.

Installing the Infinite Scale binary manually works well if you want to quickly test Infinite Scale without performing additional tasks.

For a small production environment, see the Bare Metal Deployment with systemd. The main differences between the setup described in this document and the small production environment is the use of systemd, letsencrypt and a reverse proxy.

This minimal bare metal deployment makes the following assumptions:

  • Acccessing Infinite Scale only from the server.
    Use <localhost> as URL and no further configuration is neccesary.
    To access Infinite Scale via hostname or IP, see Accessing Infinite Scale Other Than Localhost.

  • You are fine in the first step using Infinite Scales internal unsigned certificates.
    Trusted certificates can be installed later on, see Handling Certificates for more information.

ownCloud highly recommends reading the General Information page first, as it contains valuable information about configuration rules, managing services and default paths - just to mention some of the useful topics.

Prerequisite

See the Prerequisites section for more details.

Used Settings

The following settings were used in this guide. You can change this according to your needs:

  • The Infinite Scale binary location: /usr/local/bin (OS default)

  • The Infinite Scale configuration directory: $HOME/.ocis/config/

  • The Infinite Scale base data directory: /var/lib/ocis

  • The URL for accessing Infinite Scale: localhost or IP

  • The port for accessing Infinite Scale: 9200 (default)

Installation

  • To get the stable binary from ownCloud, visit download.owncloud.com, select the version and the platform of choice and copy the link of the file. Check the sort order on the modification date to get the most recent releases on top. Depending on your system and preferences, you may want to save the binary in /usr/local/bin.

    To download use:

    sudo wget -O /usr/local/bin/ocis <file_url>
  • Make the binary executable with:

    sudo chmod +x /usr/local/bin/ocis
  • Check the version installed:

    ocis version --skip-services

    The output looks like this:

    Version: 5.0.4
    Compiled: 2024-05-14 00:00:00 +0000 UTC

    Note that if you omit --skip-services, you will get additional information about services printed.

Getting Command Line Help

To get a list of available options and commands type:

ocis

or

ocis --help

Start and Stop Infinite Scale

Starting Infinite Scale

Infinite Scale is started in two steps:

  • A first time start to initialize the system and

  • a recurring start after initialization.

Refer to the Default Users and Groups section if you want to have demo users created when initializing the system. This step can only be done during initialization.

First Time Initializing Infinite Scale

Infinite Scale needs a first time initialization to set up the environment. You will need to answer questions as the basis for generating a default ocis.yaml file. You can edit this file later. The default location for config files is, if not otherwise defined, $HOME/.ocis/config/. For details see the Configuration Directory documentation. Type the following command to initialize Infinite Scale.

ocis init

On success, you will see a message like:

Do you want to configure Infinite Scale with certificate checking disabled?
 This is not recommended for public instances! [yes | no = default]

=========================================
 generated OCIS Config
=========================================
 configpath : <your-user>/.ocis/config/ocis.yaml
 user       : admin
 password   : <removed for documentation>

If you get an error message like the following:

Could not create config: config in /home/<user-name>/.ocis/config/ocis.yaml already exists

you already have created a configuration once. As you cannot overwrite the existing configuration, you must delete the old configuration first to proceed. For more details, see: Initialize Infinite Scale.

Recurring Start of Infinite Scale

After initializing Infinite Scale for the first time, you can start the Infinite Scale runtime which includes embedded services. See the following sections for more information and details:

You cannot instantiate runtime services though you can define which services should start or be excluded from starting. See Managing Services for more details.

Accessing the Infinite Scale Runtime

When you have configured and started the Infinite Scale runtime as described in the example command above, you can access it via a browser using https://localhost:9200.

Starting Infinite Scale

The example commands shown below have no environment variables or command line options for ease of reading, add them according to your requirements.

To start the Infinite Scale runtime type:

ocis server

Note that this will bind ocis to the shell you are running. If you want to detach it and avoid it being stopped when closing the shell or the shell gets disconnected (SIGHUP), use the following command:

Bash
ocis server & disown -h
ZSH
ocis server & disown %%

See the respective shell documentation for how to manage processes respectively detach and re-attach sessions.

Accessing Infinite Scale Other Than Localhost

If you want to reuse an already configured minimized setup for any other address than https://localhost :

List Running Infinite Scale Processes

To list all running ocis processes type:

ps ax | grep ocis | grep -v grep
 221297 pts/1    Sl     0:04 ocis server
 221706 pts/0    Sl     0:00 ocis proxy

Stopping Infinite Scale

Depending on what you want to stop, different commands need to be applied.

If a service is being terminated with its PID, the signal SIGTERM (-15) is used. Note that SIGTERM politely asks a process to terminate. It will terminate gracefully, cleaning up all resources (files, sockets, child processes, etc.), deleting temporary files and so on. Do not use SIGKILL (-9) as this will initiate a dirty shutdown.

Stopping the complete runtime with all its running services

Depending on the user you started ocis with and which user you are currently logged in as, you may need to use sudo for the kill command for proper permissions.

ps -ax | \
   grep "ocis server" | \
   grep -v grep | \
   awk '{ print $1 }' | \
   xargs sudo kill -15
Stopping a particular ocis PID

First identify which PID you want to terminate:

ps ax | grep "ocis" | grep -v grep

This may give an output like the following:

 221297 pts/1    Sl     0:04 ocis server
 221706 pts/0    Sl     0:00 ocis proxy

To terminate the ocis proxy service type the following command, where sudo may not be necessary depending on the permissions of the logged-in user. Replace the PID according the output from above:

sudo kill -15 221706