On Thu, Dec 18, 2014 at 11:16:16PM +0530, Kunal Kushwaha wrote: > Hi, > > With ref to LXD issue #114 <https://github.com/lxc/lxd/issues/114> > > There are two ways to implement the default roots. > > 1. Initialize within code. > Instead of initializing with empty Config Structure at > https://github.com/lxc/lxd/blob/master/config.go#L56 > > can be initialized as > > remotes := map[string]RemoteConfig{ > "images": RemoteConfig{"https+registry://registry.linuxcontainers.org"}, > "local": RemoteConfig{"unix+lxd://var/lib/lxd/socket"}, > } > > defaultConfig := &Config{TestOption: "", > DefaultRemote: "", > Remotes: remotes, > ListenAddr: "80"} > > > > 2. Create a default config file. > While installation, a default config.yml can be create with default > settings. > > --- > test-option: > default-remote: > remotes: > images: > addr: https+registry://registry.linuxcontainers.org > local: > addr: unix+lxd://var/lib/lxd/socket > listen-addr: 80 > > > Which approach is better? > > > Regards, > Kunal Kushwaha
So I think we'd need something closer to option 1 since the actual list of default remotes may vary depending on the system. See: https://github.com/lxc/lxd/issues/114 The "local" entry must only be added and set as default if there is a lxd socket. If there isn't, only the images one should be present and no remote should be set as default. -- Stéphane Graber Ubuntu developer http://www.ubuntu.com
signature.asc
Description: Digital signature
_______________________________________________ lxc-devel mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-devel
