We recommend a virtualenv for using these scripts.
Install the dependencies for the scripts - Fabric and Cuisine.
pip install -r requirements.txtUse the following commands to install and configure a standalone Eden instance.
Install :
fab -H targetmachine setup_eden_standaloneConfigure :
fab -H targetmachine configure_eden_standalone
The following illustrates the procedure to spawn a standalone Sahana Eden instance on EC2.
Create a file called .boto in your home directory with the following contents with the access key and the secret access key as per your account.
[Credentials] aws_access_key_id = REPLACE_ME_WITH_ACCESS_KEY aws_secret_access_key = REPLACE_ME_WITH_SECRET_ACCESS_KEYUpload your public key to be used with the instances created with EC2.
fab aws_import_key:key_name=awskey,public_key=path_to_your_public_key,ZONE='us-east-1b'Create a security group to be used with the instances spawned with EC2.
fab aws_create_security_group:name=default,ZONE='us-east-1b'Create a standalone Sahana Eden instance.
fab aws_eden_standalone
Sahana Eden deployment script
Cleans AWS instances in the specific region.
Parameters: | ZONE – AWS Zone to list the instances from. Default ‘us-east-1b’ |
---|
Wrapper around boto’s create_image
Parameters: |
|
---|
This function creates security groups with access to the ports given from ALL ips.
Parameters: |
|
---|
Deletes the AMI and the EBS snapshot associated with the image_id
Parameters: |
|
---|
Spawns a standalone AWS instance of Eden with Postgres, uwsgi and Cherokee.
Arguments are same as those of fabfile.aws_spawn()
Imports a RSA key into AWS
Parameters: |
|
---|
Lists out AWS instances launched in the specific region
Parameters: | ZONE – AWS Zone to list the instances from. Default ‘us-east-1b’ |
---|
Spawns an AWS instance and installs Postgres with Eden - The uwsgi Eden instance is not started. Eden install on this machine is used only for initilization of DB and migration.
Arguments are same as those of fabfile.aws_spawn()
Spawns an AWS instance with the given specs.
Parameters: |
|
---|
Spawns an AWS instance with TSUNG set up to run load testing.
Arguments are same as those of fabfile.aws_spawn()
Configure an installed Eden - Postgres instance - This is to be run after installing Eden with other helpers provided.
Parameters: | start_eden – Start uWSGI after configuring eden. Default True |
---|
Installs packages necessary for Eden.
Parameters: | path – Path to the directory in which a Web2py directory along with Eden is created. Default: ‘/home’ |
---|
Initializes the Debian env to work with Cuisine.
Installs memcached on the remote machine
Install Postgres on a remote machine
Runs tsung tests with a given xml against the given target - Replaces localhost in the xml with the target and fetches the reports dir.
Parameters: |
|
---|---|
Returns: | A tar.gz of the logs directory. |
Example Usage:
fab -i awskey.pem -u root -H machine_with_tsung run_tsung:xml=tsung-tests/test.xml,target=machine_to_test_against,additional_file=tsung-tests/test.csv
Sets up Postgres, uwsgi and Cherokee
Installs snmpd on a given host for monitoring. NOTE: Allows everyone to connect
Installs Tsung for Load testing