Exemple #1
0
 def create_machines(self):
   """Create Vagrant machines"""
   logger.info("Creating machines")
   vagrantfile = os.path.realpath(os.path.join(os.path.curdir, 'Vagrantfile'))
   if not os.path.exists(vagrantfile):
     logger.error("Cannot find file: {}".format(vagrantfile))
     logger.error("Are you sure that \'k8sdc template\' has been run?")
     sys.exit(1)
   execute("vagrant up --no-provision")
Exemple #2
0
  def create_machines(self):
    """Create Droplets"""
    logger.info("Creating machines")

    result = execute("pip freeze", output=False)
    dopy_found = False
    for item in result:
      if item.startswith("dopy"):
        dopy_found = True
    if not dopy_found:
      logger.error("Unable to find Python module \'dopy\'")
      sys.exit(1)    

    call_ansible(os.path.realpath(os.path.join(os.path.curdir, 'playbooks/machine.yaml')))