Permalink
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
View
@@ -36,3 +36,53 @@ cloud.properties file.
* `List all running domains <https://github.com/nimbusproject/Phantom/blob/master/sandbox/asg_list.py>`_.
* `Change the n-preserving value <https://github.com/nimbusproject/Phantom/blob/master/sandbox/asg_alter.py>`_.
+
+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 lc_create.py testlc1@hotel hello-cloud
+ $ python lc_create.py testlc1@sierra hello-cloud
+ $ python lc_list.py
+ testlc1@hotel
+ testlc1@sierra
+
+Note that we had to call lc_create.py 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 asg_create.py testDomain1 testlc1@hotel 3 hotel:1 sierra:2
+ using LaunchConfiguration:testlc1@hotel
+ $ python asg_list.py
+ 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 asg_delete.py testDomain1
+ deleting AutoScaleGroup<testDomain1>
+ $ python lc_delete.py testlc1@hotel
+ $ python lc_delete.py testlc1@sierra
+

0 comments on commit 41fb4e3

Please sign in to comment.