The gitfs Fileserver Backend

In SUSE Manager, pygit2 is the supported Python interface to git. When pygit2 is installed the gitfs fileserver backend is available and it is a supported feature.

Configuration options are set in the /etc/salt/master file, or in a separate configuration file in the /etc/salt/master.d/ directory. The basic settings are:

fileserver_backend

List of fileserver backends that the Salt master checks for files in the order they are defined. Options:

  • roots: Files local on the Salt master (SUSE Manager Server). roots is required to keep the product running. You can only enable gitfs optionally. Additionally, SUSE strongly recommends to prefer roots (local files) over gitfs. The standard backend.

  • gitfs: Files stored in one or more git repositories. The repositories are defined with gitfs_remotes.

    Example:

    fileserver_backend:
      - roots
      - git
gitfs_remotes

List of git repositories. git://, https://, file://, or ssh:// URLs can be configured. For SSH remotes, a scp-like syntax is also supported; for example: gitlab@gitlab.example.com:universe/setup.git. Then you can also specify options for credentials, file locations, or branches such as pubkey, privkey, root,base.

Example:

gitfs_remotes:
  - https://example.com/myformulas/formula.git
  - gitlab@gitlab.example.com:universe/setup.git:
    - pubkey: /var/lib/salt/.ssh/id_rsa_gitlab.pub
    - privkey: /var/lib/salt/.ssh/id_rsa_gitlab
    - root: srv/salt
    - base: master
ext_pillar

List of external pillar interfaces. Salt can also serve pillar data from one or more git repositories. For syntax and options, also see the gitfs_remotes setting.

Example:

ext_pillar:
  - git:
    - master gitlab@gitlab.example.com:universe/setup.git:
      - root: srv/pillar
      - pubkey: /var/lib/salt/.ssh/id_rsa_gitlab.pub
      - privkey: /var/lib/salt/.ssh/id_rsa_gitlab

For more information, see: