Skip to content

0.5.0

Compare
Choose a tag to compare
@mnapoli mnapoli released this 17 Jul 11:30
· 2623 commits to master since this release
5f2d626

This is a "major" version without BC break, but with major changes that affect the usage of Bref.

Logo

Bref now has a logo, thanks to Percola.top and null:

bref-logo-source-01

Switching to Serverless

AWS SAM is being replaced by Serverless as the tool to configure and deploy applications.

This is a major change because:

  • Bref now recommends Serverless instead of SAM
  • the documentation has been rewritten around Serverless
  • tooling has been added around Serverless

SAM will continue to work with Bref, just like CloudFormation, Terraform, Now (#368), etc. Bref layers are independent of the tooling used. If you have created applications with SAM, you can keep using it. Most of the time however migrating template.yaml to serverless.yml is not too complex (migrating a production stack may be more effort).

Why?

Serverless offers a configuration format (serverless.yml) that is much simpler and more concise (#320). Sometimes serverless.yml is twice less YAML than template.yaml for the same application. You can see an example of this with the configuration file for a simple HTTP application: https://gist.github.com/mnapoli/a9f690499160736a0a9f70e8492b1f5e

Another major simplification is that the stack name and the region are configured inside serverless.yml. Deploying no longer take 3 steps and 10 lines of code, but only 2 words.

7-1

On top of that, Serverless offers a plugin system that lets us simplify a lot of things, especially around Bref (#351). For example, using Bref layers is now much simpler:

# Before
functions:
    foo:
        handler: index.php
        layers:
            - 'arn:aws:lambda:us-east-1:209497400698:layer:php-73:7'

# After
functions:
    foo:
        handler: index.php
        layers:
            - ${bref:layer.php-73}

Layer version numbers are now tied to a specific Bref version, and we no longer need to mess with the AWS region name. Upgrading layers is now as simple as upgrading Bref via Composer.

Additionally, serverless deploy can deploy the same application in multiple stages.

Finally, Serverless offers a lot of plugins to create more advanced applications: https://serverless.com/plugins/

Want to benefit all of that? All the bref.sh documentation has been rewritten and expanded to help you use Serverless. Give it a try!

Creating websites with Bref

A new documentation article has been created to help you create serverless websites with Bref. You can read it here: Creating websites with Bref.

Several architectures are suggested, depending on what you need:

This is great news as the Maturity Matrix has a more ratings going to green!

Maturity Matrix

Other changes