Skip to content

Latest commit

 

History

History
110 lines (84 loc) · 4.43 KB

File metadata and controls

110 lines (84 loc) · 4.43 KB

Spinnaker Plugin for AWS Lambda Deployment

This plugin provides support for AWS Lambda Deployment via Pipelines in Spinnaker

Version Compatibility

Plugin Spinnaker Platform
1.0.5 <= 1.23.x
1.0.6 >= 1.26.x
1.0.11 >= 1.29.x

This plugin is currently only compatible with Spinnaker platform 1.23.x and up. It is possible to run the plugin in an environment running an earlier release by making the following changes to your environment:

  1. Checkout master branch for spinnaker/orca
  2. Checkout master branch for spinnaker/deck
  3. Checkout master branch for spinnaker/clouddriver
  4. Install the plugin

Major changes

11/02/2022 - Release 1.1.0 - removes older versions of the runtime engine from the UI. This means editing older pipelines will no longer let you use the unsupported lambda runtimes. Please see https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html for questions/information.

Requirements

  1. This plugin requires Java 11
  2. AWS Lambda functions must be enabled in your spinnaker environment and for all required AWS accounts. Find more information here or within samples.

Plugin Deployment Guide

  1. Add the following to the Halyard config (typically found at ~/.hal/config) to load the Orca backend
  spinnaker:
    extensibility:
      plugins:
        Aws.LambdaDeploymentPlugin:
          enabled: true
          version: <<VERSION_NUMBER>> 
          extensions:
            Aws.LambdaDeploymentStage:
              enabled: true
      repositories:
        awsLambdaDeploymentPluginRepo:
          id: awsLambdaDeploymentPluginRepo
          url: https://raw.githubusercontent.com/spinnaker-plugins/aws-lambda-deployment-plugin-spinnaker/master/plugins.json

  # you can also optionally configure cache refresh retries and timeouts
  lambdaPluginConfig:
    cloudDriverReadTimeout: 60 # defaults to 60 secs
    cloudDriverConnectTimeout: 15 # defaults to 15 secs
    cacheRefreshRetryWaitTime: 15 # defaults to 15 sec
    cacheOnDemandRetryWaitTime: 15 # defaults to 15 sec
    cloudDriverRetrieveNewPublishedLambdaWaitSeconds: 40 # defaults to 40 sec
    cloudDriverRetrieveMaxValidateWeightsTimeSeconds: 240 # defaults to 240 sec
  1. Add the following to gate-local.yml in the necessary profile to load the Deck frontend
spinnaker:
 extensibility:
    deck-proxy:
      enabled: true
      plugins:
        Aws.LambdaDeploymentPlugin:
          enabled: true
          version: <<VERSION NUMBER>>
    repositories:
      awsLambdaDeploymentPluginRepo:
        url: https://raw.githubusercontent.com/spinnaker-plugins/aws-lambda-deployment-plugin-spinnaker/master/plugins.json
  1. Execute hal deploy apply to deploy the changes.
  2. You should now be able to see 3 new stages provided by this plugin in the Deck UI when adding a new stage to your pipeline.

Plugin User Guide

See the plugin user guide here

Plugin TroubleShooting Guide

See the plugin user guide for troubleshooting instructions here

Plugin Developer Guide

See the plugin developers guide here

Releasing New Versions

  • Releases are done from the master branch
  • Releases uses github actions. Scripts required for this are checked into the .github directory
  • First update the version in gradle.properties and get that change merged to master.
  • Then, to create a release, we tag the master branch commit with a release number (e.g. release-1.2.3) and push this tag
git tag 1.2.3
git push --tag
  • The scripts in the .github directory trigger a build when this tag is pushed
  • Once the build is successful, A new branch is created (called release-1.2.3) off this tag.
  • A new commit is added to this branch that updates the plugin.json with artifacts produced by this build
  • A PR is created for merging this commit to master. Merge this PR to master.
  • Navigate to the releases page Releases to make sure the new release shows up.
  • Use the updated plugin.json in any new spinnaker deploys.

Security

See CONTRIBUTING for more information.

License

This project is licensed under the Apache-2.0 License.