This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@104corp/cdk-aws-codedeploy-on-premises
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Build Status

cdk-aws-codedeploy-on-premises

CDK Construct for AWS CodeDeploy on premises

Usage

Example

new CodeDeployOnPremises(this, 'CodeDeployOnPremises', {
  projectName: 'Example Project',
  projectStage: 'production',
  deploymentGroups: [
    {
      name: 'Master',
      instances: [
        name: 'instance01',
        name: 'instance02',
      ],
    },
    {
      name: 'Slave',
      instances: [
        name: 'instance01',
        name: 'instance02',
      ],
    }
  ],
});

Construct Props

Name Type Description
projectName string The name of the project.
projectStage string The name of the stage. It's naming dev, staging, and production typically.
deploymentGroups DeploymentGroups[] Specify name for CodeDeploy deployment groups and instances
slackWebhookURL? string slack web hook url
autoRegisterInstance? boolean Using AWSUtility::CloudFormation::CommandRunner to register instance on premises

projectName

  • Determines a part of the instance name. It look like ${projectName}-${projectStage}-${instanceName}.
  • Determines a part of AWS IAM user name for Travis CI. It look like TravisCIUser-${projectName}-${projectStage}
  • Determines a part of CodeDeploy application name. It look like ${projectName}-${projectStage}
  • Determines a part of AWS IAM role name for CommandRunner. It look like ${projectName}-${projectStage}-EC2RunCommandRole

projectStage

I's the same with projectName property.

deploymentGroups

The format is in example code. See Usage section.

slackWebhookURL?

Notify message of status to slack channel. Trigger deployment event is list below

  • DeploymentStart
  • DeploymentSuccess
  • DeploymentFailure

autoRegisterInstance?

Default is true.

AWS CodeDeploy on premises need to register for each instance. It can register by AWS CLI or API.

If use AWS CLI, it look like aws deploy register --instance-name ${instanceName} --iam-user-arn ${user.userArn} --tags Key=Name,Value=${instanceName} --region ${Aws.REGION}.

The Construct execute the command on EC2 which using AWSUtility::CloudFormation::CommandRunner CloudFormation resource type.

See more details

IAM User Generation

  • TravisCIUser-${projectName}-${projectStage}

The construct will generate the IAM user for Travis CI. Using the credential of IAM user to set on .travis.yml file.

See more details on Travis CI setting for AWS CodeDeploy

  • CodeDeployUser-OnPrem-${groupName}-${instanceName}

The construct will generate the IAM user for CodeDeploy agent.

See more details on Step 4: Add a configuration file to the on-premises instance

/@104corp/cdk-aws-codedeploy-on-premises/

    Package Sidebar

    Install

    npm i @104corp/cdk-aws-codedeploy-on-premises

    Weekly Downloads

    6

    Version

    1.0.2

    License

    Apache-2.0

    Unpacked Size

    47.7 kB

    Total Files

    12

    Last publish

    Collaborators

    • 104corp-f2e
    • 9incloud
    • totofish