Exemple #1
0
func main() {
	logs.GetDefaultLog().(*erlog.ErlogLogger).Appenders[0].(*erlog.ErlogWriterAppender).Out = os.Stdout
	logs.SetLevel(logs.TRACE)

	overrideEnvVarName := ""
	target := "/"
	var templateDir string

	processArgs(&overrideEnvVarName, &target, &templateDir)

	Run(overrideEnvVarName, target, templateDir)
}
Exemple #2
0
func main() {
	logs.GetDefaultLog().(*erlog.ErlogLogger).Appenders[0].(*erlog.ErlogWriterAppender).Out = os.Stdout

	if os.Getuid() != 0 {
		println("dgr needs to be run as root")
		os.Exit(1)
	}

	if !SupportsOverlay() {
		logs.Fatal("Overlay filesystem is required")
	}

	Execute()
}
Exemple #3
0
func main() {
	logs.GetDefaultLog().(*erlog.ErlogLogger).Appenders[0].(*erlog.ErlogWriterAppender).Out = os.Stdout

	overrideEnvVarName := ""
	target := "/"
	var templateDir string
	logLvl := "INFO"

	processArgs(&overrideEnvVarName, &target, &templateDir, &logLvl)

	lvl, err := logs.ParseLevel(logLvl)
	if err != nil {
		fmt.Println("Wrong log level : " + logLvl)
		os.Exit(1)
	}
	logs.SetLevel(lvl)

	Run(overrideEnvVarName, target, templateDir)
}
Exemple #4
0
func main() {
	logs.GetDefaultLog().(*erlog.ErlogLogger).Appenders[0].(*erlog.ErlogWriterAppender).Out = os.Stdout

	uuid := ProcessArgsAndReturnPodUUID()

	dir, err := os.Getwd()
	if err != nil {
		logs.WithE(err).Fatal("Failed to get current working directory")
	}

	b, err := NewBuilder(dir, uuid)
	if err != nil {
		logs.WithE(err).Fatal("Failed to load Builder")
	}

	if err = b.Build(); err != nil {
		logs.WithE(err).Fatal("Build failed")
	}

	os.Exit(0)
}