I have a PHP App Server running Ubuntu 14.04 with a stack that contains an ELB, the server, and a MySQL RDS. All of this is working as expected, but to finalise my deployment I need to install node.js.
On the Chef Supermarket I have found a cookbook for node.js but I'm a little confused as to how to add it in regards to the lifecycle events - and even just in general. For example, the Node.js App Server contains events such as deploy::nodejs-undeploy
and deploy::nodejs-stop
yet this cookbook doesn't - primarily because it is for an installation. Would this be an issue for when an instance shuts down?
With that, how would I go about installing it altogether? Would it just be a case of cloning the repository to my private one and then adding to the setup lifecycle nodejs::default
or are there any additional steps I would need to follow?
My final question is in regards to NPM - I'd need to install socket.io and express. I assume I can do this using the custom JSON feature (on the readme towards the bottom there appears to be this ability). With that does it just become a case of:
"nodejs": {
"npm_packages": [
{
"name": "express"
},
{
"name":"socket.io"
}
}
Or would it be done through some other mechanism?
Thank you very much in advance, and sorry for the mass questions - I feel I am totally out of my depth, but at least I'm learning an incredible amount!