Changes between Initial Version and Version 1 of UserGuidelines/DeploymentTools


Ignore:
Timestamp:
08/16/14 16:35:51 (11 years ago)
Author:
gnarula
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UserGuidelines/DeploymentTools

    v1 v1  
     1= User Guidelines - DeploymentTools =
     2[[TOC]]
     3
     4This page documents the usage of DeploymentTools (setup template). Please refer to [http://eden.sahanafoundation.org/wiki/InstallationGuidelines/Amazon#InstallingDeploymentCoapponEC2] to setup the coapp on an EC2 instance.
     5
     6== Workflow ==
     7
     8The coapp allows single and 3 tier deployments (with database, webserver and Eden on separate EC2 instances). The workflow is almost the same for both with subtle differences for the 3 tier deployments.
     9
     10=== Create EC2 Instance(s) ===
     11
     12* Once you've registered for Amazon's Web Services, login to the [https://console.aws.amazon.com/ec2/v2/home EC2 Management Console]. You'll be greeted with the EC2 dashboard as in the picture below
     13
     14[[Image(http://eden.sahanafoundation.org/raw-attachment/wiki/InstallationGuidelines/Amazon/Dashboard.png, 75%)]]
     15
     16* Next, click on Launch Instance. This new instance will act as a master node for future deployments. We'll use Debian as the OS but other distributions may be supported in the future. In the "Select your Amazon Machine Image" pane, select "AWS Marketplace" from the left sidebar. Scroll down, click on "Operating Systems" and select "Debian GNU/Linux"
     17
     18[[Image(http://eden.sahanafoundation.org/raw-attachment/wiki/InstallationGuidelines/Amazon/SelectAMI.png, 75%)]]
     19
     20* In the next step, select the instance depending on your requirements.
     21
     22* Create a new security group with rules as displayed below (for production instance).
     23
     24[[Image(http://eden.sahanafoundation.org/raw-attachment/wiki/InstallationGuidelines/Amazon/SecurityGroup.png, 75%)]]
     25
     26Port 80 - HTTP
     27Port 22 - SSH
     28Port 5432 - PostgreSQL
     29Port 59025 - uWSGI for Production Instance
     30Port 59026 - uWSGI for Demo Instance
     31Port 59027 - uWSGI for Test Instance
     32
     33* Finally, review the configuration and launch the instance. You'll be prompted to select an existing key pair or generate a new one. In case you're a new user or you don't have access to your key, generate a new keypair, save it and proceed.
     34
     35In case you wish to have a 3-tier deployment, create 3 servers in total with security groups allowing permission for HTTP and SSH in all, PostgreSQL in one and uWSGI (deopending on instance type) on the 3rd one.
     36
     37=== Create Deployment using the CoApp ===
     38
     39* Once the coapp is set up, access it by visiting [http://coapp.domain/eden/setup/index]. You'll be presented with a screen like below
     40
     41* Register an account so that you may have permissions to create new deployments
     42
     43* Once that's done, click on "Deploy Eden" and "Add Record" to deploy a new Eden instance
     44
     45* In the "Server Role" section of the form, if you wish to use a single EC2 instance for the deployment, select "all" as the role and enter the Elastic-IP in the "Host IP" field. On the other hand, if you wish to create a 3-tier deployment, select "db", "webserver" and "eden" as the roles in each row and enter the respective Elastic-IPs in the "Host IP" field.
     46
     47* In the "Instance Type" section, select the type of instance ("prod", "demo") you wish to deploy along with the URL and prepop options for the same.
     48
     49* Finally, submit the form. This would queue the task in the scheduler and the status can be viewed in the "read" page of the record (accessible by [http://coapp.domain/eden/setup/deployment/<record_id>/read])
     50
     51=== Add another instance to a deployment ===
     52
     53The coapp makes it easy to add say, a demo instance after setting up the prod instance on a deployment. Here's how:
     54
     55* Begin by opening the deployment record and clicking on the "Instances" tab
     56
     57* Click on "Add Record"
     58
     59* Complete the form and submit. The entry will be added to scheduler and the status can be checked on the read page of the record.
     60
     61=== Perform management tasks ===
     62
     63You may use the coapp to perform operations on instances such as cleaning the database or upgrading Eden. A word of caution though - be extremely careful before initiating these on a production server
     64
     65* Begin by opening the deployment record and clicking on the "Instances" tab
     66
     67* Click on "Clean" or "Upgrade Eden" for the instance you wish to perform the management task on
     68
     69* The task will be queued to the scheduler in the background (TODO: report status)