├── .gitignore
├── .jenkins
└── Jenkinsfile
├── .rookout
├── LICENSE
├── README.md
├── aws-ecs
└── main.tf
├── dotnet-aspnet
├── README.md
├── dotnet-core-2
│ ├── Directory.Build.props
│ ├── Program.cs
│ └── SimpleHttpServer.csproj
├── dotnet-core-3
│ ├── Directory.Build.props
│ ├── Program.cs
│ └── SimpleHttpServer.csproj
└── shared-configurations
│ ├── dotnet-core-2
│ ├── Program.cs
│ ├── RookoutConfiguration.targets
│ └── SimpleHttpServer.csproj
│ └── dotnet-core-3
│ ├── Program.cs
│ ├── RookoutConfiguration.targets
│ └── SimpleHttpServer.csproj
├── dotnet-azure-functions
├── .gitignore
├── DotNet_AzureFunction.csproj
├── DotNet_AzureFunction.sln
├── HttpTrigger_RookOutDemo.cs
├── Properties
│ └── launchSettings.json
├── Readme.md
└── host.json
├── go-aws-lambda-docker
├── Dockerfile
├── README.md
├── go.mod
├── go.sum
└── main.go
├── go-aws-lambda-zip
├── Dockerfile
├── README.md
├── go.mod
├── go.sum
└── main.go
├── java-aws-elasticbeanstalk
├── .ebextensions
│ └── rook.config
├── .gitignore
├── Buildfile
├── Dockerfile
├── Jenkinsfile
├── Makefile
├── Manifest.txt
├── Procfile
├── README.md
├── runTest.sh
└── src
│ └── httpserver
│ ├── HttpRequestHandler.java
│ ├── HttpServerTest.java
│ └── SimpleHttpServer.java
├── java-aws-lambda-gradle
├── README.md
├── build.gradle
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── src
│ └── main
│ └── java
│ └── example
│ └── Handler.java
├── java-aws-lambda-maven
├── README.md
├── jar-with-dependencies.xml
├── pom.xml
└── src
│ └── main
│ └── java
│ └── example
│ └── Handler.java
├── java-azure-functions
├── .gitignore
├── Readme.md
├── host.json
├── pom.xml
└── src
│ ├── main
│ └── java
│ │ └── com
│ │ └── rookout
│ │ └── Function.java
│ └── test
│ └── java
│ └── com
│ └── rookout
│ ├── FunctionTest.java
│ └── HttpResponseMessageMock.java
├── java-docker-compose
├── Dockerfile
├── Makefile
├── README.md
├── docker-compose.yaml
├── pom.xml
└── src
│ └── main
│ └── java
│ └── com
│ └── rookout
│ └── HelloWorld.java
├── java-dropwizard
├── Dockerfile
├── Jenkinsfile
├── README.md
├── pom.xml
└── src
│ └── main
│ └── java
│ ├── DropwizardExampleApplication.java
│ └── Resource.java
├── java-gcp-dataflow
├── README.md
└── word-count-beam
│ ├── pom.xml
│ └── src
│ ├── main
│ └── java
│ │ └── org
│ │ └── apache
│ │ └── beam
│ │ └── examples
│ │ ├── DebuggingWordCount.java
│ │ ├── MinimalWordCount.java
│ │ ├── RookoutJvmInitializer.java
│ │ ├── WindowedWordCount.java
│ │ ├── WordCount.java
│ │ ├── common
│ │ ├── ExampleBigQueryTableOptions.java
│ │ ├── ExampleOptions.java
│ │ ├── ExamplePubsubTopicAndSubscriptionOptions.java
│ │ ├── ExamplePubsubTopicOptions.java
│ │ ├── ExampleUtils.java
│ │ └── WriteOneFilePerWindow.java
│ │ ├── complete
│ │ └── game
│ │ │ ├── GameStats.java
│ │ │ ├── HourlyTeamScore.java
│ │ │ ├── LeaderBoard.java
│ │ │ ├── StatefulTeamScore.java
│ │ │ ├── UserScore.java
│ │ │ ├── injector
│ │ │ ├── Injector.java
│ │ │ ├── InjectorUtils.java
│ │ │ └── RetryHttpInitializerWrapper.java
│ │ │ └── utils
│ │ │ ├── GameConstants.java
│ │ │ ├── WriteToBigQuery.java
│ │ │ ├── WriteToText.java
│ │ │ └── WriteWindowedToBigQuery.java
│ │ └── subprocess
│ │ ├── ExampleEchoPipeline.java
│ │ ├── SubProcessPipelineOptions.java
│ │ ├── configuration
│ │ └── SubProcessConfiguration.java
│ │ ├── kernel
│ │ ├── SubProcessCommandLineArgs.java
│ │ ├── SubProcessIOFiles.java
│ │ └── SubProcessKernel.java
│ │ └── utils
│ │ ├── CallingSubProcessUtils.java
│ │ ├── ExecutableFile.java
│ │ └── FileUtils.java
│ └── test
│ └── java
│ └── org
│ └── apache
│ └── beam
│ └── examples
│ ├── DebuggingWordCountTest.java
│ ├── MinimalWordCountTest.java
│ ├── WordCountTest.java
│ ├── complete
│ └── game
│ │ ├── GameStatsTest.java
│ │ ├── HourlyTeamScoreTest.java
│ │ ├── LeaderBoardTest.java
│ │ ├── StatefulTeamScoreTest.java
│ │ └── UserScoreTest.java
│ └── subprocess
│ └── ExampleEchoPipelineTest.java
├── java-gradle
├── java-agent
│ ├── .settings
│ │ └── org.eclipse.buildship.core.prefs
│ ├── Dockerfile
│ ├── Jenkinsfile
│ ├── README.md
│ ├── build.gradle
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ ├── settings.gradle
│ └── src
│ │ └── main
│ │ └── java
│ │ └── com
│ │ └── rookout
│ │ └── HelloWorld.java
├── java-api
│ ├── .settings
│ │ └── org.eclipse.buildship.core.prefs
│ ├── Dockerfile
│ ├── README.md
│ ├── build.gradle
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ ├── settings.gradle
│ └── src
│ │ └── main
│ │ └── java
│ │ └── com
│ │ └── HelloWorld
│ │ └── HelloWorld.java
└── java-dynamic-loading
│ ├── Dockerfile
│ ├── Jenkinsfile
│ ├── README.md
│ ├── build.gradle
│ ├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ ├── runTest.sh
│ ├── runTest_workflow.sh
│ ├── settings.gradle
│ └── src
│ └── main
│ └── java
│ └── com
│ └── rookout
│ └── HelloWorld.java
├── java-groovy
├── Dockerfile
├── Jenkinsfile
├── README.md
└── test_groovy.groovy
├── java-jboss
├── README.md
└── module.xml
├── java-jetty
├── Dockerfile
├── Jenkinsfile.disabled
├── README.md
└── SampleLib
│ ├── pom.xml
│ └── src
│ └── main
│ ├── java
│ └── org
│ │ └── jetty
│ │ └── as
│ │ └── quickstarts
│ │ └── helloworld
│ │ ├── HelloService.java
│ │ └── HelloWorldServlet.java
│ └── webapp
│ ├── WEB-INF
│ └── beans.xml
│ └── index.html
├── java-kotlin
├── Dockerfile
├── Jenkinsfile
├── build.gradle
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── src
│ └── main
│ └── kotlin
│ └── demo
│ └── helloWorld.kt
├── java-maven
├── maven-agent
│ ├── Dockerfile
│ ├── Jenkinsfile
│ ├── README.md
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── java
│ │ └── com
│ │ └── rookout
│ │ └── HelloWorld.java
├── maven-api
│ ├── Dockerfile
│ ├── README.md
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── java
│ │ └── com
│ │ └── rookout
│ │ └── HelloWorld.java
├── maven-git
│ ├── Dockerfile
│ ├── README.md
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── java
│ │ └── com
│ │ └── rookout
│ │ └── HelloWorld.java
├── maven-perforce-existing-jar
│ ├── Dockerfile
│ ├── README.md
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── java
│ │ └── com
│ │ └── rookout
│ │ └── HelloWorld.java
└── maven-perforce
│ ├── Dockerfile
│ ├── README.md
│ ├── pom.xml
│ └── src
│ └── main
│ └── java
│ └── com
│ └── rookout
│ └── HelloWorld.java
├── java-pivotal-cloud-foundry
├── README.md
└── spring-helloworld-cf
│ ├── .gitignore
│ ├── .mvn
│ └── wrapper
│ │ ├── MavenWrapperDownloader.java
│ │ ├── maven-wrapper.jar
│ │ └── maven-wrapper.properties
│ ├── mvnw
│ ├── mvnw.cmd
│ ├── pom.xml
│ └── src
│ ├── main
│ ├── java
│ │ └── com
│ │ │ └── example
│ │ │ └── howtodoinjava
│ │ │ └── springhelloworldcf
│ │ │ └── SpringHelloworldCfApplication.java
│ └── resources
│ │ └── application.properties
│ └── test
│ └── java
│ └── com
│ └── example
│ └── howtodoinjava
│ └── springhelloworldcf
│ └── SpringHelloworldCfApplicationTests.java
├── java-play-framework
├── .settings
│ └── org.eclipse.buildship.core.prefs
├── LICENSE
├── Makefile
├── README.md
├── app
│ ├── Module.java
│ ├── controllers
│ │ ├── AsyncController.java
│ │ ├── CountController.java
│ │ └── HomeController.java
│ ├── filters
│ │ └── ExampleFilter.java
│ ├── services
│ │ ├── ApplicationTimer.java
│ │ ├── AtomicCounter.java
│ │ └── Counter.java
│ └── views
│ │ ├── index.scala.html
│ │ ├── main.scala.html
│ │ └── welcome.scala.html
├── build.gradle
├── build.sbt
├── conf
│ ├── application.conf
│ ├── logback.xml
│ └── routes
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── project
│ ├── build.properties
│ └── plugins.sbt
├── public
│ ├── images
│ │ ├── external.png
│ │ ├── favicon.png
│ │ └── header-pattern.png
│ ├── javascripts
│ │ └── hello.js
│ └── stylesheets
│ │ └── main.css
├── scripts
│ ├── script-helper
│ ├── test-gradle
│ └── test-sbt
└── test
│ ├── BrowserTest.java
│ ├── FunctionalTest.java
│ └── UnitTest.java
├── java-scala-sbt
├── README.md
└── hello
│ ├── build.sbt
│ ├── project
│ ├── Dependencies.scala
│ └── build.properties
│ └── src
│ ├── main
│ └── scala
│ │ └── example
│ │ └── Hello.scala
│ └── test
│ └── scala
│ └── example
│ └── HelloSpec.scala
├── java-tomcat-aws-elasticbeanstalk
├── .ebextensions
│ ├── logging.config
│ └── xray.config
├── README.md
└── eb-tomcat-helloworld
│ ├── .ebextensions
│ ├── logging.config
│ └── xray.config
│ ├── .gitignore
│ ├── Dockerfile
│ ├── Jenkinsfile
│ ├── LICENSE
│ ├── META-INF
│ └── MANIFEST.MF
│ ├── WEB-INF
│ ├── classes
│ │ ├── META-INF
│ │ │ ├── LICENSE.txt
│ │ │ ├── MANIFEST.MF
│ │ │ └── NOTICE.txt
│ │ └── org
│ │ │ └── example
│ │ │ ├── AWSXRayServlet.class
│ │ │ ├── AWSXRayServletContext.class
│ │ │ └── ConditionalAWSXRayServletFilter.class
│ ├── lib
│ │ ├── aws-java-sdk-core-1.11.67.jar
│ │ ├── aws-java-sdk-kms-1.11.67.jar
│ │ ├── aws-java-sdk-s3-1.11.67.jar
│ │ ├── aws-xray-recorder-sdk-aws-sdk-1.0.5-beta.jar
│ │ ├── aws-xray-recorder-sdk-core-1.0.5-beta.jar
│ │ ├── commons-beanutils-1.9.2.jar
│ │ ├── commons-codec-1.9.jar
│ │ ├── commons-collections-3.2.2.jar
│ │ ├── commons-digester-1.8.1.jar
│ │ ├── commons-digester3-3.2-bin.jar
│ │ ├── commons-logging-1.1.3.jar
│ │ ├── commons-validator-1.5.1.jar
│ │ ├── httpclient-4.5.2.jar
│ │ ├── httpcore-4.4.4.jar
│ │ ├── ion-java-1.0.1.jar
│ │ ├── jackson-annotations-2.6.0.jar
│ │ ├── jackson-core-2.6.6.jar
│ │ ├── jackson-databind-2.6.6.jar
│ │ ├── jackson-dataformat-cbor-2.6.6.jar
│ │ ├── jmespath-java-1.0.jar
│ │ └── joda-time-2.8.1.jar
│ └── web.xml
│ ├── cron.yaml
│ ├── index.jsp
│ ├── runTest.sh
│ ├── scheduled.jsp
│ └── src
│ ├── AWSXRayServlet.java
│ ├── AWSXRayServletContext.java
│ └── ConditionalAWSXRayServletFilter.java
├── java-tomcat-war-maven
├── Dockerfile
├── Jenkinsfile
├── README.md
├── SampleLib
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── java
│ │ └── com
│ │ └── rookout
│ │ └── samplelib
│ │ └── SampleLib.java
└── sample
│ ├── pom.xml
│ └── src
│ └── main
│ ├── java
│ └── com
│ │ └── rookout
│ │ └── HelloServlet.java
│ └── webapp
│ └── WEB-INF
│ └── web.xml
├── java-weblogic
├── README.md
└── weblogic-helloworld
│ ├── .gitignore
│ ├── build.xml
│ └── src
│ └── examples
│ └── webservices
│ └── hello_world
│ └── HelloWorldImpl.java
├── java-wildfly-docker
├── Dockerfile
├── Jenkinsfile
├── README.md
└── helloworld
│ ├── .gitignore
│ ├── README.md
│ ├── pom.xml
│ ├── rookout-conf
│ └── standalone.conf
│ ├── rookout
│ └── LOGS_GO_HERE
│ └── src
│ └── main
│ ├── java
│ └── org
│ │ └── jboss
│ │ └── as
│ │ └── quickstarts
│ │ └── helloworld
│ │ ├── HelloService.java
│ │ └── HelloWorldServlet.java
│ └── webapp
│ ├── WEB-INF
│ └── beans.xml
│ └── index.html
├── node-14
├── Dockerfile
├── Jenkinsfile
├── package.json
└── src
│ └── app.js
├── node-app-engine-flex
├── README.md
├── app.js
├── app.yaml
├── package-lock.json
└── package.json
├── node-aws-ecs
├── Dockerfile
├── README.md
├── app.js
├── package-lock.json
├── package.json
└── task-definition.json
├── node-aws-elasticbeanstalk
├── .ebextensions
│ ├── env_options.config
│ └── logging.config
├── README.md
└── node-example
│ ├── .ebextensions
│ ├── env_options.config
│ └── logging.config
│ ├── Dockerfile
│ ├── Jenkinsfile
│ ├── app.js
│ ├── cron.yaml
│ ├── index.html
│ ├── package.json
│ └── runTest.sh
├── node-aws-lambda
├── Dockerfile
├── Jenkinsfile
├── README.md
├── awsTest.sh
├── index.js
├── package-lock.json
└── package.json
├── node-aws-serverlessframework
├── .dockerignore
├── .gitignore
├── Dockerfile
├── Dockerfile.test
├── Jenkinsfile
├── README.md
├── index.js
├── package-lock.json
├── package.json
├── runTest.sh
└── serverless.yml
├── node-electron-vue
├── README.md
├── my-project
│ ├── .babelrc
│ ├── .electron-vue
│ │ ├── build.js
│ │ ├── dev-client.js
│ │ ├── dev-runner.js
│ │ ├── webpack.main.config.js
│ │ ├── webpack.renderer.config.js
│ │ └── webpack.web.config.js
│ ├── .gitignore
│ ├── .travis.yml
│ ├── README.md
│ ├── appveyor.yml
│ ├── package.json
│ ├── src
│ │ ├── index.ejs
│ │ ├── main
│ │ │ ├── index.dev.js
│ │ │ └── index.js
│ │ └── renderer
│ │ │ ├── App.vue
│ │ │ ├── assets
│ │ │ ├── .gitkeep
│ │ │ └── logo.png
│ │ │ ├── components
│ │ │ ├── LandingPage.vue
│ │ │ └── LandingPage
│ │ │ │ └── SystemInformation.vue
│ │ │ ├── main.js
│ │ │ ├── router
│ │ │ └── index.js
│ │ │ └── store
│ │ │ ├── index.js
│ │ │ └── modules
│ │ │ ├── Counter.js
│ │ │ ├── Todo.js
│ │ │ └── index.js
│ └── static
│ │ └── .gitkeep
└── my-todos
│ ├── .babelrc
│ ├── .electron-vue
│ ├── build.js
│ ├── dev-client.js
│ ├── dev-runner.js
│ ├── webpack.main.config.js
│ ├── webpack.renderer.config.js
│ └── webpack.web.config.js
│ ├── .gitignore
│ ├── .travis.yml
│ ├── README.md
│ ├── appveyor.yml
│ ├── package-lock.json
│ ├── package.json
│ ├── src
│ ├── index.ejs
│ ├── main
│ │ ├── index.dev.js
│ │ └── index.js
│ └── renderer
│ │ ├── App.vue
│ │ ├── assets
│ │ ├── .gitkeep
│ │ └── logo.png
│ │ ├── components
│ │ ├── LandingPage.vue
│ │ └── LandingPage
│ │ │ └── SystemInformation.vue
│ │ ├── main.js
│ │ ├── router
│ │ └── index.js
│ │ └── store
│ │ ├── index.js
│ │ └── modules
│ │ ├── Counter.js
│ │ ├── Todo.js
│ │ └── index.js
│ └── yarn.lock
├── node-electron
├── README.md
├── electron_main.js
├── index.html
├── package-lock.json
└── package.json
├── node-fastify
├── Dockerfile
├── Jenkinsfile
├── package-lock.json
├── package.json
└── src
│ └── app.js
├── node-google-cloud-function
├── README.md
├── index.js
└── package.json
├── node-mjs
├── Dockerfile
├── Jenkinsfile
├── package.json
└── src
│ └── app.mjs
├── node-typescript
├── Dockerfile
├── Jenkinsfile
├── README.md
├── package-lock.json
├── package.json
├── src
│ └── app.ts
└── tsconfig.json
├── node-webpack
├── Dockerfile
├── Jenkinsfile
├── Readme.md
├── index.js
├── package-lock.json
├── package.json
├── serve.js
└── webpack.config.js
├── python-aws-chalice
├── .chalice
│ ├── config-reg-test.json
│ └── config.json
├── .gitignore
├── Dockerfile
├── Jenkins_file.disabled
├── Readme.md
├── app.py
├── requirements.txt
└── runTest.sh
├── python-aws-lambda-parameterized
├── README.md
├── samconfig.toml
├── template.yaml
└── tutorial
│ ├── __init__.py
│ ├── app.py
│ └── requirements.txt
├── python-aws-lambda
├── Dockerfile
├── Jenkinsfile
├── README.md
├── awsTest.sh
└── lambda_function.py
├── python-aws-serverlessframework
├── .gitignore
├── Dockerfile
├── Jenkinsfile
├── README.md
├── handler.py
├── package-lock.json
├── package.json
├── requirements.txt
├── serverless.yml
└── testEnvs.sh
├── python-celery
├── README.md
├── app.py
└── requirements.txt
├── python-django
├── .gitignore
├── .travis.yml
├── Dockerfile
├── Jenkinsfile
├── README.md
├── accounts
│ ├── __init__.py
│ ├── admin.py
│ ├── forms.py
│ ├── migrations
│ │ └── __init__.py
│ ├── models.py
│ ├── templates
│ │ └── accounts
│ │ │ ├── login.html
│ │ │ └── register.html
│ ├── tests.py
│ ├── urls.py
│ └── views.py
├── api
│ ├── __init__.py
│ ├── migrations
│ │ └── __init__.py
│ ├── serializers.py
│ ├── tests.py
│ ├── urls.py
│ └── views.py
├── lists
│ ├── __init__.py
│ ├── admin.py
│ ├── forms.py
│ ├── migrations
│ │ ├── 0001_initial.py
│ │ ├── 0002_auto_20150301_1937.py
│ │ ├── 0003_auto_20150308_2120.py
│ │ └── __init__.py
│ ├── models.py
│ ├── static
│ │ └── lists
│ │ │ ├── css
│ │ │ └── table.css
│ │ │ ├── images
│ │ │ ├── asc.gif
│ │ │ ├── bg.gif
│ │ │ └── desc.gif
│ │ │ └── js
│ │ │ ├── jquery.tablesorter.min.js
│ │ │ └── lists.js
│ ├── templates
│ │ └── lists
│ │ │ ├── index.html
│ │ │ ├── overview.html
│ │ │ └── todolist.html
│ ├── templatetags
│ │ ├── __init__.py
│ │ └── lists_extras.py
│ ├── tests.py
│ ├── urls.py
│ └── views.py
├── manage.py
├── requirements.txt
└── todolist
│ ├── __init__.py
│ ├── settings.py
│ ├── static
│ ├── css
│ │ └── custom.css
│ ├── images
│ │ └── favicon.png
│ └── js
│ │ └── site.js
│ ├── templates
│ ├── 403.html
│ ├── 404.html
│ ├── 500.html
│ └── base.html
│ ├── urls.py
│ └── wsgi.py
├── python-flask
├── Dockerfile
├── Jenkinsfile
├── README.md
├── flask_rookout.py
└── requirements.txt
├── python-fork
├── Dockerfile
├── Jenkinsfile
├── README.md
├── fork_rookout.py
└── requirements.txt
├── python-kubernetes
├── README.md
├── rookout-service
│ ├── README.md
│ ├── app-deployment.yaml
│ └── app-service.yaml
└── with-agent
│ ├── README.md
│ ├── app-deployment.yaml
│ ├── app-service.yaml
│ ├── controller-deployment.yaml
│ └── controller-service.yaml
├── python-nameko
├── Dockerfile
├── Jenkinsfile
├── README.md
├── nameko_example.py
└── requirements.txt
├── python-pyspark
├── Dockerfile
├── Jenkinsfile
├── driver.py
├── pyspark_demo.py
└── requirements.txt
├── python-sanic
├── Dockerfile
├── Jenkinsfile
├── README.md
├── requirements.txt
└── sanic_rookout.py
└── python-zappa
├── README.md
├── django_app
├── .gitignore
├── .travis.yml
├── accounts
│ ├── __init__.py
│ ├── admin.py
│ ├── forms.py
│ ├── migrations
│ │ └── __init__.py
│ ├── models.py
│ ├── templates
│ │ └── accounts
│ │ │ ├── login.html
│ │ │ └── register.html
│ ├── tests.py
│ ├── urls.py
│ └── views.py
├── api
│ ├── __init__.py
│ ├── migrations
│ │ └── __init__.py
│ ├── serializers.py
│ ├── tests.py
│ ├── urls.py
│ └── views.py
├── lists
│ ├── __init__.py
│ ├── admin.py
│ ├── forms.py
│ ├── migrations
│ │ ├── 0001_initial.py
│ │ ├── 0002_auto_20150301_1937.py
│ │ ├── 0003_auto_20150308_2120.py
│ │ └── __init__.py
│ ├── models.py
│ ├── static
│ │ └── lists
│ │ │ ├── css
│ │ │ └── table.css
│ │ │ ├── images
│ │ │ ├── asc.gif
│ │ │ ├── bg.gif
│ │ │ └── desc.gif
│ │ │ └── js
│ │ │ ├── jquery.tablesorter.min.js
│ │ │ └── lists.js
│ ├── templates
│ │ └── lists
│ │ │ ├── index.html
│ │ │ ├── overview.html
│ │ │ └── todolist.html
│ ├── templatetags
│ │ ├── __init__.py
│ │ └── lists_extras.py
│ ├── tests.py
│ ├── urls.py
│ └── views.py
├── manage.py
├── requirements.txt
└── todolist
│ ├── __init__.py
│ ├── settings.py
│ ├── static
│ ├── css
│ │ └── custom.css
│ ├── images
│ │ └── favicon.png
│ └── js
│ │ └── site.js
│ ├── templates
│ ├── 403.html
│ ├── 404.html
│ ├── 500.html
│ └── base.html
│ ├── urls.py
│ └── wsgi.py
└── flask_app
├── __init__.py
├── app.py
├── requirements.txt
└── zappa_settings.json
/.rookout:
--------------------------------------------------------------------------------
1 | java-aws-elasticbeanstalk /
2 | java-aws-lambda /
3 | java-aws-lambda-maven /
4 | java-docker-compose /
5 | java-dropwizard /
6 | java-gradle /
7 | java-groovy /
8 | java-maven /
9 | java-play-framework /
10 | java-tomcat-aws-elasticbeanstalk /
11 | java-weblogic /
12 | java-wildfly-docker-agentless /
13 | node-app-engine-flex /
14 | node-aws-ecs /
15 | node-aws-elasticbeanstalk /
16 | node-aws-lambda /
17 | node-electron /
18 | node-ibm-cloud-functions /
19 | node-typescript /
20 | python-aws-chalice /
21 | python-aws-lambda /
22 | python-aws-serverlessframework /
23 | python-django /
24 | python-flask python-flask
25 | python-kubernetes /
26 | python-sanic /
27 | dotnet-aspnet/dotnet-core-2 /
28 | dotnet-aspnet/dotnet-core-3 /
29 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Rookout
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Examples for deploying Rookout
2 |
3 | This repository contains full deployment examples, developed by Rookout and the community, and supported by Rookout engineer team.
4 |
5 |
6 |
7 | [appengine]: https://cloud.google.com/appengine/docs/flexible/nodejs
8 | [tutorial]: https://cloud.google.com/appengine/docs/flexible/nodejs/quickstart
9 | [readme]: ../README.md
10 | [contributing]: https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/CONTRIBUTING.md
11 |
--------------------------------------------------------------------------------
/dotnet-aspnet/dotnet-core-2/Directory.Build.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/dotnet-aspnet/dotnet-core-2/SimpleHttpServer.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp2.1;netcoreapp2.2
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/dotnet-aspnet/dotnet-core-3/Directory.Build.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/dotnet-aspnet/dotnet-core-3/SimpleHttpServer.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.1
5 | latest
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/dotnet-aspnet/shared-configurations/dotnet-core-2/RookoutConfiguration.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | true
5 | false
6 | git config --get remote.origin.url %26%26 git rev-parse HEAD
7 | full
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/dotnet-aspnet/shared-configurations/dotnet-core-2/SimpleHttpServer.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | netcoreapp2.1;netcoreapp2.2
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/dotnet-aspnet/shared-configurations/dotnet-core-3/RookoutConfiguration.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | true
5 | false
6 | git config --get remote.origin.url %26%26 git rev-parse HEAD
7 | full
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/dotnet-aspnet/shared-configurations/dotnet-core-3/SimpleHttpServer.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | netcoreapp3.0;netcoreapp3.1
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/dotnet-azure-functions/DotNet_AzureFunction.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | net6.0
4 | v4
5 | portable
6 | true
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | PreserveNewest
15 |
16 |
17 | PreserveNewest
18 | Never
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/dotnet-azure-functions/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "DotNet_AzureFunction": {
4 | "commandName": "Project",
5 | "commandLineArgs": "--port 7038",
6 | "launchBrowser": false
7 | }
8 | }
9 | }
--------------------------------------------------------------------------------
/dotnet-azure-functions/host.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "2.0",
3 | "logging": {
4 | "applicationInsights": {
5 | "samplingSettings": {
6 | "isEnabled": true,
7 | "excludedTypes": "Request"
8 | }
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/go-aws-lambda-docker/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM golang:1.18-alpine3.15 as builder
2 |
3 | WORKDIR /app
4 | ADD . .
5 |
6 | ARG ROOKOUT_TOKEN
7 |
8 | RUN apk --update --no-cache add git gcc musl-dev protobuf-dev openssl-libs-static openssl-dev build-base zlib-static
9 |
10 | # Change the version here to the newest one
11 | RUN go get -d github.com/Rookout/GoSDK@v0.1.11
12 |
13 | RUN go mod download
14 | RUN go mod tidy
15 |
16 | RUN go build -tags=alpine314,rookout_static -gcflags='all=-N -l' main.go
17 |
18 | FROM alpine:3.15 as release
19 | COPY --from=builder /app/main ./
20 |
21 | ENV ROOKOUT_TOKEN=${ROOKOUT_TOKEN}
22 |
23 | ENV PORT 1994
24 | EXPOSE 1994
25 | CMD ["./main"]
--------------------------------------------------------------------------------
/go-aws-lambda-docker/main.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "context"
5 | "encoding/json"
6 | "time"
7 |
8 | rookout "github.com/Rookout/GoSDK"
9 |
10 | "github.com/aws/aws-lambda-go/events"
11 | "github.com/aws/aws-lambda-go/lambda"
12 | )
13 |
14 | type response struct {
15 | UTC time.Time `json:"utc"`
16 | }
17 |
18 | func handleRequest(ctx context.Context, request events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) {
19 | rookout.Start(rookout.RookOptions{})
20 | defer rookout.Flush()
21 |
22 | now := time.Now()
23 | resp := &response{
24 | UTC: now.UTC(),
25 | }
26 | body, err := json.Marshal(resp)
27 | if err != nil {
28 | return events.APIGatewayProxyResponse{}, err
29 | }
30 | return events.APIGatewayProxyResponse{Body: string(body), StatusCode: 200}, nil
31 | }
32 |
33 | func main() {
34 | lambda.Start(handleRequest)
35 | }
36 |
--------------------------------------------------------------------------------
/go-aws-lambda-zip/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM golang:1.18-alpine3.15 as builder
2 |
3 | WORKDIR /app
4 | ADD . .
5 |
6 | RUN apk --update --no-cache add git gcc musl-dev protobuf-dev openssl-libs-static openssl-dev build-base zlib-static
7 |
8 | # Change the version here to the newest one
9 | RUN go get -d github.com/Rookout/GoSDK@v0.1.11
10 |
11 | RUN go mod download
12 | RUN go mod tidy
13 |
14 | RUN go build -tags=alpine314,rookout_static -gcflags='all=-N -l' main.go
15 |
16 | FROM scratch as release
17 | COPY --from=builder /app/main ./
18 |
--------------------------------------------------------------------------------
/go-aws-lambda-zip/main.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "context"
5 | "encoding/json"
6 | "time"
7 |
8 | rookout "github.com/Rookout/GoSDK"
9 |
10 | "github.com/aws/aws-lambda-go/events"
11 | "github.com/aws/aws-lambda-go/lambda"
12 | )
13 |
14 | type response struct {
15 | UTC time.Time `json:"utc"`
16 | }
17 |
18 | func handleRequest(ctx context.Context, request events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) {
19 | rookout.Start(rookout.RookOptions{})
20 | defer rookout.Flush()
21 |
22 | now := time.Now()
23 | resp := &response{
24 | UTC: now.UTC(),
25 | }
26 | body, err := json.Marshal(resp)
27 | if err != nil {
28 | return events.APIGatewayProxyResponse{}, err
29 | }
30 | return events.APIGatewayProxyResponse{Body: string(body), StatusCode: 200}, nil
31 | }
32 |
33 | func main() {
34 | lambda.Start(handleRequest)
35 | }
36 |
--------------------------------------------------------------------------------
/java-aws-elasticbeanstalk/.ebextensions/rook.config:
--------------------------------------------------------------------------------
1 | files:
2 | "/opt/elasticbeanstalk/lib/rook.jar" :
3 | mode: "000444"
4 | owner: root
5 | group: root
6 | source: "https://search.maven.org/remote_content?g=com.rookout&a=rook&v=LATEST"
7 | option_settings:
8 | aws:elasticbeanstalk:application:environment:
9 | JAVA_TOOL_OPTIONS: '-javaagent:/opt/elasticbeanstalk/lib/rook.jar'
10 | ROOKOUT_TOKEN: ""
--------------------------------------------------------------------------------
/java-aws-elasticbeanstalk/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | # Elastic Beanstalk Files
3 | .elasticbeanstalk/*
4 | !.elasticbeanstalk/*.cfg.yml
5 | !.elasticbeanstalk/*.global.yml
6 |
--------------------------------------------------------------------------------
/java-aws-elasticbeanstalk/Buildfile:
--------------------------------------------------------------------------------
1 | initdirs: mkdir output && mkdir target
2 | compile: javac src/httpserver/* -d output
3 | build: jar cvfm target/server.jar Manifest.txt -C output/ . src/*
--------------------------------------------------------------------------------
/java-aws-elasticbeanstalk/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM lambci/lambda:build-java8
2 |
3 | WORKDIR /app
4 |
5 | ADD . .
6 |
7 | RUN zip -r java-elastic-beanstalk.zip .
--------------------------------------------------------------------------------
/java-aws-elasticbeanstalk/Jenkinsfile:
--------------------------------------------------------------------------------
1 | regressionTest {
2 | FILE_PATH = "src/httpserver/HttpRequestHandler.java"
3 | LINE_NUM = "70"
4 | SHA = "86cf02a9c131ae2352f266ef15ee4b7a058d0c224a0bb3ccbdfd2c11fe8d6ef1"
5 | URL_FOR_TRIGGER = "http://java-aws-elasticbeanstalk.us-east-2.elasticbeanstalk.com/"
6 | LANG = "Java"
7 | BACKGROUND_IMAGE_CMD = "bash /app/runTest.sh &"
8 | STATIC_LABEL = "java-aws-elasticbeanstalk"
9 | }
--------------------------------------------------------------------------------
/java-aws-elasticbeanstalk/Makefile:
--------------------------------------------------------------------------------
1 | build:
2 | mkdir output && mkdir target
3 | javac src/httpserver/* -d output
4 | jar cvfm target/server.jar Manifest.txt -C output/ . src/*
5 | wget "https://search.maven.org/remote_content?g=com.rookout&a=rook&v=LATEST" -O rook.jar
6 |
7 | run:
8 | export PORT=7000 && java -javaagent:rook.jar -jar target/server.jar
9 |
10 |
--------------------------------------------------------------------------------
/java-aws-elasticbeanstalk/Manifest.txt:
--------------------------------------------------------------------------------
1 | Main-Class: com.rookout.httpserver.HttpServerTest
2 |
--------------------------------------------------------------------------------
/java-aws-elasticbeanstalk/Procfile:
--------------------------------------------------------------------------------
1 | web: java -jar target/server.jar
2 |
--------------------------------------------------------------------------------
/java-aws-elasticbeanstalk/runTest.sh:
--------------------------------------------------------------------------------
1 | aws s3 cp /app/java-elastic-beanstalk.zip s3://java-elastic-beanstalk-regression-test
2 |
3 | version=$(uuidgen)
4 |
5 | aws elasticbeanstalk create-application-version \
6 | --application-name regression-tests \
7 | --version-label $version \
8 | --source-bundle S3Bucket="java-elastic-beanstalk-regression-test",S3Key="java-elastic-beanstalk.zip" ; \
9 |
10 | aws elasticbeanstalk update-environment \
11 | --application-name regression-tests \
12 | --environment-name java-aws-elasticbeanstalk \
13 | --version-label $version \
14 | --option-settings \
15 | Namespace=aws:elasticbeanstalk:application:environment,OptionName=ROOKOUT_TOKEN,Value=$ROOKOUT_TOKEN \
16 | Namespace=aws:elasticbeanstalk:application:environment,OptionName=ROOKOUT_LABELS,Value="regression_test:java-aws-elasticbeanstalk" \
17 | Namespace=aws:elasticbeanstalk:application:environment,OptionName=ROOKOUT_DEBUG,Value=1
18 |
--------------------------------------------------------------------------------
/java-aws-elasticbeanstalk/src/httpserver/HttpServerTest.java:
--------------------------------------------------------------------------------
1 | package com.rookout.httpserver;
2 |
3 | public class HttpServerTest {
4 |
5 | private static final String CONTEXT = "/";
6 | private static final int PORT = Integer.parseInt(System.getenv().get("PORT"));
7 |
8 | public static void main(String[] args) throws Exception {
9 |
10 | // Create a new SimpleHttpServer
11 | SimpleHttpServer simpleHttpServer = new SimpleHttpServer(PORT, CONTEXT,
12 | new HttpRequestHandler());
13 |
14 | // Start the server
15 | simpleHttpServer.start();
16 | System.out.println("Server is started and listening on port "+ PORT);
17 | }
18 |
19 | }
--------------------------------------------------------------------------------
/java-aws-lambda-gradle/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'java'
3 | }
4 |
5 | sourceCompatibility = JavaVersion.VERSION_11
6 | targetCompatibility = JavaVersion.VERSION_11
7 |
8 | repositories {
9 | mavenCentral()
10 | maven {
11 | url "https://nexus.nuiton.org/nexus/service/local/repositories/thirdparty/content/"
12 | }
13 | }
14 |
15 | dependencies {
16 | implementation 'com.sun:tools:1.7.0.13'
17 | implementation 'com.amazonaws:aws-lambda-java-core:1.2.1'
18 | implementation 'com.rookout:rook:latest.release'
19 | }
20 |
21 | task buildZip(type: Zip) {
22 | from compileJava
23 | from processResources
24 | into('lib') {
25 | from configurations.runtimeClasspath
26 | }
27 | }
28 |
29 | build.dependsOn buildZip
30 |
--------------------------------------------------------------------------------
/java-aws-lambda-gradle/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-aws-lambda-gradle/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/java-aws-lambda-gradle/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/java-aws-lambda-gradle/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'java-aws-lambda-gradle'
2 |
--------------------------------------------------------------------------------
/java-azure-functions/.gitignore:
--------------------------------------------------------------------------------
1 | # Build output
2 | target/
3 | *.class
4 |
5 | # Log file
6 | *.log
7 |
8 | # BlueJ files
9 | *.ctxt
10 |
11 | # Mobile Tools for Java (J2ME)
12 | .mtj.tmp/
13 |
14 | # Package Files #
15 | *.jar
16 | *.war
17 | *.ear
18 | *.zip
19 | *.tar.gz
20 | *.rar
21 |
22 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
23 | hs_err_pid*
24 |
25 | # IDE
26 | .idea/
27 | *.iml
28 | .settings/
29 | .project
30 | .classpath
31 | .vscode/
32 |
33 | # macOS
34 | .DS_Store
35 |
36 | # Azure Functions
37 | local.settings.json
38 | bin/
39 | obj/
40 |
--------------------------------------------------------------------------------
/java-azure-functions/host.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "2.0",
3 | "extensionBundle": {
4 | "id": "Microsoft.Azure.Functions.ExtensionBundle",
5 | "version": "[1.*, 2.0.0)"
6 | }
7 | }
--------------------------------------------------------------------------------
/java-docker-compose/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM maven:3.5.2-jdk-8-alpine
2 |
3 | WORKDIR /code
4 |
5 | RUN mkdir -p /usr/src/app/target/
6 | WORKDIR /usr/src/app
7 |
8 | # Copy the jar image (which already include resoures)
9 | COPY target/rookoutDemo-1.0.0.jar /usr/src/app/target/rookoutDemo-1.0.0.jar
10 | #Download the Rookout agent jar
11 | RUN apk update \
12 | && apk add ca-certificates wget \
13 | && update-ca-certificates
14 | RUN wget "https://search.maven.org/remote_content?g=com.rookout&a=rook&v=LATEST" -O rook.jar
15 |
--------------------------------------------------------------------------------
/java-docker-compose/Makefile:
--------------------------------------------------------------------------------
1 | build-local-maven:
2 |
3 | #We download the javaagent for local running
4 | wget "https://search.maven.org/remote_content?g=com.rookout&a=rook&v=LATEST" -O rook.jar
5 |
6 | #We need to build the tartget/rookoutDemo-1.0.0.jar - which already include the project sources in the jar
7 | mvn package
8 |
9 | build-local-gradle:
10 | #We download the javaagent for local running
11 | wget "https://search.maven.org/remote_content?g=com.rookout&a=rook&v=LATEST" -O rook.jar
12 |
13 | #We need to build the build/libs/rookoutDemo-1.0.0.jar - which already include the project sources in the jar
14 | gradle fatJar
15 |
16 | build-for-docker-compose:
17 | #We need to build the tartget/rookoutDemo-1.0.0.jar that we later use in the dockerfile.
18 | mvn package
19 |
20 | run-local-maven:
21 | #We need to add the javaagent to the run
22 | java -javaagent:rook.jar -jar target/rookoutDemo-1.0.0.jar
23 |
24 | run-local-gradle:
25 | java -javaagent:rook.jar -jar build/libs/rookoutDemo-1.0.0.jar
--------------------------------------------------------------------------------
/java-docker-compose/docker-compose.yaml:
--------------------------------------------------------------------------------
1 | version: '3'
2 |
3 | services:
4 | app:
5 | environment:
6 | ROOKOUT_TOKEN: c7a0d0a38b4af5546152ffdba16c8831c9b52f7f20e2107e3051bd74bd6517ae
7 | build: .
8 | container_name: rookout-demo-app
9 | ports:
10 | - 7000:7000
11 | command: java -javaagent:rook.jar -jar target/rookoutDemo-1.0.0.jar
12 |
--------------------------------------------------------------------------------
/java-docker-compose/src/main/java/com/rookout/HelloWorld.java:
--------------------------------------------------------------------------------
1 | package com.rookout;
2 | import io.javalin.Context;
3 | import io.javalin.Handler;
4 | import io.javalin.Javalin;
5 |
6 | public class HelloWorld {
7 | public static void main(String[] args) {
8 | Javalin app = Javalin.start(7000);
9 | app.get("/", new Handler() {
10 | public void handle(Context ctx) throws Exception {
11 | ctx.result("Hello World");
12 | }
13 | });
14 | app.get("/hello/:name", new Handler() {
15 | public void handle(Context ctx) throws Exception {
16 | ctx.result("Hello: " + ctx.param("name"));
17 | }
18 | });
19 | app.get("/", new Handler() {
20 | public void handle(Context ctx) throws Exception {
21 | ctx.result("Hello World");
22 | }
23 | });
24 | }
25 | }
--------------------------------------------------------------------------------
/java-dropwizard/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM maven:3.6-jdk-8-slim
2 | ADD pom.xml pom.xml
3 | ADD src src
4 | RUN mvn package
--------------------------------------------------------------------------------
/java-dropwizard/Jenkinsfile:
--------------------------------------------------------------------------------
1 | regressionTest {
2 | FILE_PATH = "src/main/java/Resource.java"
3 | LINE_NUM = "12"
4 | SHA = "4257bf2eeb19cf6f22bbae7407ab25ad5a4526bb82c161bdaa7a6e73a7f76f92"
5 | URL_FOR_TRIGGER = "http://localhost:8080/hello"
6 | LANG = "Java"
7 | BACKGROUND_IMAGE_CMD = "java -jar /target/dropwizard-example-1.0-SNAPSHOT.jar server &"
8 | FILES_TO_FUZZ = "src/main/java/Resource.java"
9 | MAX_LINES_IN_FILE_TO_FUZZ = "35"
10 | }
--------------------------------------------------------------------------------
/java-dropwizard/src/main/java/DropwizardExampleApplication.java:
--------------------------------------------------------------------------------
1 | import io.dropwizard.Application;
2 | import io.dropwizard.Configuration;
3 | import io.dropwizard.setup.Environment;
4 |
5 | public class DropwizardExampleApplication extends Application {
6 | public static void main(String[] args) throws Exception {
7 | new DropwizardExampleApplication().run(args);
8 | }
9 |
10 | @Override
11 | public void run(Configuration configuration, Environment environment) {
12 | environment.jersey().register(new Resource());
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/java-dropwizard/src/main/java/Resource.java:
--------------------------------------------------------------------------------
1 | import javax.ws.rs.FormParam;
2 | import javax.ws.rs.GET;
3 | import javax.ws.rs.POST;
4 | import javax.ws.rs.Path;
5 | import javax.ws.rs.QueryParam;
6 |
7 | @Path("/")
8 | public class Resource {
9 | @GET
10 | @Path("/hello")
11 | public String hello() {
12 | return "Hello";
13 | }
14 |
15 | @GET
16 | @Path("/query")
17 | public String query(@QueryParam("message") String message) {
18 | return "You passed " + message;
19 | }
20 |
21 | @POST
22 | @Path("/postbody")
23 | public String postBody(String message) {
24 | return "You posted " + message;
25 | }
26 |
27 | @POST
28 | @Path("/postparam")
29 | public String postParam(@FormParam("message") String message) {
30 | return "You posted " + message;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/java-gcp-dataflow/word-count-beam/src/main/java/org/apache/beam/examples/RookoutJvmInitializer.java:
--------------------------------------------------------------------------------
1 | package org.apache.beam.examples;
2 |
3 | import com.rookout.rook.API;
4 | import com.rookout.rook.RookOptions;
5 | import org.apache.beam.sdk.harness.JvmInitializer;
6 | import org.apache.beam.sdk.options.PipelineOptions;
7 | import com.google.auto.service.AutoService;
8 | import java.util.HashMap;
9 |
10 | @AutoService(JvmInitializer.class)
11 | public class RookoutJvmInitializer implements JvmInitializer {
12 | @Override
13 | public void beforeProcessing(PipelineOptions options) {
14 | RookOptions opts = new RookOptions();
15 | opts.token = "";
16 | opts.labels = new HashMap() {{
17 | put("env", "prod");
18 | }};
19 | API.start(opts);
20 | }
21 | }
--------------------------------------------------------------------------------
/java-gradle/java-agent/.settings/org.eclipse.buildship.core.prefs:
--------------------------------------------------------------------------------
1 | connection.project.dir=
2 | eclipse.preferences.version=1
3 |
--------------------------------------------------------------------------------
/java-gradle/java-agent/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM openjdk:8-slim
2 | ADD gradlew gradlew
3 | ADD build.gradle build.gradle
4 | ADD gradle gradle
5 | ADD settings.gradle settings.gradle
6 | RUN ./gradlew build
7 | RUN apt update -y && apt install -y wget
8 | ADD . .
9 | RUN ./gradlew jar
10 |
--------------------------------------------------------------------------------
/java-gradle/java-agent/Jenkinsfile:
--------------------------------------------------------------------------------
1 | regressionTest {
2 | FILE_PATH = "src/main/java/com/rookout/HelloWorld.java"
3 | LINE_NUM = "16"
4 | SHA = "7459814efb8eb2c0caf3956e441f159252ece842aa714be32ad350dd5e331d9b"
5 | URL_FOR_TRIGGER = "http://localhost:7000/hello/ori"
6 | LANG = "Java"
7 | BACKGROUND_IMAGE_CMD = "java -jar /build/libs/rookoutDemo-1.0.0.jar &"
8 | FILES_TO_FUZZ = "src/main/java/com/rookout/HelloWorld.java"
9 | MAX_LINES_IN_FILE_TO_FUZZ = "20"
10 | }
11 |
--------------------------------------------------------------------------------
/java-gradle/java-agent/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'java'
2 |
3 | group = 'com.rookout'
4 | version = '1.0.0'
5 |
6 | description = """rookoutHellopApp"""
7 |
8 | configurations {
9 | rookoutAgent
10 | }
11 |
12 | repositories {
13 | maven { url "https://repo1.maven.org/maven2" }
14 | }
15 |
16 | dependencies {
17 | compile group: 'io.javalin', name: 'javalin', version:'1.3.0'
18 | compile 'org.slf4j:slf4j-nop:1.7.25'
19 | rookoutAgent 'com.rookout:rook:+'
20 | }
21 |
22 | jar {
23 | manifest {
24 | attributes 'Implementation-Title': 'Rookout Gradle Example',
25 | 'Implementation-Version': version,
26 | 'Main-Class': 'com.rookout.HelloWorld'
27 | }
28 | from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } //Collect all dependecies for the jar
29 | from sourceSets.main.allSource
30 | }
31 |
32 | task run(type: JavaExec) {
33 | classpath = files(jar.archivePath)
34 | classpath += sourceSets.main.runtimeClasspath
35 | main = 'com.rookout.HelloWorld'
36 | if (!System.getenv("DISABLE_ROOKOUT")) {
37 | jvmArgs = ["-javaagent:${configurations.rookoutAgent.singleFile}"]
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/java-gradle/java-agent/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-gradle/java-agent/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/java-gradle/java-agent/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/java-gradle/java-agent/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'rookoutDemo'
2 |
--------------------------------------------------------------------------------
/java-gradle/java-agent/src/main/java/com/rookout/HelloWorld.java:
--------------------------------------------------------------------------------
1 | package com.rookout;
2 | import io.javalin.Context;
3 | import io.javalin.Handler;
4 | import io.javalin.Javalin;
5 |
6 | public class HelloWorld {
7 | public static void main(String[] args) {
8 | Javalin app = Javalin.start(7000);
9 | app.get("/", new Handler() {
10 | public void handle(Context ctx) throws Exception {
11 | ctx.result("Hello World");
12 | }
13 | });
14 | app.get("/hello/:name", new Handler() {
15 | public void handle(Context ctx) throws Exception {
16 | ctx.result("Hello: " + ctx.param("name"));
17 | }
18 | });
19 | }
20 | }
--------------------------------------------------------------------------------
/java-gradle/java-api/.settings/org.eclipse.buildship.core.prefs:
--------------------------------------------------------------------------------
1 | connection.project.dir=
2 | eclipse.preferences.version=1
3 |
--------------------------------------------------------------------------------
/java-gradle/java-api/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM openjdk:8-slim
2 | ADD gradlew gradlew
3 | ADD build.gradle build.gradle
4 | ADD gradle gradle
5 | ADD settings.gradle settings.gradle
6 | RUN ./gradlew build
7 | RUN apt update -y && apt install -y wget
8 | ADD . .
9 | RUN ./gradlew jar
--------------------------------------------------------------------------------
/java-gradle/java-api/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'java'
2 |
3 | group = 'com.rookout'
4 | version = '1.0.0'
5 |
6 | description = """rookoutHellopApp"""
7 |
8 | repositories {
9 | maven { url "https://repo1.maven.org/maven2" }
10 | }
11 |
12 | dependencies {
13 | compile group: 'io.javalin', name: 'javalin', version:'1.3.0'
14 | compile 'org.slf4j:slf4j-nop:1.7.25'
15 | compile group: 'com.rookout', name: 'rook', version: '0.+'
16 | }
17 |
18 | jar {
19 | manifest {
20 | attributes 'Implementation-Title': 'Rookout Gradle Example',
21 | 'Implementation-Version': version,
22 | 'Main-Class': 'com.HelloWorld.HelloWorld'
23 | }
24 | from sourceSets.main.allSource
25 | }
26 |
27 | task run(type: JavaExec) {
28 | classpath = files(jar.archivePath)
29 | classpath += sourceSets.main.runtimeClasspath
30 | main = 'com.HelloWorld.HelloWorld'
31 | }
32 |
--------------------------------------------------------------------------------
/java-gradle/java-api/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-gradle/java-api/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/java-gradle/java-api/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/java-gradle/java-api/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'rookoutDemo'
2 |
--------------------------------------------------------------------------------
/java-gradle/java-api/src/main/java/com/HelloWorld/HelloWorld.java:
--------------------------------------------------------------------------------
1 | package com.HelloWorld;
2 |
3 | import io.javalin.Context;
4 | import io.javalin.Handler;
5 | import io.javalin.Javalin;
6 | import com.rookout.rook.API;
7 | import com.rookout.rook.RookOptions;
8 |
9 | public class HelloWorld {
10 | public static void main(String[] args) {
11 | Javalin app = Javalin.start(7000);
12 |
13 | RookOptions opts = new RookOptions();
14 | opts.token = "";
15 | API.start(opts);
16 |
17 | app.get("/", new Handler() {
18 | public void handle(Context ctx) throws Exception {
19 | ctx.result("Hello World");
20 | }
21 | });
22 | app.get("/hello/:name", new Handler() {
23 | public void handle(Context ctx) throws Exception {
24 | ctx.result("Hello: " + ctx.param("name"));
25 | }
26 | });
27 | }
28 | }
--------------------------------------------------------------------------------
/java-gradle/java-dynamic-loading/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM openjdk:8-slim
2 | ADD gradlew gradlew
3 | ADD build.gradle build.gradle
4 | ADD gradle gradle
5 | ADD settings.gradle settings.gradle
6 | RUN ./gradlew build
7 | RUN apt update -y && apt install -y wget
8 | RUN apt-get install -y procps
9 | ADD . .
10 | RUN ./gradlew jar
11 |
--------------------------------------------------------------------------------
/java-gradle/java-dynamic-loading/Jenkinsfile:
--------------------------------------------------------------------------------
1 | regressionTest {
2 | FILE_PATH = "src/main/java/com/rookout/HelloWorld.java"
3 | LINE_NUM = "16"
4 | SHA = "7459814efb8eb2c0caf3956e441f159252ece842aa714be32ad350dd5e331d9b"
5 | URL_FOR_TRIGGER = "http://localhost:7000/hello/ori"
6 | LANG = "Java"
7 | BACKGROUND_IMAGE_CMD = "bash /runTest.sh &"
8 | }
9 |
--------------------------------------------------------------------------------
/java-gradle/java-dynamic-loading/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'java'
2 |
3 | group = 'com.rookout'
4 | version = '1.0.0'
5 |
6 | description = """rookoutHellopApp"""
7 |
8 | configurations {
9 | rookoutAgent
10 | }
11 |
12 | repositories {
13 | maven { url "https://repo1.maven.org/maven2" }
14 | }
15 |
16 | dependencies {
17 | compile group: 'io.javalin', name: 'javalin', version:'1.3.0'
18 | compile 'org.slf4j:slf4j-nop:1.7.25'
19 | rookoutAgent 'com.rookout:rook:+'
20 | }
21 |
22 | jar {
23 | manifest {
24 | attributes 'Implementation-Title': 'Rookout Gradle Example',
25 | 'Implementation-Version': version,
26 | 'Main-Class': 'com.rookout.HelloWorld'
27 | }
28 | from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } //Collect all dependecies for the jar
29 | from sourceSets.main.allSource
30 | }
31 |
32 | task run(type: JavaExec) {
33 | classpath = files(jar.archivePath)
34 | classpath += sourceSets.main.runtimeClasspath
35 | main = 'com.rookout.HelloWorld'
36 | if (!System.getenv("DISABLE_ROOKOUT")) {
37 | jvmArgs = ["-javaagent:${configurations.rookoutAgent.singleFile}"]
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/java-gradle/java-dynamic-loading/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-gradle/java-dynamic-loading/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/java-gradle/java-dynamic-loading/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/java-gradle/java-dynamic-loading/runTest.sh:
--------------------------------------------------------------------------------
1 | unset JAVA_TOOL_OPTIONS
2 | export JAVA_TOOL_OPTIONS=""
3 | java -jar /build/libs/rookoutDemo-1.0.0.jar &
4 | export ROOKOUT_TARGET_PID=$(ps -ef | grep 'java -jar /build/libs/rookoutDemo-1.0.0.jar' | grep -v grep | awk '{print $2}')
5 | java -jar /home/jenkins/agent/rook.jar &
--------------------------------------------------------------------------------
/java-gradle/java-dynamic-loading/runTest_workflow.sh:
--------------------------------------------------------------------------------
1 | unset JAVA_TOOL_OPTIONS
2 | export JAVA_TOOL_OPTIONS=""
3 | java -jar /build/libs/rookoutDemo-1.0.0.jar &
4 | export ROOKOUT_TARGET_PID=$(ps -ef | grep 'java -jar /build/libs/rookoutDemo-1.0.0.jar' | grep -v grep | awk '{print $2}')
5 | java -jar $ROOK_DEST/rook-all.jar &
6 | sleep infinity
--------------------------------------------------------------------------------
/java-gradle/java-dynamic-loading/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'rookoutDemo'
2 |
--------------------------------------------------------------------------------
/java-gradle/java-dynamic-loading/src/main/java/com/rookout/HelloWorld.java:
--------------------------------------------------------------------------------
1 | package com.rookout;
2 | import io.javalin.Context;
3 | import io.javalin.Handler;
4 | import io.javalin.Javalin;
5 |
6 | public class HelloWorld {
7 | public static void main(String[] args) {
8 | Javalin app = Javalin.start(7000);
9 | app.get("/", new Handler() {
10 | public void handle(Context ctx) throws Exception {
11 | ctx.result("Hello World");
12 | }
13 | });
14 | app.get("/hello/:name", new Handler() {
15 | public void handle(Context ctx) throws Exception {
16 | ctx.result("Hello: " + ctx.param("name"));
17 | }
18 | });
19 | }
20 | }
--------------------------------------------------------------------------------
/java-groovy/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM groovy:2.5.1-jdk8
2 |
3 | USER root
4 |
5 | ADD test_groovy.groovy /home/groovy/
--------------------------------------------------------------------------------
/java-groovy/Jenkinsfile:
--------------------------------------------------------------------------------
1 | regressionTest {
2 | FILE_PATH = "test_groovy.groovy"
3 | LINE_NUM = "8"
4 | SHA = "50a539ea048b203802710cc51fc2f5082d120d94bd6acf18672b044063d4c123"
5 | URL_FOR_TRIGGER = "http://localhost:8080/hello"
6 | LANG = "Java"
7 | BACKGROUND_IMAGE_CMD = "groovy /home/groovy/test_groovy.groovy &"
8 | FILES_TO_FUZZ = "test_groovy.groovy"
9 | MAX_LINES_IN_FILE_TO_FUZZ = "15"
10 | }
--------------------------------------------------------------------------------
/java-groovy/README.md:
--------------------------------------------------------------------------------
1 | # Debug a Groovy app using Rookout
2 |
3 | A sample app for debugging Groovy + Docker Compose using Rookout.
4 |
5 | Before following this guide we recommend reading the basic [Java + Rookout] guide.
6 |
7 | * [Running locally](#running-locally)
8 | * [Rookout Integration explained](#rookout-integration-explained)
9 |
10 | ## Running locally
11 | 1. Run the Rookout ETL Agent:
12 | ``` bash
13 | $ docker run -p 7486:7486 -e "ROOKOUT_TOKEN=" rookout/agent
14 | ```
15 | 2. Build the docker image:
16 | ```bash
17 | $ docker build -t=rookoutgroovy .
18 | ```
19 | 3. Run the docker image:
20 | ```bash
21 | $ docker run -it rookoutgroovy bash
22 | ```
23 | 4. Run the groovy script
24 | ```bash
25 | $ groovy /home/groovy/test_groovy.groovy
26 | ```
27 |
28 | [Java + Rookout]: https://docs.rookout.com/docs/sdk-setup.html
29 | [here]: https://github.com/tipsy/javalin/
30 | [maven central]: https://mvnrepository.com/artifact/com.rookout/rook
31 |
--------------------------------------------------------------------------------
/java-groovy/test_groovy.groovy:
--------------------------------------------------------------------------------
1 | import com.sun.net.httpserver.HttpServer
2 |
3 | HttpServer.create(new InetSocketAddress(8080), 0).with {
4 | createContext("/hello") { http ->
5 | http.responseHeaders.add("Content-type", "text/plain")
6 | http.sendResponseHeaders(200, 0)
7 | http.responseBody.withWriter { out ->
8 | out << "Hello ${http.remoteAddress.hostName}!"
9 | }
10 | }
11 | start()
12 | }
--------------------------------------------------------------------------------
/java-jboss/module.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/java-jetty/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM maven:3.5.2-jdk-8-alpine AS SAMPLE_LIB
2 | COPY SampleLib/pom.xml /tmp/
3 | COPY SampleLib/src /tmp/src/
4 | WORKDIR /tmp/
5 | RUN mvn package
6 |
7 | FROM jetty:latest
8 | USER root
9 |
10 | COPY --from=SAMPLE_LIB /tmp/target/jetty-helloworld.war /var/lib/jetty/webapps/
11 | RUN echo '--exec \n-javaagent:/home/jenkins/agent/rook.jar' >> /var/lib/jetty/start.d/server.ini
12 |
13 | CMD ["java","-jar","/usr/local/jetty/start.jar"]
14 |
15 |
--------------------------------------------------------------------------------
/java-jetty/Jenkinsfile.disabled:
--------------------------------------------------------------------------------
1 | regressionTest {
2 | FILE_PATH = "HelloWorldServlet.java"
3 | LINE_NUM = "50"
4 | SHA = "3673018c8bd288e8597789ff2a93b7c45af678b80ad394ae88f868e8a7f043ed"
5 | URL_FOR_TRIGGER = "http://127.0.0.1:8080/jetty-helloworld/HelloWorld"
6 | LANG = "Java"
7 | BACKGROUND_IMAGE_CMD = "cd /var/lib/jetty && java -jar /usr/local/jetty/start.jar &"
8 | DISABLE_LOAD_JAVA_AGENT = "true"
9 | }
10 |
--------------------------------------------------------------------------------
/java-jetty/SampleLib/src/main/java/org/jetty/as/quickstarts/helloworld/HelloService.java:
--------------------------------------------------------------------------------
1 | package org.jetty.as.quickstarts.helloworld;
2 |
3 | /**
4 | * A simple CDI service which is able to say hello to someone
5 | *
6 | * @author Pete Muir
7 | *
8 | */
9 | public class HelloService {
10 |
11 | String createHelloMessage(String name) {
12 | return "Hello " + name + "!";
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/java-jetty/SampleLib/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/java-jetty/SampleLib/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/java-kotlin/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM openjdk:8-slim
2 | RUN mkdir /proj
3 | ADD gradlew /proj/gradlew
4 | ADD build.gradle /proj/build.gradle
5 | ADD gradle /proj/gradle
6 | ADD settings.gradle /proj/settings.gradle
7 | RUN /proj/gradlew build
8 | RUN apt update -y && apt install -y wget
9 | ADD . /proj
10 | WORKDIR /proj
11 | RUN ./gradlew jar
12 |
13 |
--------------------------------------------------------------------------------
/java-kotlin/Jenkinsfile:
--------------------------------------------------------------------------------
1 | regressionTest {
2 | FILE_PATH = "src/main/kotlin/demo/helloWorld.kt"
3 | LINE_NUM = "17"
4 | SHA = "74c0ba7745db50425308d0ec6caad47a015d8b77cf4cb2348e3528bc70a9f6ee"
5 | URL_FOR_TRIGGER = "http://localhost:9090/hello"
6 | LANG = "Java"
7 | BACKGROUND_IMAGE_CMD = "java -jar /proj/build/libs/rookoutDemo.jar &"
8 | FILES_TO_FUZZ = "src/main/kotlin/demo/helloWorld.kt"
9 | MAX_LINES_IN_FILE_TO_FUZZ = "25"
10 | }
11 |
--------------------------------------------------------------------------------
/java-kotlin/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.3.10'
3 | repositories {
4 | mavenCentral()
5 | }
6 | dependencies {
7 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
8 | }
9 | }
10 |
11 | apply plugin: 'kotlin'
12 | apply plugin: 'application'
13 |
14 | mainClassName = 'demo.HelloWorldKt'
15 |
16 | defaultTasks 'run'
17 |
18 | repositories {
19 | mavenCentral()
20 | }
21 |
22 | dependencies {
23 | compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
24 | testCompile 'junit:junit:4.11'
25 | testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
26 | }
27 |
28 | jar {
29 | manifest { attributes 'Main-Class': 'demo.HelloWorldKt' }
30 | from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
31 | }
32 |
33 | task wrapper(type: Wrapper) {
34 | gradleVersion = "4.10.2"
35 | }
36 |
--------------------------------------------------------------------------------
/java-kotlin/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-kotlin/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/java-kotlin/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Oct 26 12:25:13 CET 2015
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-all.zip
7 |
--------------------------------------------------------------------------------
/java-kotlin/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'rookoutDemo'
2 |
--------------------------------------------------------------------------------
/java-kotlin/src/main/kotlin/demo/helloWorld.kt:
--------------------------------------------------------------------------------
1 | package demo
2 |
3 | import com.sun.net.httpserver.HttpServer
4 | import java.io.PrintWriter
5 | import java.net.InetSocketAddress
6 |
7 | /**
8 | * Minimal embedded HTTP server in Kotlin using Java built in HttpServer
9 | */
10 | fun main(args: Array) {
11 | HttpServer.create(InetSocketAddress(9090), 0).apply {
12 |
13 | createContext("/hello") { http ->
14 | http.responseHeaders.add("Content-type", "text/plain")
15 | http.sendResponseHeaders(200, 0)
16 | PrintWriter(http.responseBody).use { out ->
17 | out.println("Hello ${http.remoteAddress.hostName}!")
18 | }
19 | }
20 |
21 | start()
22 | }
23 | }
--------------------------------------------------------------------------------
/java-maven/maven-agent/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM maven:3.6-jdk-8-slim
2 | ADD pom.xml pom.xml
3 | #https://stackoverflow.com/questions/42208442/maven-docker-cache-dependencies
4 | RUN mvn -B -f ./pom.xml -s /usr/share/maven/ref/settings-docker.xml dependency:resolve
5 | RUN apt update -y && apt install -y wget
6 | ADD . .
7 | RUN mvn package
--------------------------------------------------------------------------------
/java-maven/maven-agent/Jenkinsfile:
--------------------------------------------------------------------------------
1 | regressionTest {
2 | FILE_PATH = "src/main/java/com/rookout/HelloWorld.java"
3 | LINE_NUM = "16"
4 | SHA = "7459814efb8eb2c0caf3956e441f159252ece842aa714be32ad350dd5e331d9b"
5 | URL_FOR_TRIGGER = "http://localhost:7000/hello/ori"
6 | LANG = "Java"
7 | BACKGROUND_IMAGE_CMD = "java -jar /target/rookoutDemo-1.0.0-jar-with-dependencies.jar &"
8 |
9 | }
--------------------------------------------------------------------------------
/java-maven/maven-agent/src/main/java/com/rookout/HelloWorld.java:
--------------------------------------------------------------------------------
1 | package com.rookout;
2 | import io.javalin.Context;
3 | import io.javalin.Handler;
4 | import io.javalin.Javalin;
5 |
6 | public class HelloWorld {
7 | public static void main(String[] args) {
8 | Javalin app = Javalin.start(7000);
9 | app.get("/", new Handler() {
10 | public void handle(Context ctx) throws Exception {
11 | ctx.result("Hello World");
12 | }
13 | });
14 | app.get("/hello/:name", new Handler() {
15 | public void handle(Context ctx) throws Exception {
16 | ctx.result("Hello: " + ctx.param("name"));
17 | }
18 | });
19 | }
20 | }
--------------------------------------------------------------------------------
/java-maven/maven-api/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM maven:3.6-jdk-8-slim
2 | ADD pom.xml pom.xml
3 | #https://stackoverflow.com/questions/42208442/maven-docker-cache-dependencies
4 | RUN mvn -B -f ./pom.xml -s /usr/share/maven/ref/settings-docker.xml dependency:resolve
5 | RUN apt update -y && apt install -y wget
6 | ADD . .
7 | RUN mvn package
--------------------------------------------------------------------------------
/java-maven/maven-api/src/main/java/com/rookout/HelloWorld.java:
--------------------------------------------------------------------------------
1 | package com.rookout;
2 | import io.javalin.Context;
3 | import io.javalin.Handler;
4 | import io.javalin.Javalin;
5 |
6 | import com.rookout.rook.API;
7 | import com.rookout.rook.RookOptions;
8 |
9 | public class HelloWorld {
10 | public static void main(String[] args) {
11 | Javalin app = Javalin.start(7000);
12 |
13 | RookOptions opts = new RookOptions();
14 | opts.token = "";
15 | API.start(opts);
16 |
17 | app.get("/", new Handler() {
18 | public void handle(Context ctx) throws Exception {
19 | ctx.result("Hello World");
20 | }
21 | });
22 | app.get("/hello/:name", new Handler() {
23 | public void handle(Context ctx) throws Exception {
24 | ctx.result("Hello: " + ctx.param("name"));
25 | }
26 | });
27 | }
28 | }
--------------------------------------------------------------------------------
/java-maven/maven-git/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM maven:3.6-jdk-8-slim
2 | ADD pom.xml pom.xml
3 | #https://stackoverflow.com/questions/42208442/maven-docker-cache-dependencies
4 | RUN mvn -B -f ./pom.xml -s /usr/share/maven/ref/settings-docker.xml dependency:resolve
5 | RUN apt update -y && apt install -y wget
6 | ADD . .
7 | RUN mvn package
--------------------------------------------------------------------------------
/java-maven/maven-git/src/main/java/com/rookout/HelloWorld.java:
--------------------------------------------------------------------------------
1 | package com.rookout;
2 | import io.javalin.Context;
3 | import io.javalin.Handler;
4 | import io.javalin.Javalin;
5 |
6 | public class HelloWorld {
7 | public static void main(String[] args) {
8 | Javalin app = Javalin.start(7000);
9 | app.get("/", new Handler() {
10 | public void handle(Context ctx) throws Exception {
11 | ctx.result("Hello World");
12 | }
13 | });
14 | app.get("/hello/:name", new Handler() {
15 | public void handle(Context ctx) throws Exception {
16 | ctx.result("Hello: " + ctx.param("name"));
17 | }
18 | });
19 | }
20 | }
--------------------------------------------------------------------------------
/java-maven/maven-perforce-existing-jar/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM maven:3.6-jdk-8-slim
2 | ADD pom.xml pom.xml
3 | #https://stackoverflow.com/questions/42208442/maven-docker-cache-dependencies
4 | RUN mvn -B -f ./pom.xml -s /usr/share/maven/ref/settings-docker.xml dependency:resolve
5 | RUN apt update -y && apt install -y wget
6 | ADD . .
7 | RUN mvn package
--------------------------------------------------------------------------------
/java-maven/maven-perforce-existing-jar/src/main/java/com/rookout/HelloWorld.java:
--------------------------------------------------------------------------------
1 | package com.rookout;
2 | import io.javalin.Context;
3 | import io.javalin.Handler;
4 | import io.javalin.Javalin;
5 |
6 | public class HelloWorld {
7 | public static void main(String[] args) {
8 | Javalin app = Javalin.start(7000);
9 | app.get("/", new Handler() {
10 | public void handle(Context ctx) throws Exception {
11 | ctx.result("Hello World");
12 | }
13 | });
14 | app.get("/hello/:name", new Handler() {
15 | public void handle(Context ctx) throws Exception {
16 | ctx.result("Hello: " + ctx.param("name"));
17 | }
18 | });
19 | }
20 | }
--------------------------------------------------------------------------------
/java-maven/maven-perforce/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM maven:3.6-jdk-8-slim
2 | ADD pom.xml pom.xml
3 | #https://stackoverflow.com/questions/42208442/maven-docker-cache-dependencies
4 | RUN mvn -B -f ./pom.xml -s /usr/share/maven/ref/settings-docker.xml dependency:resolve
5 | RUN apt update -y && apt install -y wget
6 | ADD . .
7 | RUN mvn package
--------------------------------------------------------------------------------
/java-maven/maven-perforce/src/main/java/com/rookout/HelloWorld.java:
--------------------------------------------------------------------------------
1 | package com.rookout;
2 | import io.javalin.Context;
3 | import io.javalin.Handler;
4 | import io.javalin.Javalin;
5 |
6 | public class HelloWorld {
7 | public static void main(String[] args) {
8 | Javalin app = Javalin.start(7000);
9 | app.get("/", new Handler() {
10 | public void handle(Context ctx) throws Exception {
11 | ctx.result("Hello World");
12 | }
13 | });
14 | app.get("/hello/:name", new Handler() {
15 | public void handle(Context ctx) throws Exception {
16 | ctx.result("Hello: " + ctx.param("name"));
17 | }
18 | });
19 | }
20 | }
--------------------------------------------------------------------------------
/java-pivotal-cloud-foundry/spring-helloworld-cf/.gitignore:
--------------------------------------------------------------------------------
1 | HELP.md
2 | target/
3 | !.mvn/wrapper/maven-wrapper.jar
4 | !**/src/main/**
5 | !**/src/test/**
6 |
7 | ### STS ###
8 | .apt_generated
9 | .classpath
10 | .factorypath
11 | .project
12 | .settings
13 | .springBeans
14 | .sts4-cache
15 |
16 | ### IntelliJ IDEA ###
17 | .idea
18 | *.iws
19 | *.iml
20 | *.ipr
21 |
22 | ### NetBeans ###
23 | /nbproject/private/
24 | /nbbuild/
25 | /dist/
26 | /nbdist/
27 | /.nb-gradle/
28 | build/
29 |
30 | ### VS Code ###
31 | .vscode/
32 |
--------------------------------------------------------------------------------
/java-pivotal-cloud-foundry/spring-helloworld-cf/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-pivotal-cloud-foundry/spring-helloworld-cf/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/java-pivotal-cloud-foundry/spring-helloworld-cf/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip
2 |
--------------------------------------------------------------------------------
/java-pivotal-cloud-foundry/spring-helloworld-cf/src/main/java/com/example/howtodoinjava/springhelloworldcf/SpringHelloworldCfApplication.java:
--------------------------------------------------------------------------------
1 | package com.example.howtodoinjava.springhelloworldcf;
2 |
3 | import java.util.Date;
4 |
5 | import org.springframework.beans.factory.annotation.Value;
6 | import org.springframework.boot.SpringApplication;
7 | import org.springframework.boot.autoconfigure.SpringBootApplication;
8 | import org.springframework.web.bind.annotation.RequestMapping;
9 | import org.springframework.web.bind.annotation.RequestParam;
10 | import org.springframework.web.bind.annotation.RestController;
11 |
12 | @SpringBootApplication
13 | public class SpringHelloworldCfApplication {
14 |
15 | public static void main(String[] args) {
16 | SpringApplication.run(SpringHelloworldCfApplication.class, args);
17 | }
18 | }
19 |
20 | @RestController
21 | class MessageRestController {
22 |
23 | @RequestMapping("/hello")
24 | String getMessage(@RequestParam(value = "name") String name) {
25 | String rsp = "Hi " + name + " : responded on - " + new Date();
26 | System.out.println(rsp);
27 | return rsp;
28 | }
29 | }
--------------------------------------------------------------------------------
/java-pivotal-cloud-foundry/spring-helloworld-cf/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/java-pivotal-cloud-foundry/spring-helloworld-cf/src/test/java/com/example/howtodoinjava/springhelloworldcf/SpringHelloworldCfApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.example.howtodoinjava.springhelloworldcf;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.context.SpringBootTest;
6 | import org.springframework.test.context.junit4.SpringRunner;
7 |
8 | @RunWith(SpringRunner.class)
9 | @SpringBootTest
10 | public class SpringHelloworldCfApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/java-play-framework/.settings/org.eclipse.buildship.core.prefs:
--------------------------------------------------------------------------------
1 | connection.project.dir=
2 | eclipse.preferences.version=1
3 |
--------------------------------------------------------------------------------
/java-play-framework/LICENSE:
--------------------------------------------------------------------------------
1 | License
2 | -------
3 | Written in 2016 by Lightbend
4 |
5 | To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
6 |
7 | You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see .
8 |
--------------------------------------------------------------------------------
/java-play-framework/Makefile:
--------------------------------------------------------------------------------
1 | build prod:
2 | sbt dist
3 | unzip target/universal/play-java-starter-example-1.0-SNAPSHOT.zip
4 | run prod:
5 | chmod +x play-java-starter-example-1.0-SNAPSHOT/bin/play-java-starter-example
6 | play-java-starter-example-1.0-SNAPSHOT/bin/play-java-starter-example -Dplay.file=../conf/application.conf
7 |
--------------------------------------------------------------------------------
/java-play-framework/app/controllers/CountController.java:
--------------------------------------------------------------------------------
1 | package controllers;
2 |
3 | import play.mvc.Controller;
4 | import play.mvc.Result;
5 | import services.Counter;
6 |
7 | import javax.inject.Inject;
8 | import javax.inject.Singleton;
9 |
10 | /**
11 | * This controller demonstrates how to use dependency injection to
12 | * bind a component into a controller class. The class contains an
13 | * action that shows an incrementing count to users. The {@link Counter}
14 | * object is injected by the Guice dependency injection system.
15 | */
16 | @Singleton
17 | public class CountController extends Controller {
18 |
19 | private final Counter counter;
20 |
21 | @Inject
22 | public CountController(Counter counter) {
23 | this.counter = counter;
24 | }
25 |
26 | /**
27 | * An action that responds with the {@link Counter}'s current
28 | * count. The result is plain text. This action is mapped to
29 | * GET
requests with a path of /count
30 | * requests by an entry in the routes
config file.
31 | */
32 | public Result count() {
33 | return ok(Integer.toString(counter.nextCount()));
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/java-play-framework/app/controllers/HomeController.java:
--------------------------------------------------------------------------------
1 | package controllers;
2 |
3 | import play.mvc.*;
4 |
5 | import views.html.*;
6 |
7 | /**
8 | * This controller contains an action to handle HTTP requests
9 | * to the application's home page.
10 | */
11 | public class HomeController extends Controller {
12 |
13 | /**
14 | * An action that renders an HTML page with a welcome message.
15 | * The configuration in the routes
file means that
16 | * this method will be called when the application receives a
17 | * GET
request with a path of /
.
18 | */
19 | public Result index() {
20 | return ok(index.render("Your new application is ready."));
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/java-play-framework/app/filters/ExampleFilter.java:
--------------------------------------------------------------------------------
1 | package filters;
2 |
3 | import play.mvc.EssentialAction;
4 | import play.mvc.EssentialFilter;
5 |
6 | import javax.inject.Inject;
7 | import javax.inject.Singleton;
8 | import java.util.concurrent.Executor;
9 |
10 | /**
11 | * This is a simple filter that adds a header to all requests.
12 | */
13 | @Singleton
14 | public class ExampleFilter extends EssentialFilter {
15 |
16 | private final Executor exec;
17 |
18 | /**
19 | * @param exec This class is needed to execute code asynchronously.
20 | */
21 | @Inject
22 | public ExampleFilter(Executor exec) {
23 | this.exec = exec;
24 | }
25 |
26 | @Override
27 | public EssentialAction apply(EssentialAction next) {
28 | return EssentialAction.of(request ->
29 | next.apply(request).map(result ->
30 | result.withHeader("X-ExampleFilter", "foo"), exec)
31 | );
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/java-play-framework/app/services/AtomicCounter.java:
--------------------------------------------------------------------------------
1 | package services;
2 |
3 | import java.util.concurrent.atomic.AtomicInteger;
4 | import javax.inject.*;
5 |
6 | /**
7 | * This class is a concrete implementation of the {@link Counter} trait.
8 | * It is configured for Guice dependency injection in the {@link Module}
9 | * class.
10 | *
11 | * This class has a {@link Singleton} annotation because we need to make
12 | * sure we only use one counter per application. Without this
13 | * annotation we would get a new instance every time a {@link Counter} is
14 | * injected.
15 | */
16 | @Singleton
17 | public class AtomicCounter implements Counter {
18 |
19 | private final AtomicInteger atomicCounter = new AtomicInteger();
20 |
21 | @Override
22 | public int nextCount() {
23 | return atomicCounter.getAndIncrement();
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/java-play-framework/app/services/Counter.java:
--------------------------------------------------------------------------------
1 | package services;
2 |
3 | /**
4 | * This interface demonstrates how to create a component that is injected
5 | * into a controller. The interface represents a counter that returns a
6 | * incremented number each time it is called.
7 | *
8 | * The {@link Modules} class binds this interface to the
9 | * {@link AtomicCounter} implementation.
10 | */
11 | public interface Counter {
12 | int nextCount();
13 | }
14 |
--------------------------------------------------------------------------------
/java-play-framework/app/views/index.scala.html:
--------------------------------------------------------------------------------
1 | @*
2 | * This template takes a single argument, a String containing a
3 | * message to display.
4 | *@
5 | @(message: String)
6 |
7 | @*
8 | * Call the `main` template with two arguments. The first
9 | * argument is a `String` with the title of the page, the second
10 | * argument is an `Html` object containing the body of the page.
11 | *@
12 | @main("Welcome to Play") {
13 |
14 | @*
15 | * Get an `Html` object by calling the built-in Play welcome
16 | * template and passing a `String` message.
17 | *@
18 | @welcome(message, style = "java")
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/java-play-framework/app/views/main.scala.html:
--------------------------------------------------------------------------------
1 | @*
2 | * This template is called from the `index` template. This template
3 | * handles the rendering of the page header and body tags. It takes
4 | * two arguments, a `String` for the title of the page and an `Html`
5 | * object to insert into the body of the page.
6 | *@
7 | @(title: String)(content: Html)
8 |
9 |
10 |
11 |
12 | @* Here's where we render the page title `String`. *@
13 | @title
14 |
15 |
16 |
17 |
18 |
19 | @* And here's where we render the `Html` object containing
20 | * the page content. *@
21 | @content
22 |
23 |
24 |
--------------------------------------------------------------------------------
/java-play-framework/build.sbt:
--------------------------------------------------------------------------------
1 | name := """play-java-starter-example"""
2 |
3 | version := "1.0-SNAPSHOT"
4 |
5 | scalaVersion := "2.12.6"
6 |
7 | lazy val root = (project in file(".")).enablePlugins(PlayJava, JavaAgent, JavaAppPackaging)
8 |
9 | crossScalaVersions := Seq("2.11.12", "2.12.4")
10 |
11 | libraryDependencies += guice
12 |
13 | // Test Database
14 | libraryDependencies += "com.h2database" % "h2" % "1.4.197"
15 |
16 | // Testing libraries for dealing with CompletionStage...
17 | libraryDependencies += "org.assertj" % "assertj-core" % "3.11.1" % Test
18 | libraryDependencies += "org.awaitility" % "awaitility" % "3.1.5" % Test
19 |
20 | // Make verbose tests
21 | testOptions in Test := Seq(Tests.Argument(TestFrameworks.JUnit, "-a", "-v"))
22 | javaAgents += "com.rookout" % "rook" % "0.1.47" % "dist"
--------------------------------------------------------------------------------
/java-play-framework/conf/routes:
--------------------------------------------------------------------------------
1 | # Routes
2 | # This file defines all application routes (Higher priority routes first)
3 | # ~~~~
4 |
5 | # An example controller showing a sample home page
6 | GET / controllers.HomeController.index
7 | # An example controller showing how to use dependency injection
8 | GET /count controllers.CountController.count
9 | # An example controller showing how to write asynchronous code
10 | GET /message controllers.AsyncController.message
11 |
12 | # Map static resources from the /public folder to the /assets URL path
13 | GET /assets/*file controllers.Assets.versioned(path="/public", file: Asset)
14 |
--------------------------------------------------------------------------------
/java-play-framework/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-bin.zip
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStorePath=wrapper/dists
5 | zipStoreBase=GRADLE_USER_HOME
6 |
--------------------------------------------------------------------------------
/java-play-framework/project/build.properties:
--------------------------------------------------------------------------------
1 | sbt.version=1.1.2
2 |
--------------------------------------------------------------------------------
/java-play-framework/project/plugins.sbt:
--------------------------------------------------------------------------------
1 | // The Play plugin
2 | addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.6.15")
3 |
4 | // Play enhancer - this automatically generates getters/setters for public fields
5 | // and rewrites accessors of these fields to use the getters/setters. Remove this
6 | // plugin if you prefer not to have this feature, or disable on a per project
7 | // basis using disablePlugins(PlayEnhancer) in your build.sbt
8 | addSbtPlugin("com.typesafe.sbt" % "sbt-play-enhancer" % "1.2.2")
9 | addSbtPlugin("com.lightbend.sbt" % "sbt-javaagent" % "0.1.4")
10 | addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.15")
11 |
--------------------------------------------------------------------------------
/java-play-framework/public/images/external.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-play-framework/public/images/external.png
--------------------------------------------------------------------------------
/java-play-framework/public/images/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-play-framework/public/images/favicon.png
--------------------------------------------------------------------------------
/java-play-framework/public/images/header-pattern.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-play-framework/public/images/header-pattern.png
--------------------------------------------------------------------------------
/java-play-framework/public/javascripts/hello.js:
--------------------------------------------------------------------------------
1 | if (window.console) {
2 | console.log("Welcome to your Play application's JavaScript!");
3 | }
4 |
--------------------------------------------------------------------------------
/java-play-framework/scripts/script-helper:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -e
4 | set -o pipefail
5 |
6 | java_version=$(java -version 2>&1 | java -version 2>&1 | awk -F '"' '/version/ {print $2}')
7 |
8 | if [[ $java_version = 9* ]] ; then
9 | echo "The build is using Java 9 ($java_version). We need additional JVM parameters"
10 | export _JAVA_OPTIONS="$_JAVA_OPTIONS --add-modules=java.xml.bind"
11 | else
12 | echo "The build is NOT using Java 9 ($java_version). No addional JVM params needed."
13 | fi
14 |
--------------------------------------------------------------------------------
/java-play-framework/scripts/test-gradle:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | . "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/script-helper"
4 |
5 | # Using cut because TRAVIS_SCALA_VERSION is the full Scala
6 | # version (for example 2.12.4), but Gradle expects just the
7 | # binary version (for example 2.12)
8 | scala_binary_version=$(echo $TRAVIS_SCALA_VERSION | cut -c1-4)
9 |
10 | echo "+------------------------------+"
11 | echo "| Executing tests using Gradle |"
12 | echo "+------------------------------+"
13 | ./gradlew -Dscala.binary.version=$scala_binary_version check -i --stacktrace
14 |
--------------------------------------------------------------------------------
/java-play-framework/scripts/test-sbt:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | . "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/script-helper"
4 |
5 | echo "+----------------------------+"
6 | echo "| Executing tests using sbt |"
7 | echo "+----------------------------+"
8 | sbt ++$TRAVIS_SCALA_VERSION test
9 |
--------------------------------------------------------------------------------
/java-play-framework/test/BrowserTest.java:
--------------------------------------------------------------------------------
1 | import org.junit.Test;
2 | import play.Application;
3 | import play.test.Helpers;
4 | import play.test.TestBrowser;
5 | import play.test.WithBrowser;
6 |
7 | import static org.junit.Assert.assertTrue;
8 | import static play.test.Helpers.*;
9 |
10 | public class BrowserTest extends WithBrowser {
11 |
12 | protected Application provideApplication() {
13 | return fakeApplication(inMemoryDatabase());
14 | }
15 |
16 | protected TestBrowser provideBrowser(int port) {
17 | return Helpers.testBrowser(port);
18 | }
19 |
20 | /**
21 | * add your integration test here
22 | * in this example we just check if the welcome page is being shown
23 | */
24 | @Test
25 | public void test() {
26 | browser.goTo("http://localhost:" + play.api.test.Helpers.testServerPort());
27 | assertTrue(browser.pageSource().contains("Your new application is ready."));
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/java-play-framework/test/FunctionalTest.java:
--------------------------------------------------------------------------------
1 | import org.junit.Test;
2 | import play.test.WithApplication;
3 | import play.twirl.api.Content;
4 |
5 | import static org.assertj.core.api.Assertions.assertThat;
6 |
7 | /**
8 | * A functional test starts a Play application for every test.
9 | *
10 | * https://www.playframework.com/documentation/latest/JavaFunctionalTest
11 | */
12 | public class FunctionalTest extends WithApplication {
13 |
14 | @Test
15 | public void renderTemplate() {
16 | // If you are calling out to Assets, then you must instantiate an application
17 | // because it makes use of assets metadata that is configured from
18 | // the application.
19 |
20 | Content html = views.html.index.render("Your new application is ready.");
21 | assertThat("text/html").isEqualTo(html.contentType());
22 | assertThat(html.body()).contains("Your new application is ready.");
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/java-scala-sbt/README.md:
--------------------------------------------------------------------------------
1 | # Quickstart Debugging sbt app using Rookout
2 |
3 | A sample application for debugging a Scala app using Rookout.
4 |
5 | ## Integrate Rookout into your sbt application
6 |
7 | To integrate Rookout into your existing Scala application, follow these steps:
8 |
9 | 1. [Download the Rookout Java Agent](https://search.maven.org/remote_content?g=com.rookout&a=rook&v=LATEST)
10 | 2. Add Rookout as a javaagent to your environment variable as following:
11 | ```bash
12 | JAVA_OPTS=-javaagent:
13 | ```
14 | 3. Set your Rookout Token as the `ROOKOUT_TOKEN` environment variable. (Your token is available in your [Rookout App](app.rookout.com).
15 |
16 | 4. Add your sources to your jar by adding the following line to your main `build.sbt` file:
17 |
18 | (where `./src/main/scala` is the base directory of your Scala source files)
19 | ```bash
20 | Compile / unmanagedResourceDirectories += baseDirectory.value / "./src/main/scala"
21 | ```
22 | 5. Pack your app, run it and start debugging!
23 |
24 | Go to [app.rookout.com](https://app.rookout.com) and start debugging !
25 |
26 | [Java + Rookout]: https://docs.rookout.com/docs/sdk-setup.html
27 |
--------------------------------------------------------------------------------
/java-scala-sbt/hello/build.sbt:
--------------------------------------------------------------------------------
1 | import Dependencies._
2 |
3 | ThisBuild / scalaVersion := "2.12.8"
4 | ThisBuild / version := "0.1.0-SNAPSHOT"
5 | ThisBuild / organization := "com.example"
6 | ThisBuild / organizationName := "example"
7 |
8 | Compile / unmanagedResourceDirectories += baseDirectory.value / "./src/main/scala"
9 |
10 | lazy val root = (project in file("."))
11 | .settings(
12 | name := "hello",
13 | libraryDependencies += scalaTest % Test
14 | )
15 |
--------------------------------------------------------------------------------
/java-scala-sbt/hello/project/Dependencies.scala:
--------------------------------------------------------------------------------
1 | import sbt._
2 |
3 | object Dependencies {
4 | lazy val scalaTest = "org.scalatest" %% "scalatest" % "3.0.5"
5 | }
6 |
--------------------------------------------------------------------------------
/java-scala-sbt/hello/project/build.properties:
--------------------------------------------------------------------------------
1 | sbt.version=1.2.7
2 |
--------------------------------------------------------------------------------
/java-scala-sbt/hello/src/main/scala/example/Hello.scala:
--------------------------------------------------------------------------------
1 | package example
2 |
3 | object Hello extends Greeting with App {
4 | println(greeting)
5 | }
6 |
7 | trait Greeting {
8 | lazy val greeting: String = "hello"
9 | }
10 |
--------------------------------------------------------------------------------
/java-scala-sbt/hello/src/test/scala/example/HelloSpec.scala:
--------------------------------------------------------------------------------
1 | package example
2 |
3 | import org.scalatest._
4 |
5 | class HelloSpec extends FlatSpec with Matchers {
6 | "The Hello object" should "say hello" in {
7 | Hello.greeting shouldEqual "hello"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/.ebextensions/logging.config:
--------------------------------------------------------------------------------
1 | files:
2 | "/opt/elasticbeanstalk/tasks/bundlelogs.d/01-sample-app.conf":
3 | content: |
4 | /tmp/sample-app*
5 |
6 | "/opt/elasticbeanstalk/tasks/taillogs.d/01-sample-app.conf":
7 | content: |
8 | /tmp/sample-app.log
9 |
10 | "/opt/elasticbeanstalk/lib/rook.jar" :
11 | mode: "000444"
12 | owner: root
13 | group: root
14 | source: "https://search.maven.org/remote_content?g=com.rookout&a=rook&v=LATEST"
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/.ebextensions/xray.config:
--------------------------------------------------------------------------------
1 | option_settings:
2 | - namespace: aws:elasticbeanstalk:xray
3 | option_name: XRayEnabled
4 | value: true
5 | - namespace: aws:elasticbeanstalk:application:environment
6 | option_name: XRAY_ENABLED
7 | value: '`{ "Fn::GetOptionSetting" : {"Namespace": "aws:elasticbeanstalk:xray", "OptionName": "XRayEnabled", "DefaultValue": "false"} }`'
8 | - namespace: aws:elasticbeanstalk:application
9 | option_name: Application Healthcheck URL
10 | value: /search
11 | - namespace: aws:elasticbeanstalk:container:tomcat:jvmoptions
12 | option_name: JVM Options
13 | value: '-javaagent:/opt/elasticbeanstalk/lib/rook.jar'
14 | - namespace: aws:elasticbeanstalk:application:environment
15 | option_name: ROOKOUT_TOKEN
16 | value: 'd1fee9a4a26620c993fb180677fad4ea6939677b82e6082265f889026f1cd71a'
17 | option_name: ROOKOUT_DEBUG
18 | value: '1'
19 | - namespace: aws:elasticbeanstalk:environment:proxy
20 | option_name: ProxyServer
21 | value: nginx
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/.ebextensions/logging.config:
--------------------------------------------------------------------------------
1 | files:
2 | "/opt/elasticbeanstalk/tasks/bundlelogs.d/01-sample-app.conf":
3 | content: |
4 | /tmp/sample-app*
5 |
6 | "/opt/elasticbeanstalk/tasks/taillogs.d/01-sample-app.conf":
7 | content: |
8 | /tmp/sample-app.log
9 |
10 | "/opt/elasticbeanstalk/lib/rook.jar" :
11 | mode: "000444"
12 | owner: root
13 | group: root
14 | source: "https://search.maven.org/remote_content?g=com.rookout&a=rook&v=LATEST"
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/.ebextensions/xray.config:
--------------------------------------------------------------------------------
1 | option_settings:
2 | - namespace: aws:elasticbeanstalk:xray
3 | option_name: XRayEnabled
4 | value: true
5 | - namespace: aws:elasticbeanstalk:application:environment
6 | option_name: XRAY_ENABLED
7 | value: '`{ "Fn::GetOptionSetting" : {"Namespace": "aws:elasticbeanstalk:xray", "OptionName": "XRayEnabled", "DefaultValue": "false"} }`'
8 | - namespace: aws:elasticbeanstalk:application
9 | option_name: Application Healthcheck URL
10 | value: /search
11 | - namespace: aws:elasticbeanstalk:container:tomcat:jvmoptions
12 | option_name: JVM Options
13 | value: '-javaagent:/opt/elasticbeanstalk/lib/rook.jar'
14 | - namespace: aws:elasticbeanstalk:application:environment
15 | option_name: ROOKOUT_TOKEN
16 | value: ''
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/.gitignore:
--------------------------------------------------------------------------------
1 | *.DS_Store
2 | *.war
3 | *.zip
4 | *.class
5 | !*aws*.class
6 | # Elastic Beanstalk Files
7 | .elasticbeanstalk/*
8 | !.elasticbeanstalk/*.cfg.yml
9 | !.elasticbeanstalk/*.global.yml
10 |
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM lambci/lambda:build-java8
2 |
3 | WORKDIR app
4 |
5 | ADD . .
6 |
7 | RUN zip -r java-aws-tomcat-test.zip .
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/Jenkinsfile:
--------------------------------------------------------------------------------
1 | regressionTest {
2 | FILE_PATH = "eb-tomcat-helloworld/src/ConditionalAWSXRayServletFilter.java"
3 | LINE_NUM = "31"
4 | SHA = "49708436924d2f811b2e7b1112d83d2aaa8d6f5744acd17012d9779845b9e7f3"
5 | URL_FOR_TRIGGER = "http://java-tomcat-aws-elasticbeanstalk.us-east-2.elasticbeanstalk.com/"
6 | LANG = "Java"
7 | BACKGROUND_IMAGE_CMD = "bash /app/runTest.sh &"
8 | STATIC_LABEL = "java-tomcat-aws-elasticbeanstalk"
9 | }
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 |
3 |
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/classes/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Created-By: 1.6.0_22 (Apple Inc.)
3 |
4 |
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/classes/META-INF/NOTICE.txt:
--------------------------------------------------------------------------------
1 | AWS Elastic Beanstalk Sample Application
2 | Copyright 2010 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 |
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/classes/org/example/AWSXRayServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/classes/org/example/AWSXRayServlet.class
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/classes/org/example/AWSXRayServletContext.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/classes/org/example/AWSXRayServletContext.class
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/classes/org/example/ConditionalAWSXRayServletFilter.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/classes/org/example/ConditionalAWSXRayServletFilter.class
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/aws-java-sdk-core-1.11.67.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/aws-java-sdk-core-1.11.67.jar
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/aws-java-sdk-kms-1.11.67.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/aws-java-sdk-kms-1.11.67.jar
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/aws-java-sdk-s3-1.11.67.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/aws-java-sdk-s3-1.11.67.jar
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/aws-xray-recorder-sdk-aws-sdk-1.0.5-beta.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/aws-xray-recorder-sdk-aws-sdk-1.0.5-beta.jar
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/aws-xray-recorder-sdk-core-1.0.5-beta.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/aws-xray-recorder-sdk-core-1.0.5-beta.jar
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/commons-beanutils-1.9.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/commons-beanutils-1.9.2.jar
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/commons-codec-1.9.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/commons-codec-1.9.jar
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/commons-collections-3.2.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/commons-collections-3.2.2.jar
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/commons-digester-1.8.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/commons-digester-1.8.1.jar
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/commons-digester3-3.2-bin.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/commons-digester3-3.2-bin.jar
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/commons-logging-1.1.3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/commons-logging-1.1.3.jar
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/commons-validator-1.5.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/commons-validator-1.5.1.jar
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/httpclient-4.5.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/httpclient-4.5.2.jar
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/httpcore-4.4.4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/httpcore-4.4.4.jar
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/ion-java-1.0.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/ion-java-1.0.1.jar
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/jackson-annotations-2.6.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/jackson-annotations-2.6.0.jar
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/jackson-core-2.6.6.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/jackson-core-2.6.6.jar
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/jackson-databind-2.6.6.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/jackson-databind-2.6.6.jar
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/jackson-dataformat-cbor-2.6.6.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/jackson-dataformat-cbor-2.6.6.jar
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/jmespath-java-1.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/jmespath-java-1.0.jar
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/joda-time-2.8.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/WEB-INF/lib/joda-time-2.8.1.jar
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/cron.yaml:
--------------------------------------------------------------------------------
1 | version: 1
2 | cron:
3 | - name: "task1"
4 | url: "/scheduled.jsp"
5 | schedule: "*/1 * * * *"
6 |
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/scheduled.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
2 | <%@page import="java.io.BufferedWriter" %>
3 | <%@page import="java.io.FileWriter" %>
4 | <%@page import="java.util.Date" %>
5 | <%
6 | /** Log scheduled tasks to a file **/
7 | if ("POST".equalsIgnoreCase(request.getMethod())) {
8 | BufferedWriter writer = new BufferedWriter(new FileWriter("/tmp/sample-app.log", true));
9 | String taskName = request.getHeader("X-Aws-Sqsd-Taskname");
10 | String scheduleTime = request.getHeader("X-Aws-Sqsd-Scheduled-At");
11 | writer.write(String.format("%s Received task %s scheduled at %s.\n", (new Date()).toString(), taskName, scheduleTime));
12 | writer.flush();
13 | writer.close();
14 | }
15 | %>
16 |
--------------------------------------------------------------------------------
/java-tomcat-aws-elasticbeanstalk/eb-tomcat-helloworld/src/AWSXRayServletContext.java:
--------------------------------------------------------------------------------
1 | package org.example;
2 |
3 | import com.amazonaws.xray.AWSXRay;
4 | import com.amazonaws.xray.AWSXRayRecorderBuilder;
5 | import com.amazonaws.xray.plugins.ElasticBeanstalkPlugin;
6 |
7 | import javax.servlet.ServletContextEvent;
8 | import javax.servlet.ServletContextListener;
9 |
10 | public class AWSXRayServletContext implements ServletContextListener {
11 |
12 | public void contextInitialized(ServletContextEvent servletContextEvent) {
13 | // Initialize AWS XRay Recorder before any filters or servlets are created
14 | AWSXRayRecorderBuilder builder = AWSXRayRecorderBuilder.standard().withPlugin(new ElasticBeanstalkPlugin());
15 | AWSXRay.setGlobalRecorder(builder.build());
16 | }
17 |
18 | public void contextDestroyed(ServletContextEvent servletContextEvent) {
19 |
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/java-tomcat-war-maven/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM maven:3.5.2-jdk-8-alpine AS SAMPLE_LIB
2 | COPY SampleLib/pom.xml /tmp/
3 | COPY SampleLib/src /tmp/src/
4 | WORKDIR /tmp/
5 | RUN mvn package
6 |
7 |
8 |
9 | FROM maven:3.5.2-jdk-8-alpine AS MAVEN_TOOL_CHAIN
10 | COPY sample/pom.xml /tmp/
11 | COPY sample/src /tmp/src/
12 | COPY --from=SAMPLE_LIB /tmp/target/sample-lib-1.0-SNAPSHOT.jar /tmp/src/main/webapp/WEB-INF/lib/
13 | WORKDIR /tmp/
14 | RUN mvn package
15 |
16 | FROM tomcat:8
17 | COPY --from=MAVEN_TOOL_CHAIN /tmp/target/sample.war $CATALINA_HOME/webapps/
18 |
19 | ADD --chown=root:root https://search.maven.org/remote_content?g=com.rookout&a=rook&v=LATEST $CATALINA_HOME/rook.jar
20 |
21 | EXPOSE 8080
22 | CMD ["/bin/bash", "-c", "CATALINA_OPTS=\"$CATALINA_OPTS -javaagent:$CATALINA_HOME/rook.jar\" catalina.sh run"]
23 |
24 |
--------------------------------------------------------------------------------
/java-tomcat-war-maven/Jenkinsfile:
--------------------------------------------------------------------------------
1 | regressionTest {
2 | FILE_PATH = "SampleLib.java"
3 | LINE_NUM = "7"
4 | SHA = "2c17f2307572b8286d640f238b895e26e58c480024efaa507faceb62590c9dcb"
5 | URL_FOR_TRIGGER = "http://127.0.0.1:8080/sample"
6 | LANG = "Java"
7 | BACKGROUND_IMAGE_CMD = "catalina.sh run &"
8 | }
9 |
--------------------------------------------------------------------------------
/java-tomcat-war-maven/SampleLib/src/main/java/com/rookout/samplelib/SampleLib.java:
--------------------------------------------------------------------------------
1 | package com.rookout.samplelib;
2 |
3 | public class SampleLib
4 | {
5 | public static String LibraryFunction()
6 | {
7 | return "Hello World";
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/java-tomcat-war-maven/sample/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | com.rookout
5 | deployment-example
6 | war
7 | 1.0-SNAPSHOT
8 | Deployment Example Webapp
9 | http://maven.apache.org
10 |
11 |
12 | com.rookout.samplelib
13 | sample-lib
14 | system
15 | 1.0-SNAPSHOT
16 | /tmp/src/main/webapp/WEB-INF/lib/sample-lib-1.0-SNAPSHOT.jar
17 |
18 |
19 | javax.servlet
20 | javax.servlet-api
21 | 3.0.1
22 | provided
23 |
24 |
25 |
26 | sample
27 |
28 |
29 |
--------------------------------------------------------------------------------
/java-tomcat-war-maven/sample/src/main/java/com/rookout/HelloServlet.java:
--------------------------------------------------------------------------------
1 | package com.rookout;
2 |
3 | import javax.servlet.http.HttpServlet;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.http.HttpServletRequest;
6 | import javax.servlet.http.HttpServletResponse;
7 |
8 | import com.rookout.samplelib.*;
9 |
10 | import java.io.IOException;
11 | import java.io.PrintWriter;
12 |
13 | public class HelloServlet extends HttpServlet {
14 |
15 | protected void doGet(HttpServletRequest request,
16 | HttpServletResponse response) throws ServletException, IOException
17 | {
18 | // Very simple - just return some plain text
19 | PrintWriter writer = response.getWriter();
20 | writer.print(SampleLib.LibraryFunction());
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/java-tomcat-war-maven/sample/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 | Sample Rookout Web Application
8 |
9 |
10 | HelloServlet
11 | com.rookout.HelloServlet
12 |
13 |
14 |
15 | HelloServlet
16 | /
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/java-weblogic/weblogic-helloworld/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .idea
3 | build
--------------------------------------------------------------------------------
/java-weblogic/weblogic-helloworld/src/examples/webservices/hello_world/HelloWorldImpl.java:
--------------------------------------------------------------------------------
1 | package example.webservices.hello_world;
2 | // Import the @WebService annotation
3 | import javax.jws.WebService;
4 | @WebService(name="HelloWorldPortType", serviceName="HelloWorldService")
5 | /**
6 | * This JWS file forms the basis of simple Java-class implemented WebLogic
7 | * Web Service with a single operation: sayHelloWorld
8 | */
9 | public class HelloWorldImpl {
10 | // By default, all public methods are exposed as Web Services operation
11 | public String sayHelloWorld(String message) {
12 | try {
13 | System.out.println("sayHelloWorld:" + message);
14 | } catch (Exception ex) { ex.printStackTrace(); }
15 |
16 | return "Here is the message: '" + message + "'";
17 | }
18 | }
--------------------------------------------------------------------------------
/java-wildfly-docker/Dockerfile:
--------------------------------------------------------------------------------
1 |
2 |
3 | FROM maven:3.5.2-jdk-8-alpine AS MAVEN_TOOL_CHAIN
4 | COPY helloworld/pom.xml /tmp/
5 | COPY helloworld/src /tmp/src/
6 | WORKDIR /tmp/
7 | RUN mvn package
8 |
9 | FROM jboss/wildfly:8.2.1.Final
10 | USER root
11 | COPY --from=MAVEN_TOOL_CHAIN /tmp/target/wildfly-helloworld.war /opt/jboss/wildfly/standalone/deployments/
12 | ADD --chown=root:root helloworld/rookout /var/log/rookout
13 | ADD --chown=root:root https://search.maven.org/remote_content?g=com.rookout&a=rook&v=LATEST /opt/jboss/wildfly/lib/rook.jar
14 | ADD helloworld/rookout-conf/standalone.conf /opt/jboss/wildfly/bin/
15 | EXPOSE 8080
16 | RUN chmod +x /opt/jboss/wildfly/bin/standalone.sh
--------------------------------------------------------------------------------
/java-wildfly-docker/Jenkinsfile:
--------------------------------------------------------------------------------
1 | regressionTest {
2 | FILE_PATH = "src/main/java/org/jboss/as/quickstarts/helloworld/HelloService.java"
3 | LINE_NUM = "28"
4 | SHA = "cc08dd8ff4994d6e3ba608fd587a3e2a9f3fb0e18ddc10e4e3d62ad3f8b4f3b9"
5 | URL_FOR_TRIGGER = "http://127.0.0.1:8080/wildfly-helloworld/HelloWorld"
6 | TRIGGER_TIME = "30"
7 | LANG = "Java"
8 | BACKGROUND_IMAGE_CMD = "bash /opt/jboss/wildfly/bin/standalone.sh -bmanagement 0.0.0.0 &"
9 | FILES_TO_FUZZ = "src/main/java/org/jboss/as/quickstarts/helloworld/HelloService.java"
10 | MAX_LINES_IN_FILE_TO_FUZZ = "32"
11 | }
12 |
--------------------------------------------------------------------------------
/java-wildfly-docker/helloworld/.gitignore:
--------------------------------------------------------------------------------
1 | target/
2 |
--------------------------------------------------------------------------------
/java-wildfly-docker/helloworld/rookout/LOGS_GO_HERE:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/java-wildfly-docker/helloworld/rookout/LOGS_GO_HERE
--------------------------------------------------------------------------------
/java-wildfly-docker/helloworld/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/node-14/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:14.17.6
2 | ADD package.json .
3 | RUN npm install
4 | RUN npm install express
5 | ADD src src
6 | RUN npm build
7 |
--------------------------------------------------------------------------------
/node-14/Jenkinsfile:
--------------------------------------------------------------------------------
1 | regressionTest {
2 | FILE_PATH = "src/app.js"
3 | LINE_NUM = "9"
4 | SHA = "0b57a3770075874d8dddde393a67217fd0dddf037d39a1d744afda343c8ac6ce"
5 | TRIGGER_TIME = "4"
6 | LANG = "NodeJs"
7 | BACKGROUND_IMAGE_CMD = "node /src/app.js &"
8 | URL_FOR_TRIGGER = "http://localhost:5000/hello/world"
9 | }
10 |
--------------------------------------------------------------------------------
/node-14/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "rookout-node-14-example",
3 | "version": "1.0.0",
4 | "description": "Example project integrating Rookout",
5 | "main": "/src/app.js",
6 | "scripts": {
7 | "start": "node /src/app.js"
8 | },
9 | "dependencies": {
10 | "build": "^0.1.4",
11 | "rookout": "^0.23.0"
12 | },
13 | "devDependencies": {
14 | "@types/node": "^10.12.6"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/node-14/src/app.js:
--------------------------------------------------------------------------------
1 | const rookout = require('rookout');
2 | rookout.start();
3 |
4 | const express = require("express");
5 | const app = express();
6 |
7 | app.get('/', (req, res) => res.send("Hello World"));
8 | app.get("/hello/:name", (req, res) => {
9 | res.send("Hello, " + req.params.name);
10 | });
11 |
12 | app.listen(5000);
--------------------------------------------------------------------------------
/node-app-engine-flex/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "appengine-hello-world",
3 | "description": "Simple Hello World Node.js sample for Google App Engine Flexible Environment.",
4 | "version": "0.0.1",
5 | "private": true,
6 | "license": "Apache-2.0",
7 | "author": "Google Inc.",
8 | "repository": {
9 | "type": "git",
10 | "url": "https://github.com/GoogleCloudPlatform/nodejs-docs-samples.git"
11 | },
12 | "engines": {
13 | "node": ">=4.3.2"
14 | },
15 | "scripts": {
16 | "deploy": "gcloud app deploy",
17 | "start": "node app.js",
18 | "lint": "samples lint",
19 | "pretest": "npm run lint",
20 | "system-test": "samples test app",
21 | "test": "npm run system-test",
22 | "e2e-test": "samples test deploy"
23 | },
24 | "dependencies": {
25 | "express": "4.15.4",
26 | "rookout": "^0.23.0"
27 | },
28 | "devDependencies": {
29 | "@google-cloud/nodejs-repo-tools": "1.4.17"
30 | },
31 | "cloud-repo-tools": {
32 | "test": {
33 | "app": {
34 | "msg": "Hello, world!"
35 | }
36 | },
37 | "requiresKeyFile": true,
38 | "requiresProjectId": true
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/node-aws-ecs/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:carbon
2 |
3 | # Create app directory
4 | WORKDIR /usr/src/app
5 |
6 | # Install app dependencies
7 | # A wildcard is used to ensure both package.json AND package-lock.json are copied
8 | # where available (npm@5+)
9 | COPY package*.json ./
10 |
11 | RUN npm install
12 | # If you are building your code for production
13 | # RUN npm install --only=production
14 |
15 | # Bundle app source
16 | COPY . .
17 |
18 | EXPOSE 8080
19 | CMD [ "npm", "start" ]
--------------------------------------------------------------------------------
/node-aws-ecs/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ecs-hello-world",
3 | "description": "Simple Hello World Node.js sample for ECS.",
4 | "version": "0.0.1",
5 | "private": true,
6 | "license": "Apache-2.0",
7 | "engines": {
8 | "node": ">=4.3.2"
9 | },
10 | "scripts": {
11 | "deploy": "gcloud app deploy",
12 | "start": "node app.js",
13 | "lint": "samples lint",
14 | "pretest": "npm run lint",
15 | "system-test": "samples test app",
16 | "test": "npm run system-test",
17 | "e2e-test": "samples test deploy"
18 | },
19 | "dependencies": {
20 | "express": "4.15.4",
21 | "rookout": "^0.23.0"
22 | },
23 | "devDependencies": {
24 | "@google-cloud/nodejs-repo-tools": "1.4.17"
25 | },
26 | "cloud-repo-tools": {
27 | "test": {
28 | "app": {
29 | "msg": "Hello, world!"
30 | }
31 | },
32 | "requiresKeyFile": true,
33 | "requiresProjectId": true
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/node-aws-ecs/task-definition.json:
--------------------------------------------------------------------------------
1 | {
2 | "family": "rookout-ecs-node-example",
3 | "containerDefinitions": [
4 | {
5 | "name": "web",
6 | "image": "node:carbon",
7 | "cpu": 128,
8 | "memoryReservation": 128,
9 | "portMappings": [
10 | {
11 | "containerPort": 8080,
12 | "protocol": "tcp"
13 | }
14 | ],
15 | "command": [
16 | "ruby", "hi.rb"
17 | ],
18 | "essential": true
19 | }
20 | ]
21 | }
--------------------------------------------------------------------------------
/node-aws-elasticbeanstalk/.ebextensions/env_options.config:
--------------------------------------------------------------------------------
1 | option_settings:
2 | aws:elasticbeanstalk:application:environment:
3 | ROOKOUT_TOKEN: ""
4 | aws:elasticbeanstalk:container:nodejs:
5 | NodeCommand: "npm run start"
6 | NodeVersion: 8.15.0
--------------------------------------------------------------------------------
/node-aws-elasticbeanstalk/.ebextensions/logging.config:
--------------------------------------------------------------------------------
1 | files:
2 | "/opt/elasticbeanstalk/tasks/bundlelogs.d/01-sample-app.conf":
3 | content: |
4 | /tmp/sample-app*
5 |
6 | "/opt/elasticbeanstalk/tasks/taillogs.d/01-sample-app.conf":
7 | content: |
8 | /tmp/sample-app.log
9 |
--------------------------------------------------------------------------------
/node-aws-elasticbeanstalk/node-example/.ebextensions/env_options.config:
--------------------------------------------------------------------------------
1 | option_settings:
2 | aws:elasticbeanstalk:application:environment:
3 | ROOKOUT_TOKEN: ""
4 | aws:elasticbeanstalk:container:nodejs:
5 | NodeCommand: "npm start"
6 | NodeVersion: 8.15.0
--------------------------------------------------------------------------------
/node-aws-elasticbeanstalk/node-example/.ebextensions/logging.config:
--------------------------------------------------------------------------------
1 | files:
2 | "/opt/elasticbeanstalk/tasks/bundlelogs.d/01-sample-app.conf":
3 | content: |
4 | /tmp/sample-app*
5 |
6 | "/opt/elasticbeanstalk/tasks/taillogs.d/01-sample-app.conf":
7 | content: |
8 | /tmp/sample-app.log
9 |
--------------------------------------------------------------------------------
/node-aws-elasticbeanstalk/node-example/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM lambci/lambda:build-nodejs12.x AS img1
2 |
3 | WORKDIR /build
4 |
5 | COPY . .
6 |
7 | RUN npm install
8 |
9 | FROM alpine:latest as img2
10 |
11 | RUN apk add --update zip
12 |
13 | WORKDIR /apps
14 |
15 | COPY --from=img1 /build /apps
16 |
17 | RUN zip -r node_aws_elastic_beanstalk.zip .
18 |
19 | FROM lambci/lambda:build-nodejs12.x
20 |
21 | COPY --from=img2 /apps /
--------------------------------------------------------------------------------
/node-aws-elasticbeanstalk/node-example/Jenkinsfile:
--------------------------------------------------------------------------------
1 | regressionTest {
2 | FILE_PATH = "app.js"
3 | LINE_NUM = "32"
4 | SHA = "f818b9cd82d383b21bc8bc14f0d59caa9ceae3802132a480d6e565939cda673b"
5 | URL_FOR_TRIGGER = "http://node-aws-ebs-reg-test.us-east-2.elasticbeanstalk.com/"
6 | LANG = "Node"
7 | BACKGROUND_IMAGE_CMD = "bash /runTest.sh &"
8 | STATIC_LABEL = "node-aws-ebs-reg-test"
9 | }
--------------------------------------------------------------------------------
/node-aws-elasticbeanstalk/node-example/cron.yaml:
--------------------------------------------------------------------------------
1 | version: 1
2 | cron:
3 | - name: "task1"
4 | url: "/scheduled"
5 | schedule: "* * * * *"
6 |
--------------------------------------------------------------------------------
/node-aws-elasticbeanstalk/node-example/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Elastic-Beanstalk-Sample-App",
3 | "version": "0.0.1",
4 | "private": true,
5 | "description": "Rookout Node deployment example to elastic beanstalk",
6 | "dependencies": {
7 | "rookout": "^0.23.0"
8 | },
9 | "scripts": {
10 | "start": "node app.js"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/node-aws-lambda/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM amazon/aws-sam-cli-build-image-nodejs14.x
2 | RUN mkdir -p /build
3 | RUN mkdir -p /dist
4 | WORKDIR /build
5 | COPY . .
6 | RUN npm install
7 | RUN zip -r /dist/rookout_lambda_test.zip .
8 | ENV AWS_DEFAULT_REGION us-east-2
9 |
--------------------------------------------------------------------------------
/node-aws-lambda/Jenkinsfile:
--------------------------------------------------------------------------------
1 | regressionTest {
2 | FILE_PATH = "index.js"
3 | LINE_NUM = "4"
4 | SHA = "3400c8ecff0a7818049c751e57364f0663427c58ad632e2501cf108ecbe6b332"
5 | URL_FOR_TRIGGER = "node_aws_lambda_regression_test"
6 | LANG = "NodeJs"
7 | BACKGROUND_IMAGE_CMD = "bash /build/awsTest.sh &"
8 | STATIC_LABEL = "node_aws_lambda_regression_test"
9 | }
10 |
--------------------------------------------------------------------------------
/node-aws-lambda/awsTest.sh:
--------------------------------------------------------------------------------
1 | cd /build
2 | npm install ${JENKINS_AGENT_WORKDIR}/${rookNodeVersion}.tgz
3 | zip -r /dist/rookout_lambda_test_regression.zip .
4 |
5 | if aws lambda list-functions --region us-east-2 | grep "node_aws_lambda_regression_test"; then
6 | aws lambda update-function-code \
7 | --function-name node_aws_lambda_regression_test \
8 | --zip-file fileb:///dist/rookout_lambda_test_regression.zip \
9 | --region us-east-2 ; \
10 |
11 | else
12 | aws lambda create-function \
13 | --region us-east-2 \
14 | --function-name node_aws_lambda_regression_test \
15 | --zip-file fileb:///dist/rookout_lambda_test_regression.zip \
16 | --role arn:aws:iam::032275105219:role/rookout-lambda-role \
17 | --handler index.handler \
18 | --runtime nodejs14.x \
19 | --environment Variables="{ROOKOUT_TOKEN=$ROOKOUT_TOKEN,ROOKOUT_LABELS='regression_test:node_aws_lambda_regression_test',ROOKOUT_LOG_TO_STDERR=1,ROOKOUT_DEBUG=1}" \
20 | --timeout 25 \
21 | --tags "type=regression_test" ; \
22 | fi
23 |
--------------------------------------------------------------------------------
/node-aws-lambda/index.js:
--------------------------------------------------------------------------------
1 | const rookout = require('rookout/lambda');
2 |
3 | async function handler(event, context) {
4 | console.log("EVENT: \n" + JSON.stringify(event, null, 2))
5 | return context.logStreamName}
6 |
7 | exports.handler = rookout.wrap(handler);
8 |
--------------------------------------------------------------------------------
/node-aws-lambda/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "rookout-aws-lambda-example",
3 | "version": "1.0.0",
4 | "description": "Rookout deployment example for AWS Lambda",
5 | "main": "index.js",
6 | "author": "",
7 | "license": "ISC",
8 | "repository": "https://github.com/Rookout/deployment-examples",
9 | "dependencies": {
10 | "rookout": "^0.23.0"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/node-aws-serverlessframework/.dockerignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/node-aws-serverlessframework/.gitignore:
--------------------------------------------------------------------------------
1 | # package directories
2 | node_modules
3 | jspm_packages
4 |
5 | # Serverless directories
6 | .serverless
--------------------------------------------------------------------------------
/node-aws-serverlessframework/Dockerfile:
--------------------------------------------------------------------------------
1 | # use your node version
2 | FROM node:14.17.0
3 |
4 | # install serverless framework
5 | RUN npm install -g serverless
6 |
7 | # make room for our application in /app
8 | RUN mkdir app
9 | WORKDIR /app
10 |
11 | # copy package dependencies
12 | COPY package.json package-lock.json ./
13 |
14 | # install app dependencies
15 | RUN npm install
16 |
17 | # copy our application contents
18 | COPY . .
19 |
20 | # @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
21 | # severless preperations here (e.g: setting aws permissions)
22 | # @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
23 |
24 | # deploy serverless
25 | CMD sls deploy
--------------------------------------------------------------------------------
/node-aws-serverlessframework/Dockerfile.test:
--------------------------------------------------------------------------------
1 | # use your node version
2 | FROM lambci/lambda:build-nodejs12.x
3 |
4 | # install serverless framework
5 | RUN npm install -g serverless
6 |
7 | # make room for our application in /app
8 | RUN mkdir app
9 | WORKDIR /app
10 |
11 | # copy package dependencies
12 | COPY package.json package-lock.json ./
13 |
14 | # install app dependencies
15 | RUN npm install
16 |
17 | # copy our application contents
18 | COPY . .
19 |
20 | RUN sed -i '1s/.*/service: node-serverless-reg-test/' serverless.yml
--------------------------------------------------------------------------------
/node-aws-serverlessframework/Jenkinsfile:
--------------------------------------------------------------------------------
1 | regressionTest {
2 | FILE_PATH = "index.js"
3 | LINE_NUM = "8"
4 | SHA = "f22045aa01ee2a854fa578b9ebb6fc1283247877ceddf24865bb523d662da8b7"
5 | URL_FOR_TRIGGER = "node-serverless-reg-test-dev-example"
6 | LANG = "NodeJs"
7 | BACKGROUND_IMAGE_CMD = "bash /app/runTest.sh &"
8 | STATIC_LABEL = "node-serverless-reg-test-dev-example"
9 | }
--------------------------------------------------------------------------------
/node-aws-serverlessframework/index.js:
--------------------------------------------------------------------------------
1 | const rookout = require('rookout/lambda');
2 | const serverless = require('serverless-http');
3 | const express = require('express');
4 | const app = express();
5 |
6 | // our simple hello world http handler
7 | app.get('/', function (req, res) {
8 | res.send('Hello World!');
9 | });
10 |
11 | // wrap the handler with Rookout so we make sure rookout is loaded before any subsequent
12 | // requests are being handled
13 | module.exports.handler = rookout.wrap(serverless(app));
--------------------------------------------------------------------------------
/node-aws-serverlessframework/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "serverless-node",
3 | "version": "1.0.0",
4 | "description": "example deploying rookout on node serverless app",
5 | "main": "index.js",
6 | "scripts": {
7 | "deploy": "docker build --tag serverless-deployment . && docker run serverless-deployment"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "express": "^4.16.4",
13 | "rookout": "^0.23.0",
14 | "serverless-http": "^1.8.0"
15 | },
16 | "devDependencies": {
17 | "serverless": "^1.50.1"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/node-aws-serverlessframework/runTest.sh:
--------------------------------------------------------------------------------
1 | cd /app
2 |
3 | sls deploy --force
4 |
5 | aws lambda update-function-configuration \
6 | --function-name node-serverless-reg-test-dev-example \
7 | --environment Variables="{ROOKOUT_TOKEN=$ROOKOUT_TOKEN,ROOKOUT_LABELS='regression_test:node-serverless-reg-test-dev-example',ROOKOUT_DEBUG=1,ROOKOUT_LOG_TO_STDERR=1}"
--------------------------------------------------------------------------------
/node-aws-serverlessframework/serverless.yml:
--------------------------------------------------------------------------------
1 | service: node-serverless-app
2 | provider:
3 | name: aws
4 | runtime: nodejs10.x
5 | region: ${opt:region, self:custom.defaultRegion}
6 | environment:
7 | 'ROOKOUT_TOKEN': ${opt:ROOKOUT_TOKEN, 'YOUR_TOKEN'}
8 | custom:
9 | defaultRegion: us-east-2
10 |
11 | functions:
12 | example:
13 | handler: index.handler
14 | events:
15 | - http: ANY /
16 |
--------------------------------------------------------------------------------
/node-electron-vue/my-project/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "comments": false,
3 | "env": {
4 | "main": {
5 | "presets": [
6 | ["env", {
7 | "targets": { "node": 7 }
8 | }],
9 | "stage-0"
10 | ]
11 | },
12 | "renderer": {
13 | "presets": [
14 | ["env", {
15 | "modules": false
16 | }],
17 | "stage-0"
18 | ]
19 | },
20 | "web": {
21 | "presets": [
22 | ["env", {
23 | "modules": false
24 | }],
25 | "stage-0"
26 | ]
27 | }
28 | },
29 | "plugins": ["transform-runtime"]
30 | }
31 |
--------------------------------------------------------------------------------
/node-electron-vue/my-project/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | dist/electron/*
3 | dist/web/*
4 | build/*
5 | !build/icons
6 | node_modules/
7 | npm-debug.log
8 | npm-debug.log.*
9 | thumbs.db
10 | !.gitkeep
11 |
--------------------------------------------------------------------------------
/node-electron-vue/my-project/.travis.yml:
--------------------------------------------------------------------------------
1 | osx_image: xcode8.3
2 | sudo: required
3 | dist: trusty
4 | language: c
5 | matrix:
6 | include:
7 | - os: osx
8 | - os: linux
9 | env: CC=clang CXX=clang++ npm_config_clang=1
10 | compiler: clang
11 | cache:
12 | directories:
13 | - node_modules
14 | - "$HOME/.electron"
15 | - "$HOME/.cache"
16 | addons:
17 | apt:
18 | packages:
19 | - libgnome-keyring-dev
20 | - icnsutils
21 | before_install:
22 | - mkdir -p /tmp/git-lfs && curl -L https://github.com/github/git-lfs/releases/download/v1.2.1/git-lfs-$([
23 | "$TRAVIS_OS_NAME" == "linux" ] && echo "linux" || echo "darwin")-amd64-1.2.1.tar.gz
24 | | tar -xz -C /tmp/git-lfs --strip-components 1 && /tmp/git-lfs/git-lfs pull
25 | - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install --no-install-recommends -y icnsutils graphicsmagick xz-utils; fi
26 | install:
27 | - nvm install 7
28 | - curl -o- -L https://yarnpkg.com/install.sh | bash
29 | - source ~/.bashrc
30 | - npm install -g xvfb-maybe
31 | - yarn
32 | script:
33 | - yarn run build
34 | branches:
35 | only:
36 | - master
37 |
--------------------------------------------------------------------------------
/node-electron-vue/my-project/README.md:
--------------------------------------------------------------------------------
1 | # node-electron-vue-rookout-example
2 |
3 | > An electron-vue project
4 |
5 | #### Build Setup
6 |
7 | ``` bash
8 | # install dependencies
9 | npm install
10 |
11 | # serve with hot reload at localhost:9080
12 | npm run dev
13 |
14 | # build electron application for production
15 | npm run build
16 |
17 |
18 | ```
19 |
20 | ---
21 |
22 | This project was generated with [electron-vue](https://github.com/SimulatedGREG/electron-vue)@[8fae476](https://github.com/SimulatedGREG/electron-vue/tree/8fae4763e9d225d3691b627e83b9e09b56f6c935) using [vue-cli](https://github.com/vuejs/vue-cli). Documentation about the original structure can be found [here](https://simulatedgreg.gitbooks.io/electron-vue/content/index.html).
23 |
--------------------------------------------------------------------------------
/node-electron-vue/my-project/appveyor.yml:
--------------------------------------------------------------------------------
1 | version: 0.1.{build}
2 |
3 | branches:
4 | only:
5 | - master
6 |
7 | image: Visual Studio 2017
8 | platform:
9 | - x64
10 |
11 | cache:
12 | - node_modules
13 | - '%APPDATA%\npm-cache'
14 | - '%USERPROFILE%\.electron'
15 | - '%USERPROFILE%\AppData\Local\Yarn\cache'
16 |
17 | init:
18 | - git config --global core.autocrlf input
19 |
20 | install:
21 | - ps: Install-Product node 8 x64
22 | - git reset --hard HEAD
23 | - yarn
24 | - node --version
25 |
26 | build_script:
27 | - yarn build
28 |
29 | test: off
30 |
--------------------------------------------------------------------------------
/node-electron-vue/my-project/src/index.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | node-electron-vue-rookout-example
6 | <% if (htmlWebpackPlugin.options.nodeModules) { %>
7 |
8 |
11 | <% } %>
12 |
13 |
14 |
15 |
16 | <% if (!process.browser) { %>
17 |
20 | <% } %>
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/node-electron-vue/my-project/src/main/index.dev.js:
--------------------------------------------------------------------------------
1 | /**
2 | * This file is used specifically and only for development. It installs
3 | * `electron-debug` & `vue-devtools`. There shouldn't be any need to
4 | * modify this file, but it can be used to extend your development
5 | * environment.
6 | */
7 |
8 | /* eslint-disable */
9 |
10 | // Install `electron-debug` with `devtron`
11 | require('electron-debug')({ showDevTools: true })
12 |
13 | // Install `vue-devtools`
14 | require('electron').app.on('ready', () => {
15 | let installExtension = require('electron-devtools-installer')
16 | installExtension.default(installExtension.VUEJS_DEVTOOLS)
17 | .then(() => {})
18 | .catch(err => {
19 | console.log('Unable to install `vue-devtools`: \n', err)
20 | })
21 | })
22 |
23 | // Require `main` process to boot app
24 | require('./index')
--------------------------------------------------------------------------------
/node-electron-vue/my-project/src/renderer/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
16 |
--------------------------------------------------------------------------------
/node-electron-vue/my-project/src/renderer/assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/node-electron-vue/my-project/src/renderer/assets/.gitkeep
--------------------------------------------------------------------------------
/node-electron-vue/my-project/src/renderer/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/node-electron-vue/my-project/src/renderer/assets/logo.png
--------------------------------------------------------------------------------
/node-electron-vue/my-project/src/renderer/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import axios from 'axios'
3 |
4 | import App from './App'
5 | import router from './router'
6 | import store from './store'
7 |
8 | if (!process.env.IS_WEB) Vue.use(require('vue-electron'))
9 | Vue.http = Vue.prototype.$http = axios
10 | Vue.config.productionTip = false
11 |
12 | /* eslint-disable no-new */
13 | new Vue({
14 | components: { App },
15 | router,
16 | store,
17 | template: ''
18 | }).$mount('#app')
19 |
--------------------------------------------------------------------------------
/node-electron-vue/my-project/src/renderer/router/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Router from 'vue-router'
3 |
4 | Vue.use(Router)
5 |
6 | export default new Router({
7 | routes: [
8 | {
9 | path: '/',
10 | name: 'landing-page',
11 | component: require('@/components/LandingPage').default
12 | },
13 | {
14 | path: '*',
15 | redirect: '/'
16 | }
17 | ]
18 | })
19 |
--------------------------------------------------------------------------------
/node-electron-vue/my-project/src/renderer/store/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Vuex from 'vuex'
3 |
4 | import { createPersistedState, createSharedMutations } from 'vuex-electron'
5 |
6 | import modules from './modules'
7 |
8 | Vue.use(Vuex)
9 |
10 | export default new Vuex.Store({
11 | modules,
12 | plugins: [
13 | createPersistedState(),
14 | createSharedMutations()
15 | ],
16 | strict: process.env.NODE_ENV !== 'production'
17 | })
18 |
--------------------------------------------------------------------------------
/node-electron-vue/my-project/src/renderer/store/modules/Counter.js:
--------------------------------------------------------------------------------
1 | const state = {
2 | main: 0
3 | }
4 |
5 | const mutations = {
6 | DECREMENT_MAIN_COUNTER (state) {
7 | state.main--
8 | },
9 | INCREMENT_MAIN_COUNTER (state) {
10 | state.main++
11 | }
12 | }
13 |
14 | const actions = {
15 | someAsyncTask ({ commit }) {
16 | // do something async
17 | commit('INCREMENT_MAIN_COUNTER')
18 | }
19 | }
20 |
21 | export default {
22 | state,
23 | mutations,
24 | actions
25 | }
26 |
--------------------------------------------------------------------------------
/node-electron-vue/my-project/src/renderer/store/modules/Todo.js:
--------------------------------------------------------------------------------
1 | import uuid from 'uuid/v4';
2 |
3 | const state = {
4 | todos: []
5 | };
6 |
7 | const actions = {
8 | ADD_TODO ({ commit }, name) {
9 | console.log(name);
10 | console.error("222222222222222222222222222222222222222222222222222222")
11 | commit('ADD_TODO', name);
12 | },
13 | COMPLETE_TODO ({ commit }, id) {
14 | commit('COMPLETE_TODO', id);
15 | },
16 | CLEAR_TODOS ({ commit }) {
17 | commit('CLEAR_TODOS');
18 | }
19 | };
20 |
21 | const mutations = {
22 | ADD_TODO (state, name) {
23 | console.error("3333333333333333333333333333333333333333333333333333333333333")
24 | state.todos = [ ...state.todos, { id: uuid(), name } ];
25 | },
26 | COMPLETE_TODO (state, id) {
27 | state.todos = state.todos.filter((todo) => todo.id != id);
28 | },
29 | CLEAR_TODOS (state) {
30 | state.todos = [];
31 | }
32 | };
33 |
34 | export default {
35 | state,
36 | actions,
37 | mutations
38 | };
39 |
--------------------------------------------------------------------------------
/node-electron-vue/my-project/src/renderer/store/modules/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * The file enables `@/store/index.js` to import all vuex modules
3 | * in a one-shot manner. There should not be any reason to edit this file.
4 | */
5 |
6 | const files = require.context('.', false, /\.js$/)
7 | const modules = {}
8 |
9 | files.keys().forEach(key => {
10 | if (key === './index.js') return
11 | modules[key.replace(/(\.\/|\.js)/g, '')] = files(key).default
12 | })
13 |
14 | export default modules
15 |
--------------------------------------------------------------------------------
/node-electron-vue/my-project/static/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/node-electron-vue/my-project/static/.gitkeep
--------------------------------------------------------------------------------
/node-electron-vue/my-todos/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "comments": false,
3 | "env": {
4 | "main": {
5 | "presets": [
6 | ["env", {
7 | "targets": { "node": 7 }
8 | }],
9 | "stage-0"
10 | ]
11 | },
12 | "renderer": {
13 | "presets": [
14 | ["env", {
15 | "modules": false
16 | }],
17 | "stage-0"
18 | ]
19 | },
20 | "web": {
21 | "presets": [
22 | ["env", {
23 | "modules": false
24 | }],
25 | "stage-0"
26 | ]
27 | }
28 | },
29 | "plugins": ["transform-runtime"]
30 | }
31 |
--------------------------------------------------------------------------------
/node-electron-vue/my-todos/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | dist/electron/*
3 | dist/web/*
4 | build/*
5 | !build/icons
6 | node_modules/
7 | npm-debug.log
8 | npm-debug.log.*
9 | thumbs.db
10 | !.gitkeep
11 |
--------------------------------------------------------------------------------
/node-electron-vue/my-todos/.travis.yml:
--------------------------------------------------------------------------------
1 | osx_image: xcode8.3
2 | sudo: required
3 | dist: trusty
4 | language: c
5 | matrix:
6 | include:
7 | - os: osx
8 | - os: linux
9 | env: CC=clang CXX=clang++ npm_config_clang=1
10 | compiler: clang
11 | cache:
12 | directories:
13 | - node_modules
14 | - "$HOME/.electron"
15 | - "$HOME/.cache"
16 | addons:
17 | apt:
18 | packages:
19 | - libgnome-keyring-dev
20 | - icnsutils
21 | before_install:
22 | - mkdir -p /tmp/git-lfs && curl -L https://github.com/github/git-lfs/releases/download/v1.2.1/git-lfs-$([
23 | "$TRAVIS_OS_NAME" == "linux" ] && echo "linux" || echo "darwin")-amd64-1.2.1.tar.gz
24 | | tar -xz -C /tmp/git-lfs --strip-components 1 && /tmp/git-lfs/git-lfs pull
25 | - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install --no-install-recommends -y icnsutils graphicsmagick xz-utils; fi
26 | install:
27 | - nvm install 7
28 | - curl -o- -L https://yarnpkg.com/install.sh | bash
29 | - source ~/.bashrc
30 | - npm install -g xvfb-maybe
31 | - yarn
32 | script:
33 | - yarn run build
34 | branches:
35 | only:
36 | - master
37 |
--------------------------------------------------------------------------------
/node-electron-vue/my-todos/README.md:
--------------------------------------------------------------------------------
1 | # my-todos
2 |
3 | > An electron-vue project
4 |
5 | #### Build Setup
6 |
7 | ``` bash
8 | # install dependencies
9 | npm install
10 |
11 | # serve with hot reload at localhost:9080
12 | npm run dev
13 |
14 | # build electron application for production
15 | npm run build
16 |
17 |
18 | ```
19 |
20 | ---
21 |
22 | This project was generated with [electron-vue](https://github.com/SimulatedGREG/electron-vue)@[8fae476](https://github.com/SimulatedGREG/electron-vue/tree/8fae4763e9d225d3691b627e83b9e09b56f6c935) using [vue-cli](https://github.com/vuejs/vue-cli). Documentation about the original structure can be found [here](https://simulatedgreg.gitbooks.io/electron-vue/content/index.html).
23 |
--------------------------------------------------------------------------------
/node-electron-vue/my-todos/appveyor.yml:
--------------------------------------------------------------------------------
1 | version: 0.1.{build}
2 |
3 | branches:
4 | only:
5 | - master
6 |
7 | image: Visual Studio 2017
8 | platform:
9 | - x64
10 |
11 | cache:
12 | - node_modules
13 | - '%APPDATA%\npm-cache'
14 | - '%USERPROFILE%\.electron'
15 | - '%USERPROFILE%\AppData\Local\Yarn\cache'
16 |
17 | init:
18 | - git config --global core.autocrlf input
19 |
20 | install:
21 | - ps: Install-Product node 8 x64
22 | - git reset --hard HEAD
23 | - yarn
24 | - node --version
25 |
26 | build_script:
27 | - yarn build
28 |
29 | test: off
30 |
--------------------------------------------------------------------------------
/node-electron-vue/my-todos/src/index.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | my-todos
6 | <% if (htmlWebpackPlugin.options.nodeModules) { %>
7 |
8 |
11 | <% } %>
12 |
13 |
14 |
15 |
16 | <% if (!process.browser) { %>
17 |
20 | <% } %>
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/node-electron-vue/my-todos/src/main/index.dev.js:
--------------------------------------------------------------------------------
1 | /**
2 | * This file is used specifically and only for development. It installs
3 | * `electron-debug` & `vue-devtools`. There shouldn't be any need to
4 | * modify this file, but it can be used to extend your development
5 | * environment.
6 | */
7 |
8 | /* eslint-disable */
9 |
10 | // Install `electron-debug` with `devtron`
11 | require('electron-debug')({ showDevTools: true })
12 |
13 | // Install `vue-devtools`
14 | require('electron').app.on('ready', () => {
15 | let installExtension = require('electron-devtools-installer')
16 | installExtension.default(installExtension.VUEJS_DEVTOOLS)
17 | .then(() => {})
18 | .catch(err => {
19 | console.log('Unable to install `vue-devtools`: \n', err)
20 | })
21 | })
22 |
23 | // Require `main` process to boot app
24 | require('./index')
25 |
--------------------------------------------------------------------------------
/node-electron-vue/my-todos/src/renderer/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
16 |
--------------------------------------------------------------------------------
/node-electron-vue/my-todos/src/renderer/assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/node-electron-vue/my-todos/src/renderer/assets/.gitkeep
--------------------------------------------------------------------------------
/node-electron-vue/my-todos/src/renderer/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/node-electron-vue/my-todos/src/renderer/assets/logo.png
--------------------------------------------------------------------------------
/node-electron-vue/my-todos/src/renderer/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import axios from 'axios'
3 |
4 | import App from './App'
5 | import router from './router'
6 | import store from './store'
7 |
8 | if (!process.env.IS_WEB) Vue.use(require('vue-electron'))
9 | Vue.http = Vue.prototype.$http = axios
10 | Vue.config.productionTip = false
11 |
12 | /* eslint-disable no-new */
13 | new Vue({
14 | components: { App },
15 | router,
16 | store,
17 | template: ''
18 | }).$mount('#app')
19 |
--------------------------------------------------------------------------------
/node-electron-vue/my-todos/src/renderer/router/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Router from 'vue-router'
3 |
4 | Vue.use(Router)
5 |
6 | export default new Router({
7 | routes: [
8 | {
9 | path: '/',
10 | name: 'landing-page',
11 | component: require('@/components/LandingPage').default
12 | },
13 | {
14 | path: '*',
15 | redirect: '/'
16 | }
17 | ]
18 | })
19 |
--------------------------------------------------------------------------------
/node-electron-vue/my-todos/src/renderer/store/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Vuex from 'vuex'
3 |
4 | import { createPersistedState, createSharedMutations } from 'vuex-electron'
5 |
6 | import modules from './modules'
7 |
8 | Vue.use(Vuex)
9 |
10 | export default new Vuex.Store({
11 | modules,
12 | plugins: [
13 | createPersistedState(),
14 | createSharedMutations()
15 | ],
16 | strict: process.env.NODE_ENV !== 'production'
17 | })
18 |
--------------------------------------------------------------------------------
/node-electron-vue/my-todos/src/renderer/store/modules/Counter.js:
--------------------------------------------------------------------------------
1 | const state = {
2 | main: 0
3 | }
4 |
5 | const mutations = {
6 | DECREMENT_MAIN_COUNTER (state) {
7 | state.main--
8 | },
9 | INCREMENT_MAIN_COUNTER (state) {
10 | state.main++
11 | }
12 | }
13 |
14 | const actions = {
15 | someAsyncTask ({ commit }) {
16 | // do something async
17 | commit('INCREMENT_MAIN_COUNTER')
18 | }
19 | }
20 |
21 | export default {
22 | state,
23 | mutations,
24 | actions
25 | }
26 |
--------------------------------------------------------------------------------
/node-electron-vue/my-todos/src/renderer/store/modules/Todo.js:
--------------------------------------------------------------------------------
1 | import uuid from 'uuid/v4';
2 |
3 | const state = {
4 | todos: []
5 | };
6 |
7 | const actions = {
8 | ADD_TODO ({ commit }, name) {
9 | commit('ADD_TODO', name);
10 | },
11 | COMPLETE_TODO ({ commit }, id) {
12 | commit('COMPLETE_TODO', id);
13 | },
14 | CLEAR_TODOS ({ commit }) {
15 | commit('CLEAR_TODOS');
16 | }
17 | };
18 |
19 | const mutations = {
20 | ADD_TODO (state, name) {
21 | state.todos = [ ...state.todos, { id: uuid(), name } ];
22 | },
23 | COMPLETE_TODO (state, id) {
24 | state.todos = state.todos.filter((todo) => todo.id != id);
25 | },
26 | CLEAR_TODOS (state) {
27 | state.todos = [];
28 | }
29 | };
30 |
31 | export default {
32 | state,
33 | actions,
34 | mutations
35 | };
36 |
--------------------------------------------------------------------------------
/node-electron-vue/my-todos/src/renderer/store/modules/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * The file enables `@/store/index.js` to import all vuex modules
3 | * in a one-shot manner. There should not be any reason to edit this file.
4 | */
5 |
6 | const files = require.context('.', false, /\.js$/)
7 | const modules = {}
8 |
9 | files.keys().forEach(key => {
10 | if (key === './index.js') return
11 | modules[key.replace(/(\.\/|\.js)/g, '')] = files(key).default
12 | })
13 |
14 | export default modules
15 |
--------------------------------------------------------------------------------
/node-electron/README.md:
--------------------------------------------------------------------------------
1 | # Quickstart for debugging an Electron + Lambda app using Rookout
2 |
3 | A sample application for debugging an Electron app using Rookout
4 |
5 | Before following this guide we recommend reading the basic [Node + Rookout] guide
6 |
7 | ## Rookout Integration Explained
8 |
9 | There are 4 simple steps to integrate Rookout into your existing Node-Electron application:
10 |
11 | 1. Adding the Rookout SDK to `package.json` available on [npm]:
12 | ```bash
13 | $ npm install --save rookout
14 | ```
15 |
16 | 2. Export Organization Token:
17 | ```bash
18 | $ export ROOKOUT_TOKEN=
19 | ```
20 |
21 | 3. Adding a require statement to the project entry file:
22 | ```js
23 | const rookout = require("rookout/auto_start");
24 | ```
25 |
26 | 4. Update the command line for electron to contain --inspect, In the `package.json`:
27 | ```
28 | "scripts": {
29 | "start": "electron . --inspect"
30 | },
31 | ```
32 |
33 | 5. Build your electron application
34 |
35 |
36 | [Node + Rookout]: https://docs.rookout.com/docs/sdk-setup.html
37 | [npm]: https://www.npmjs.com/package/rookout
38 |
--------------------------------------------------------------------------------
/node-electron/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Hello From Rookout
6 |
7 |
8 | Hello from Rookout!
9 |
10 |
--------------------------------------------------------------------------------
/node-electron/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "electron-workshop",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "electron_main.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1",
8 | "start": "electron . --inspect"
9 | },
10 | "keywords": [],
11 | "author": "",
12 | "license": "ISC",
13 | "devDependencies": {
14 | "electron": "^11.5.0"
15 | },
16 | "dependencies": {
17 | "rookout": "^0.23.0"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/node-fastify/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:16.18.0
2 | ADD package.json .
3 | RUN npm install
4 | ADD src src
5 |
6 |
--------------------------------------------------------------------------------
/node-fastify/Jenkinsfile:
--------------------------------------------------------------------------------
1 | regressionTest {
2 | FILE_PATH = "src/app.js"
3 | LINE_NUM = "7"
4 | SHA = "864beed7f8f122e8801f573e750b0aa9b77a5354c91d7e21f7a854151416a8fe"
5 | TRIGGER_TIME = "4"
6 | LANG = "NodeJs"
7 | BACKGROUND_IMAGE_CMD = "node /src/app.js &"
8 | URL_FOR_TRIGGER = "http://localhost:3000"
9 | }
10 |
--------------------------------------------------------------------------------
/node-fastify/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "rookout-node-fastify-example",
3 | "version": "1.0.0",
4 | "description": "Example project integrating Rookout",
5 | "main": "/src/app.js",
6 | "scripts": {
7 | "start": "node /src/app.js"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "fastify": "^4.9.2",
13 | "rookout": "^0.98.0"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/node-fastify/src/app.js:
--------------------------------------------------------------------------------
1 | // Require the framework and instantiate it
2 | const fastify = require('fastify')({ logger: true })
3 | const rookout = require('rookout');
4 |
5 | // Declare a route
6 | fastify.get('/', async (request, reply) => {
7 | return { hello: 'world' }
8 | })
9 |
10 | // Run the server!
11 | const start = async () => {
12 | try {
13 | await fastify.listen({ port: 3000, host:"0.0.0.0" })
14 | } catch (err) {
15 | fastify.log.error(err)
16 | process.exit(1)
17 | }
18 | }
19 | rookout.start()
20 |
21 | start()
22 |
23 |
--------------------------------------------------------------------------------
/node-google-cloud-function/README.md:
--------------------------------------------------------------------------------
1 | # Quickstart for debugging a google cloud function + NodeJS using Rookout
2 |
3 | A sample application for debugging a google cloud function + NodeJS using Rookout
4 |
5 | Before following this guide we recommend completing the basic [Node.JS + Rookout tutorial](https://github.com/Rookout/tutorial-nodejs).
6 |
7 | ## Rookout Integration Explained
8 |
9 | To integrate Rookout into your google function, follow these steps:
10 |
11 | 1. Edit the package.json and add Rookout as project dependency
12 | 2. Set your Rookout Token as the ROOKOUT_TOKEN environment variable
13 | 3. Call to rook start function in the beginning of your index.js file:
14 | ``` js
15 | const rookout = require('rookout');
16 | rookout.start();
17 | ```
18 | 4. Go to [app.rookout.com](https://app.rookout.com/) and start debugging !
19 |
20 | We recommend to increase the memory of the function to 1GB due to low CPU resources with lower memory allocation.
21 |
22 | [Node + Rookout]: https://docs.rookout.com/docs/sdk-setup.html
23 | [npm]: https://www.npmjs.com/package/rookout
24 |
--------------------------------------------------------------------------------
/node-google-cloud-function/index.js:
--------------------------------------------------------------------------------
1 | const escapeHtml = require('escape-html');
2 |
3 | const rookout = require('rookout');
4 | rookout.start();
5 |
6 | /**
7 | * Responds to any HTTP request.
8 | *
9 | * @param {!express:Request} req HTTP request context.
10 | * @param {!express:Response} res HTTP response context.
11 | */
12 | exports.helloWorld = (req, res) => {
13 | let message = req.query.message || req.body.message || 'Hello World!';
14 | res.status(200).send(message);
15 | };
16 |
--------------------------------------------------------------------------------
/node-google-cloud-function/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "google-cloud-function-rookout-demo",
3 | "version": "0.0.1",
4 | "description": "Rookout example for google cloud functions",
5 | "main": "index.js",
6 | "author": "Rookout Labs",
7 | "license": "ISC",
8 | "dependencies": {
9 | "rookout": "^0.23.0",
10 | "escape-html": "1.0.3"
11 | }
12 | }
--------------------------------------------------------------------------------
/node-mjs/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:12.22.7
2 | ADD package.json .
3 | RUN npm install
4 | RUN npm install express
5 | ADD src src
6 | RUN npm build
7 |
--------------------------------------------------------------------------------
/node-mjs/Jenkinsfile:
--------------------------------------------------------------------------------
1 | regressionTest {
2 | FILE_PATH = "src/app.mjs"
3 | LINE_NUM = "9"
4 | SHA = "b6842b2c16f123c15fd3c8339bb57720aa5a6e0c6836f8d46451e8b719a61ee7"
5 | TRIGGER_TIME = "4"
6 | LANG = "NodeJs"
7 | BACKGROUND_IMAGE_CMD = "node /src/app.mjs &"
8 | URL_FOR_TRIGGER = "http://localhost:5000/hello/yuval"
9 | }
10 |
--------------------------------------------------------------------------------
/node-mjs/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "rookout-node-mjs-example",
3 | "version": "1.0.0",
4 | "description": "Example project integrating Rookout",
5 | "main": "/src/app.mjs",
6 | "scripts": {
7 | "start": "node /src/app.mjs"
8 | },
9 | "dependencies": {
10 | "build": "^0.1.4",
11 | "rookout": "^0.23.0"
12 | },
13 | "devDependencies": {
14 | "@types/node": "^10.12.6",
15 | "typescript": "^3.1.6"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/node-mjs/src/app.mjs:
--------------------------------------------------------------------------------
1 | import rookout from 'rookout';
2 | rookout.start();
3 |
4 | import express from 'express';
5 | const app = express();
6 |
7 | app.get('/', (req, res) => res.send("Hello World"));
8 | app.get("/hello/:name", (req, res) => {
9 | res.send("Hello, " + req.params.name);
10 | });
11 |
12 | app.listen(5000);
--------------------------------------------------------------------------------
/node-typescript/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:12.22.7
2 | ADD package.json .
3 | RUN npm install
4 | RUN npm install express
5 | ADD src src
6 | ADD tsconfig.json tsconfig.json
7 | RUN npm run build
--------------------------------------------------------------------------------
/node-typescript/Jenkinsfile:
--------------------------------------------------------------------------------
1 | regressionTest {
2 | FILE_PATH = "src/app.ts"
3 | LINE_NUM = "12"
4 | SHA = "0d113f70cd0fe4ad05438f245ccc88f2da10c76c346a00e30a19206ed4aa3f0e"
5 | TRIGGER_TIME = "4"
6 | LANG = "NodeJs"
7 | BACKGROUND_IMAGE_CMD = "node /dist/app.js &"
8 | URL_FOR_TRIGGER = "http://localhost:5000/hello/yuval"
9 | }
10 |
--------------------------------------------------------------------------------
/node-typescript/README.md:
--------------------------------------------------------------------------------
1 | # Quickstart for TypeScript Node + Rookout
2 |
3 | A sample application for using Rookout + Node(TypeScript) .
4 |
5 | __IMPORTANT FOR TYPESCRIPT:__
6 |
7 | * __Rookout needs the corresponding sourcemaps to work properly.__
8 |
9 | * In order to use require(), you must have the node types package installed:
10 | ```bash
11 | $ npm install --save @types/node
12 | ```
13 |
14 | For a more in-depth explanation, see the [Node.JS + Rookout guide](https://docs.rookout.com/docs/node-setup/).
15 |
16 |
17 | ## Running this sample
18 |
19 | 1. Installing dependencies:
20 | ```bash
21 | $ npm install
22 | ```
23 |
24 | 2. Export organization token (found under Organization Settings -> Token)
25 | ```bash
26 | $ export ROOKOUT_TOKEN=
27 | ```
28 |
29 | 3. Build:
30 | ```bash
31 | $ npm run build
32 | ```
33 |
34 | 4. Run:
35 | ```bash
36 | $ npm start
37 | ```
38 |
39 | 5. Go to [http://app.rookout.com](http://app.rookout.com) and start debugging!
40 |
41 |
42 | [Node + Rookout]: https://docs.rookout.com/docs/sdk-setup.html
43 | [npm]: https://www.npmjs.com/package/rookout
44 |
45 |
46 |
--------------------------------------------------------------------------------
/node-typescript/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "rookout-node-typescript-example",
3 | "version": "1.0.0",
4 | "description": "Example project integrating Rookout",
5 | "main": "./dist/app.js",
6 | "scripts": {
7 | "build": "./node_modules/typescript/bin/tsc -inlineSources -inlineSourceMap",
8 | "start": "node ./dist/app.js"
9 | },
10 | "dependencies": {
11 | "rookout": "^0.23.0"
12 | },
13 | "devDependencies": {
14 | "@types/node": "^10.12.6",
15 | "typescript": "^3.1.6"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/node-typescript/src/app.ts:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | "use strict";
4 | const rookout = require('rookout');
5 | rookout.start();
6 |
7 | const express = require("express");
8 | const app = express();
9 |
10 | app.get('/', (req, res) => res.send("Hello World"));
11 | app.get("/hello/:name", (req, res) => {
12 | res.send("Hello, " + req.params.name);
13 | });
14 |
15 | app.listen(5000);
--------------------------------------------------------------------------------
/node-typescript/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "outDir": "dist",
4 | "inlineSources": true,
5 | "inlineSourceMap": true
6 | },
7 | "include": [
8 | "src/**/*"
9 | ],
10 | "exclude": [
11 | "node_modules"
12 | ]
13 | }
--------------------------------------------------------------------------------
/node-webpack/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:12.22.7
2 |
3 | COPY . .
4 | RUN mkdir -p /dist
5 | RUN npm ci
6 | RUN npm run build
7 |
--------------------------------------------------------------------------------
/node-webpack/Jenkinsfile:
--------------------------------------------------------------------------------
1 | regressionTest {
2 | FILE_PATH = "serve.js"
3 | LINE_NUM = "9"
4 | SHA = "4fb3012310dc0959f4d53af92bb1076ddf279afd0ab43758c10214ccbe46d7cc"
5 | TRIGGER_TIME = "4"
6 | LANG = "NodeJs"
7 | BACKGROUND_IMAGE_CMD = "node /dist/index.js &"
8 | URL_FOR_TRIGGER = "http://localhost:5000/hello/ori"
9 | }
10 |
--------------------------------------------------------------------------------
/node-webpack/Readme.md:
--------------------------------------------------------------------------------
1 | # Quickstart for Webpack + Node + Rookout
2 |
3 | A sample application for using Rookout + Node + Webpack.
4 |
5 | ## Running this sample
6 |
7 | 1. Installing dependencies:
8 | ```bash
9 | $ npm install
10 | ```
11 | Note that you will have to copy `node_modules` if you move the packed js and run it elsewhere.
12 |
13 | 2. Export organization token (found under Organization Settings -> Token)
14 | ```bash
15 | $ export ROOKOUT_TOKEN=
16 | ```
17 |
18 | 3. Build:
19 | ```bash
20 | $ npm run build
21 | ```
22 |
23 | 4. Run:
24 | ```bash
25 | $ npm start
26 | ```
27 |
28 | 5. Go to [http://app.rookout.com](http://app.rookout.com) and start debugging!
29 |
30 |
31 | [Node + Rookout]: https://docs.rookout.com/docs/sdk-setup.html
32 | [npm]: https://www.npmjs.com/package/rookout
33 |
34 |
35 |
--------------------------------------------------------------------------------
/node-webpack/index.js:
--------------------------------------------------------------------------------
1 | require("./serve");
2 |
3 |
--------------------------------------------------------------------------------
/node-webpack/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "rookout-webpack",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1",
8 | "build": "webpack",
9 | "start": "node dist/index.js"
10 | },
11 | "author": "",
12 | "license": "ISC",
13 | "dependencies": {
14 | "express": "^4.17.1",
15 | "rookout": "^0.47.0",
16 | "webpack": "^4.29.1",
17 | "webpack-cli": "^3.2.3"
18 | },
19 | "devDependencies": {
20 | "webpack-node-externals": "^3.0.0"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/node-webpack/serve.js:
--------------------------------------------------------------------------------
1 | const rookout = require('rookout');
2 | rookout.start();
3 |
4 | const express = require("express");
5 | const app = express();
6 |
7 | app.get('/', (req, res) => res.send("Hello World"));
8 | app.get("/hello/:name", (req, res) => {
9 | res.send("Hello, " + req.params.name);
10 | });
11 |
12 | app.listen(5000);
13 |
14 |
--------------------------------------------------------------------------------
/node-webpack/webpack.config.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const nodeExternals = require('webpack-node-externals');
3 |
4 | module.exports = {
5 | entry: './index.js',
6 | target: 'node',
7 | devtool: 'source-map',
8 | output: {
9 | filename: 'index.js',
10 | path: path.resolve(__dirname, 'dist')
11 | },
12 | externals: [nodeExternals()],
13 | };
14 |
--------------------------------------------------------------------------------
/python-aws-chalice/.chalice/config-reg-test.json:
--------------------------------------------------------------------------------
1 | {
2 | "environment_variables": {
3 | "ROOKOUT_TOKEN": "ROOKOUT_TOKEN_GOES_HERE",
4 | "ROOKOUT_LABELS": "regression_test:python_chalice_lambda_regression_test-dev",
5 | "ROOKOUT_DEBUG": "1",
6 | "ROOKOUT_LOG_TO_STDERR": "1"
7 | },
8 | "stages": {
9 | "dev": {
10 | "api_gateway_stage": "api"
11 | }
12 | },
13 | "version": "2.0",
14 | "app_name": "python_chalice_lambda_regression_test"
15 | }
16 |
--------------------------------------------------------------------------------
/python-aws-chalice/.chalice/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "environment_variables": {
3 | "ROOKOUT_TOKEN": ""
4 | },
5 | "stages": {
6 | "dev": {
7 | "api_gateway_stage": "api"
8 | }
9 | },
10 | "version": "2.0",
11 | "app_name": "python-aws-chalice"
12 | }
13 |
--------------------------------------------------------------------------------
/python-aws-chalice/.gitignore:
--------------------------------------------------------------------------------
1 | .chalice/deployments/
2 | .chalice/venv/
3 | vendor/
4 |
--------------------------------------------------------------------------------
/python-aws-chalice/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM lambci/lambda:build-python2.7
2 |
3 | ADD .chalice/config.json .chalice/config.json
4 | ADD .chalice/config-reg-test.json .chalice/config-reg-test.json
5 | ADD app.py requirements.txt ./
6 |
7 | # Install app dependencies
8 | RUN pip install --upgrade pip
9 | RUN pip install -r requirements.txt
10 | RUN pip install 'chalice == 1.7.0'
11 |
12 | ADD runTest.sh runTest.sh
--------------------------------------------------------------------------------
/python-aws-chalice/Jenkins_file.disabled:
--------------------------------------------------------------------------------
1 | regressionTest {
2 | FILE_PATH = "app.py"
3 | LINE_NUM = "11"
4 | SHA = "3e577424d98028ef44cb12f322a68524b66c2788d203682301f0bea300fb80d3"
5 | URL_FOR_TRIGGER = "python_chalice_lambda_regression_test-dev"
6 | LANG = "Python"
7 | BACKGROUND_IMAGE_CMD = "bash /var/task/runTest.sh &"
8 | BACKGROUND_SCRIPT_END_STRING = "DONEEE"
9 | URL_FOR_TRIGGER_IN_FILE = "true"
10 | STATIC_LABEL = "python_chalice_lambda_regression_test-dev"
11 | }
12 |
--------------------------------------------------------------------------------
/python-aws-chalice/app.py:
--------------------------------------------------------------------------------
1 | from rook.serverless import RookoutChalice
2 |
3 | # In order to pass parameters using the Rookout API, uncomment the section below:
4 | # import rook
5 | # rook.start(token="", tags=["tag1", "tag2"])
6 |
7 | app = RookoutChalice(app_name='python-aws-chalice')
8 |
9 | @app.route('/')
10 | def index():
11 | return {'hello': 'world'}
12 |
--------------------------------------------------------------------------------
/python-aws-chalice/requirements.txt:
--------------------------------------------------------------------------------
1 | setuptools
2 | rook
3 |
--------------------------------------------------------------------------------
/python-aws-chalice/runTest.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | cd /var/task
3 | echo "Updating reg-test chalice config.json and replacing the original config.json"
4 | sed -i-E "s/ROOKOUT_TOKEN_GOES_HERE/$ROOKOUT_TOKEN/g" .chalice/config-reg-test.json
5 | echo "Printing config-reg-test.json"
6 | cat .chalice/config-reg-test.json
7 | mv .chalice/config-reg-test.json .chalice/config.json
8 | echo "Printing configjson"
9 | cat .chalice/config.json
10 | echo "Deploying the lambda, and update with envs"
11 | RESULT=$(chalice deploy) ; echo $RESULT ;
12 | echo "Fetching URL to trigger"
13 | URL=$(echo $RESULT | grep -oE 'Rest API URL: (.+\/api\/)' | cut -d\ -f4)
14 | echo "URL_TO_TRIGGER -- START"
15 | echo $URL
16 | echo "URL_TO_TRIGGER -- END"
17 | echo "Sleeping for 240 seconds more"
18 | sleep 240
19 | echo "Trying to get logs"
20 | chalice logs --name index
21 | chalice logs --name python_chalice_lambda_regression_test-dev
22 | echo "Deleting the stage"
23 | chalice delete --stage dev
24 | echo "DONEEE"
25 |
--------------------------------------------------------------------------------
/python-aws-lambda-parameterized/README.md:
--------------------------------------------------------------------------------
1 | # Rookout AWS Lambda Python Deployment
2 |
3 | Pre-requisite:
4 | [AWS SAM cli](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html) is installed and an amazon account is configured.
5 |
6 | ### Step 1:
7 | Update your S3 bucket inside `samconfig.toml`.
8 |
9 | ### Step 2:
10 | ```sam build --region=[YOUR REGION NAME]```
11 |
12 | ### Step 3:
13 | ```sam deploy --guided``` and follow the guided deployment.
--------------------------------------------------------------------------------
/python-aws-lambda-parameterized/samconfig.toml:
--------------------------------------------------------------------------------
1 | version = 0.1
2 | [default]
3 | [default.deploy]
4 | [default.deploy.parameters]
5 | stack_name = "python-aws-lambda-parameterized"
6 | s3_bucket = "ENTER YOUR BUCKET NAME HERE"
7 | s3_prefix = "python-aws-lambda-parameterized"
8 | region = "us-east-1"
9 | confirm_changeset = true
10 | capabilities = "CAPABILITY_IAM"
11 | parameter_overrides = "TodosTableName=\"todos-table-python\""
12 | image_repositories = []
13 | disable_rollback = false
--------------------------------------------------------------------------------
/python-aws-lambda-parameterized/tutorial/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/python-aws-lambda-parameterized/tutorial/__init__.py
--------------------------------------------------------------------------------
/python-aws-lambda-parameterized/tutorial/requirements.txt:
--------------------------------------------------------------------------------
1 | requests
2 | flask-lambda
3 | flask-cors
4 | boto3
5 | Werkzeug==2.0.3
6 | rook
--------------------------------------------------------------------------------
/python-aws-lambda/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM lambci/lambda:build-python3.7 AS img1
2 |
3 | WORKDIR /app
4 |
5 | ADD . .
6 |
7 | # Install app dependencies
8 | RUN pip install --upgrade pip
9 | RUN pip install rook -t .
10 |
11 | FROM alpine:latest AS img2
12 |
13 | RUN apk add --update zip
14 |
15 | WORKDIR /build
16 |
17 | COPY --from=img1 /app /build
18 |
19 | RUN zip -r rookout_lambda_test.zip .
20 |
21 | FROM lambci/lambda:build-python3.7
22 |
23 | USER root
24 |
25 | ENV AWS_DEFAULT_REGION us-east-2
26 |
27 | ADD awsTest.sh /
28 |
29 | COPY --from=img2 /build/rookout_lambda_test.zip /
30 |
31 | ENTRYPOINT ["/bin/bash"]
32 |
--------------------------------------------------------------------------------
/python-aws-lambda/Jenkinsfile:
--------------------------------------------------------------------------------
1 | regressionTest {
2 | FILE_PATH = "lambda_function.py"
3 | LINE_NUM = "5"
4 | SHA = "33e7260e49e3ecc9a71b0596d193aaf49a685c3bde357c1e18785062ecfb45b6"
5 | URL_FOR_TRIGGER = "python_lambda_regression_test"
6 | LANG = "Python"
7 | BACKGROUND_IMAGE_CMD = "pip list && bash /awsTest.sh &"
8 | STATIC_LABEL = "python_lambda_regression_test"
9 | }
--------------------------------------------------------------------------------
/python-aws-lambda/awsTest.sh:
--------------------------------------------------------------------------------
1 | if aws lambda list-functions --region us-east-2 | grep "python_lambda_regression_test"; then
2 | aws lambda update-function-code \
3 | --function-name python_lambda_regression_test \
4 | --zip-file fileb:///../../rookout_lambda_test.zip \
5 | --region us-east-2 \
6 |
7 | else
8 | aws lambda create-function \
9 | --region us-east-2 \
10 | --function-name python_lambda_regression_test \
11 | --zip-file fileb:///rookout_lambda_test.zip \
12 | --role arn:aws:iam::032275105219:role/rookout-lambda-role \
13 | --handler lambda_function.lambda_handler \
14 | --runtime python3.7 \
15 | --environment Variables="{ROOKOUT_TOKEN=$ROOKOUT_TOKEN,ROOKOUT_LABELS='regression_test:python_lambda_regression_test',ROOKOUT_DEBUG=1,ROOKOUT_LOG_TO_STDERR=1}" \
16 | --timeout 25 \
17 | --memory-size 400 \
18 | --tags "type=regression_test" ; \
19 | fi
20 |
--------------------------------------------------------------------------------
/python-aws-lambda/lambda_function.py:
--------------------------------------------------------------------------------
1 | from rook.serverless import serverless_rook
2 |
3 | @serverless_rook
4 | def lambda_handler(event, context):
5 | return "Hello world"
6 |
--------------------------------------------------------------------------------
/python-aws-serverlessframework/.gitignore:
--------------------------------------------------------------------------------
1 | # package directories
2 | node_modules
3 | jspm_packages
4 |
5 | # Serverless directories
6 | .serverless
--------------------------------------------------------------------------------
/python-aws-serverlessframework/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM lambci/lambda:build-python3.6 AS builder
2 |
3 | WORKDIR /build
4 |
5 | ADD . .
6 |
7 | RUN pip install -r requirements.txt -t .
8 |
9 | FROM lambci/lambda:build-nodejs12.x
10 |
11 | # install serverless framework
12 | RUN npm install -g serverless
13 |
14 | WORKDIR /app
15 |
16 | COPY --from=builder /build /app
17 |
18 | RUN sed -i '14s/.*/service: python-aws-serverless-reg-test/' serverless.yml
--------------------------------------------------------------------------------
/python-aws-serverlessframework/Jenkinsfile:
--------------------------------------------------------------------------------
1 | regressionTest {
2 | FILE_PATH = "handler.py"
3 | LINE_NUM = "13"
4 | SHA = "f0ac96765edbfdb43a6381f977e070844b56808cd04f919ba7775a50a944fd28"
5 | URL_FOR_TRIGGER = "python-aws-serverless-reg-test-dev-hello"
6 | LANG = "Python"
7 | BACKGROUND_IMAGE_CMD = "bash /app/testEnvs.sh &"
8 | STATIC_LABEL = "python-aws-serverless-reg-test-dev-hello"
9 | }
--------------------------------------------------------------------------------
/python-aws-serverlessframework/handler.py:
--------------------------------------------------------------------------------
1 | import json
2 | from rook.serverless import serverless_rook
3 |
4 |
5 | @serverless_rook
6 | def hello(event, context):
7 | body = {
8 | "message": "Go Serverless v1.0! Your function executed successfully!",
9 | "input": event
10 | }
11 |
12 | response = {
13 | "statusCode": 200,
14 | "body": json.dumps(body)
15 | }
16 |
17 | return response
18 |
19 | # Use this code if you don't use the http event with the LAMBDA-PROXY
20 | # integration
21 | """
22 | return {
23 | "message": "Go Serverless v1.0! Your function executed successfully!",
24 | "event": event
25 | }
26 | """
27 |
--------------------------------------------------------------------------------
/python-aws-serverlessframework/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "python-aws-serverlessframework",
3 | "description": "",
4 | "version": "0.1.0",
5 | "dependencies": {},
6 | "devDependencies": {
7 | "serverless-python-requirements": "^4.3.0"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/python-aws-serverlessframework/requirements.txt:
--------------------------------------------------------------------------------
1 | rook
--------------------------------------------------------------------------------
/python-aws-serverlessframework/testEnvs.sh:
--------------------------------------------------------------------------------
1 | cd /app
2 |
3 | sls deploy --force
4 |
5 | sls package --package /tmp/pkg
6 |
7 | aws lambda update-function-code --function-name python-aws-serverless-reg-test-dev-hello \
8 | --zip-file fileb:/tmp/pkg/python-aws-serverless-reg-test.zip
9 |
10 | aws lambda update-function-configuration \
11 | --function-name python-aws-serverless-reg-test-dev-hello \
12 | --environment Variables="{ROOKOUT_TOKEN=$ROOKOUT_TOKEN,ROOKOUT_LABELS='regression_test:python-aws-serverless-reg-test-dev-hello',ROOKOUT_DEBUG=1,ROOKOUT_LOG_TO_STDERR=1}"
13 |
14 |
--------------------------------------------------------------------------------
/python-celery/app.py:
--------------------------------------------------------------------------------
1 | from celery import Celery
2 |
3 | import rook
4 | rook.start(fork=True)
5 |
6 | app = Celery('tasks', broker='amqp://host.docker.internal', backend='redis://host.docker.internal')
7 |
8 |
9 | @app.task
10 | def add(x, y):
11 | return x + y
12 |
--------------------------------------------------------------------------------
/python-celery/requirements.txt:
--------------------------------------------------------------------------------
1 | rook>=0.1.111
2 | celery>=4.4.6
3 | redis>=3.5.3
4 |
--------------------------------------------------------------------------------
/python-django/.gitignore:
--------------------------------------------------------------------------------
1 | # python related files
2 | *.pyc
3 | *.pyo
4 | *.egg
5 | *.egg-info
6 | __pycache__
7 |
8 | # sqlite db
9 | *.db
10 | *.sqlite3
11 |
12 | # sublime related files
13 | *.sublime-project
14 | *.sublime-workspace
15 |
16 | # test, build, log
17 | build
18 | docs/_build
19 | dist
20 | results
21 | logs
22 | *.logs
--------------------------------------------------------------------------------
/python-django/.travis.yml:
--------------------------------------------------------------------------------
1 | language: python
2 | python:
3 | - "2.7"
4 | - "3.6"
5 | # command to install dependencies
6 | install: "pip install -r requirements.txt"
7 | # command to run tests
8 | script: "python manage.py test"
9 |
--------------------------------------------------------------------------------
/python-django/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM python:3.7-stretch
2 | ADD requirements.txt .
3 | RUN pip install -r requirements.txt
4 | ADD . .
5 | RUN python manage.py migrate
--------------------------------------------------------------------------------
/python-django/Jenkinsfile:
--------------------------------------------------------------------------------
1 | regressionTest {
2 | FILE_PATH = "accounts/views.py"
3 | LINE_NUM = "10"
4 | SHA = "785af086cc1345b57c2b462a036f77a97502bd4586f96ab85fe3d41dd84a7bca"
5 | URL_FOR_TRIGGER = "http://localhost:8001/auth/login/"
6 | LANG = "Python"
7 | BACKGROUND_IMAGE_CMD = " python /manage.py runserver 0.0.0.0:8001 &"
8 | }
--------------------------------------------------------------------------------
/python-django/accounts/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/python-django/accounts/__init__.py
--------------------------------------------------------------------------------
/python-django/accounts/admin.py:
--------------------------------------------------------------------------------
1 | from django.contrib import admin
2 |
3 | # Register your models here.
4 |
--------------------------------------------------------------------------------
/python-django/accounts/migrations/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/python-django/accounts/migrations/__init__.py
--------------------------------------------------------------------------------
/python-django/accounts/models.py:
--------------------------------------------------------------------------------
1 | from django.db import models
2 |
3 | # Create your models here.
4 |
--------------------------------------------------------------------------------
/python-django/accounts/templates/accounts/login.html:
--------------------------------------------------------------------------------
1 | {% extends "base.html" %}
2 |
3 | {% block body %}
4 |
20 | {% endblock %}
21 |
--------------------------------------------------------------------------------
/python-django/accounts/templates/accounts/register.html:
--------------------------------------------------------------------------------
1 | {% extends "base.html" %}
2 |
3 | {% block body %}
4 |
20 | {% endblock %}
21 |
--------------------------------------------------------------------------------
/python-django/accounts/urls.py:
--------------------------------------------------------------------------------
1 | from django.conf.urls import url
2 |
3 | from accounts import views
4 |
5 | urlpatterns = [
6 | url(r'^login/$', views.login_view, name='login'),
7 | url(r'^logout/$', views.logout_view, name='logout'),
8 | url(r'^register/$', views.register, name='register'),
9 | ]
10 |
--------------------------------------------------------------------------------
/python-django/api/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/python-django/api/__init__.py
--------------------------------------------------------------------------------
/python-django/api/migrations/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/python-django/api/migrations/__init__.py
--------------------------------------------------------------------------------
/python-django/api/serializers.py:
--------------------------------------------------------------------------------
1 | from django.contrib.auth.models import User
2 | from rest_framework import serializers
3 |
4 | from lists.models import TodoList, Todo
5 |
6 |
7 | class UserSerializer(serializers.ModelSerializer):
8 |
9 | todolists = serializers.PrimaryKeyRelatedField(
10 | many=True, queryset=TodoList.objects.all()
11 | )
12 |
13 | class Meta:
14 | model = User
15 | fields = ('id', 'username', 'last_login', 'date_joined', 'todolists')
16 |
17 |
18 | class TodoListSerializer(serializers.ModelSerializer):
19 |
20 | creator = serializers.ReadOnlyField(source='creator.username')
21 |
22 | class Meta:
23 | model = TodoList
24 | fields = ('id', 'title', 'created_at', 'creator', 'todos')
25 |
26 |
27 | class TodoSerializer(serializers.ModelSerializer):
28 |
29 | creator = serializers.ReadOnlyField(source='creator.username')
30 |
31 | class Meta:
32 | model = Todo
33 | fields = (
34 | 'id', 'todolist', 'description', 'created_at',
35 | 'creator', 'is_finished', 'finished_at'
36 | )
37 |
--------------------------------------------------------------------------------
/python-django/api/urls.py:
--------------------------------------------------------------------------------
1 | from django.conf.urls import url, include
2 |
3 | from rest_framework.routers import DefaultRouter
4 |
5 | from api import views
6 |
7 | router = DefaultRouter()
8 | router.register(r'users', views.UserViewSet)
9 | router.register(r'todolists', views.TodoListViewSet)
10 | router.register(r'todos', views.TodoViewSet)
11 |
12 | urlpatterns = [
13 | url(r'^', include(router.urls)),
14 | ]
15 |
--------------------------------------------------------------------------------
/python-django/lists/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/python-django/lists/__init__.py
--------------------------------------------------------------------------------
/python-django/lists/admin.py:
--------------------------------------------------------------------------------
1 | from django.contrib import admin
2 |
3 | # Register your models here.
4 |
--------------------------------------------------------------------------------
/python-django/lists/forms.py:
--------------------------------------------------------------------------------
1 | from django import forms
2 |
3 |
4 | def widget_attrs(placeholder):
5 | return {'class': 'u-full-width', 'placeholder': placeholder}
6 |
7 |
8 | def form_kwargs(widget, label='', max_length=128):
9 | return {'widget': widget, 'label': label, 'max_length': max_length}
10 |
11 |
12 | class TodoForm(forms.Form):
13 | description = forms.CharField(
14 | **form_kwargs(
15 | widget=forms.TextInput(attrs=widget_attrs('Enter your todo'))
16 | )
17 | )
18 |
19 |
20 | class TodoListForm(forms.Form):
21 | title = forms.CharField(
22 | **form_kwargs(
23 | widget=forms.TextInput(
24 | attrs=widget_attrs('Enter a title to start a new todolist')
25 | )
26 | )
27 | )
28 |
--------------------------------------------------------------------------------
/python-django/lists/migrations/0002_auto_20150301_1937.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from __future__ import unicode_literals
3 |
4 | from django.db import models, migrations
5 | from django.conf import settings
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | dependencies = [
11 | ('lists', '0001_initial'),
12 | ]
13 |
14 | operations = [
15 | migrations.AlterField(
16 | model_name='todo',
17 | name='creator',
18 | field=models.ForeignKey(to=settings.AUTH_USER_MODEL, null=True),
19 | preserve_default=True,
20 | ),
21 | migrations.AlterField(
22 | model_name='todolist',
23 | name='creator',
24 | field=models.ForeignKey(to=settings.AUTH_USER_MODEL, null=True),
25 | preserve_default=True,
26 | ),
27 | ]
28 |
--------------------------------------------------------------------------------
/python-django/lists/migrations/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/python-django/lists/migrations/__init__.py
--------------------------------------------------------------------------------
/python-django/lists/static/lists/images/asc.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/python-django/lists/static/lists/images/asc.gif
--------------------------------------------------------------------------------
/python-django/lists/static/lists/images/bg.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/python-django/lists/static/lists/images/bg.gif
--------------------------------------------------------------------------------
/python-django/lists/static/lists/images/desc.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/python-django/lists/static/lists/images/desc.gif
--------------------------------------------------------------------------------
/python-django/lists/templates/lists/index.html:
--------------------------------------------------------------------------------
1 | {% extends "base.html" %}
2 |
3 | {% block body %}
4 |
19 | {% endblock %}
20 |
--------------------------------------------------------------------------------
/python-django/lists/templatetags/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/python-django/lists/templatetags/__init__.py
--------------------------------------------------------------------------------
/python-django/lists/urls.py:
--------------------------------------------------------------------------------
1 | from django.conf.urls import url
2 |
3 | from lists import views
4 |
5 | urlpatterns = [
6 | url(r'^$', views.index, name='index'),
7 | url(r'^todolist/(?P\d+)/$', views.todolist, name='todolist'),
8 | url(r'^todolist/new/$', views.new_todolist, name='new_todolist'),
9 | url(r'^todolist/add/$', views.add_todolist, name='add_todolist'),
10 | url(r'^todo/add/(?P\d+)/$', views.add_todo, name='add_todo'),
11 | url(r'^todolists/$', views.overview, name='overview'),
12 | ]
13 |
--------------------------------------------------------------------------------
/python-django/manage.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | import os
3 | import sys
4 |
5 | if __name__ == "__main__":
6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "todolist.settings")
7 |
8 | from django.core.management import execute_from_command_line
9 |
10 | execute_from_command_line(sys.argv)
11 |
--------------------------------------------------------------------------------
/python-django/requirements.txt:
--------------------------------------------------------------------------------
1 | Django==1.11.29
2 | djangorestframework==3.7.1
3 | rook>=0.1.20
4 |
--------------------------------------------------------------------------------
/python-django/todolist/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/python-django/todolist/__init__.py
--------------------------------------------------------------------------------
/python-django/todolist/static/images/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/python-django/todolist/static/images/favicon.png
--------------------------------------------------------------------------------
/python-django/todolist/templates/403.html:
--------------------------------------------------------------------------------
1 | {% extends "base.html" %}
2 |
3 | {% block body %}
4 |
13 | {% endblock %}
14 |
--------------------------------------------------------------------------------
/python-django/todolist/templates/404.html:
--------------------------------------------------------------------------------
1 | {% extends "base.html" %}
2 |
3 | {% block body %}
4 |
13 | {% endblock %}
14 |
--------------------------------------------------------------------------------
/python-django/todolist/templates/500.html:
--------------------------------------------------------------------------------
1 | {% extends "base.html" %}
2 |
3 | {% block body %}
4 |
13 | {% endblock %}
14 |
--------------------------------------------------------------------------------
/python-django/todolist/urls.py:
--------------------------------------------------------------------------------
1 | from django.conf.urls import include, url
2 | from django.contrib import admin
3 |
4 | urlpatterns = [
5 | url(r'', include('lists.urls', namespace='lists')),
6 | url(r'^auth/', include('accounts.urls', namespace='auth')),
7 | url(r'^api/', include('api.urls', namespace='api')),
8 | url(r'^api-auth/', include('rest_framework.urls',
9 | namespace='rest_framework')),
10 | url(r'^admin/', include(admin.site.urls)),
11 | ]
12 |
--------------------------------------------------------------------------------
/python-django/todolist/wsgi.py:
--------------------------------------------------------------------------------
1 | """
2 | WSGI config for todolist project.
3 |
4 | It exposes the WSGI callable as a module-level variable named ``application``.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
8 | """
9 |
10 | import os
11 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "todolist.settings")
12 |
13 | from django.core.wsgi import get_wsgi_application
14 | application = get_wsgi_application()
15 |
--------------------------------------------------------------------------------
/python-flask/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM python:3.7-stretch
2 | ADD requirements.txt .
3 | RUN pip install -r requirements.txt
4 | ADD flask_rookout.py .
--------------------------------------------------------------------------------
/python-flask/Jenkinsfile:
--------------------------------------------------------------------------------
1 | regressionTest {
2 | FILE_PATH = "flask_rookout.py"
3 | LINE_NUM = "26"
4 | SHA = "ff977376cd104bb6be77e3354a2699d28eb07ccf145178bc7d389072133907bc"
5 | URL_FOR_TRIGGER = "http://localhost:5000/render"
6 | LANG = "Python"
7 | BACKGROUND_IMAGE_CMD = "python /flask_rookout.py &"
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/python-flask/requirements.txt:
--------------------------------------------------------------------------------
1 | rook>=0.1.39
2 | flask>=1.0,<=2.0
3 |
--------------------------------------------------------------------------------
/python-fork/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM python:3.7-stretch
2 | ADD requirements.txt .
3 | RUN pip install -r requirements.txt
4 | ADD fork_rookout.py .
5 |
--------------------------------------------------------------------------------
/python-fork/Jenkinsfile:
--------------------------------------------------------------------------------
1 | regressionTest {
2 | FILE_PATH = "fork_rookout.py"
3 | LINE_NUM = "19,24"
4 | SHA = "1a21d0c11ab8722f0303a06c15d9b15c71ba720559052fcfe85c9b4f32b5a1a7"
5 | URL_FOR_TRIGGER = "http://localhost:5000/hello"
6 | LANG = "Python"
7 | BACKGROUND_IMAGE_CMD = "python /fork_rookout.py &"
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/python-fork/fork_rookout.py:
--------------------------------------------------------------------------------
1 | import time
2 | from flask import Flask
3 | from random import randint
4 | import os
5 | from datetime import datetime
6 | import rook
7 |
8 |
9 | app = Flask(__name__)
10 |
11 | @app.route("/")
12 | def home():
13 | time.sleep(0.01 * randint(10, 200) + 0.1)
14 | return 'Index Main Page'
15 |
16 | @app.route('/hello')
17 | def hello():
18 | time.sleep(0.01 * randint(10, 200) + 0.1)
19 | return 'Hello, World' # Set bp here
20 |
21 |
22 | def debug_here(i):
23 | j = i * i
24 | return j # Set bp here
25 |
26 |
27 | def child_routine():
28 | for i in range(30):
29 | debug_here(i)
30 | time.sleep(5)
31 |
32 |
33 | if __name__ == "__main__":
34 | rook.start(throw_errors=True, fork=True)
35 | if 0 == os.fork():
36 | app.run(host="0.0.0.0", port=5000, threaded=True)
37 | else:
38 | child_routine()
39 |
--------------------------------------------------------------------------------
/python-fork/requirements.txt:
--------------------------------------------------------------------------------
1 | rook>=0.1.39
2 | flask>=1.0,<=2.0
3 |
--------------------------------------------------------------------------------
/python-kubernetes/README.md:
--------------------------------------------------------------------------------
1 | # Quickstart for debugging Kubernetes deployments
2 |
3 | These are full examples for deploying an application with Rookout using Kubernetes.
4 |
5 | You can choose to use Rookout as a service by simply adding our SDK to your application and setting ROOKOUT_TOKEN.
6 | Or install the Rookout ETL Controller on your kubernetes cluster. For more information about self-hosted ETL Controller check out [our documentation](https://docs.rookout.com/docs/agent-setup.html)
7 |
--------------------------------------------------------------------------------
/python-kubernetes/rookout-service/app-deployment.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1
2 | kind: Deployment
3 | metadata:
4 | name: rookout-demo-app-deployment
5 | labels:
6 | app: rookout-demo-app-deployment
7 | spec:
8 | replicas: 1
9 | selector:
10 | matchLabels:
11 | app: rookout-demo-app-deployment
12 | template:
13 | metadata:
14 | labels:
15 | app: rookout-demo-app-deployment
16 | spec:
17 | containers:
18 | - name: rookout-demo-app
19 | image: rookout/tutorial-python
20 | imagePullPolicy: Always
21 | ports:
22 | - containerPort: 5000
23 | env:
24 | - name: ROOKOUT_TOKEN
25 | valueFrom:
26 | secretKeyRef:
27 | name: rookout
28 | key: token
--------------------------------------------------------------------------------
/python-kubernetes/rookout-service/app-service.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: rookout-demo-app-service
5 | spec:
6 | ports:
7 | - port: 80
8 | targetPort: 5000
9 | protocol: TCP
10 | selector:
11 | app: rookout-demo-app-deployment
12 | type: LoadBalancer
--------------------------------------------------------------------------------
/python-kubernetes/with-agent/app-deployment.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: extensions/v1beta1
2 | kind: Deployment
3 | metadata:
4 | name: rookout-demo-app-deployment
5 | labels:
6 | name: rookout-demo-app-deployment
7 | spec:
8 | replicas: 1
9 | template:
10 | metadata:
11 | labels:
12 | name: rookout-demo-app-deployment
13 | spec:
14 | containers:
15 | - name: rookout-demo-app
16 | image: rookout/tutorial-python
17 | imagePullPolicy: Always
18 | ports:
19 | - containerPort: 5000
20 | env:
21 | - name: ROOKOUT_CONTROLLER_HOST
22 | value: 'rookout-controller-service.default.svc.cluster.local'
--------------------------------------------------------------------------------
/python-kubernetes/with-agent/app-service.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: rookout-demo-app-service
5 | spec:
6 | ports:
7 | - port: 80
8 | targetPort: 5000
9 | protocol: TCP
10 | selector:
11 | name: rookout-demo-app-deployment
12 | type: LoadBalancer
--------------------------------------------------------------------------------
/python-kubernetes/with-agent/controller-deployment.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1beta1
2 | kind: Deployment
3 | metadata:
4 | name: rookout-controller-deployment
5 | labels:
6 | product: rookout
7 | app: controller
8 | type: deployment
9 | spec:
10 | replicas: 1
11 | template:
12 | metadata:
13 | labels:
14 | product: rookout
15 | app: controller
16 | spec:
17 | containers:
18 | - name: controller
19 | image: rookout/controller
20 | imagePullPolicy: Always
21 | resources:
22 | requests:
23 | cpu: "0.03"
24 | memory: "32Mi"
25 | limits:
26 | cpu: "1"
27 | memory: "1Gi"
28 | env:
29 | - name: ROOKOUT_TOKEN
30 | valueFrom:
31 | secretKeyRef:
32 | name: rookout
33 | key: token
34 | ports:
35 | - containerPort: 7486
36 | livenessProbe:
37 | tcpSocket:
38 | port: 7486
39 | initialDelaySeconds: 15
40 | periodSeconds: 20
--------------------------------------------------------------------------------
/python-kubernetes/with-agent/controller-service.yaml:
--------------------------------------------------------------------------------
1 | kind: Service
2 | apiVersion: v1
3 | metadata:
4 | name: rookout-controller-service
5 | labels:
6 | product: rookout
7 | app: controller
8 | type: service
9 | spec:
10 | selector:
11 | product: rookout
12 | app: controller
13 | type: deployment
14 | type: ClusterIP
15 | ports:
16 | - protocol: TCP
17 | port: 7486
--------------------------------------------------------------------------------
/python-nameko/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM python:3.7-stretch
2 | RUN mkdir /nameko
3 | WORKDIR /nameko
4 | ADD requirements.txt /nameko
5 | RUN pip install -r /nameko/requirements.txt
6 | ADD nameko_example.py /nameko/
7 |
8 |
--------------------------------------------------------------------------------
/python-nameko/Jenkinsfile:
--------------------------------------------------------------------------------
1 | regressionTest {
2 | FILE_PATH = "nameko_example.py"
3 | LINE_NUM = "10"
4 | SHA = "4296857248ac51dceeb1c59102c5d296e1e154d9592277c17f0e9ec7e7be0d10"
5 | URL_FOR_TRIGGER = "http://localhost:8000/get/42"
6 | LANG = "Python"
7 | BACKGROUND_IMAGE_CMD = "cd /nameko; nameko run nameko_example &"
8 | USE_WEBSOCKET_PROTOCOL = "true"
9 | }
10 |
--------------------------------------------------------------------------------
/python-nameko/README.md:
--------------------------------------------------------------------------------
1 |
2 | # Quickstart for debugging Nameko
3 |
4 | A sample application for debugging Python Nameko apps using Rookout.
5 |
6 |
7 | Before following this guide we recommend completing the basic [Python + Rookout tutorial](https://github.com/Rookout/tutorial-python).
8 |
9 |
10 | ## Running Nameko Server with Rookout
11 |
12 | 1. *Clone and install dependencies*:
13 | ```bash
14 | git clone https://github.com/Rookout/deployment-examples.git
15 | cd deployment-examples/python-nameko
16 | pip3 install -r requirements.txt
17 | ```
18 |
19 | 2. *Export organization token*:
20 | ```bash
21 | export ROOKOUT_TOKEN=
22 | ```
23 |
24 | 3. *Run nameko*:
25 | ```bash
26 | # start the server (default: http://localhost:8000)
27 | nameko run nameko_example
28 | ```
29 |
30 | 4. *Have fun debugging*:
31 | Go to https://app.rookout.com and start debugging :)
32 |
33 |
34 | [Python + Rookout]: https://docs.rookout.com/docs/sdk-setup.html
35 |
36 |
--------------------------------------------------------------------------------
/python-nameko/nameko_example.py:
--------------------------------------------------------------------------------
1 | import json
2 | import rook
3 | from nameko.web.handlers import http
4 |
5 | class HttpService:
6 | name = "http_service"
7 |
8 | @http('GET', '/get/')
9 | def get_method(self, request, value):
10 | return json.dumps({'value': value})
11 |
12 | @http('POST', '/post')
13 | def do_post(self, request):
14 | return u"received: {}".format(request.get_data(as_text=True))
15 |
16 | @http('GET,PUT,POST,DELETE', '/multi')
17 | def do_multi(self, request):
18 | return request.method
19 |
20 | rook.start()
21 |
--------------------------------------------------------------------------------
/python-nameko/requirements.txt:
--------------------------------------------------------------------------------
1 | rook>=0.1.58
2 | nameko
3 | importlib-metadata<5.0
--------------------------------------------------------------------------------
/python-pyspark/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM datamechanics/spark:3.2.1-latest
2 | USER root
3 | RUN sed -i 's/deb /deb \[trusted=yes\] /' /etc/apt/sources.list
4 | RUN apt-get update || true
5 | RUN apt-get install -y gcc python3-dev
6 | ADD requirements.txt .
7 | RUN pip install -r requirements.txt
8 | ADD pyspark_demo.py .
9 | ADD driver.py .
--------------------------------------------------------------------------------
/python-pyspark/Jenkinsfile:
--------------------------------------------------------------------------------
1 | regressionTest {
2 | FILE_PATH = "driver.py"
3 | LINE_NUM = "11"
4 | SHA = "6a31c4bee2527f1ea2acdb2e7ac202fc41dfbe199669b6e8ab51d871419556ca"
5 | URL_FOR_TRIGGER = "http://localhost:4000/driver"
6 | LANG = "Python"
7 | BACKGROUND_IMAGE_CMD = '/opt/spark/bin/spark-submit --conf spark.python.daemon.module=rook.pyspark_daemon --conf spark.executorEnv.ROOKOUT_TOKEN=$ROOKOUT_TOKEN --conf spark.executorEnv.ROOKOUT_LABELS=$ROOKOUT_LABELS /opt/spark/work-dir/pyspark_demo.py &'
8 | TRIGGER_TIME = "30"
9 | CUSTOM_SLEEP_TIME = "30"
10 | }
11 |
--------------------------------------------------------------------------------
/python-pyspark/driver.py:
--------------------------------------------------------------------------------
1 | import time
2 |
3 |
4 | class DriverClass(object):
5 | def __init__(self, sc):
6 | self.sc = sc
7 |
8 | def run_driver(self):
9 | def filter_even(num):
10 | def filter_even_inner(num):
11 | time.sleep(2)
12 | return num % 2 == 0
13 |
14 | time.sleep(2)
15 | return filter_even_inner(num)
16 |
17 | rdd = self.sc.parallelize([1, 2, 3, 4, 5, 6])
18 | res = rdd.filter(lambda num: filter_even(num)).collect()
19 | return res
20 |
--------------------------------------------------------------------------------
/python-pyspark/pyspark_demo.py:
--------------------------------------------------------------------------------
1 | from flask import Flask
2 | from pyspark.sql import SparkSession
3 | import rook
4 |
5 | import driver
6 |
7 |
8 | app = Flask(__name__)
9 | spark = SparkSession.builder.appName('Sample Spark App').getOrCreate()
10 | sc = spark.sparkContext
11 |
12 |
13 | @app.route('/driver')
14 | def driver_handler():
15 | driver_instance = driver.DriverClass(sc)
16 | res = driver_instance.run_driver()
17 | return str(res)
18 |
19 |
20 | if __name__ == '__main__':
21 | rook.start()
22 | app.run(host='0.0.0.0', port=4000, threaded=True)
23 |
--------------------------------------------------------------------------------
/python-pyspark/requirements.txt:
--------------------------------------------------------------------------------
1 | flask>=1.0,<=2.0
2 | rook>=0.1.206
--------------------------------------------------------------------------------
/python-sanic/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM python:3.7-stretch
2 | ADD requirements.txt .
3 | RUN pip3 install -r requirements.txt
4 | ADD sanic_rookout.py .
5 |
6 |
--------------------------------------------------------------------------------
/python-sanic/Jenkinsfile:
--------------------------------------------------------------------------------
1 | regressionTest {
2 | FILE_PATH = "sanic_rookout.py"
3 | LINE_NUM = "18"
4 | SHA = "ba66d1c9115e0eee190a18b5462c3fc5db260dfa5a51db20e5ec2b6f3cf2a7cb"
5 | URL_FOR_TRIGGER = "http://localhost:5000/await"
6 | LANG = "Python"
7 | BACKGROUND_IMAGE_CMD = "python3 /sanic_rookout.py &"
8 | }
--------------------------------------------------------------------------------
/python-sanic/requirements.txt:
--------------------------------------------------------------------------------
1 | rook>=0.1.8
2 | sanic==21.12
3 | websockets==10.0
4 |
--------------------------------------------------------------------------------
/python-sanic/sanic_rookout.py:
--------------------------------------------------------------------------------
1 | from sanic import Sanic
2 | import os
3 | from sanic import response
4 | from sanic.exceptions import ServerError
5 |
6 | app = Sanic(__name__)
7 |
8 | @app.route("/")
9 | async def test_async(request):
10 | return response.json({"test": True})
11 |
12 | @app.route("/exception")
13 | def exception(request):
14 | raise ServerError("It's dead jim")
15 |
16 | @app.route("/await")
17 | async def test_await(request):
18 | import asyncio
19 | await asyncio.sleep(5)
20 | return response.text("I'm feeling sleepy")
21 |
22 |
23 |
24 | async def load_rookout():
25 | from rook import auto_start
26 |
27 |
28 | def start_server():
29 | app.add_task(load_rookout())
30 | app.run(host='0.0.0.0',
31 | port=os.environ.get('PORT', 5000),
32 | access_log=False,
33 | debug=False,
34 | workers=3)
35 |
36 | start_server()
37 |
--------------------------------------------------------------------------------
/python-zappa/README.md:
--------------------------------------------------------------------------------
1 | # Quickstart for debugging Python + AWS Lambda + Zappa
2 |
3 | A sample application for debugging Python apps deployed in AWS Zappa using Rookout.
4 |
5 | Before following this guide we recommend reading the basic [Python + Lambda debugging guide](https://github.com/Rookout/deployment-examples/blob/master/python-aws-lambda/README.md).
6 |
7 | This example is based on a plain Zappa app, with the following modifications applied:
8 |
9 | 1. Set your Rookout token as an environment variable in `zappa_settings.json`:
10 |
11 | ```json
12 | {
13 | "dev": {
14 | ....
15 | ....,
16 | "aws_environment_variables" : {"ROOKOUT_TOKEN": ""}
17 | }
18 | }
19 | ```
20 |
21 | 2. Add the `rook` SDK dependancy to your `requirements.txt` Zappa file.
22 |
23 | 3. Add the following code in your main app code:
24 |
25 | ```python
26 | from rook.serverless import setup_zappa_support
27 | setup_zappa_support()
28 | ```
29 |
30 | 4. Go to [app.rookout.com](https://app.rookout.com) and start debugging!
31 |
--------------------------------------------------------------------------------
/python-zappa/django_app/.gitignore:
--------------------------------------------------------------------------------
1 | # python related files
2 | *.pyc
3 | *.pyo
4 | *.egg
5 | *.egg-info
6 | __pycache__
7 |
8 | # sqlite db
9 | *.db
10 | *.sqlite3
11 |
12 | # sublime related files
13 | *.sublime-project
14 | *.sublime-workspace
15 |
16 | # test, build, log
17 | build
18 | docs/_build
19 | dist
20 | results
21 | logs
22 | *.logs
--------------------------------------------------------------------------------
/python-zappa/django_app/.travis.yml:
--------------------------------------------------------------------------------
1 | language: python
2 | python:
3 | - "2.7"
4 | - "3.6"
5 | # command to install dependencies
6 | install: "pip install -r requirements.txt"
7 | # command to run tests
8 | script: "python manage.py test"
9 |
--------------------------------------------------------------------------------
/python-zappa/django_app/accounts/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/python-zappa/django_app/accounts/__init__.py
--------------------------------------------------------------------------------
/python-zappa/django_app/accounts/admin.py:
--------------------------------------------------------------------------------
1 | from django.contrib import admin
2 |
3 | # Register your models here.
4 |
--------------------------------------------------------------------------------
/python-zappa/django_app/accounts/migrations/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/python-zappa/django_app/accounts/migrations/__init__.py
--------------------------------------------------------------------------------
/python-zappa/django_app/accounts/models.py:
--------------------------------------------------------------------------------
1 | from django.db import models
2 |
3 | # Create your models here.
4 |
--------------------------------------------------------------------------------
/python-zappa/django_app/accounts/templates/accounts/login.html:
--------------------------------------------------------------------------------
1 | {% extends "base.html" %}
2 |
3 | {% block body %}
4 |
20 | {% endblock %}
21 |
--------------------------------------------------------------------------------
/python-zappa/django_app/accounts/templates/accounts/register.html:
--------------------------------------------------------------------------------
1 | {% extends "base.html" %}
2 |
3 | {% block body %}
4 |
20 | {% endblock %}
21 |
--------------------------------------------------------------------------------
/python-zappa/django_app/accounts/urls.py:
--------------------------------------------------------------------------------
1 | from django.conf.urls import url
2 |
3 | from accounts import views
4 |
5 | urlpatterns = [
6 | url(r'^login/$', views.login_view, name='login'),
7 | url(r'^logout/$', views.logout_view, name='logout'),
8 | url(r'^register/$', views.register, name='register'),
9 | ]
10 |
--------------------------------------------------------------------------------
/python-zappa/django_app/api/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/python-zappa/django_app/api/__init__.py
--------------------------------------------------------------------------------
/python-zappa/django_app/api/migrations/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/python-zappa/django_app/api/migrations/__init__.py
--------------------------------------------------------------------------------
/python-zappa/django_app/api/serializers.py:
--------------------------------------------------------------------------------
1 | from django.contrib.auth.models import User
2 | from rest_framework import serializers
3 |
4 | from lists.models import TodoList, Todo
5 |
6 |
7 | class UserSerializer(serializers.ModelSerializer):
8 |
9 | todolists = serializers.PrimaryKeyRelatedField(
10 | many=True, queryset=TodoList.objects.all()
11 | )
12 |
13 | class Meta:
14 | model = User
15 | fields = ('id', 'username', 'last_login', 'date_joined', 'todolists')
16 |
17 |
18 | class TodoListSerializer(serializers.ModelSerializer):
19 |
20 | creator = serializers.ReadOnlyField(source='creator.username')
21 |
22 | class Meta:
23 | model = TodoList
24 | fields = ('id', 'title', 'created_at', 'creator', 'todos')
25 |
26 |
27 | class TodoSerializer(serializers.ModelSerializer):
28 |
29 | creator = serializers.ReadOnlyField(source='creator.username')
30 |
31 | class Meta:
32 | model = Todo
33 | fields = (
34 | 'id', 'todolist', 'description', 'created_at',
35 | 'creator', 'is_finished', 'finished_at'
36 | )
37 |
--------------------------------------------------------------------------------
/python-zappa/django_app/api/urls.py:
--------------------------------------------------------------------------------
1 | from django.conf.urls import url, include
2 |
3 | from rest_framework.routers import DefaultRouter
4 |
5 | from api import views
6 |
7 | router = DefaultRouter()
8 | router.register(r'users', views.UserViewSet)
9 | router.register(r'todolists', views.TodoListViewSet)
10 | router.register(r'todos', views.TodoViewSet)
11 |
12 | urlpatterns = [
13 | url(r'^', include(router.urls)),
14 | ]
15 |
--------------------------------------------------------------------------------
/python-zappa/django_app/lists/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/python-zappa/django_app/lists/__init__.py
--------------------------------------------------------------------------------
/python-zappa/django_app/lists/admin.py:
--------------------------------------------------------------------------------
1 | from django.contrib import admin
2 |
3 | # Register your models here.
4 |
--------------------------------------------------------------------------------
/python-zappa/django_app/lists/forms.py:
--------------------------------------------------------------------------------
1 | from django import forms
2 |
3 |
4 | def widget_attrs(placeholder):
5 | return {'class': 'u-full-width', 'placeholder': placeholder}
6 |
7 |
8 | def form_kwargs(widget, label='', max_length=128):
9 | return {'widget': widget, 'label': label, 'max_length': max_length}
10 |
11 |
12 | class TodoForm(forms.Form):
13 | description = forms.CharField(
14 | **form_kwargs(
15 | widget=forms.TextInput(attrs=widget_attrs('Enter your todo'))
16 | )
17 | )
18 |
19 |
20 | class TodoListForm(forms.Form):
21 | title = forms.CharField(
22 | **form_kwargs(
23 | widget=forms.TextInput(
24 | attrs=widget_attrs('Enter a title to start a new todolist')
25 | )
26 | )
27 | )
28 |
--------------------------------------------------------------------------------
/python-zappa/django_app/lists/migrations/0002_auto_20150301_1937.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from __future__ import unicode_literals
3 |
4 | from django.db import models, migrations
5 | from django.conf import settings
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | dependencies = [
11 | ('lists', '0001_initial'),
12 | ]
13 |
14 | operations = [
15 | migrations.AlterField(
16 | model_name='todo',
17 | name='creator',
18 | field=models.ForeignKey(to=settings.AUTH_USER_MODEL, null=True),
19 | preserve_default=True,
20 | ),
21 | migrations.AlterField(
22 | model_name='todolist',
23 | name='creator',
24 | field=models.ForeignKey(to=settings.AUTH_USER_MODEL, null=True),
25 | preserve_default=True,
26 | ),
27 | ]
28 |
--------------------------------------------------------------------------------
/python-zappa/django_app/lists/migrations/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/python-zappa/django_app/lists/migrations/__init__.py
--------------------------------------------------------------------------------
/python-zappa/django_app/lists/static/lists/images/asc.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/python-zappa/django_app/lists/static/lists/images/asc.gif
--------------------------------------------------------------------------------
/python-zappa/django_app/lists/static/lists/images/bg.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/python-zappa/django_app/lists/static/lists/images/bg.gif
--------------------------------------------------------------------------------
/python-zappa/django_app/lists/static/lists/images/desc.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/python-zappa/django_app/lists/static/lists/images/desc.gif
--------------------------------------------------------------------------------
/python-zappa/django_app/lists/templates/lists/index.html:
--------------------------------------------------------------------------------
1 | {% extends "base.html" %}
2 |
3 | {% block body %}
4 |
19 | {% endblock %}
20 |
--------------------------------------------------------------------------------
/python-zappa/django_app/lists/templatetags/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/python-zappa/django_app/lists/templatetags/__init__.py
--------------------------------------------------------------------------------
/python-zappa/django_app/lists/urls.py:
--------------------------------------------------------------------------------
1 | from django.conf.urls import url
2 |
3 | from lists import views
4 |
5 | urlpatterns = [
6 | url(r'^$', views.index, name='index'),
7 | url(r'^todolist/(?P\d+)/$', views.todolist, name='todolist'),
8 | url(r'^todolist/new/$', views.new_todolist, name='new_todolist'),
9 | url(r'^todolist/add/$', views.add_todolist, name='add_todolist'),
10 | url(r'^todo/add/(?P\d+)/$', views.add_todo, name='add_todo'),
11 | url(r'^todolists/$', views.overview, name='overview'),
12 | ]
13 |
--------------------------------------------------------------------------------
/python-zappa/django_app/manage.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | import os
3 | import sys
4 |
5 | if __name__ == "__main__":
6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "todolist.settings")
7 |
8 | from django.core.management import execute_from_command_line
9 |
10 | execute_from_command_line(sys.argv)
11 |
--------------------------------------------------------------------------------
/python-zappa/django_app/requirements.txt:
--------------------------------------------------------------------------------
1 | Django==1.11.6
2 | djangorestframework==3.7.1
3 | rook>=0.1.20
4 | zappa
5 |
--------------------------------------------------------------------------------
/python-zappa/django_app/todolist/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/python-zappa/django_app/todolist/__init__.py
--------------------------------------------------------------------------------
/python-zappa/django_app/todolist/static/images/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/python-zappa/django_app/todolist/static/images/favicon.png
--------------------------------------------------------------------------------
/python-zappa/django_app/todolist/templates/403.html:
--------------------------------------------------------------------------------
1 | {% extends "base.html" %}
2 |
3 | {% block body %}
4 |
13 | {% endblock %}
14 |
--------------------------------------------------------------------------------
/python-zappa/django_app/todolist/templates/404.html:
--------------------------------------------------------------------------------
1 | {% extends "base.html" %}
2 |
3 | {% block body %}
4 |
13 | {% endblock %}
14 |
--------------------------------------------------------------------------------
/python-zappa/django_app/todolist/templates/500.html:
--------------------------------------------------------------------------------
1 | {% extends "base.html" %}
2 |
3 | {% block body %}
4 |
13 | {% endblock %}
14 |
--------------------------------------------------------------------------------
/python-zappa/django_app/todolist/urls.py:
--------------------------------------------------------------------------------
1 | from django.conf.urls import include, url
2 | from django.contrib import admin
3 |
4 | urlpatterns = [
5 | url(r'', include('lists.urls', namespace='lists')),
6 | url(r'^auth/', include('accounts.urls', namespace='auth')),
7 | url(r'^api/', include('api.urls', namespace='api')),
8 | url(r'^api-auth/', include('rest_framework.urls',
9 | namespace='rest_framework')),
10 | url(r'^admin/', include(admin.site.urls)),
11 | ]
12 |
--------------------------------------------------------------------------------
/python-zappa/django_app/todolist/wsgi.py:
--------------------------------------------------------------------------------
1 | """
2 | WSGI config for todolist project.
3 |
4 | It exposes the WSGI callable as a module-level variable named ``application``.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
8 | """
9 |
10 | import os
11 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "todolist.settings")
12 |
13 | from django.core.wsgi import get_wsgi_application
14 | application = get_wsgi_application()
15 |
--------------------------------------------------------------------------------
/python-zappa/flask_app/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rookout/deployment-examples/ad75fd226733fc14cc584945232767f291daf8eb/python-zappa/flask_app/__init__.py
--------------------------------------------------------------------------------
/python-zappa/flask_app/requirements.txt:
--------------------------------------------------------------------------------
1 | Flask>=0.12
2 | zappa>=0.17.6
3 | rook>=0.1.63
4 |
--------------------------------------------------------------------------------
/python-zappa/flask_app/zappa_settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "devv": {
3 | "app_function": "app.app",
4 | "aws_region": "us-east-1",
5 | "profile_name": "default",
6 | "project_name": "flask-app",
7 | "runtime": "python2.7",
8 | "s3_bucket": "zappa-irlljlfd8",
9 | "aws_environment_variables" : {"ROOKOUT_TOKEN": ""}
10 | }
11 | }
12 |
--------------------------------------------------------------------------------