Documentation ¶
Index ¶
- Constants
- Variables
- func GetUidGid(username string) (uid, gid int)
- type BackoffNode
- type ClusterComponentData
- type ClusterConfig
- type Etcd
- type EtcdConfig
- type HTTPAdapterSet
- type ListOutput
- type Master
- type MasterConfig
- type Node
- type NodeConfig
- type OpenVPN
- type OpenVPNClient
- type OpenVPNConfig
- type RevocationResponse
- type SSHComponent
- type SSHConfig
- type SSHUsersFile
- type SystemUser
- type UserSpec
Constants ¶
View Source
const ( EtcdCaCrt = "ca.crt" EtcdCaKey = "ca.key" SnapshotFilenameBucket = "snapshot.db" )
View Source
const ( MasterSaKey = "sa.key" MasterSaPub = "sa.pub" MasterFProxyCrt = "front-proxy-ca.crt" MasterFProxyKey = "front-proxy-ca.key" MasterCaKey = "ca.key" MasterCaCrt = "ca.crt" )
View Source
const ( JoinFile string = "join.sh" BucketPath string = "join" LocalJoinFilePath string = "." DefaultJointTimeoutValue time.Duration = 30 * time.Minute )
View Source
const ( OpenVPNServerCert = "server.crt" OpenVPNServerKey = "server.key" OpenVPNCaCert = "ca.crt" OpenVPNCaKey = "ca.key" OpenVPNCRL = "ca.crl" OpenVPNTaKey = "ta.key" OpenVPNPath = "pki/vpn" )
View Source
const ( OpenVPNClientCert = "client.crt" OpenVPNClientKey = "client.key" OpenVPNClientCaCert = "ca.crt" OpenVPNClientCaKey = "ca.key" OpenVPNClientTaKey = "ta.key" OpenVPNClientPath = "pki/vpn-client" OpenVPNClientRevokedPath = "pki/vpn-client/revoked" )
View Source
const ( SSHUserSpecs = "ssh-users.yml" SSHBucketDir = "ssh" SSHAuthorizedKeysFileName = "authorized_keys" SSHAuthorizedKeysTempFileName = "authorized_keys_tmp" SSHSudoerDir = "/etc/sudoers.d" )
Variables ¶
View Source
var ( Cert = certutil.Config{ CommonName: "SIGHUP s.r.l. Server", Organization: []string{"SIGHUP s.r.l."}, AltNames: certutil.AltNames{DNSNames: []string{}, IPs: []net.IP{}}, Usages: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth}, } CertConfig = pki.CertConfig{ Config: Cert, PublicKeyAlgorithm: 0, } )
Functions ¶
Types ¶
type BackoffNode ¶
type ClusterComponentData ¶
type ClusterComponentData struct { *ClusterConfig *storage.Data }
type ClusterConfig ¶
type ClusterConfig struct { NodeName string `json:"nodeName" mapstructure:"nodeName"` Etcd EtcdConfig `json:"etcd" mapstructure:"etcd"` Master MasterConfig `json:"master" mapstructure:"master"` Node NodeConfig `json:"node" mapstructure:"node"` OpenVPN OpenVPNConfig `json:"openvpn" mapstructure:"openvpn"` SSH SSHConfig `json:"sshkeys" mapstructure:"sshkeys"` }
ClusterConfig represents the configuration for the whole cluster
type Etcd ¶
type Etcd struct { ClusterComponentData StopFlag bool }
Etcd implements the ClusterComponent Interface
type EtcdConfig ¶
type EtcdConfig struct { DataDir string `json:"dataDir" mapstructure:"dataDir"` CertDir string `json:"certDir" mapstructure:"certDir"` CaCertFilename string `json:"caCertFilename" mapstructure:"caCertFilename"` CaKeyFilename string `json:"caKeyFilename" mapstructure:"caKeyFilename"` ClientCertFilename string `json:"clientCertFilename" mapstructure:"clientCertFilename"` InitialClusterToken string `json:"initialClusterToken" mapstructure:"initialClusterToken"` SnapshotFile string `json:"snapshotFile" mapstructure:"snapshotFile"` ClientKeyFilename string `json:"clientKeyFilename" mapstructure:"clientKeyFilename"` Endpoint string `json:"endpoint" mapstructure:"endpoint"` }
EtcdConfig is used to backup/restore/configure etcd nodes
type HTTPAdapterSet ¶
type ListOutput ¶ added in v0.2.0
type ListOutput struct { User string `json:"user"` ValidFrom string `json:"valid_from"` ValidTo string `json:"valid_to"` Expired bool `json:"expired"` Revoked RevocationResponse `json:"revoke_info"` }
type Master ¶
type Master struct {
ClusterComponentData
}
Master implements the ClusterComponent interface
type MasterConfig ¶
type MasterConfig struct { CertDir string `json:"certDir" mapstructure:"certDir"` CaCertFile string `json:"caCertFilename" mapstructure:"caCertFilename"` CaKeyFile string `json:"caKeyFilename" mapstructure:"caKeyFilename"` SaPubFile string `json:"saPubFilename" mapstructure:"saPubFilename"` SaKeyFile string `json:"saKeyFilename" mapstructure:"saKeyFilename"` ProxyCaCertFile string `json:"proxyCaCertFilename" mapstructure:"proxyCaCertFilename"` ProxyKeyCertFile string `json:"proxyKeyCertFilename" mapstructure:"proxyKeyCertFilename"` }
MasterConfig is used to backup/restore/configure master nodes
type Node ¶
type Node struct {
ClusterComponentData
}
Node represent the object that reflects what nodes need (implements ClusterComponent)
type NodeConfig ¶
type NodeConfig struct { CloudProvider string `json:"caKeyFilename" mapstructure:"caKeyFilename"` // contains filtered or unexported fields }
NodeConfig is used to backup/restore/configure worker nodes (backup and restore are not implemented right now)
type OpenVPN ¶
type OpenVPN struct {
ClusterComponentData
}
type OpenVPNClient ¶
type OpenVPNClient struct {
ClusterComponentData
}
func (OpenVPNClient) CreateUser ¶ added in v0.1.0
func (o OpenVPNClient) CreateUser(clientName string) error
func (OpenVPNClient) ListUserCertificates ¶ added in v0.2.0
func (o OpenVPNClient) ListUserCertificates(output string) error
func (OpenVPNClient) RevokeUser ¶ added in v0.1.0
func (o OpenVPNClient) RevokeUser(clientName string) error
type OpenVPNConfig ¶
type RevocationResponse ¶ added in v0.2.0
type SSHComponent ¶
type SSHComponent struct {
ClusterComponentData
}
func (SSHComponent) Configure ¶
func (o SSHComponent) Configure(overwrite bool) error
Configure setup for each file entry the github configured ssh keys in the authorized_keys file
func (SSHComponent) Init ¶
func (o SSHComponent) Init() error
type SSHConfig ¶
type SSHConfig struct { User string `json:"user" mapstructure:"user"` TempDir string `json:"tempDir" mapstructure:"tempDir"` LocalDirConfigs string `json:"localDirConfigs" mapstructure:"localDirConfigs"` Adapter HTTPAdapterSet `json:"adapter" mapstructure:"adapter"` }
type SSHUsersFile ¶
type SSHUsersFile struct {
Users []UserSpec `yaml:"users"`
}
Click to show internal directories.
Click to hide internal directories.