Download the PHP package techpivot/aws-code-deploy without Composer

On this page you can find all versions of the php package techpivot/aws-code-deploy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package aws-code-deploy

AWS Code Deploy Executer

Latest Version Total Downloads npm Software License

This script deploys applications with the AWS Code Deploy service. The script uses the AWS CLI for underlying commands and extends functionality to provide common requirements for applications being deployed including compression, encryption, bucket revision limiting, monitoring, and more. It also handles creation of defined AWS Code Deploy components as necessary (e.g. Deployment Groups). By utilizing environment variables, this script is easily portable and intended to run inside CI containers. For more information, refer to the AWS Code Deploy documentation or the AWS CLI API.

Features:

Sample Output

Usage

Composer (PHP Projects)

  1. Include the techpivot/aws-code-deploy project from Packagist as a development dependency:

    composer.json

    or via command line:

  2. The file can then be executed directly: ./vendor/bin/aws-code-deploy.sh

NPM (General Projects)

Include the aws-code-deploy from NPM as a local or global dependency.

Global

  1. npm install aws-code-deploy -g
  2. The file can then be executed globally: aws-code-deploy

Local

  1. npm install aws-code-deploy --save-dev
  2. The file can then be executed directly: ./node_modules/aws-code-deploy/bin/aws-code-deploy.sh

Environment Variables

Environment variables are used to control the deployment actions. A brief summary is listed in the table below. Full descriptions with recommendations can be found by searching the readme for the variable name.

Variable Required Description
AWS_CODE_DEPLOY_KEY No If specified, sets the AWS key id
AWS_CODE_DEPLOY_SECRET No If specified, sets the AWS secret key
AWS_CODE_DEPLOY_REGION No If specified, sets the AWS region
AWS_CODE_DEPLOY_APPLICATION_NAME Yes Application name. If it does not exist, will create.
AWS_CODE_DEPLOY_DEPLOYMENT_GROUP_NAME Yes Deployment group name. If it does not exist, will create.
AWS_CODE_DEPLOY_DEPLOYMENT_CONFIG_NAME No Deployment config name. By default: CodeDeployDefault.OneAtATime
AWS_CODE_DEPLOY_MINIMUM_HEALTHY_HOSTS No The minimum number of healthy instances during deployment. By default: _type=FLEETPERCENT,value=75
AWS_CODE_DEPLOY_SERVICE_ROLE_ARN No Service role arn giving permissions to use Code Deploy when creating a deployment group
AWS_CODE_DEPLOY_EC2_TAG_FILTERS No EC2 tags to filter on when creating a deployment group
AWS_CODE_DEPLOY_AUTO_SCALING_GROUPS No Auto Scaling groups when creating a deployment group
AWS_CODE_DEPLOY_APP_SOURCE Yes The source directory used to create the deploy archive or a pre-bundled tar, tgz, or zip
AWS_CODE_DEPLOY_APP_BUNDLE_TYPE No Deploy bundle type when created from source directory (tgz or zip). Default: zip)
AWS_CODE_DEPLOY_S3_BUCKET Yes The name of the S3 bucket to deploy the revision
AWS_CODE_DEPLOY_S3_KEY_PREFIX No A prefix to use for the revision bucket key
AWS_CODE_DEPLOY_S3_FILENAME Yes The destination name within S3.
AWS_CODE_DEPLOY_S3_LIMIT_BUCKET_FILES No Number of revisions to limit. If 0, unlimited. Default = 0
AWS_CODE_DEPLOY_S3_SSE No If specified and true will ensure the CodeDeploy archive is stored in S3 with Server Side Encryption (SSE)
AWS_CODE_DEPLOY_REVISION_DESCRIPTION No A description that is stored within AWS Code Deploy that stores information about the specific revision
AWS_CODE_DEPLOY_DEPLOYMENT_DESCRIPTION No A description that is stored within AWS Code Deploy that stores information about the specific deployment
AWS_CODE_DEPLOY_OUTPUT_STATUS_LIVE No Boolean true\|false that specifies whether the deployment status should use a single line showing live status. In CI environments where the \r is not supported, set this to false for better logging. Default = true
AWS_CODE_DEPLOY_IGNORE_APPLICATION_STOP_FAILURES No Boolean true\|false that specifies whether ApplicatonStop failures should be ignored. Set this to true to ignore ApplicatonStop failures. Default = false

Examples

CircleCI

circle.yml

IAM Requirements

In order for the script to execute successfully, the specified AWS credentials must be granted the required IAM privileges for the corresponding actions. Since various steps of this script are optional it allows for flexibility in creating policies that apply the principle of least privilege. Two common examples are described below. In general, the script needs access to the following (depending on parameters):

  1. Code Deploy - Verifying Application, Creating Application, Creating Revisions
  2. Code Deploy Deployment - Creating Deployment, Creating Deployment Group, Listing Instances
  3. S3 - Uploading bundle to S3, Deleting Old Revisions

Wildcard Access

This may be best for first time users with

Explicit Access with Full Functionality

Detailed Workflow & Variable Information

Step 1: Checking Dependencies

The following executables are installed:

Step 2: Configuring AWS

This step ensures that configuration parameters for AWS CLI are properly set.

Environment Variables:

Step 3: Checking Application

This step ensures the application exists within Code Deploy. If it does not exist, it will attempt to create the application with the specified name.

Environment Variables:

Step 4: Deployment Config (optional)

This step ensures the specified deployment configuration exists for the application. Defining a custom configuration is optional because you can use the deployment strategy already defined in Code Deploy.

Environment Variables:

Step 5: Deployment Group

This step ensures the deployment group exists within the specified application. If it does not exist, the script will attempt to create the group using the name and defined service role ARN.

Environment Variables:

Required IAM Access:

Step 6: Compressing Source

This step compresses the specified source directory as a zip file in preparation for uploading to S3. This is useful for application deployments that use unique file names per revision. This helps limit the transfer to and from S3 during deployment.

Environment Variables:

Step 7: Pushing to S3

This step consists to push the application to S3.

Environment Variables:

Step 8: Limiting Deploy Revisions per Bucket/Key

This step ensures that applications with high revision/commit volume with unique filenames can remove old revisions to help limit the size of the container. Large teams can quickly fill S3 with multiple TBs/day depending on the projects. Since deployments typically don't need to store that many versions backwards, this step will ensure that only N revisions exist, removing oldest revisions upon deploy.

Note: If a limit is specified, the IAM permissions described below will need to be granted for the specific s3://bucket/(key).

Environment Variables:

Required IAM Access:

Step 9: Registering Revision

This step registers a code deploy revision for the uploaded file to the specified application/deployment group.

Environment Variables:

Step 10: Creating Deployment

This step deploys the application revision using the defined deployment settings across all hosts that match the deployment group.

Environment Variables:

Monitor Deployment

This step monitors the deployment and logs information about the overall status as well as any failed instance statuses.

Environment Variables:


All versions of aws-code-deploy with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package techpivot/aws-code-deploy contains the following files

Loading the files please wait ....