0 Replies Latest reply: Oct 16, 2012 8:36 AM by 899247 RSS

    Deploying from a list with WLST

    899247
      Hey all!
      i have a little problem... and cant find any thread to this...
      My position:
      we get for our WebLogic always new deliveries .
      In this, new deployments are included . Until now, there was always a fixed number of deployments and also clearly by name .
      The change occurred .
      There comes a delivery with any number of deployments with different names.

      My idea :
      Search all deployments in the current delivery - these are collected in a list ( Deployments.txt ) .
      The Deploy function should work - in fact even the undeploy ( not tried ) :
      ------------------------------------------------------------------------------------------------------------------------------
      for i in `more /apps/tenoss/data/delivery/CONFIG/Deloyments.txt`;
      do
      echo "Beginne mit dem ersten Deployment: $i"
      . ${JAVA}
      #x=` java weblogic.Deployer -debug -verbose -adminurl $URL -userkeyfile ${USER} -stage -name $i -targets ${TARGET} -deploy ${DEPLDIR}/${DATE}/$i 1> ${LOGDEPL}/$.log 2> ${LOGDEPL}/${i}.log`
      #rtvl=$?
      if [ $rtvl -gt 0 ]; then
      cat ${LOGDEPL}/${i}.log
      echo "Fehler beim ausfuehren!!"
      exit $rtvl
      fi
      while ! grep -s "deploy application $i on ${TARGET}." ${DOMAINLOG} > /dev/null ; do sleep 10 ; done
      echo "Deployment ${i} erfolgreich eingespielt."
      sleep 10
      done
      ------------------------------------------------------------------------------------------------------------------------------
      for the undeploy I could also just use the " -undeploy " parameter .
      Now I would like to try the whole with WLST .
      Since I find the undeploy easier I started it and immediately ran into problems.
      How it looked before:
      ------------------------------------------------------------------------------------------------------------------------------
      edit()
      startEdit()
      stopApplication(DEPL5)
      print "Applikation %s gestoppt." %(DEPL5)
      activate()
      edit()
      startEdit()
      undeploy(DEPL5)
      activate()
      ------------------------------------------------------------------------------------------------------------------------------
      ( Of course with Connect , etc.)
      How can I make something that he install from a list that reads deployments undeploy I want?
      So for i in ( Undeploy.txt ) ;
      do ...
      ...
      done;

      Does it work?

      thx for help!
      Simon