GithubHelp home page GithubHelp logo

aws-marketplace-oe-patterns-cdk-common's Introduction

aws-marketplace-oe-patterns-cdk-common

Common Processes

Release a new version

  1. Create release branch
$ git flow release start 1.0.0
$ vim CHANGELOG.md
$ git add CHANGELOG.md
  1. Build AMI in oe-patterns-prod AWS account:
$ export TEMPLATE_VERSION=x.y.z
$ ave oe-patterns-prod make TEMPLATE_VERSION=$TEMPLATE_VERSION ami-ec2-build
$ export AMI_ID=[ami_id_from_above]
  1. Update CDK with AMI ID, synth, and test:
$ vim cdk/[app]/[app]_stack.py # update as directed by the output of ami-ec2-build
$ make synth-to-file
$ avl oe-patterns-prod-dylan
(take dist/template.yaml and test it manually in console of OE Patterns Prod account)
$ git add cdk
  1. Scan AMI in AWS Marketplace Portal
$ xdg-open https://aws.amazon.com/marketplace/management/manage-products/#/share
(go to Assets -> Amazon Machine Image, then select the latest AMI and click 'Share')
Role: arn:aws:iam::879777583535:role/AWSMarketplaceAMIScanning
(monitor the result of the scan and make fixes, repeat as necessary)
  1. Generate Product Load Form for AWS Marketplace

If this is the first version to be submitted:

$ wget https://s3.amazonaws.com/awsmp-loadforms/ProductDataLoad-Current.xlsx

If the product is already published, go to 'Products -> Server', then select the product, and click the Download product load form button. Copy the downloaded xlsx file to plf.xlsx in the root folder.

Then:

$ ave oe-patterns-prod-dylan make TEMPLATE_VERSION=$TEMPLATE_VERSION AMI_ID=$AMI_ID plf
(this may take a while to complete due to the AWS pricing calculations...)

The above will generate a plf-[version]--[datetime].xlsx, which we will upload in step 7.

  1. Publish template to s3 bucket (in OE Patterns dev account)
$ ave oe-patterns-dev make TEMPLATE_VERSION=$TEMPLATE_VERSION publish
  1. Upload Excel file to AWS Management Portal
$ xdg-open https://aws.amazon.com/marketplace/management/product-load
  1. Wait for AWS to update product / make requested changes on release branch

  2. Finish release branch

$ git ci -m "$TEMPLATE_VERSION updates"
$ git flow release finish $TEMPLATE_VERSION
$ git checkout main
$ git push
$ git push --tags
$ git checkout develop
  1. Generate and copy dev AMI for taskcat tests
$ ave oe-patterns-dev make ami-ec2-build
$ ave oe-patterns-dev make AMI_ID=ami-xxxxxxxxxxxxxxxxx ami-ec2-copy
$ git add .
$ git commit -m "Updated AMI for taskcat testing post $TEMPLATE_VERSION release"
$ git push

Create new product

  1. Create github repo

  2. Clone locally

  3. Create CDK project, and rename base folder to cdk for consistency among patterns.

$ mkdir [projectname]
$ cd [projectname]
$ cdk init app --language python
$ cd ..
$ mv [projectname] cdk
  1. Copy in the Dockerfile, docker-compose.yml, Makefile, .gitignore and packer directories from another pattern

  2. Tweak the cdk/app.py file to match other patterns

  3. Create an empty CHANGELOG.md

Areas we can reuse

  • packer/setup.sh - the beginning and end of that script should be the some for all patterns using the same OS
  • scripts/* - all these scripts could be shared

aws-marketplace-oe-patterns-cdk-common's People

Contributors

aaroncarlucci avatar dylanvaughn avatar hankszeto avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

hankszeto

aws-marketplace-oe-patterns-cdk-common's Issues

Alb <--> Vpc internet gateway undeclared dependency

On a test deployment, when creating new VPC as part of stack, got this error:

Alb	
CREATE_FAILED
VPC vpc-xxxxxxxxxxxxx has no internet gateway
Service: AmazonElasticLoadBalancing; Status Code: 400; Error Code: InvalidSubnet

Update the ALB resource to include a dependency on the VPC internet gateway if the stack is creating the VPC.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.