// Install is a mocked implementation.
177923
func (m *Messenger) Install(handler messenger.MessageHandler, msg proto.Message) error {
	m.handlers[reflect.TypeOf(msg).Elem().Name()] = handler
	return m.Called().Error(0)
}
28935
func Install(client kubernetes.Interface, opts *Options) error {
	if err := createDeployment(client.ExtensionsV1beta1(), opts); err != nil {
		return err
	}
	if err := createService(client.CoreV1(), opts.Namespace); err != nil {
		return err
	}
	if opts.tls() {
		if err := createSecret(client.CoreV1(), opts); err != nil {
			return err
		}
	}
	return nil
}
173172
func (t *SubprocessTest) SetUp(ti *ogletest.TestInfo) {
	err := t.initialize(ti.Ctx)
	if err != nil {
		panic(err)
	}
}
313199
func Install(i Installer) error {
	basePath := filepath.Dir(i.Path())
	if _, pathErr := os.Stat(basePath); os.IsNotExist(pathErr) {
		if err := os.MkdirAll(basePath, 0755); err != nil {
			return err
		}
	}

	if _, pathErr := os.Stat(i.Path()); !os.IsNotExist(pathErr) {
		return i.Update()
	}

	return i.Install()
}
998778
func (e *endpointDetails) Install(mux oauthserver.Mux, paths ...string) {
	for _, prefix := range paths {
		mux.HandleFunc(path.Join(prefix, urls.RequestTokenEndpoint), e.readyHandler(e.requestToken))
		mux.HandleFunc(path.Join(prefix, urls.DisplayTokenEndpoint), e.readyHandler(e.displayToken))
		mux.HandleFunc(path.Join(prefix, urls.ImplicitTokenEndpoint), e.implicitToken)
	}
}
340670
func Install(targets []string, b backend.Backend, cb config.Backend, checkKeys func(config.Backend) error) error {

	// if target is platform, install all services
	if len(targets) == 1 {
		switch targets[0] {
		case PlatformCommand:
			return InstallPlatform(b, cb, checkKeys, false)
		case StatelessPlatformCommand:
			return InstallPlatform(b, cb, checkKeys, true)
		}
	}
	var wg sync.WaitGroup

	// otherwise create the specific targets
	b.Create(targets, &wg, Stdout, Stderr)
	wg.Wait()

	return nil
}
510461
func (s *Service) Install() error {
	if s.NoConf() {
		return s.errorf(nil, "missing conf")
	}

	err := s.install()
	if errors.IsAlreadyExists(err) {
		logger.Debugf("service %q already installed", s.Name())
		return nil
	} else if err != nil {
		logger.Errorf("failed to install service %q: %v", s.Name(), err)
		return err
	}
	logger.Debugf("service %q successfully installed", s.Name())
	return nil
}
91982
func (f *Food) Install() error {
	h := home.Home(home.HomePath)
	barrelDir := filepath.Join(h.Barrel(), f.Name, f.Version)
	pkg := f.GetPackage(runtime.GOOS, runtime.GOARCH)
	if pkg == nil {
		return fmt.Errorf("food '%s' does not support the current platform (%s/%s)", f.Name, runtime.GOOS, runtime.GOARCH)
	}
	u, err := url.Parse(pkg.URL)
	if err != nil {
		return fmt.Errorf("could not parse package URL '%s' as a URL: %v", pkg.URL, err)
	}
	cachedFilePath := filepath.Join(home.UserHome(home.UserHomePath).Cache(), fmt.Sprintf("%s-%s-%s-%s%s", f.Name, f.Version, pkg.OS, pkg.Arch, filepath.Ext(u.Path)))
	if err := f.DownloadTo(pkg, cachedFilePath); err != nil {
		return err
	}
	if err := checksumVerifyPath(cachedFilePath, pkg.SHA256); err != nil {
		return fmt.Errorf("shasum verify check failed: %v", err)
	}

	if err := os.MkdirAll(barrelDir, 0755); err != nil {
		return err
	}
	unarchiveOrCopy(cachedFilePath, barrelDir, u.Path)

	// This is just a safety check to make sure that there's nothing there when we link the package.
	f.Unlink(pkg)
	// special case: gofish is replacing itself on windows
	// https://github.com/fishworks/gofish/issues/46
	if runtime.GOOS == "windows" && f.Name == "gofish" {
		gofishBinPath := filepath.Join(home.HomePrefix, "bin/gofish.exe")
		exists, err := osutil.Exists(gofishBinPath)
		if err != nil {
			return err
		}
		if exists {
			if err := os.Rename(gofishBinPath, fmt.Sprintf("%s.rotten", gofishBinPath)); err != nil {
				return err
			}
		}
	}
	if err := f.Link(pkg); err != nil {
		return err
	}

	if f.Caveats != "" {
		fmt.Println(f.Caveats)
	}

	// write to the install receipt to record what's been done here
	receiptFilepath := filepath.Join(h.Barrel(), f.Name, receipt.ReceiptFilename)

	receiptFile, err := os.OpenFile(receiptFilepath, os.O_RDWR|os.O_CREATE, 0644)
	if err != nil {
		return err
	}
	defer receiptFile.Close()

	installReceipt, err := receipt.NewFromReader(receiptFile)
	if err != nil && err != io.EOF {
		return err
	}

	// rewind to the beginning to overwrite the receipt's contents
	receiptFile.Seek(0, 0)

	installReceipt.Name = f.Name
	installReceipt.Rig = f.Rig
	installReceipt.LastModified = time.Now()
	installReceipt.GoFishVersion = version.String()

	return installReceipt.Save(receiptFile)
}
1207687
func (i *VCSInstaller) Install() error {
	repo, err := vcs.NewRepo(i.Source, i.Path())
	if err != nil {
		return err
	}

	if err := i.sync(repo); err != nil {
		return err
	}

	ref, err := i.solveVersion(repo)
	if err != nil {
		return err
	}

	if ref != "" {
		if err := i.setVersion(repo, ref); err != nil {
			return err
		}
	}

	if !isRig(repo.LocalPath()) {
		return rig.ErrDoesNotExist
	}

	return nil
}
366003
func (s *SourceScriptHandler) Install(r *api.InstallResult) error {
	dst := filepath.Join(s.DestinationDir, constants.UploadScripts, r.Script)
	if err := s.fs.Rename(r.URL, dst); err != nil {
		return err
	}
	if err := s.fs.Chmod(dst, 0755); err != nil {
		return err
	}
	// Make the path to scripts nicer in logs
	parts := strings.Split(filepath.ToSlash(r.URL), "/")
	if len(parts) > 3 {
		r.URL = filepath.FromSlash(sourcesRootAbbrev + "/" + strings.Join(parts[len(parts)-3:], "/"))
	}
	r.Installed = true
	r.Downloaded = true
	return nil
}
1001299
func (c *Client) Install(argv []string) error {
	usage := fmt.Sprintf(`Loads the definitions of components from local unit files.

After install, the components will be available to start.

"deisctl install" looks for unit files in these directories, in this order:
- the $DEISCTL_UNITS environment variable, if set
- $HOME/.deis/units
- /var/lib/deis/units

Usage:
  deisctl install [<target>...] [options]

Options:
  --router-mesh-size=<num>  Number of routers to be loaded when installing the platform [default: %d].
`, cmd.DefaultRouterMeshSize)
	// parse command-line arguments
	args, err := docopt.Parse(usage, argv, true, "", false)
	if err != nil {
		return err
	}

	meshSizeArg, _ := args["--router-mesh-size"].(string)
	parsedValue, err := strconv.ParseUint(meshSizeArg, 0, 8)
	if err != nil || parsedValue < 1 {
		fmt.Print("Error: argument --router-mesh-size: invalid value, make sure the value is an integer between 1 and 255.\n")
		return err
	}
	cmd.RouterMeshSize = uint8(parsedValue)

	return cmd.Install(args["<target>"].([]string), c.Backend, c.configBackend, cmd.CheckRequiredKeys)
}
310079
func Install(i Installer) error {
	if _, pathErr := os.Stat(path.Dir(i.Path())); os.IsNotExist(pathErr) {
		return errors.New(`plugin home "$HELM_HOME/plugins" does not exist`)
	}

	if _, pathErr := os.Stat(i.Path()); !os.IsNotExist(pathErr) {
		return errors.New("plugin already exists")
	}

	return i.Install()
}
405940
func (o *OrganizerModern) Setup(f func()) {
	o.setup = append(o.setup, f)
}
1218440
func Install(scheme *runtime.Scheme) {
	utilruntime.Must(authentication.AddToScheme(scheme))
	utilruntime.Must(v1beta1.AddToScheme(scheme))
	utilruntime.Must(v1.AddToScheme(scheme))
	utilruntime.Must(scheme.SetVersionPriority(v1.SchemeGroupVersion, v1beta1.SchemeGroupVersion))
}
557378
func Install(scheme *runtime.Scheme) {
	utilruntime.Must(batch.AddToScheme(scheme))
	utilruntime.Must(v1.AddToScheme(scheme))
	utilruntime.Must(v1beta1.AddToScheme(scheme))
	utilruntime.Must(v2alpha1.AddToScheme(scheme))
	utilruntime.Must(scheme.SetVersionPriority(v1.SchemeGroupVersion, v1beta1.SchemeGroupVersion, v2alpha1.SchemeGroupVersion))
}
1155405
func (m *MesosMessenger) Install(handler MessageHandler, msg proto.Message) error {
	// Check if the message is a pointer.
	mtype := reflect.TypeOf(msg)
	if mtype.Kind() != reflect.Ptr {
		return fmt.Errorf("Message %v is not a Ptr type", msg)
	}

	// Check if the message is already installed.
	name := getMessageName(msg)
	if _, ok := m.installedMessages[name]; ok {
		return fmt.Errorf("Message %v is already installed", name)
	}

	m.guardHandlers.Lock()
	defer m.guardHandlers.Unlock()

	m.installedMessages[name] = mtype.Elem()
	m.installedHandlers[name] = handler
	m.tr.Install(name)
	return nil
}
413201
func Install(scheme *runtime.Scheme) {
	utilruntime.Must(audit.AddToScheme(scheme))
	utilruntime.Must(v1.AddToScheme(scheme))
	utilruntime.Must(v1beta1.AddToScheme(scheme))
	utilruntime.Must(v1alpha1.AddToScheme(scheme))
	utilruntime.Must(scheme.SetVersionPriority(v1.SchemeGroupVersion, v1beta1.SchemeGroupVersion, v1alpha1.SchemeGroupVersion))
}