provision: github.com/digitalrebar/provision/server Index | Files

package server

import "github.com/digitalrebar/provision/server"

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 https://raw.githubusercontent.com/digitalrebar/digitalrebar/master/LICENSE.md
Contact: Greg Althaus<greg@rackn.com> http://rackn.com

Security:
  - basicAuth: []
  - Bearer: []

Consumes:
- application/json

Produces:
- application/json

swagger:meta

Index

Package Files

cert.go localOnly.go server.go

Variables

var EmbeddedAssetsExtractFunc func(string, string) error

EmbeddedAssetsExtractFunc is a function pointer that can set at initialization time to enable the exploding of data. This is used to avoid having to have a fully generated binary for testing purposes.

func Server Uses

func Server(cOpts *ProgOpts)

Server takes the start up options and runs a DRP server. This function will not return unless an error or shutdown signal is received.

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"`
    SecretsType    string `long:"secrets" description:"Storage to use for persistent data. Can be either 'consul', 'directory', or a store URI.  Will default to being the same as 'backend'" default:""`
    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"`
    SecretsRoot     string `long:"secrets-root" description:"Location we should store encrypted parameter private keys in" default:"secrets"`
    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:"https://portal.rackn.io"`
    DhcpInterfaces string `long:"dhcp-ifs" description:"Comma-separated 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"`

    HaEnabled   bool   `long:"ha-enabled" description:"Enable HA"`
    HaAddress   string `long:"ha-address" description:"IP address to advertise as our HA address" default:""`
    HaInterface string `long:"ha-interface" description:"Interface to put the VIP on for HA" default:""`
}

ProgOpts defines the DRP server command line options.

Package server imports 30 packages (graph) and is imported by 1 packages. Updated 2018-06-22. Refresh now. Tools for package owners.