simple_perf 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
| @@ -40,7 +40,8 @@ EOS | |
| 40 40 | 
             
                        ' -a KeyName=' +  config['aws_keypair'] +
         | 
| 41 41 | 
             
                        ' -a AmiId=' +  opts[:ami] +
         | 
| 42 42 | 
             
                        ' -a S3BucketName=' + opts[:s3bucket] +
         | 
| 43 | 
            -
                        ' -a InstanceType=' + opts[:instancetype]
         | 
| 43 | 
            +
                        ' -a InstanceType=' + opts[:instancetype] +
         | 
| 44 | 
            +
                        ' -a Abort=no'
         | 
| 44 45 |  | 
| 45 46 | 
             
                    Shared::pretty_print `#{command}`
         | 
| 46 47 | 
             
                  end
         | 
| @@ -10,7 +10,7 @@ module SimplePerf | |
| 10 10 | 
             
                      version SimplePerf::VERSION
         | 
| 11 11 | 
             
                      banner <<-EOS
         | 
| 12 12 |  | 
| 13 | 
            -
            Destroys CloudFormation  | 
| 13 | 
            +
            Destroys CloudFormation stacks.
         | 
| 14 14 |  | 
| 15 15 | 
             
            Usage:
         | 
| 16 16 | 
             
                  simple_perf destroy -e ENVIRONMENT -p PROJECT_NAME
         | 
| @@ -27,6 +27,52 @@ EOS | |
| 27 27 | 
             
                                    ' -n ' + 'simple-perf-' + opts[:project]
         | 
| 28 28 |  | 
| 29 29 | 
             
                    Shared::pretty_print `#{command}`
         | 
| 30 | 
            +
             | 
| 31 | 
            +
                    config = Config.new.environment opts[:environment]
         | 
| 32 | 
            +
             | 
| 33 | 
            +
                    AWS.config(
         | 
| 34 | 
            +
                        :access_key_id => config['access_key'],
         | 
| 35 | 
            +
                        :secret_access_key => config['secret_key'])
         | 
| 36 | 
            +
             | 
| 37 | 
            +
                    command = 'simple_deploy list' +
         | 
| 38 | 
            +
                        ' -e ' + opts[:environment] +
         | 
| 39 | 
            +
                        ' | grep ' + opts[:project] + '-s3'
         | 
| 40 | 
            +
                    bucket_stack = `#{command}`
         | 
| 41 | 
            +
             | 
| 42 | 
            +
                    puts bucket_stack
         | 
| 43 | 
            +
             | 
| 44 | 
            +
                    if bucket_stack.empty?
         | 
| 45 | 
            +
                      return
         | 
| 46 | 
            +
                    end
         | 
| 47 | 
            +
             | 
| 48 | 
            +
                    command = 'simple_deploy outputs' +
         | 
| 49 | 
            +
                        ' -e ' + opts[:environment] +
         | 
| 50 | 
            +
                        ' -n ' + bucket_stack
         | 
| 51 | 
            +
                    bucket_name = `#{command}`
         | 
| 52 | 
            +
                    bucket_name = bucket_name.split(' ')[1]
         | 
| 53 | 
            +
             | 
| 54 | 
            +
                    if(config['region'] == 'us-east-1')
         | 
| 55 | 
            +
                      s3_endpoint = 's3.amazonaws.com'
         | 
| 56 | 
            +
                    else
         | 
| 57 | 
            +
                      s3_endpoint = "s3-#{config['region']}.amazonaws.com"
         | 
| 58 | 
            +
                    end
         | 
| 59 | 
            +
             | 
| 60 | 
            +
                    s3 = AWS::S3.new(:s3_endpoint => s3_endpoint)
         | 
| 61 | 
            +
             | 
| 62 | 
            +
                    # use existing s3 bucket
         | 
| 63 | 
            +
                    b = s3.buckets[bucket_name]
         | 
| 64 | 
            +
             | 
| 65 | 
            +
                    b.objects.each do |obj|
         | 
| 66 | 
            +
                      puts obj.key
         | 
| 67 | 
            +
                      obj.delete
         | 
| 68 | 
            +
                    end
         | 
| 69 | 
            +
             | 
| 70 | 
            +
                    command = 'simple_deploy destroy' +
         | 
| 71 | 
            +
                        ' -e ' + opts[:environment] +
         | 
| 72 | 
            +
                        ' -n ' + bucket_stack
         | 
| 73 | 
            +
             | 
| 74 | 
            +
                    Shared::pretty_print `#{command}`
         | 
| 75 | 
            +
             | 
| 30 76 | 
             
                  end
         | 
| 31 77 | 
             
                end
         | 
| 32 78 | 
             
              end
         | 
| @@ -205,7 +205,7 @@ | |
| 205 205 | 
             
                                            "mode": "000770"
         | 
| 206 206 | 
             
                                        },
         | 
| 207 207 |  | 
| 208 | 
            -
                                        "/home/ec2-user/ | 
| 208 | 
            +
                                        "/home/ec2-user/simple_perf_test_files/gatling.sh": {
         | 
| 209 209 | 
             
                                            "content": { "Fn::Join": [ "", [ "#!/bin/bash", "\n",
         | 
| 210 210 | 
             
                                                "export GATLING_HOME=/opt/gatling", "\n",
         | 
| 211 211 | 
             
                                                "$GATLING_HOME/bin/gatling.sh -df ~/simple_perf_test_files/user-files/data -sf ~/simple_perf_test_files/user-files/simulations -s $1", "\n" ] ] },
         | 
| @@ -214,7 +214,7 @@ | |
| 214 214 | 
             
                                            "mode": "000770"
         | 
| 215 215 | 
             
                                        },
         | 
| 216 216 |  | 
| 217 | 
            -
                                        "/home/ec2-user/ | 
| 217 | 
            +
                                        "/home/ec2-user/simple_perf_test_files/input": {
         | 
| 218 218 | 
             
                                            "content": { "Fn::Join": [ "", [ "GatlingSimulation", "\n",
         | 
| 219 219 | 
             
                                                "EWLB", "\n" ] ] },
         | 
| 220 220 | 
             
                                            "owner": "ec2-user",
         | 
    
        data/lib/simple_perf/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: simple_perf
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.0. | 
| 4 | 
            +
              version: 0.0.8
         | 
| 5 5 | 
             
              prerelease: 
         | 
| 6 6 | 
             
            platform: ruby
         | 
| 7 7 | 
             
            authors:
         | 
| @@ -9,7 +9,7 @@ authors: | |
| 9 9 | 
             
            autorequire: 
         | 
| 10 10 | 
             
            bindir: bin
         | 
| 11 11 | 
             
            cert_chain: []
         | 
| 12 | 
            -
            date: 2013-09- | 
| 12 | 
            +
            date: 2013-09-28 00:00:00.000000000 Z
         | 
| 13 13 | 
             
            dependencies:
         | 
| 14 14 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 15 15 | 
             
              name: rake
         |