Skip to content

continuousdemo/aws-drupal-infra-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Drupal Ephemeral AWS Infrastructure Deployment

Requirements

You need an AWS account
Install Pyhton 3.7 And AWS CLI
Configure AWS CLI documentation here install make

Deploy Infrastructure

Configure your AWS Accout

To deploy this stack you need to create some component manually.
First, you need a S3 Bucket
On EC2 service, you need to create a key pair to access to your server thought SSH
Configure a public hosted zone Create a role for cloudformation

Environment variables

export Profile= export InfraBucket= export PackageBucket= export BaseDomain= export KeyPair= export RoleArn= export Region=

Deploy you stack

cd infra
make deploy

Deploy Drupal

Define yours drupal parameters

Your code will be deployed using AWS CodeDeploy

Prepare the package running : composer --no-dev
Prepare your durpal configuration

Prepare a tar.gz package.

run deployement :

export version=<My destination package version>
export PACKAGE_PATH=<local package location>

aws --profile $Profile \
  s3 cp $PACKAGE_PATH s3://$PackageBucket/$version.tar.gz

deploymentId=`aws --region $Region --profile $Profile \
  deploy create-deployment \
    --application-name $appName \
    --s3-location bucket=$PackageBucket,key=$version.tar.gz,bundleType=tgz \
    --deployment-group-name app \
    --description "Deployment app related to commit $version" \
  --query 'deploymentId' --output text`

echo "Deployment start with ID $deploymentId"

aws --profile $Profile --region $Region \
  deploy wait deployment-successful \
    --deployment-id $deploymentId

Or Use deploy.sh in continuousphp.com