Changes between Initial Version and Version 1 of UserGuidelines/DeploymentTools

08/16/14 16:35:51 (8 years ago)



  • UserGuidelines/DeploymentTools

    v1 v1  
     1= User Guidelines - DeploymentTools =
     4This page documents the usage of DeploymentTools (setup template). Please refer to [] to setup the coapp on an EC2 instance.
     6== Workflow ==
     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.
     10=== Create EC2 Instance(s) ===
     12* Once you've registered for Amazon's Web Services, login to the [ EC2 Management Console]. You'll be greeted with the EC2 dashboard as in the picture below
     14[[Image(, 75%)]]
     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"
     18[[Image(, 75%)]]
     20* In the next step, select the instance depending on your requirements.
     22* Create a new security group with rules as displayed below (for production instance).
     24[[Image(, 75%)]]
     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
     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.
     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.
     37=== Create Deployment using the CoApp ===
     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
     41* Register an account so that you may have permissions to create new deployments
     43* Once that's done, click on "Deploy Eden" and "Add Record" to deploy a new Eden instance
     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.
     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.
     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])
     51=== Add another instance to a deployment ===
     53The coapp makes it easy to add say, a demo instance after setting up the prod instance on a deployment. Here's how:
     55* Begin by opening the deployment record and clicking on the "Instances" tab
     57* Click on "Add Record"
     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.
     61=== Perform management tasks ===
     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
     65* Begin by opening the deployment record and clicking on the "Instances" tab
     67* Click on "Clean" or "Upgrade Eden" for the instance you wish to perform the management task on
     69* The task will be queued to the scheduler in the background (TODO: report status)