docs: Use a better bootstrap example. Previous one wasn't really clear what was going on and it looked more like a single command was executed on the server instead of a whole script being run.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/11d120ec Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/11d120ec Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/11d120ec Branch: refs/heads/trunk Commit: 11d120eccc02ab306775d48182f54a8781f421c6 Parents: 354b3a4 Author: Tomaz Muraus <[email protected]> Authored: Wed Sep 11 13:20:12 2013 +0200 Committer: Tomaz Muraus <[email protected]> Committed: Wed Sep 11 13:20:29 2013 +0200 ---------------------------------------------------------------------- docs/compute/deployment.rst | 1 - docs/examples/compute/bootstrapping_puppet_on_node.py | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/11d120ec/docs/compute/deployment.rst ---------------------------------------------------------------------- diff --git a/docs/compute/deployment.rst b/docs/compute/deployment.rst index 2f0a721..693d5bb 100644 --- a/docs/compute/deployment.rst +++ b/docs/compute/deployment.rst @@ -88,7 +88,6 @@ shell script. .. literalinclude:: /examples/compute/bootstrapping_puppet_on_node.py :language: python - .. _`Chef`: http://www.opscode.com/chef/ .. _`Puppet`: http://puppetlabs.com/ .. _`Salt`: http://docs.saltstack.com/topics/ http://git-wip-us.apache.org/repos/asf/libcloud/blob/11d120ec/docs/examples/compute/bootstrapping_puppet_on_node.py ---------------------------------------------------------------------- diff --git a/docs/examples/compute/bootstrapping_puppet_on_node.py b/docs/examples/compute/bootstrapping_puppet_on_node.py index 3acaa10..6cf780c 100644 --- a/docs/examples/compute/bootstrapping_puppet_on_node.py +++ b/docs/examples/compute/bootstrapping_puppet_on_node.py @@ -10,6 +10,11 @@ from libcloud.compute.deployment import ScriptDeployment, SSHKeyDeployment # Path to the public key you would like to install KEY_PATH = os.path.expanduser('~/.ssh/id_rsa.pub') +# Shell script to run on the remote server +SCRIPT = '''#!/usr/bin/env bash +apt-get -y update && apt-get -y install puppet +''' + RACKSPACE_USER = 'your username' RACKSPACE_KEY = 'your key' @@ -24,7 +29,7 @@ with open(KEY_PATH) as fp: step_1 = SSHKeyDeployment(content) # A simple script to install puppet post boot, can be much more complicated. -step_2 = ScriptDeployment('apt-get -y install puppet') +step_2 = ScriptDeployment(SCRIPT) msd = MultiStepDeployment([step_1, step_2])
