Browse files

adding information about how to use the scripts

  • Loading branch information...
1 parent ac4d8be commit 41fb4e3910d58f31a93bc95cfd98cf7c40d7ffd4 @buzztroll buzztroll committed Oct 19, 2012
Showing with 50 additions and 0 deletions.
  1. +50 −0 phantom/scripting.rst
@@ -36,3 +36,53 @@ file.
* `List all running domains <>`_.
* `Change the n-preserving value <>`_.
+Here is a sample session of using the above scripts. In it we will create a
+launch configuration that has 2 sites. We will then launch a domain that
+spans those 2 sites. First we create the launch configuration::
+ $ python testlc1@hotel hello-cloud
+ $ python testlc1@sierra hello-cloud
+ $ python
+ testlc1@hotel
+ testlc1@sierra
+Note that we had to call twice, once for each cloud. We
+used the same name so that the two calls will be associated. In
+the listing they appear as two separate launch configurations, and
+as far as the AWS protocol goes they are treated as two launch configurations.
+However, in Phantom they will be treated as one.
+The next thing we do is create a domain using that launch configuration::
+ $ python testDomain1 testlc1@hotel 3 hotel:1 sierra:2
+ using LaunchConfiguration:testlc1@hotel
+ $ python
+ testDomain1
+ testlc1 : 3
+ Instances:
+ ---------
+ sierra : Healthy
+ hotel : Healthy
+ sierra : Healthy
+The arguments to that program are as follows in order:
+* the new domain name
+* the launch configuration name
+* the size of the domain
+* a list of clouds and the maximum number of domains that will be on them.
+ This takes the following format <cloud name>:<max vms>
+Notice the we used the launch configuration name *testlc1@hotel*. We could
+have also used the name *testlc1@sierra* if we wanted to. It just has to
+match one of the AWS launch configuration names. Phantom will internally
+associate it with all the sites that have the name prefix of "testlc1".
+Now we clean everything up::
+ $ python testDomain1
+ deleting AutoScaleGroup<testDomain1>
+ $ python testlc1@hotel
+ $ python testlc1@sierra

0 comments on commit 41fb4e3

Please sign in to comment.