Skip to content

Configuring Minicoin

Volker Hilsheimer edited this page Mar 5, 2022 · 2 revisions

Minicoin is configured through minicoin.yml files. The default, global configuration lives in the minicoin directory, and includes default setting for folder sharing, and setting that apply to all machines.

User and project specific minicoin.yml files can extend and override those settings. User settings need to live in ~/minicoin/minicoin.yml, project specific settings need to live in a .minicoin/minicoin.yml file within or above the directory from which minicoin will be run. The load order is global - user - project, allowing user settings to extend and override global settings, and project settings to extend and override user settings.

Default rules are defined in the settings section of the minicoin.yml files. The following example adds mutagen-based file system syncing for all machines, and the ccache role to Ubuntu VMs:

--
settings:
  /.*/:
    shared_folders:
      mutagen:
        - ~/qt/dev

    roles:
      - role: upload
        files:
          $HOME/.gitconfig: ~/.gitconfig

  /ubuntu.*/:
    roles:
      - role: ccache
        cache_dir: $GUEST_HOMES/$USER/.ccache
        max_size: 20.0G

For a complete list of setting that can be configured for machines, see the Machines documentation.

Folder sharing

By default, the minicoin directory with the Vagrantfile will be shared with the guest as a folder /opt/minicoin; the home directory of the current user (or whatever the home_share attribute specifies) will be shared with the guest as a home-folder in the respective home directory, ie (/home/$USER on Linux, C:\Users\$USER on Windows, /Users/$USER on Mac guests, with $USER being the user name on the host system).

Additional folders can be shared using the provider-specific default mechanism:

settings:
  shared_folders:
    /host/path: /guest/path

Sharing of some or all folders using the default mechanism can be disabled by listing respective host paths under a disabled type:

- name: opensuse15
  shared_folders:
    disabled:
      - $HOME # don't share $HOME on this machine

These default mechanism are based on file access over the virtualized network interfaces. On local VMs, this is not very performant. On cloud-hosted VMs, such default folder-sharing is automatically disabled. For faster file access on the guest, it's preferable to use synchronizing mechanisms.

File syncing with mutagen

In contrast to regular shared folders, mutagen based file system synching copies the contents from the host path to the guest. This is the only way to make local sources available on cloud VMs, and also for local VMs it results in significantly faster build times than host file access via shared folders.

settings:
  /.*/:
    shared_folders:
      mutagen:
      - ~/qt/dev
      - ~/qt/5.15

The mutagen tool needs to be installed on the host. An alternative to mutagen is rsync, which is however slower and problematic on Windows guests.