Skip to content
Branch: master
Find file History
ManuelNemirovsky and sonariorobot RK-698 - Aws regression test (#93)
* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Initial commit (working on regression tests for aws lambda

* Adding Jenkinsfile

* Adding url

* Updating Jenkinsfile

* Fixing Jenkinsfile

* Adding right credentials

* Fixing typo

* Change ver names

* Fix Jenkinsfile

* Fixing dockerfile

* Fixing Jenkinsfile

* Typo

* Typo1

* Typo2

* Typo3

* Changing the way Jenkinsfile build

* Changing the way we put Jenkinsfile

* move add credentials

* Fixing typos

* withcreds

* Trying without env variable

* Adding python docekrfile

* Fixing typos

* Adding dockerfile build for lambda maven

* Adding env variable

* Deleting env var

* Add bash file that will run the dockerfile in jenkins

* Fixing typo

* Add awsTest bash file into java aws lambda

* Checking whats inside the folder

* Changing files location

* Changing path

* Changing files path

* Fix bash path and jenkinsfile

* Fix dockerfile

* Change path files

* CHange dockerfile

* Checking

* Change path file

* Checking

* Change docekrfile

* Update Jenkinsfile

* Edititng files

* 11

* Checking things

* Add right Jenkinsfile back

* Fixing bash script

* 1111

* Scripting the right thing

* dasdas

* Add create funcrtion code to dockerfile

* Delete everything to last commit

* Delete everything to last commit1

* Trying to force running on aws

* delete fileb://

* Add fileb back

* Add root path

* Add awsTest

* Edit CMD jenkins line

* Add python-aws-;ambda test

* Add root prem

* Add bash file to dkcer

* Add ubuntu image

* Add dockerfile

* Add dockerfile1

* Add dockerfile2

* Add regression test for node-aws-lambda

* Add node_modules folder

* Fix node dockerfile

* Add right handler for node

* Make zip better

* Edit dockerfile

* trying to put proiject in folder

* POC of another way to run bash script

* add jenkinsfile in java root path

* Add different path

* Checking

* Add updated dockerfile

* Fix lamg

* Add var task path

* dasd

* Add relative path

* Add full path to zip file

* Add log to stdr for checking

* Add files to root path

* Add fixed dockerfile

* Fix dpckerfile

* Change to build base image

* Add root premissions

* Fix invoke function code

* Add rookout_debug to see better logs in cloudWatch

* Add rookout_debug to logs

* Add log to stdr

* Orginize dockerfile

* Add sleep time

* Fix typo

* Add time

* Change sleep time

* Add right path to bashfile

* Add token in dockerfile

* Add test to gradle api

* return to old dockerfile in java-gradle-api

* Delete jenkinsfile

* Change function name for jenkins test

* Make only the function

* Change bashfile to support updating lambda function

* Delete comments

* Add bash file for python

* Add regression-tests tag

* Add dockerfile for chalice

* Check

* Delete useless lines

* Add name of function to teigger url

* Typo

* Add name of func tag

* Typo

* fix file path

* Change to relative path

* Add reg test to java-aws-lambda

* Add chalice test

* add chalice deploy

* Add chalice test

* Add token to chalice reg test

* relative path to zip file

* [chalice] add right path

* Add something

* Add things

* Add rioght path

* Add right path1

* Add reg tag

* Delete tags

* Delete things in chalice dockerfile

* Add right configuration

* Update .rookout

* Delete workdir from dockerfile

* Add right path to bashfile

* Bad Jenkinsfile

* Good Jenkinsfile

* Add right path and update dockerfile

* Add curl

* Add sleep time

* Printing url

* Printing RESULT

* Adding the right ver

* Add sleep time

* Add more wait time

* Update README.md

* Update README.md

* Add more wait time1

* Delete api java test

* Add more time

* Add more time1

* delete var

* DElete extra time

* Delete dockerfile for aws lambda

* Return java-lambda to what it was

* Step back

* Checking

* Delete things that I add on update in the bashfile

* Change bash run line

* Make dockerfile nicer

* Add sleep time

* Add issue to bashfile on chalice

* Add more sleep time

* Add more sleep time before curl

* Add for loop to curl

* Add sleep time netweem curl

* Fix for loop

* Typo

* Going back before pusing today

* Fixing dockerfile

* Update README.md
Latest commit b5c6682 Mar 4, 2019
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
Dockerfile
Jenkinsfile
README.md
awsTest.sh RK-698 - Aws regression test (#93) Mar 4, 2019
index.js
package-lock.json
package.json

README.md

Quickstart for debugging Node.JS + AWS Lambda applications using Rookout

A sample application for debugging Node.js + AWS Lambda.

Before following this guide we recommend reading the basic Node + Rookout guide.

Rookout Integration Explained

There are 3 simple steps to integrate Rookout into your existing Node application:

  1. Add the Rookout SDK using the npm dependency rookout

  2. Wrap your lambda function with rookout.wrap()

  3. Set your Rookout Token as an environment variable in the Lambda configuration.

Running on Lambda

  1. Uploading your function :

    • Zip Upload: In order to run your Rookout-wrapped function on Lambda, make sure the dependencies are downloaded and zip the folder (including node_modules).
      zip -r rookout_lambda_test.zip .

    • aws-cli : Create a new Lambda function and update it like so :

      aws lambda create-function \
                  --region <REGION> \
                  --function-name rookout_lambda_test \
                  --zip-file fileb://rookout_lambda_test.zip \
                  --role <ROLE-ARN> \
                  --handler index.handler \
                  --runtime nodejs8.10 \
                  --environment Variables="{ROOKOUT_TOKEN=<Your Rookout Token>,ROOKOUT_ROOK_TAGS=lambda}" \
                  --timeout 25

      If you do not have access to aws-cli, you can do this from the AWS console and follow the Amazon Documentation

    • Using Cloud9 IDE integrated tools.

      IMPORTANT: If you are building on a MacOS/Windows machine, npm will compile native binaries for this platform. AWS Lambda runs on Linux and thus needs the linux compiled binaries. To build AWS Lambda compatible native extensions, simply run the following command line:

      docker run -v `pwd`:`pwd` -w `pwd` -i -t lambci/lambda:build-nodejs8.10 npm install

      You can read more about building a local native extension in our blog.

  2. Set your Rookout Token as an environment variable in the Lambda configuration:

    • ROOKOUT_TOKEN : Your Organization Token

    More information can be found in our documentation

  3. Go to app.rookout.com and start debugging!

Rookout Integration Process

We have added Rookout to the original project by:

  1. Installing the Rookout SDK: npm install --save rookout and adding it in the entry file const rookout = require('rookout/lambda');

  2. Wrapping your function with the Lambda wrapper as such :
    const rookout = require('rookout/lambda');

exports.handler = rookout.wrap((event, context, callback) => {
    callback(null, "Hello World");
});
  1. Set Lambda environment for ROOKOUT_TOKEN to connect with the Rookout service.
You can’t perform that action at this time.