Changeset 202 for drbl-virt/sbin


Ignore:
Timestamp:
Aug 30, 2010, 2:18:14 PM (14 years ago)
Author:
rock
Message:

Add: Automatic packaging drbl-virt (tar_drbl-virt.sh)

Location:
drbl-virt/sbin
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • drbl-virt/sbin/check_drbl_client.sh

    r200 r202  
    2020
    2121# [Main]
     22drbl_sshkey
    2223for client_IP in $client_IPs
    2324do
    2425    # local variables
    25     client_hostname="$(cat $Work_Home/etc/IP_HOST_TABLE | grep -v "#" | awk '{print $2}')"
     26    client_hostname="$(cat $Work_Home/etc/IP_HOST_TABLE | grep -v "#" | grep $client_IP | awk '{print $2}')"
    2627    IP_status="online"
    2728    client_CPU_core=""
  • drbl-virt/sbin/check_drbl_vm.sh

    r200 r202  
    2424    # local variables
    2525    IP_status="online"
    26     client_hostname="$(cat $Work_Home/etc/IP_HOST_TABLE | grep -v "#" | awk '{print $2}')"
     26    client_hostname="$(cat $Work_Home/etc/IP_HOST_TABLE | grep -v "#" | grep $client_IP | awk '{print $2}')"
    2727    vm_numbers=""
    2828    vm_hostnames=""
     
    5858            i=i+1
    5959        done
    60    
     60        echo ""
    6161    else
    62         echo "[Error] $client_hostname $client_IP is offline !" && exit 2
     62        echo "[Error] $client_hostname $client_IP is offline !"
    6363
    6464    fi
  • drbl-virt/sbin/drbl_virt.sh

    r187 r202  
    3131$Work_Path/drbl_xen_repush.sh
    3232
     33# = 4. Create User(drbl-virter) and mv drbl-virt.wat to tomcat =
     34creat_drbl-virter
     35install_tomcat_and_mv_drbl-virt
  • drbl-virt/sbin/functions_drbl_virt

    r195 r202  
    8383# [Check Debian Xen package]
    8484function check_debian_xen(){
     85echo "[Check Xen package in apt server]"
     86echo ""
    8587aptitude update
    8688check_debian_xen_pkg=$(aptitude search xen-linux-system)
     
    300302Xen_MAC_5=""
    301303Xen_MAC_6=""
     304VM_Host_totoal_nu=$(cat $Work_Home/etc/IP_VM_$eth | wc -l)
    302305
    303306# backup
     
    307310
    308311# generate MAC
    309 for (( i=1 ; i<"$VM_Host_totoal_nu" ; i++ ))
     312for (( i=1 ; i<="$VM_Host_totoal_nu" ; i++ ))
    310313do
    311314    if [ $i -lt 10 ]; then
     
    325328    fi
    326329done
     330
     331# delete tmp file
     332rm /tmp/drbl-virt_MAC
    327333}
    328334
     
    403409
    404410}
     411
     412
     413# [Creat drbl-virter user]
     414function creat_drbl-virter(){
     415useradd -m -s /bin/bash drbl-virter
     416}
     417
     418
     419# [Download tomcat and mv drbl-virt.wat to wepapps]                           
     420function install_tomcat_and_mv_drbl-virt(){
     421if [ ! -e $Work_Home/tomcat-7.0.2.tar.gz ]; then
     422wget http://drbl-virt.googlecode.com/files/tomcat-7.0.2.tar.gz -P $Work_Home
     423fi                         
     424tar zxvf $Work_Home/tomcat-7.0.2.tar.gz -C $Work_Home/
     425mv $Work_Home/drbl-virt.war $Work_Home/tomcat-7.0.2/webapps/
     426chown -R drbl-virter.drbl-virter $Work_Home/tomcat-7.0.2
     427su  drbl-virter -c "$Work_Home/tomcat-7.0.2/bin/startup.sh"
     428}
  • drbl-virt/sbin/xen_install.sh

    r191 r202  
    5353                echo "[Install Xen Hypervisior]"
    5454                echo ""
    55                 aptitude install xen-linux-system-2.6.26-2-xen-${Linux_bit} xen-tools bridge-utils python-xml ipcalc xtightvncviewer
     55                aptitude install xen-linux-system-2.6.26-2-xen-${Linux_bit} xen-tools bridge-utils python-xml ipcalc xtightvncviewer sun-java6-jre
     56                   
     57                # setup java
     58                update-java-alternatives -s java-6-sun
     59
    5660                cp $Work_Home/conf/debian-lenny_xend-config.sxp /etc/xen/xend-config.sxp
     61                # change java
    5762                if [ $1 == "stop" ]; then
    5863                    echo ""
Note: See TracChangeset for help on using the changeset viewer.