3. Deploy with AWS CodeDeploy

Create an Endpoint for AWS CodeDeploy

To use AWS CodeDeploy for deployments, create a suitable endpoint.

Follow these steps:

  • Go to Administration, Endpoints, and click Add Endpoint.
  • Type a Name for the endpoint.
    Example: CodeDeploy EP
  • In Select Plugin select AWS CodeDeploy Endpoint.
  • Enter the Region in which your AWS CodeDeploy is configured.
  • Enter your Access Key ID and Secret Access Key.

Info: Use a key with limited permissions. You can find the Access key under the IAM area in AWS.

  • The next fields refer to the GitHub repository from which you want to take the artifacts to deploy.
    If the repository is public don’t enter the username and password.
    Enter the repository owner.
    Example: in the following, cddirector is the owner https://github.com/cddirector/gettingStarted
  • Enter the repository.
    Example: in the following, gettingStarted is the repository https://github.com/cddirector/gettingStarted

Configure the AWS CodeDeploy Deployment Task

  • Open Sample Release for editing.
  • In the Acceptance phase, click Deploy Sample Application 1 or select the task toolbar icon at the bottom right of the Deploy Sample Application 1 task, and click Edit Task. The Edit Task form opens.
  • In the Type drop-down, select AWS CodeDeploy, and Deploy type.
  • In the Endpoint field, select the endpoint that you created in the previous section.
  • In the Application field, type @. You get a list of all your applications in AWS CodeDeploy. Select Sample Application
  • In the Deployment Group field, type @ and select the Acceptance deployment group that you have previously defined.
  • In the Commit ID field, specify the commit ID you want to deploy.

Info: To get notified by GitHub on every push to the master branch, and to start running this phase automatically, do not specify a specific commit. Instead, type % and select the built-in token ‘last_successful_commit’.

Info: In the Edit Task form, the list of task-related applications appears in the Content area. If an application in the list is not selected, CA Continuous Delivery Director will not promote that application at run-time.