Date: 2013-10-16
Title: HeBS OpsWorks Launch Script for CMS Enterprise
Published: true
Type: post
Collection of scripts and configurations to set up and configure server(s) and CMS for HeBS application environment
- Amazon Linux
Only Amazon Linux is currently supported; future updates may include Ubuntu LTS.
Server will be configured with nginx and php-fpm, and following extensions will be installed
- php
- php-fpm
- php-devel
- pcre-devel
- httpd-devel
- mysql
- php-mbstring
- php-exif
- php-xml
- php-common
- php-xmlrpc
- php-devel
- php-gd
- php-cli
- php-mysqli
- php-mcrypt
- php-mhash
- php-soap
- php-pecl-memcached
- php-pear
- php-pear-Auth-SASL
- php-pear-XML-Parser
- php-pear-Mail-Mime
- php-pear-DB
- php-pear-HTML-Common
You need to define Repository URL in Custom Chef Recipes, and also repository SSH key.
- Log in to OpsWorks
- Click on Stack, Edit
- Make sure Chef version is newest, 11.4
- Use Custom Chef cookbooks is On
- Repository URL: [email protected]:hebsdigital-ondemand/opsworks-cms.git
- Repository SSH key: See MyMessageSafe for hebs_deploy_privkey.txt
Optionally, when setting up Staging environment, set following custom JSON
{ "opsworks" : { "deploy_user": { "group": "nginx" } }, "server": { "env": "production", "swap": 1 }, "cms": { "mysql": { "username": "<rds_mysql_username>", "password": "<rds_mysql_password>", "database": "<rds_mysql_database_name>" }, "cache": { "prefix": "<cache_prefix>" } } }
Create Layer with short name nginx and type is custom
Configure following recipes:
- Setup: php-fpm, server::swap
- Configure: php-fpm, cms::config
- Deploy: deploy::nginx
- Undeploy: deploy::nginx-undeploy
- Shutdown: php-fpm::stop
If server does not need swap, you can omit server::swap
Custom recipes will be executed right after built-in recipes are installed.
Add new PHP app, set Git repository URL to [email protected]:hebsdigital-ondemand/cms.git and don't forget to provide Private Key from hebs_deploy_privkey.txt (see above)
Branch/Revision should be
- releases/6.0 for Production
Last updated: October 16, 2013 16:50 AM EST