Beispiel #1
0
def install_sbt(sbt_url=SBT_URL, tmp_dir="/tmp"):
  with settings(warn_only=True):
    run("mkdir $HOME/software")
    run("mkdir $HOME/bin")

  util.remote_file(sbt_url, "$HOME/software", backup=False)
  util.remote_file(RESOURCE_PATH + "/sbt", "$HOME/bin", backup=False,
      permissions="755")
Beispiel #2
0
def install_drake():
  with cd("$HOME/software"):
    run("git clone git://github.com/Factual/drake.git")

  with cd("$HOME/software/drake"):
    run("lein uberjar")

  util.remote_file(RESOURCE_PATH + "/drake", "$HOME/bin", backup=False,
      permissions="755")
Beispiel #3
0
def install_guest_additions(iso=None):
  user = util.env_var("$USER")
  apt.apt_install("dkms")
  reboot(180)
  guest_addition_mnt = "/mnt/vbox_guest_additions"

  if iso:
    guest_addition_iso = "/tmp/VBoxGuestAdditions.iso"
    util.remote_file(iso, guest_addition_iso)
  else:
    apt.apt_install("virtualbox-guest-additions")
    guest_addition_iso = "/usr/share/virtualbox/VBoxGuestAdditions.iso"

  sudo("mkdir -p %s" % guest_addition_mnt)
  sudo("mount -o loop %s %s" % (guest_addition_iso, guest_addition_mnt))
  with cd(guest_addition_mnt):
    sudo("./VBoxLinuxAdditions.run")

  sudo("umount %s" % guest_addition_mnt)
  sudo("rmdir %s" % guest_addition_mnt)
  sudo("usermod -a -G vboxsf %s" % user)
  print "you may need to logout and login for group changes to take effect"
Beispiel #4
0
def update_config():
  util.remote_file(RESOURCE_PATH + "/zoo.cfg", "/etc/zookeeper", \
      use_sudo=True, owner="root", group="root")
Beispiel #5
0
 def install_apt_repo(self, apt_repo_file):
   remote_file = self.remote_apt_path + "/" + apt_repo_file
   util.remote_file(self.resource_path + "/" + apt_repo_file, \
       remote_file, use_sudo=True, owner="root", group="root")
   self.apt_update()