Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use GitHub Container as Extension Installation. #17

Merged
merged 1 commit into from Jul 3, 2022

Conversation

metaskills
Copy link
Member

The purpose of this pull request is to provide a simple interface to install the Lambda Extension for Lambda Containers. This post here (https://aws.amazon.com/blogs/compute/working-with-lambda-layers-and-extensions-in-container-images/) does a great job outlining the technique. The learnings here will influence an another open-source project to use Libvips with Ruby here (https://github.com/customink/ruby-vips-lambda).

@brcarp I will be making some ℹ️ comments on various parts of this and merging right away. Feel free to ask questions tho and see what eventually lands in main after the merge.

FROM public.ecr.aws/myrepo/shared-lib-layer:1 AS shared-lib-layer
WORKDIR /opt
COPY --from=shared-lib-layer /opt/ .

Post Merge TODO

  • Ensure extension package is public.
  • Test container extension usage and update readme.

@metaskills metaskills requested a review from brcarp July 3, 2022 00:06
@@ -24,7 +24,7 @@ jobs:
- name: Build & Run Development Container
uses: devcontainers/ci@v0.2
with:
imageName: ghcr.io/customink/crypteia
imageName: ghcr.io/customink/crypteia-devcontainer
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not part of the PR here but I wanted to have each package (two container images soon) associated with this repo have intention revealing names.

CRYPTEIA_VERSION: ${{ steps.changelog_reader.outputs.version }}
run: |
echo "${{ secrets.PUBLIC_GITHUB_TOKEN_PACKAGES }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
./layer/deploy-image
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the new PUBLIC_GITHUB_TOKEN_PACKAGES secret (cc @shellerci) for our open source repos. This will push the Amazon Linux 2 container image along with the other release binary and shared object files. Hmm... typing this out, I think I should add -amzn suffix here too and make a debian one.

@@ -0,0 +1,8 @@
FROM alpine
LABEL org.opencontainers.image.source "https://github.com/customink/crypteia"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pretty neat... GitHub should use this label to associate the package with this repo.

@@ -46,3 +46,9 @@ jobs:
prerelease: ${{ steps.changelog_reader.outputs.status == 'prereleased' }}
draft: ${{ steps.changelog_reader.outputs.status == 'unreleased' }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Push Lambda Extension Layer Image
env:
CRYPTEIA_VERSION: ${{ steps.changelog_reader.outputs.version }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OMG, I'm so in love with this Action that parses the CHANGELOG.

@metaskills metaskills merged commit 04d8d07 into main Jul 3, 2022
@metaskills metaskills deleted the ExtensionsWithContainers branch October 9, 2022 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant