Documentation
¶
Overview ¶
Package homeboot provides a command line tool that creates a private key identity and enrolls it.
Index ¶
- Constants
- func BuildEmpty(client *dock.Client, name string) error
- func BuildEmptyIfNotExist(client *dock.Client, name string) error
- func CheckSystemDock() error
- func FetchBuildRelease(c *httputil.Client, b string) (*drvapi.Release, error)
- func FetchChannelRelease(c *httputil.Client, ch string) (*drvapi.Release, error)
- func FetchSSHKeys(c *InitConfig) ([]string, error)
- func InitFiles(c *InitConfig) ([]*bosinit.WriteFile, error)
- func Main()
- func StartCore(client *dock.Client, config *CoreConfig) (string, error)
- type BootConfig
- type CoreConfig
- type DownloadConfig
- type DownloadSource
- type Downloader
- type InitConfig
Constants ¶
const CoreMount = "/opt/jarvis/var"
CoreMount is the mount point of jarvis volume.
Variables ¶
This section is empty.
Functions ¶
func BuildEmpty ¶
BuildEmpty builds the homedrv/empty image. This image is only used for processing volumes.
func BuildEmptyIfNotExist ¶
BuildEmptyIfNotExist builds the homedrv/empty image if the image does not exist yet.
func CheckSystemDock ¶
func CheckSystemDock() error
CheckSystemDock checks if system docker exists. It returns NotFound error if not.
func FetchBuildRelease ¶
FetchBuildRelease fetches the a particular build.
func FetchChannelRelease ¶
FetchChannelRelease fetch the release from a particular channel.
func FetchSSHKeys ¶
func FetchSSHKeys(c *InitConfig) ([]string, error)
FetchSSHKeys fetches the SSH keys specified by the config.
func InitFiles ¶
func InitFiles(c *InitConfig) ([]*bosinit.WriteFile, error)
InitFiles generates init files for a new homedrive.
Types ¶
type BootConfig ¶
type BootConfig struct { Drive *drvcfg.Config Code string Download bool `json:",omitempty"` LegacyNaming bool }
BootConfig is a JSON marshallable file that is saved on the file system, often as /opt/homedrv/boot.jsonx It specifies the flags used by homeinstall.
type CoreConfig ¶
type CoreConfig struct { Drive *drvcfg.Config Image string Files *tarutil.Stream BindSysDock bool // bind system-docker.sock }
CoreConfig specifies how to start a core.
type DownloadConfig ¶
type DownloadConfig struct { Release *drvapi.Release Channel string Build string Naming *drvcfg.Naming // Naming conventions. // Download the core only; only used in homeboot for bootstraping. CoreOnly bool // Only downloads the latest one from the ladder. LatestOnly bool // If set, ignore major versions that are lower than this. CurrentSemVersions map[string]string }
DownloadConfig is the install config. This is the configuration for downloading and installing.
type DownloadSource ¶
type DownloadSource struct { // Build gets the release by name. Build func(b string) (*drvapi.Release, error) // Channel gets the release of a channel. Channel func(ch string) (*drvapi.Release, error) // OpenObject opens an object by name. OpenObject func(name string) (io.ReadCloser, error) // OpenDocker is the legacy way to download a docker image. OpenDocker func(name, hash string) (io.ReadCloser, error) }
DownloadSource is a source for downloading a release.
func OfficialDownloadSource ¶
func OfficialDownloadSource(c *httputil.Client) *DownloadSource
OfficialDownloadSource creates a downloader downloading from HomeDrive official website.
type Downloader ¶
type Downloader struct {
// contains filtered or unexported fields
}
Downloader is a downloader for downloading docker images.
func NewDownloader ¶
func NewDownloader(src *DownloadSource, dock *dock.Client) *Downloader
NewDownloader creates a new downloader.
func NewOfficialDownloader ¶
func NewOfficialDownloader( c *httputil.Client, dock *dock.Client, ) *Downloader
NewOfficialDownloader creates a new downloader that downloads from the official source.
func (*Downloader) DownloadRelease ¶
func (d *Downloader) DownloadRelease(c *DownloadConfig) ( *drvapi.Release, error, )
DownloadRelease downloads an entire release.
type InitConfig ¶
type InitConfig struct { HomeBoot string Boot *BootConfig GitHubKeys string UserKeys string }
InitConfig is the configuration to initialize a homedrive.
func NewInitConfig ¶
func NewInitConfig() *InitConfig
NewInitConfig creates a new init config for creating a new HomeDrive instance.
func (*InitConfig) DeclareFlags ¶
func (c *InitConfig) DeclareFlags(flags *flagutil.FlagSet)
DeclareFlags declares command line flags.