robksawyer / brenda-web

Web interface for submitting Blender render jobs to Amazon Web Services.
15 stars 4 forks source link

Add brenda permission to generated SQS queue? #7

Open robksawyer opened 9 years ago

robksawyer commented 9 years ago

Should I add the brenda permission that is created when installing brenda? Or will this matter in the end. I've stubbed this out in the /services/amazon/createSQSWorkQueue method.

robksawyer commented 9 years ago

I've added the ability to add the Security groups to the spot instance request. This happens in the requestSpotInstances method of the Amazon service (api/services/amazon.js).

var params = {
    SpotPrice: spotPrice, //required
    //AvailabilityZoneGroup: 'STRING_VALUE', //The user-specified name for a logical grouping of bids.
    DryRun: dry,
    InstanceCount: jobRecord.aws_ec2_instance_count,
    // LaunchGroup: 'STRING_VALUE', //The instance launch group. Launch groups are Spot Instances that launch together and terminate together. (Default: Instances are launched and terminated individually)
    LaunchSpecification: {
        // AddressingType: 'STRING_VALUE',
        // EbsOptimized: true || false,
        ImageId: jobRecord.ami_id,
        InstanceType: jobRecord.instance_type, //'t1.micro | m1.small | m1.medium | m1.large | m1.xlarge | m3.medium | m3.large | m3.xlarge | m3.2xlarge | m4.large | m4.xlarge | m4.2xlarge | m4.4xlarge | m4.10xlarge | t2.micro | t2.small | t2.medium | m2.xlarge | m2.2xlarge | m2.4xlarge | cr1.8xlarge | i2.xlarge | i2.2xlarge | i2.4xlarge | i2.8xlarge | hi1.4xlarge | hs1.8xlarge | c1.medium | c1.xlarge | c3.large | c3.xlarge | c3.2xlarge | c3.4xlarge | c3.8xlarge | c4.large | c4.xlarge | c4.2xlarge | c4.4xlarge | c4.8xlarge | cc1.4xlarge | cc2.8xlarge | g2.2xlarge | cg1.4xlarge | r3.large | r3.xlarge | r3.2xlarge | r3.4xlarge | r3.8xlarge | d2.xlarge | d2.2xlarge | d2.4xlarge | d2.8xlarge',
        Monitoring: {
            Enabled: monitoring
        },
        SecurityGroupIds: [
            jobRecord.ssh_key_name
        ],
        SecurityGroups: [
            jobRecord.sec_groups
        ],
    },
    Type: keepAlive, 
};