Changes between Version 79 and Version 80 of InstallationGuidelines/Amazon


Ignore:
Timestamp:
05/26/14 11:16:54 (8 years ago)
Author:
gnarula
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • InstallationGuidelines/Amazon

    v79 v80  
    303303To troubleshoot any errors in installation of EC2 visit its [http://aws.amazon.com/documentation/ec2/ documentation]. If you encounter problems installing eden on the EC2 instance, you can contact us via [http://webchat.freenode.net/?channels=sahana-eden&uio=d4/ IRC] or the [https://groups.google.com/forum/#!forum/sahana-eden/ mailing list].
    304304
     305== Setting up an EC2 instance as a master node ==
     306
     307Once 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
     308
     309[[Image(http://eden.sahanafoundation.org/raw-attachment/wiki/InstallationGuidelines/Amazon/Dashboard.png, 75%)]]
     310
     311Next, click on Launch Instance. This new instance will act as a master node for future deployments. We'll use Debian as the OS since the bootstrapping scripts support it. 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"
     312
     313[[Image(http://eden.sahanafoundation.org/raw-attachment/wiki/InstallationGuidelines/Amazon/SelectAMI.png, 75%)]]
     314
     315In the next step, select the instance of your choice. The t1.micro instance is a good choice if you're eligible for Free Tier.
     316
     317Next, in the Configure Instance pane, expand the Advanced Details tab and enter the following script in the User-Data field
     318{{{
     319#!/bin/bash
     320exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1
     321
     322# Update
     323sudo apt-get update
     324
     325# Install git
     326sudo apt-get install git-core
     327
     328# Install ansible dependencies
     329sudo apt-get install python-pip python-dev git -y
     330sudo pip install PyYAML jinja2 paramiko
     331
     332# Install Ansible
     333sudo pip install ansible
     334
     335# Clone bootstrap scripts
     336git clone https://github.com/gnarula/eden_deploy
     337
     338# Run the install
     339cd eden_deploy
     340
     341echo "Running install script"
     342bash install-eden-cherokee-postgis.sh
     343
     344# Run PostgreSQL optimisations for micro instance
     345pg512
     346
     347echo "Running configuration script"
     348bash configure-eden-cherokee-postgis.sh -h <hostname> -d <domain> -t <template>
     349
     350# Run uWSGI
     351sudo /etc/init.d/uwsgi-prod start
     352}}}
     353
     354The configure-eden-cherokee-postgis.sh script takes in three optional parameters. Please replace the placeholders with the appropriate values or remove them from the command in case you'd like to proceed with the default values (domain name being your Instance public dns and opting for the "default" template).
     355
     356Note: You may want to change `pg512` to pg1024 if you're running a configuration than what a micro instance has to offer.
     357
     358Moving on to Step 6, create a new security group with a rule for SSH and HTTP as shown in the screenshot below.
     359
     360[[Image(http://eden.sahanafoundation.org/raw-attachment/wiki/InstallationGuidelines/Amazon/SecurityGroup.png, 75%)]]
     361
     362Finally, 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.
     363
     364That's it! Your new instance will have Eden Installed and set up for it to be used as a master node in future deployments. Do note that the deployment takes some time even after the Web UI states the instance as "Running". Logs for the process may be found by sshing into the newly created instance with your key and viewing /var/log/user-data.log
     365
     366It's important to note that the log file contains a randomly generated password to your PostgreSQL database. We advice you to memorize it and remove it from the logs thereafter.
     367
    305368== Next ==
    306369[wiki:UserGuidelines/Admin Administration Guide]