I'm trying to deploy this example to Amazon AWS:
https://github.com/cloudify-cosmo/cloudify-nodecellar-example
When executing the actual install, it gets stuck trying to connect to the Internal IP:
2016-01-22 15:25:40 CFY <local> [nodejs_host_b9988.create] Task rescheduled 'cloudify_agent.installer.operations.create' -> Timed out trying to connect to 172.31.50.250 (tried 1 time) [attempt 3/21]
The problem is that I'm trying to deploy from my local machine, which obviously has no access to the internal IP of AWS.
Where in the example code is the IP set that Cloudify uses to connect to the different Compute Nodes?
I found out through this StackOverflow (How to get ip public AWS in Cloudify) post that I could use $(ctx instance public_ip_address)
to get the public IP.
What's best practice here? Or is it recommended to deploy directly from within AWS?
If you are running Cloudify from a manager, then you will need to run the manager on a machine that is connected to the same subnet as the agent nodes. (Meaning you'll need a manager running in AWS EC2.)
The code that sets the public_ip_address attribute is located in the start operation of the cloudify.aws.nodes.Instance node type in the Cloudify AWS Plugin, not in the example itself. The example just imports the plugin.
If you are running Cloudify in local mode, i.e. you are executing by running
cfy local init ... cfy local execute ...
, then the blueprints in that repo are not suitable for testing, with the exception of thelocal-blueprint.yaml
. (Thelocal-blueprint.yaml
only runs on the machine that the installation was initiated from. Theaws-ec2-blueprint.yaml
requires a manager. Testing AWS in local mode requires a different blueprint repository - note this is a contributed example.)