Exemplo n.º 1
0
 def _shutdownNode(self):
     if self.shutdownVm:
         self._stopMachine()
     else:
         self._printStep('Machine ready for use')
         msg = '\n\tMachine IP: %s\tRemember to stop the machine when finished' % self.vmIp
         Util.printInfo(msg)
Exemplo n.º 2
0
 def generateP12(self):
     self.tmp_dir = tempfile.mkdtemp()
     Util.printDetail('Temporary directory for certificate generation: %s' %
                      self.tmp_dir, self.configHolder.verboseLevel,
                      Util.VERBOSE_LEVEL_DETAILED)
     try:
         self._generateOpensslConfig()
         self._runCommandsP12()
     finally:
         if self.configHolder.noCleanup:
             Util.printInfo('Intermediate files are in %s' % self.tmp_dir)
         else:
             try:
                 shutil.rmtree(self.tmp_dir, ignore_errors=True)
             except:
                 pass
Exemplo n.º 3
0
    def _installPackagesOnNode(self):
        Util.printStep('Setting up Couchbase yum repository on node')
        cmd = 'curl --output %s %s' % (self._repofile, self._repourl)
        self._executeOnNodeExitOnError(cmd)

        Util.printStep('Removing Couchbase python client')
        try:
            cmd = 'pip uninstall -y couchbase'
            rc, output = self.system._nodeShell(cmd.split(' '),
                                      withOutput=True,
				      shell=True)	
            if rc != 0:
                Util.printInfo('Couchbase python client NOT removed')
            else:
                Util.printInfo('Couchbase python client removed')
        except:
            Util.printInfo("Couchbase python client NOT removed")

        Util.printStep('Removing Couchbase C client')
        cmd = 'yum erase -y %s' % ' '.join(self._pkgs)
        self._executeOnNodeExitOnError(cmd)

        Util.printStep('Installing Couchbase C client')
        cmd = 'yum install -y %s' % ' '.join(self._pkgs)
        self._executeOnNodeExitOnError(cmd)

        Util.printStep('Installing Couchbase python client dependencies')
        cmd = 'yum install --nogpgcheck -y %s' % ' '.join(self._deps)
        self._executeOnNodeExitOnError(cmd)

        Util.printStep('Installing Couchbase python client')
        cmd = 'pip install couchbase'
        self._executeOnNodeExitOnError(cmd)
Exemplo n.º 4
0
    def _installPackagesOnNode(self):
        Util.printStep("Setting up Couchbase yum repository on node")
        cmd = "curl --output %s %s" % (self._repofile, self._repourl)
        self._executeOnNodeExitOnError(cmd)

        Util.printStep("Removing Couchbase python client")
        try:
            cmd = "pip uninstall -y couchbase"
            rc, output = self.system._nodeShell(cmd.split(" "), withOutput=True, shell=True)
            if rc != 0:
                Util.printInfo("Couchbase python client NOT removed")
            else:
                Util.printInfo("Couchbase python client removed")
        except:
            Util.printInfo("Couchbase python client NOT removed")

        Util.printStep("Removing Couchbase C client")
        cmd = "yum erase -y %s" % " ".join(self._pkgs)
        self._executeOnNodeExitOnError(cmd)

        Util.printStep("Installing Couchbase C client")
        cmd = "yum install -y %s" % " ".join(self._pkgs)
        self._executeOnNodeExitOnError(cmd)

        Util.printStep("Installing Couchbase python client dependencies")
        cmd = "yum install --nogpgcheck -y %s" % " ".join(self._deps)
        self._executeOnNodeExitOnError(cmd)

        Util.printStep("Installing Couchbase python client")
        cmd = "pip install couchbase"
        self._executeOnNodeExitOnError(cmd)
Exemplo n.º 5
0
    def _installPackages(self):
        Util.printStep('Setting up Couchbase yum repository')
        cmd = 'curl --output %s %s' % (self._repofile, self._repourl)
        self._executeExitOnError(cmd)

        Util.printStep('Removing Couchbase python client')
        try:
            cmd = 'pip uninstall -y couchbase'
            rc, output = Util.execute(cmd.split(' '),
                                      withOutput=True,
                                      verboseLevel=self.verboseLevel,
                                      verboseThreshold=Util.VERBOSE_LEVEL_DETAILED)
            if rc != 0:
                Util.printInfo('Couchbase python client NOT removed')
            else:
                Util.printInfo('Couchbase python client removed')
        except:
            Util.printInfo("Couchbase python client NOT removed")

        Util.printStep('Removing Couchbase C client')
        cmd = 'yum erase -y %s' % ' '.join(self._pkgs)
        self._executeExitOnError(cmd)

        Util.printStep('Installing Couchbase C client')
        cmd = 'yum install -y %s' % ' '.join(self._pkgs)
        self._executeExitOnError(cmd)

        Util.printStep('Installing Couchbase python client dependencies')
        cmd = 'yum install -y %s' % ' '.join(self._deps)
        self._executeExitOnError(cmd)

        Util.printStep('Upgrading pip for Couchbase python client')
        cmd = 'pip install --upgrade pip'
        self._executeExitOnError(cmd)

        Util.printStep('Installing Couchbase python client')
        cmd = 'pip install couchbase'
        self._executeExitOnError(cmd)
Exemplo n.º 6
0
    def _installPackages(self):
        Util.printStep("Setting up Couchbase yum repository")
        cmd = "curl --output %s %s" % (self._repofile, self._repourl)
        self._executeExitOnError(cmd)

        Util.printStep("Removing Couchbase python client")
        try:
            cmd = "pip uninstall -y couchbase"
            rc, output = Util.execute(
                cmd.split(" "),
                withOutput=True,
                verboseLevel=self.verboseLevel,
                verboseThreshold=Util.VERBOSE_LEVEL_DETAILED,
            )
            if rc != 0:
                Util.printInfo("Couchbase python client NOT removed")
            else:
                Util.printInfo("Couchbase python client removed")
        except:
            Util.printInfo("Couchbase python client NOT removed")

        Util.printStep("Removing Couchbase C client")
        cmd = "yum erase -y %s" % " ".join(self._pkgs)
        self._executeExitOnError(cmd)

        Util.printStep("Installing Couchbase C client")
        cmd = "yum install -y %s" % " ".join(self._pkgs)
        self._executeExitOnError(cmd)

        Util.printStep("Installing Couchbase python client dependencies")
        cmd = "yum install -y %s" % " ".join(self._deps)
        self._executeExitOnError(cmd)

        Util.printStep("Installing Couchbase python client")
        cmd = "pip install couchbase"
        self._executeExitOnError(cmd)
Exemplo n.º 7
0
 def _uploadMarketplaceManifest(self):
     uploader = MarketplaceUploader(self.configHolder)
     url = uploader.upload(self.manifestFile)
     Util.printInfo('Manifest uploaded: %s' % url)
Exemplo n.º 8
0
 def _updateImageMetadataInPDisk(self):
     if self.imageMetadata:
         uuid = self.imageUrl.rsplit('/', 1)[-1]
         self.pdisk.updateVolumeAsUser(self.imageMetadata, uuid)
         Util.printInfo('Image metadata updated: %s' % self.imageMetadata)
Exemplo n.º 9
0
    def _uploadImage(self):
        self.imageUrl = self.pdisk.uploadVolume(self.imageFile)
        Util.printInfo('Image uploaded: %s' % self.imageUrl)

        self._updateImageMetadataInPDisk()