Installs all units from the manifest.
 @return [Boolean, nil] if units were installed or nil if fails mid-install
9649
def install
      return false unless install? quiet: !(logger.level == Logger::DEBUG)

      UNIT_TYPES.each do |type|
        units[type.to_s.pluralize.to_sym].each do |unit|
          return nil unless install_unit(unit, type)
        end
      end
      true
    end
1264008
def bulk_add_units(unit_list, **kwargs):
    
    # for unit in unit_list:
    #     add_unit(unit, **kwargs)

    added_units = []
    for unit in unit_list:
        added_units.append(add_unit(unit, **kwargs))

    return JSONObject({"units": added_units})
1364854
public function installModules()
    {
        foreach ($this->getRequiredModules() as $module_id) {
            if ($this->getModuleModel()->install($module_id) !== true) {
                $error = $this->translation->text('Failed to install module @module_id', array('@module_id' => $module_id));
                throw new RuntimeException($error);
            }
        }

        return true;
    }
587393
public boolean install() {
        if (tempFile == null)
            return true;  // already installed
        // Move temp file to correct location in blob store:
        String destPath = store.getRawPathForKey(blobKey);
        File destPathFile = new File(destPath);
        if (tempFile.renameTo(destPathFile))
            // If the move fails, assume it means a file with the same name already exists; in that
            // case it must have the identical contents, so we're still OK.
            tempFile = null;
        else
            cancel();
        return true;
    }
126492
def packages(id = nil, _options = {})
      id, options = nil, id if id.is_a?(Hash)
      if id
        _packages[id]
      else
        _packages.ids
      end
    end
926885
protected function install()
    {
        // Version-specific.
        $this->maybeRunVsUpgrades();

        // Misc installers.
        $this->createDbTables();
        $this->otherInstallRoutines();
        $this->doFlushRewriteRules();
        $this->maybeEnqueueNotices();

        // History/options.
        $this->updateHistory();
        $this->updateOptions();
    }
25894
public function install()
    {
        if (! isset($this->complement['installation-files'])) {
            self::$errors[] = [
                'message' => $this->complement['path']['root']
            ];

            return false;
        }

        $this->deleteDirectory();
        $this->changeState();

        $installed = $this->installComplement(
            $this->complement['installation-files'],
            $this->complement['path']['root'],
            $this->complement['slug']
        );

        if ($installed) {
            self::load(
                $this->complement['config-file'],
                $this->complement['path']['root']
            );

            $this->changeState();

            return true;
        }

        return false;
    }
1337037
protected function install()
    {
        $file = $this->download();

        if (empty($file)) {
            return false;
        }

        $result = $this->install->fromZip($file);

        if ($result !== true) {
            $this->setError($result);
            return false;
        }

        if ($this->install->isUpdate()) {
            $this->job['updated']++;
        } else {
            $this->job['inserted']++;
        }

        return true;
    }
1106194
def setup!
      return self if @app_is_setup
      puts "Hatchet setup: #{name.inspect} for #{repo_name.inspect}"
      create_git_repo! unless is_git_repo?
      create_app
      set_labs!
      buildpack_list = @buildpacks.map { |pack| { buildpack: pack } }
      api_rate_limit.call.buildpack_installation.update(name, updates: buildpack_list)
      set_config @app_config

      call_before_deploy
      @app_is_setup = true
      self
    end
1251579
def init
      ENV["GEM_HOME"] = Common.install_dir
      Gem.paths = ENV
      Common.use_dummy_ui unless Kontena.debug?
      plugins
      true
    end
615170
def install_boards(boardfamily)
      # TODO: find out why IO.pipe fails but File::NULL succeeds :(
      result = run_and_capture(flag_install_boards, boardfamily)
      already_installed = result[:err].include?("Platform is already installed!")
      result[:success] || already_installed
    end
1154786
def install?
      s = super
      return s unless s
      fail InstallFailed, 'No source file specified.' if source_path.nil?
      fail InstallFailed, 'No destination specified.' if destination_path.nil?
      true
    end
344665
def install_if_reported_available=(new_val)
      return nil if new_val == @install_if_reported_available
      new_val = false if new_val.to_s.empty?
      raise JSS::InvalidDataError, 'install_if_reported_available must be boolean true or false' unless JSS::TRUE_FALSE.include? new_val
      @install_if_reported_available = new_val
      @need_to_update = true
    end
170478
def add_repos(repos)
      return if repos.empty?

      repos[@appliance_config.os.version].each do |name, repo|
        r = { 'name' => name, 'ephemeral' => true }

        ['baseurl', 'mirrorlist'].each { |type| r[type] = substitute_vars(repo[type]) unless repo[type].nil? }

        @appliance_config.repos << r
      end
    end
26632
def run
      if @options[:list_assemblers]
        puts @assemblerman.list_assemblers
        return
      elsif @options[:install_assemblers]
        @assemblerman.install_assemblers(@options[:install_assemblers])
        return
      end

      if (@options[:left].nil? || @options[:right].nil?)
        logger.error "Reads must be provided with --left and --right"
        logger.error "Try --help for command-line help"
        exit(1)
      end

      unless (@options[:timelimit].nil?)
        logger.info "Time limit set to #{@options[:timelimit]}"
      end

      subsample_input

      res = @assemblerman.run_all_assemblers @options
      write_metadata res
      merge_assemblies res

    end
385497
def reload_all_manifests(self):
        
        self._logger.debug("Reloading all manifests.")
        self._manifests = []
        self.load_manifests()
        self._logger.debug("All manifests reloaded.")
607730
async def AddUnits(self, application, num_units, placement):
        '''
        
        '''
        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Application',
                   request='AddUnits',
                   version=5,
                   params=_params)
        _params['application'] = application
        _params['num-units'] = num_units
        _params['placement'] = placement
        reply = await self.rpc(msg)
        return reply