provision: Index | Files

package server

import ""

Package server DigitalRebar Provision Server

An RestFUL API-driven Provisioner and DHCP server

Terms Of Service:

There are no TOS at this moment, use at your own risk we take no responsibility

Schemes: https
BasePath: /api/v3
Version: 0.1.0
License: APL
Contact: Greg Althaus<>

  - basicAuth: []
  - Bearer: []

- application/json

- application/json



Package Files

cert.go server.go


var EmbeddedAssetsExtractFunc func(string, string) error

func Server Uses

func Server(c_opts *ProgOpts)

type ProgOpts Uses

type ProgOpts struct {
    VersionFlag         bool   `long:"version" description:"Print Version and exit"`
    DisableTftpServer   bool   `long:"disable-tftp" description:"Disable TFTP server"`
    DisableProvisioner  bool   `long:"disable-provisioner" description:"Disable provisioner"`
    DisableDHCP         bool   `long:"disable-dhcp" description:"Disable DHCP server"`
    DisableBINL         bool   `long:"disable-pxe" description:"Disable PXE/BINL server"`
    StaticPort          int    `long:"static-port" description:"Port the static HTTP file server should listen on" default:"8091"`
    TftpPort            int    `long:"tftp-port" description:"Port for the TFTP server to listen on" default:"69"`
    ApiPort             int    `long:"api-port" description:"Port for the API server to listen on" default:"8092"`
    DhcpPort            int    `long:"dhcp-port" description:"Port for the DHCP server to listen on" default:"67"`
    BinlPort            int    `long:"binl-port" description:"Port for the PXE/BINL server to listen on" default:"4011"`
    UnknownTokenTimeout int    `long:"unknown-token-timeout" description:"The default timeout in seconds for the machine create authorization token" default:"600"`
    KnownTokenTimeout   int    `long:"known-token-timeout" description:"The default timeout in seconds for the machine update authorization token" default:"3600"`
    OurAddress          string `long:"static-ip" description:"IP address to advertise for the static HTTP file server" default:""`
    ForceStatic         bool   `long:"force-static" description:"Force the system to always use the static IP."`

    BackEndType    string `long:"backend" description:"Storage to use for persistent data. Can be either 'consul', 'directory', or a store URI" default:"directory"`
    LocalContent   string `long:"local-content" description:"Storage to use for local overrides." default:"directory:///etc/dr-provision?codec=yaml"`
    DefaultContent string `long:"default-content" description:"Store URL for local content" default:"file:///usr/share/dr-provision/default.yaml?codec=yaml"`

    BaseRoot        string `long:"base-root" description:"Base directory for other root dirs." default:"/var/lib/dr-provision"`
    DataRoot        string `long:"data-root" description:"Location we should store runtime information in" default:"digitalrebar"`
    PluginRoot      string `long:"plugin-root" description:"Directory for plugins" default:"plugins"`
    PluginCommRoot  string `long:"plugin-comm-root" description:"Directory for the communications for plugins" default:"/var/run"`
    LogRoot         string `long:"log-root" description:"Directory for job logs" default:"job-logs"`
    SaasContentRoot string `long:"saas-content-root" description:"Directory for additional content" default:"saas-content"`
    FileRoot        string `long:"file-root" description:"Root of filesystem we should manage" default:"tftpboot"`
    ReplaceRoot     string `long:"replace-root" description:"Root of filesystem we should use to replace embedded assets" default:"replace"`

    LocalUI        string `long:"local-ui" description:"Root of Local UI Pages" default:"ux"`
    UIUrl          string `long:"ui-url" description:"URL to redirect to UI" default:""`
    DhcpInterfaces string `long:"dhcp-ifs" description:"Comma-seperated list of interfaces to listen for DHCP packets" default:""`
    DefaultStage   string `long:"default-stage" description:"The default stage for the nodes" default:"none"`
    DefaultBootEnv string `long:"default-boot-env" description:"The default bootenv for the nodes" default:"local"`
    UnknownBootEnv string `long:"unknown-boot-env" description:"The unknown bootenv for the system.  Should be \"ignore\" or \"discovery\"" default:"ignore"`

    DebugBootEnv  string `long:"debug-bootenv" description:"Debug level for the BootEnv System" default:"warn"`
    DebugDhcp     string `long:"debug-dhcp" description:"Debug level for the DHCP Server" default:"warn"`
    DebugRenderer string `long:"debug-renderer" description:"Debug level for the Template Renderer" default:"warn"`
    DebugFrontend string `long:"debug-frontend" description:"Debug level for the Frontend" default:"warn"`
    DebugPlugins  string `long:"debug-plugins" description:"Debug level for the Plug-in layer" default:"warn"`
    TlsKeyFile    string `long:"tls-key" description:"The TLS Key File" default:"server.key"`
    TlsCertFile   string `long:"tls-cert" description:"The TLS Cert File" default:"server.crt"`
    UseOldCiphers bool   `long:"use-old-ciphers" description:"Use Original Less Secure Cipher List"`
    DrpId         string `long:"drp-id" description:"The id of this Digital Rebar Provision instance" default:""`
    CurveOrBits   string `long:"cert-type" description:"Type of cert to generate. values are: P224, P256, P384, P521, RSA, or <number of RSA bits>" default:"P384"`

    BaseTokenSecret     string `long:"base-token-secret" description:"Auth Token secret to allow revocation of all tokens" default:""`
    SystemGrantorSecret string `long:"system-grantor-secret" description:"Auth Token secret to allow revocation of all Machine tokens" default:""`
    FakePinger          bool   `hidden:"true" long:"fake-pinger"`
    DefaultLogLevel     string `long:"log-level" description:"Level to log messages at" default:"warn"`

Package server imports 28 packages (graph). Updated 2018-04-22. Refresh now. Tools for package owners.