An AWS OpsWorks Chef cookbook for Clutch: An Open-ended Developer SDK for Prismic.io.
This Chef cookbook will configure an EC2 instance to run nginx
and node
for a clutch project. Presently installing node@v10.16.3
and npm@latest
.
This section will walk through setting up the Clutch Stack
on AWS OpsWorks.
- Navigate to Services > Compute > EC2 > Network & Security > Security Groups.
- Make a new security group called
clutch
. - Add default Inbound rules for
HTTP
,HTTPS
andSSH
.
- Navigate to Services > Compute > EC2 > Network & Security > Key Pairs.
- Make a new key pair called
clutch
and download the PEM file. - Move the
clutch.pem
file to your~/.ssh
directory. - Run
chmod 400 ~/.ssh/clutch.pem
. PEM file is needed only for initial dev SSH access. - Note that we'll be configuring SSH users on our EC2 instances later and the PEM file will no longer be needed for dev SSH access.
- Navigate to Services > Management & Governance > OpsWorks.
- Start fresh and add your first Stack.
- Choose the Chef 12 Stack and name it Clutch.
- Choose your default VPC.
- Use Amazon Linux 2018.03.
- Choose your SSH key pair
clutch
. - Turn on custom Chef cookbooks.
- Leave repository type as Git.
- Use this repository URL -
https://github.com/kitajchuk/clutch-chef.git
. - Pick a color for your Stack.
- Click Advanced settings and turn off "Use OpsWorks security groups" since this Stack will use the
clutch
security group. - Click the Add Stack button.
- Add a new Layer called Clutch Server with short name clutch-server.
- Select to use the
clutch
security group. - Click add then under the recipes tab add the
clutch::setup
command to the Setup lifecycle. - Click Save.
- Add an App called Clutch Chef.
- Leave repository type as Git.
- Use this repository URL -
https://github.com/kitajchuk/clutch-chef.git
. - Click the Add App button.
Do the following for development
and production
instances:
- Add an instance to the
clutch
stack. - Label the hostname
{app}-{env}
— example:clutch-dev
. - Pick a tier size.
- Your Stack settings should be set under Advanced.
- Set a volume size.
- Click the Add Instance button.
- Create a new Elastic IP.
- Register the EIP with the instance.
That's it. Checkout the clutch project for complete info on developing with the SDK.