Ejemplo n.º 1
0
 def test_shows_all_deployments(self):
     depls = []
     for i in range(10):
         depls.append(deployment.create_deployment(self.db))
     uuids = deployment.query_deployments(self.db)
     for depl in depls:
         tools.assert_true(any([ depl.uuid == uuid for uuid in uuids ]))
Ejemplo n.º 2
0
  machine =
    {{ pkgs, ... }}:
    {{
      deployment.ec2.accessKeyId = "logicblox-dev";
      deployment.ec2.region = "{0}";
      deployment.ec2.blockDeviceMapping."/dev/xvdg".size = pkgs.lib.mkOverride 10 {1};
    }};
}}
'''.format(args.region, ebs_size))
f.close()

db = deployment.open_database(deployment.get_default_state_file())
try:
    depl = deployment.open_deployment(db, "ebs-creator")
except Exception:
    depl = deployment.create_deployment(db)
    depl.name = "ebs-creator"
depl.auto_response = "y"
depl.nix_exprs = [
    os.path.abspath("./ebs-creator.nix"),
    os.path.abspath("./ebs-creator-config.nix")
]
if not args.keep: depl.destroy_resources()
depl.deploy(allow_reboot=True)

m = depl.machines['machine']

# Do the installation.
device = "/dev/xvdg"
if args.hvm:
    m.run_command('parted -s /dev/xvdg -- mklabel msdos')
Ejemplo n.º 3
0
  machine =
    {{ pkgs, ... }}:
    {{
      deployment.ec2.accessKeyId = "logicblox-dev";
      deployment.ec2.region = "{0}";
      deployment.ec2.blockDeviceMapping."/dev/xvdg".size = pkgs.lib.mkOverride 10 {1};
    }};
}}
'''.format(args.region, ebs_size))
f.close()

db = deployment.open_database(deployment.get_default_state_file())
try:
    depl = deployment.open_deployment(db, "ebs-creator")
except Exception:
    depl = deployment.create_deployment(db)
    depl.name = "ebs-creator"
depl.auto_response = "y"
depl.nix_exprs = [os.path.abspath("./ebs-creator.nix"), os.path.abspath("./ebs-creator-config.nix")]
if not args.keep: depl.destroy_resources()
depl.deploy(allow_reboot=True)

m = depl.machines['machine']


# Do the installation.
device="/dev/xvdg"
if args.hvm:
    m.run_command('parted -s /dev/xvdg -- mklabel msdos')
    m.run_command('parted -s /dev/xvdg -- mkpart primary ext2 1M -1s')
    device="/dev/xvdg1"
Ejemplo n.º 4
0
 def setup(self):
     super(GenericDeploymentTest,self).setup()
     self.depl = deployment.create_deployment(self.db)
     self.depl.auto_response = "y"