---
agentTools:
  projectIndex: https://docs.project-fifo.net/llms.txt
---

# Installing FiFo

The steps involved in getting FiFo up and running

[block:callout]
{
  "type": "success",
  "title": "Make life easier!",
  "body": "Starting with 0.8.0 Project FiFo releases pre-made datasets. See \"Installing via FiFo AIO Dataset\" for instructions. This is the quickest and easiest way to get FiFo running."
}
[/block]

Please see the [Requirements](https://docs.project-fifo.net/docs/fifo-requirements) section for details on the requirements.

[block:api-header]
{
  "type": "basic",
  "title": "1: Dataset Import"
}
[/block]

From the **GZ** *(Global Zone)* import the base dataset which we will use as the foundation for our **FiFo Zone**. Once imported we then confirm it is installed.

Please consult [Zone requirements](https://docs.project-fifo.net/docs/fifo-requirements#zone) for details.

[block:api-header]
{
  "type": "basic",
  "title": "2: Zone Creation"
}
[/block]

\#JSON Payload file used for zone creation

[block:code]
{
  "codes": [
    {
      "code": "{\n \"autoboot\": true,\n \"brand\": \"joyent\",\n \"image_uuid\": \"<zone uuid>\",\n \"delegate_dataset\": true,\n \"indestructible_delegated\": true,\n \"max_physical_memory\": 3072,\n \"cpu_cap\": 100,\n \"alias\": \"fifo\",\n \"quota\": \"40\",\n \"resolvers\": [\n  \"8.8.8.8\",\n  \"8.8.4.4\"\n ],\n \"nics\": [\n  {\n   \"interface\": \"net0\",\n   \"nic_tag\": \"admin\",\n   \"ip\": \"10.1.1.240\",\n   \"gateway\": \"10.1.1.1\",\n   \"netmask\": \"255.255.255.0\"\n  }\n ]\n}",
      "language": "json",
      "name": "setupfifo.json"
    }
  ]
}
[/block]

Next we create our *FiFo JSON* payload file and save it in case we need to re-install at a later stage.

[block:code]
{
  "codes": [
    {
      "code": "cd /opt\nvi setupfifo.json\nvmadm create -f setupfifo.json",
      "language": "shell"
    }
  ]
}
[/block]

[block:api-header]
{
  "type": "basic",
  "title": "3: FiFo Packages Install"
}
[/block]

We now **zlogin** to our newly created *FiFo Zone* and proceed with adding the *FiFo* package repository. Then we install the required *FiFo* packages.

[block:code]
{
  "codes": [
    {
      "code": "zlogin <fifo-vm-uuid>",
      "language": "shell"
    }
  ]
}
[/block]

First we do need to configure the delegate dataset to be mounted to `/data` we can do this from within the zone with the following command:

[block:code]
{
  "codes": [
    {
      "code": "zfs set mountpoint=/data zones/$(zonename)/data",
      "language": "text"
    }
  ]
}
[/block]

Starting with 14.4.0 Datasets, Joyent introduced signed packages. Starting with Version 0.7.0 - FiFo has now also started signing it's packages. To properly install FiFo packages, the [FiFo public key](https://project-fifo.net/fifo.gpg) is required and can be installed with the following command.

[block:code]
{
  "codes": [
    {
      "code": "cd /data\ncurl -O https://project-fifo.net/fifo.gpg\ngpg --primary-keyring /opt/local/etc/gnupg/pkgsrc.gpg --import < fifo.gpg\ngpg --keyring /opt/local/etc/gnupg/pkgsrc.gpg --fingerprint",
      "language": "shell"
    }
  ]
}
[/block]

The key id is `BB975564` and the fingerprint `CE62 C662 67D5 9129 B291  62A0 ADDF 278A BB97 5564` should be returned respectively.

Now we can install the packages.

[block:code]
{
  "codes": [
    {
      "code": "echo \"http://release.project-fifo.net/pkg/17.2.0/rel\" >> /opt/local/etc/pkgin/repositories.conf\npkgin -fy up\npkgin install fifo-snarl fifo-sniffle fifo-howl fifo-cerberus",
      "language": "text"
    }
  ]
}
[/block]

[block:api-header]
{
  "type": "basic",
  "title": "4: Configuring FiFo Services"
}
[/block]

If this is a fresh installation the installer will create default configuration files for each service. When updating the configuration files do not get overwritten, but new `*.conf.example` files will be added.

The generated files contain some defaults. However is it advised to take some time to configure [Sniffle](https://docs.project-fifo.net/docs/sniffle) , [Snarl](https://docs.project-fifo.net/docs/snarl) and [Howl](https://docs.project-fifo.net/docs/howl).

[block:callout]
{
  "type": "info",
  "title": "Datasets origin",
  "body": "By default, the FiFo UI [Cerberus](https://docs.project-fifo.net/docs/cerberus-general), will list and download available datasets (VM images) from <a href='http://datasets.at/'>datasets.at</a>. If you have a local mirror, you can point to it changing the file /opt/local/fifo-cerberus/config/config.js"
}
[/block]

[block:api-header]
{
  "type": "basic",
  "title": "Service Startup"
}
[/block]

[block:code]
{
  "codes": [
    {
      "code": "svcadm enable epmd\nsvcadm enable snarl\nsvcadm enable sniffle\nsvcadm enable howl\nsvcs epmd snarl sniffle howl",
      "language": "shell"
    }
  ]
}
[/block]

# Initial administrative tasks

The last step is to create an *admin user* and organisation, this can be done with one simple command:

[block:code]
{
  "codes": [
    {
      "code": " # snarl-admin init <realm> <org> <role> <user> <pass>\n snarl-admin init default MyOrg Users admin admin",
      "language": "shell"
    }
  ]
}
[/block]

[block:api-header]
{
  "type": "basic",
  "title": "5: LeoFS initialization"
}
[/block]

[block:callout]
{
  "type": "warning",
  "title": "LeoFS Storage should be working before proceeding",
  "body": "A working and fully functional **two Zone** LeoFS setup **MUST** be up and running before you proceed with the below step."
}
[/block]

If you have not previously setup your LeoFS Storage Zones, you should **pause now** at this point and proceed with the [LeoFS Install Guide](http://docs-new.project-fifo.net/docs/installing-leofs) before continuing with the last step below. The guide can be found here:

<a class="fifo-button" href="/docs/installing-leofs">LeoFS Install Guide</a>

Once LeoFS is configured and **up and running**, the `init-leofs` command can be used from `sniffle-admin` to set up the required, users, buckets and endpoints. You can use the xip.io service or your own domain name, if you setup your DNS with wildcard:

[block:code]
{
  "codes": [
    {
      "code": "sniffle-admin init-leofs 10.1.1.21.xip.io",
      "language": "shell"
    }
  ]
}
[/block]

That's it. You can now log out of your **FiFo Zone** and back into the **Global Zone** and continue with installing the [Chunter](https://docs.project-fifo.net/docs/chunter) service.

<a class="fifo-button blue" href="/docs/chunter">Go to chunter install</a>

[block:api-header]
{
  "type": "basic",
  "title": "6: Configure FiFo"
}
[/block]

Now that you have FiFo installed and chunter running, you can now start managing and create virtual machines.

We got to add some dataset servers:

[block:code]
{
  "codes": [
    {
      "code": "# Official and community images\nsniffle-admin datasets servers add https://datasets.at/images\n\n# For FiFo custom images\nsniffle-admin datasets servers add https://datasets.project-fifo.net/images\n\n# for free bsd images\nsniffle-admin datasets servers add https://bsd.project-fifo.net/images \n",
      "language": "text"
    }
  ]
}
[/block]

You can login to the [web console](https://docs.project-fifo.net/docs/cerberus-general) and use the Configuration menu to setup the following:

* Create an [IP Range](https://docs.project-fifo.net/docs/cerberus-ipranges)
* Associate it with a [Network](https://docs.project-fifo.net/docs/cerberus-networks)
* Create some [Packages](https://docs.project-fifo.net/docs/cerberus-packages)
* Import some [Datasets](https://docs.project-fifo.net/docs/cerberus-datasets)
* Setup an [SSH key](https://docs.project-fifo.net/docs/cerberus-users#section-authenitcation) to your user be able to login to the VMs

At the point you should be able to create some VMs

[block:api-header]
{
  "type": "basic",
  "title": "7: Historical Data with Tachyon & DalmatinerDB"
}
[/block]

The ability to monitor your cloud data in real-time (***cerberus metric graphs***) or over time (***historical data***) is of fundamental importance to most cloud operators.

FiFo has some ultra-performant, purpose built services that have been designed specifically for this task. Excelling at both efficiently storing huge volumes of data as well as performing extremely fast queries that can scale to handle very large cloud installations.

Although an **optional** service, we do encourage this to be setup for all FiFo installations to truly complete your cloud offering.

First you need to setup the metric storage database called "**DalmatinerDB**"

Then the "**tachyon-meter**" service is installed in each hypervisor's **Global Zone** and the aggregation service called "**Tachyon**" is installed within its own separate Zone.

*Note: The DalmatinerDB and the Tachyon aggregation service can be installed together on the same zone.*

A detailed setup is covered in the comprehensive setup guide below:

<a class="fifo-button yellow" href="/docs/metric-overview">Metrics Setup Guide</a>