zmoog / public-notes

Apache License 2.0
0 stars 1 forks source link

Figure out how to publish ESF to SAR #15

Closed zmoog closed 1 year ago

zmoog commented 1 year ago

ESF can be published as a private application in the Serverless Application Repository (SAR).

I want to install it as a private repo to test my changes to the application, template, and macro.

zmoog commented 1 year ago

Here's the command line format:

$ .internal/aws/scripts/dist.sh \
    sar-app-name \
    version-in-sar
    s3-bucket-for-sar \
    account-id \
    sar-region \
    "author name"

So this is the actual command line to publish ESF as an application in the SAR:

$ .internal/aws/scripts/dist.sh \
    elastic-serverless-forwarder-maurizio \
    1.8.0-rc1 \
    zmoog-elastic-serverless-forwarder-artifacts \
    123 \
    eu-west-1 \
    "Maurizio Branca"
    AWS CLI (https://aws.amazon.com/cli/) and Python3.9 with pip3 required
    Please, execute from root folder of the repo
{
    "LocationConstraint": "eu-west-1"
}
/tmp/dist.vyQcYbqWFf/sources
requirements.txt -> /tmp/dist.vyQcYbqWFf/sources/requirements.txt
main_aws.py -> /tmp/dist.vyQcYbqWFf/sources/main_aws.py
mkdir -v -p /tmp/dist.vyQcYbqWFf/sources/handlers
/tmp/dist.vyQcYbqWFf/sources/handlers
mkdir -v -p /tmp/dist.vyQcYbqWFf/sources/handlers/aws
/tmp/dist.vyQcYbqWFf/sources/handlers/aws
mkdir -v -p /tmp/dist.vyQcYbqWFf/sources/share

 ....

Publish Succeeded
Created new application with the following metadata:
{
  "Name": "elastic-serverless-forwarder-maurizio",
  "Description": "Send observability data from your AWS environment to Elastic.",
  "Author": "Maurizio Branca",
  "Labels": [
    "s3",
    "logs",
    "analytics",
    "observability",
    "monitoring",
    "Elastic"
  ],
  "SemanticVersion": "1.8.0-rc1",
  "LicenseUrl": "s3://zmoog-.. ",
  "ReadmeUrl": "s3://zmoog-..",
  "HomePageUrl": "https://github.com/elastic/elastic-serverless-forwarder",
  "SourceCodeUrl": "https://github.com/elastic/elastic-serverless-forwarder"
}
Click the link below to view your application in AWS console:
https://console.aws.amazon.com/serverlessrepo/home?region=eu-west-1#/published-applications/arn:aws:serverlessrepo:eu-west-1:123applications~elastic-serverless-forwarder-maurizio

Note: the dist.sh uses the code checked out in the current directory, and not the version in the Git repository.

zmoog commented 1 year ago

Ready to rumble:

Image