uc3-sam-sceptre 0.0.1 → 0.0.2
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.
- checksums.yaml +4 -4
- data/README.md +65 -57
- data/lib/uc3-sam-sceptre/version.rb +1 -1
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 8daa12905f3990e4c33824a11edc030f69b7166baf06b87f69bd6d79e61ccf14
         | 
| 4 | 
            +
              data.tar.gz: 1e3e7c42fdcf229e00e7dff93e30fd1ae84ee5fa807169fa3430a6031967b38b
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 738b38c44834d8fcf7a72646c45c8c8d6681533fa1b50ae4481089767f4a5024308b22dfc0d8f91466dcd67309a0c797220740021cb35a145fbfb930e71f8e8d
         | 
| 7 | 
            +
              data.tar.gz: d04e2615d5e6201bce35f3dacd6fb650ba5548e342e895af29bf0e83a5cbdab86f794fc294c1c0cdcca5e95dd4be75a7e09d8244a785f233b39b71b08dda7366
         | 
    
        data/README.md
    CHANGED
    
    | @@ -151,7 +151,7 @@ This gem will automatically append the `:program + :service + :subservice + :env | |
| 151 151 |  | 
| 152 152 | 
             
            #### Build the bundle
         | 
| 153 153 |  | 
| 154 | 
            -
            You will need to run `bundle install` so that this gem is installed and ready
         | 
| 154 | 
            +
            You will need to run `bundle config path ./ && bundle install` so that this gem is installed and ready
         | 
| 155 155 |  | 
| 156 156 | 
             
            #### Add the Sceptre hook
         | 
| 157 157 |  | 
| @@ -171,7 +171,7 @@ parameters: | |
| 171 171 | 
             
            hooks:
         | 
| 172 172 | 
             
              after_create:
         | 
| 173 173 | 
             
                # Build the Lambda code and store in the bucket so it is available downstream
         | 
| 174 | 
            -
                - !cmd './templates/lambdas/src/sam_build_deploy.rb'
         | 
| 174 | 
            +
                - !cmd './templates/lambdas/src/sam_build_deploy.rb true true'
         | 
| 175 175 | 
             
            ```
         | 
| 176 176 |  | 
| 177 177 | 
             
            ### Examples Ruby scripts:
         | 
| @@ -181,36 +181,40 @@ The following is an example of deploying to a Lambda that is a Docker image into | |
| 181 181 |  | 
| 182 182 | 
             
            require 'uc3-sam-sceptre'
         | 
| 183 183 |  | 
| 184 | 
            -
             | 
| 185 | 
            -
               | 
| 186 | 
            -
             | 
| 187 | 
            -
             | 
| 188 | 
            -
             | 
| 189 | 
            -
             | 
| 190 | 
            -
             | 
| 191 | 
            -
             | 
| 192 | 
            -
             | 
| 193 | 
            -
             | 
| 194 | 
            -
                 | 
| 195 | 
            -
             | 
| 196 | 
            -
             | 
| 197 | 
            -
             | 
| 198 | 
            -
             | 
| 199 | 
            -
             | 
| 200 | 
            -
             | 
| 201 | 
            -
             | 
| 202 | 
            -
             | 
| 203 | 
            -
             | 
| 204 | 
            -
             | 
| 205 | 
            -
             | 
| 206 | 
            -
             | 
| 207 | 
            -
                 | 
| 208 | 
            -
             | 
| 209 | 
            -
             | 
| 210 | 
            -
             | 
| 211 | 
            -
             | 
| 212 | 
            -
            proxy. | 
| 213 | 
            -
            proxy. | 
| 184 | 
            +
            if ARGV.length == 2
         | 
| 185 | 
            +
              params = {
         | 
| 186 | 
            +
                service: 'dmp',
         | 
| 187 | 
            +
                subservice: 'hub',
         | 
| 188 | 
            +
                git_repo: 'https://github.com/CDLUC3/dmp-hub-cfn',
         | 
| 189 | 
            +
                stack_suffix: 'docker-lambdas',
         | 
| 190 | 
            +
                admin_email_key: 'AdminEmail',
         | 
| 191 | 
            +
             | 
| 192 | 
            +
                ecr_uri_key: 'EcrRepositoryUri',
         | 
| 193 | 
            +
             | 
| 194 | 
            +
                fetchable_cf_params: [
         | 
| 195 | 
            +
                  { stack_export_name: 'VpcId' },
         | 
| 196 | 
            +
                  { stack_export_name: 'SubnetA' },
         | 
| 197 | 
            +
                  { stack_export_name: 'SubnetB' },
         | 
| 198 | 
            +
                  { stack_export_name: 'SubnetC' },
         | 
| 199 | 
            +
                  { stack_export_name: 'DeadLetterQueueArn' },
         | 
| 200 | 
            +
                  { stack_export_name: 'LambdaSecGroupId' },
         | 
| 201 | 
            +
                  { stack_export_name: 'SnsTopicEmailArn', template_param_name: 'SnsEmailTopicArn' },
         | 
| 202 | 
            +
                  { stack_export_name: 'DomainName' },
         | 
| 203 | 
            +
                  { stack_export_name: 'RdsHost' },
         | 
| 204 | 
            +
                  { stack_export_name: 'RdsPort' },
         | 
| 205 | 
            +
                  { stack_export_name: 'RdsDbName' }
         | 
| 206 | 
            +
                ],
         | 
| 207 | 
            +
                static_cf_params: [
         | 
| 208 | 
            +
                  { template_param_name: 'Version', value: 'v0' }
         | 
| 209 | 
            +
                ]
         | 
| 210 | 
            +
              }
         | 
| 211 | 
            +
             | 
| 212 | 
            +
              proxy = Uc3SamSceptre::Proxy.new(params)
         | 
| 213 | 
            +
              proxy.build if ARGV[0].to_s.downcase.strip == 'true'
         | 
| 214 | 
            +
              proxy.deploy if ARGV[1].to_s.downcase.strip == 'true'
         | 
| 215 | 
            +
            else
         | 
| 216 | 
            +
              p 'Expected 2 arguments: run build? and run deploy? (For example: `ruby sam_build_deploy.rb true true`)'
         | 
| 217 | 
            +
            end
         | 
| 214 218 | 
             
            ```
         | 
| 215 219 |  | 
| 216 220 | 
             
            The following is an example of deploying a Lambda that is NOT a Docker image into a ZIP archive stored in S3
         | 
| @@ -219,29 +223,33 @@ The following is an example of deploying a Lambda that is NOT a Docker image int | |
| 219 223 |  | 
| 220 224 | 
             
            require 'uc3-sam-sceptre'
         | 
| 221 225 |  | 
| 222 | 
            -
             | 
| 223 | 
            -
               | 
| 224 | 
            -
             | 
| 225 | 
            -
             | 
| 226 | 
            -
             | 
| 227 | 
            -
             | 
| 228 | 
            -
             | 
| 229 | 
            -
             | 
| 230 | 
            -
             | 
| 231 | 
            -
             | 
| 232 | 
            -
             | 
| 233 | 
            -
                 | 
| 234 | 
            -
             | 
| 235 | 
            -
             | 
| 236 | 
            -
             | 
| 237 | 
            -
             | 
| 238 | 
            -
             | 
| 239 | 
            -
             | 
| 240 | 
            -
                 | 
| 241 | 
            -
             | 
| 242 | 
            -
             | 
| 243 | 
            -
             | 
| 244 | 
            -
             | 
| 245 | 
            -
            proxy. | 
| 246 | 
            -
            proxy. | 
| 226 | 
            +
            if ARGV.length == 2
         | 
| 227 | 
            +
              params = {
         | 
| 228 | 
            +
                service: 'dmp',
         | 
| 229 | 
            +
                subservice: 'hub',
         | 
| 230 | 
            +
                git_repo: 'https://github.com/CDLUC3/dmp-hub-cfn',
         | 
| 231 | 
            +
                ecr_uri_key: 'EcrRepositoryUri',
         | 
| 232 | 
            +
                stack_suffix: 'docker-lambdas',
         | 
| 233 | 
            +
                admin_email_key: 'AdminEmail',
         | 
| 234 | 
            +
             | 
| 235 | 
            +
                s3_arn_key: 'S3PrivateBucketArn',
         | 
| 236 | 
            +
             | 
| 237 | 
            +
                fetchable_cf_params: [
         | 
| 238 | 
            +
                  { stack_export_name: 'CloudFrontDistroId' },
         | 
| 239 | 
            +
                  { stack_export_name: 'S3PublicBucketArn' },
         | 
| 240 | 
            +
                  { stack_export_name: 'DynamoTableName' },
         | 
| 241 | 
            +
                  { stack_export_name: 'SnsTopicEmailArn', template_param_name: 'SnsEmailTopicArn' },
         | 
| 242 | 
            +
                  { stack_export_name: 'DomainName' }
         | 
| 243 | 
            +
                ],
         | 
| 244 | 
            +
                static_cf_params: [
         | 
| 245 | 
            +
                  { template_param_name: 'Version', value: 'v0' }
         | 
| 246 | 
            +
                ]
         | 
| 247 | 
            +
              }
         | 
| 248 | 
            +
             | 
| 249 | 
            +
              proxy = Uc3SamSceptre::Proxy.new(params)
         | 
| 250 | 
            +
              proxy.build if ARGV[0].to_s.downcase.strip == 'true'
         | 
| 251 | 
            +
              proxy.deploy if ARGV[1].to_s.downcase.strip == 'true'
         | 
| 252 | 
            +
            else
         | 
| 253 | 
            +
              p 'Expected 2 arguments: run build? and run deploy? (For example: `ruby sam_build_deploy.rb true true`)'
         | 
| 254 | 
            +
            end
         | 
| 247 255 | 
             
            ```
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: uc3-sam-sceptre
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.0. | 
| 4 | 
            +
              version: 0.0.2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Brian Riley
         | 
| @@ -11,7 +11,7 @@ cert_chain: [] | |
| 11 11 | 
             
            date: 2023-06-04 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 | 
            -
              name: aws-sdk- | 
| 14 | 
            +
              name: aws-sdk-cloudformation
         | 
| 15 15 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 16 16 | 
             
                requirements:
         | 
| 17 17 | 
             
                - - "~>"
         |