Open source tools for building custom schedulers on Amazon ECS
Java Gherkin Groovy
Switch branches/tags
Clone or download
dramaticlly Add generate uber jar tasks for end-to-end-tests (#381)
* add generate uber jar for end-to-end-tests
on blox release, copy the uber jar to correct path
Latest commit 25c9adc Mar 12, 2018
Permalink
Failed to load latest commit information.
.github Simplify pull request template (#363) Jan 30, 2018
buildSrc Add copy task for build outputs (#380) Mar 1, 2018
data-service-client Cleanup old dataservice API (#350) Jan 23, 2018
data-service-model First-pass implementation of UpdateEnvironment in DataService (#372) Feb 12, 2018
data-service Add copy task for build outputs (#380) Mar 1, 2018
docs Updating the user experience and data model sections (#320) Jan 12, 2018
end-to-end-tests Add generate uber jar tasks for end-to-end-tests (#381) Mar 12, 2018
frontend-service-client Remove duplicate environmentName from UpdateEnvironmentRequest Feb 12, 2018
frontend-service Add copy task for build outputs (#380) Mar 1, 2018
gradle/wrapper Clean up Gradle build scripts, move config to root project (#287) Nov 8, 2017
integ-tests Remove unused/broken updateEnvironment cucumber test case (#374) Feb 12, 2018
json-rpc-core Move all group/version declarations to root project's build.gradle (#364 Jan 30, 2018
json-rpc-lambda-client Wire new exception mappers into DataService Jan 30, 2018
json-rpc-lambda-server Move all group/version declarations to root project's build.gradle (#364 Jan 30, 2018
lambda-logging Move all group/version declarations to root project's build.gradle (#364 Jan 30, 2018
lambda-spring Move all group/version declarations to root project's build.gradle (#364 Jan 30, 2018
licenses Add the skeleton of an AWS API Gateway + Lambda frontend service Aug 9, 2017
scheduling-manager Add copy task for build outputs (#380) Mar 1, 2018
.gitignore Add .gradletasknamecache to gitignore for using gradle command comple… Jan 19, 2018
.travis.yml Add buildspec file to build on AWS CodeBuild (#338) Jan 18, 2018
CONTRIBUTING.md Amazon Code of Conduct (#293) Nov 18, 2017
FAQ.md Updating FAQ Aug 8, 2017
LICENSE Initial commit Sep 28, 2016
README.md Update readme for user permissions (#318) Jan 11, 2018
RELEASE_TEMPLATE.md Cleaning up v0.3 (#214) Aug 3, 2017
blox-logo.png Adding blox logo to readme (#106) Dec 17, 2016
build.gradle Add generate uber jar tasks for end-to-end-tests (#381) Mar 12, 2018
buildspec.yml Add buildspec file to build on AWS CodeBuild (#338) Jan 18, 2018
gradlew Add the skeleton of an AWS API Gateway + Lambda frontend service Aug 9, 2017
gradlew.bat Add the skeleton of an AWS API Gateway + Lambda frontend service Aug 9, 2017
settings.gradle Add client and server side error/exception resolvers that support POJOs Jan 30, 2018

README.md

Logo

Blox: Open Source schedulers for Amazon ECS

Build Status

Blox provides open source schedulers optimized for running applications on Amazon ECS. Developers now have greater control over how their applications are deployed across clusters of resources, run and scale in production, and can take advantage of powerful placement capabilities of Amazon ECS. Blox is being delivered as a managed service via the Amazon ECS Console, API and CLIs. Blox v1.0 provides daemon scheduling for Amazon ECS. We will continue to add additional schedulers as part of this project. Blox schedulers are built using AWS primitives, and the Blox designs and code are open source. If you are interested in learning more or collaborating on the designs, please read the design. If you are currently using Blox v0.3, please read the FAQ.

Project structure

For an overview of the components of Blox, run:

./gradlew projects

Testing

To run the full unit test suite, run:

./gradlew check

This will run the same tests that we run in the Travis CI build.

Deploying

First, take a look at what Blox will put in your personal stack by running the showStackConfig task:

$ ./gradlew showStackConfig

> Task :showStackConfig
Blox deployment stack configuration:

  Default resource name         (blox.name): blox-<username>-alpha-us-west-2 (default)
  API Gateway stage            (blox.stage): alpha (default)
  Stack prefix                (blox.prefix): <username>-alpha (default)
  AWS Region                  (blox.region): us-west-2 (default)
  AWS Credential Profile     (blox.profile): blox-<username>-alpha-us-west-2 (default)
  Cloudformation stack name (blox.cfnStack): blox-<username>-alpha-us-west-2 (default)
  Deployment S3 bucket name (blox.s3Bucket): blox-<username>-alpha-us-west-2 (default)

To customize these values, modify ~/.gradle/gradle.properties to override the property listed.

AWS CLI configuration for profile blox-<username>-alpha-us-west-2:

The config profile (blox-<username>-alpha-us-west-2) could not be found

If you wish to customize any of these values, you can do so by overriding the property in parentheses using any of the supported ways to override Gradle properties. The easiest way is to override it for your user in ~/.gradle/gradle.properties:

blox.profile=default
blox.region=us-east-1

Next, in order to deploy your personal stack:

  • install the official AWS CLI

  • create an IAM user with the following permissions:

    {
        "Version":"2012-10-17",
        "Statement":[{
            "Effect":"Allow",
            "Action":[
                "s3:*",
                "lambda:*",
                "apigateway:*",
                "cloudformation:*",
                "iam:*",
                "execute-api:*",
                "events:DescribeRule"
            ],
            "Resource":"*"
        }]
    }
    

    These permissions are pretty broad, so we recommend you use a separate, test account.

  • configure the AWS Credential Profile shown in the showStackOutput task with the AWS credentials for the user you created above:

    aws configure --profile blox-<username>-alpha-us-west-2 set region us-west-2
    aws configure --profile blox-<username>-alpha-us-west-2
    
  • create an S3 bucket where all resources (code, cloudformation templates, etc) to be deployed will be stored:

    ./gradlew createBucket
    
  • deploy the Blox stack:

    ./gradlew deploy
    

End to end testing

Once you have a stack deployed, you can test it with:

./gradlew testEndToEnd

Contact

License

All projects under Blox are released under Apache 2.0 and contributions are accepted under individual Apache Contributor Agreements.