Changes between Version 85 and Version 86 of InstallationGuidelines/Amazon


Ignore:
Timestamp:
10/21/14 23:40:29 (7 years ago)
Author:
Michael Howden
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • InstallationGuidelines/Amazon

    v85 v86  
    77Users who are using the free tier: Remember - after 750 hours, your trial will end and the credit card on file will be charged based on the rates shown in EC2. You can prevent these charges by closing the AWS account from the [https://portal.aws.amazon.com/gp/aws/manageYourAccount/ AWS account management page].
    88
    9 == Getting Started ==
     9
     10== 1. Create AWS Account ==
     11
    1012If you haven't already, create an Amazon AWS account through [http://aws.amazon.com/free/?sc_channel=PS&sc_campaign=AWS_Free_Tier_2013&sc_category=aws_cloud_computing&sc_publisher=Google&sc_medium=Brand_Core_AWS_E&sc_content=31496064882&sc_detail=Amazon%20-%20aws&sc_matchtype=e&trk=AWS_Free_Tier_2013/ their site].[[BR]]
    1113After creating your account, head to the [https://console.aws.amazon.com/console/home?#/ management console] and set up an instance of EC2. Instructions to do this can be found in the [http://aws.amazon.com/documentation/ec2/ Amazon EC2 Documentation].
    1214
    13 == Regions & Zones ==
     15=== Regions & Zones ===
    1416Amazon supports multiple Regions in order to provide a service closest to your users.
    1517* Namespaces of Instances, Volumnes & Snapshots are unique only within a Region.
     
    1820* Bandwidth transfers are free within an Availability Zone
    1921
    20 == Instance Size ==
    21 * The free starter 'micro' instance is flexible as it can run both 32-bit & 64-bit Operating Systems.
     22== 1. Create Instance ==
     23
     24=== Step 1: Choose an Amazon Machine Image (AMI) ===
     25* Recommend using the AWS Marketplace Debian 64-bit image (as this has a sufficiently large HDD to start with)
     26* In time we may provide pre-built "Sahana Eden" AMIs (some old unmaintained ones may be available in some regions)
    2227* The normal production 'small' instance can only run 32-bit.
    2328* Larger production instances can only run 64-bit, so can't have the exact same image used.
    2429
    25 == Instance Persistence ==
     30=== Step 2: Choose an Instance Type ===
     31* The free starter 'micro' instance is flexible as it can run both 32-bit & 64-bit Operating Systems.
     32
     33=== Step 3: Configure Instance Details ===
     34Default settings are fine
     35
     36=== Step 4: Add Storage ===
     37Instance Persistence:
    2638* EBS-backed instances have persistent storage even whilst powered down, which is very useful.
    2739 * For DB I/O performance increase can stripe multiple EBS
    2840  * monitoring data available to see if this is the issue
    2941
    30 == AMI ==
    31 * Recommend using the AWS !MarketPlace Debian image (as this has a sufficiently large HDD to start with)
    32 * In time we may provide pre-built "Sahana Eden" AMIs (some old unmaintained ones may be available in some regions)
    33 
    34 == Elastic IP ==
    35 Each time you start an instance up, it will be assigned a new IP ('Public DNS') although this can be overcome using an Elastic IP
     42=== Step 5: Tag Instance ===
     43Default settings are fine
     44
     45=== Step 6: Configure Security Group ===
     46You will need to set the following Inbound Rules:
     47* SSH | TCP | 22
     48* HTTP | TCP |80
     49Restricting the source will add further security
     50
     51You can either create a '''new''' security group or Select an '''existing''' security group. With the existing security group, you may have to set the inbound rules via the EC2 dashboard:  NETWORK & SECURITY > Security Groups
     52
     53
     54
     55== 2. Associate Elastic IP ==
     56Each time you start an instance up, it will be assigned a new IP ('Public DNS') although this can be overcome using an Elastic IP:
     57
     581. NETWORK & SECURITY > Elastic IPs
     592. Allocate New Address
     603. Associate Address. Set the instance to your new instance
     61
    3662* Remember to set up Reverse DNS for your Elastic IP to be able to send emails reliably:
    3763 * https://aws-portal.amazon.com/gp/aws/html-forms-controller/contactus/ec2-email-limit-rdns-request
     
    3965  IPv4 addresses are a "scarce resource" so Amazon will charge you for wasting one if you keep it assigned
    4066  to your instance while you are not using it.
    41 == Authentication ==
    42 === SSH ===
     67
     68== 3. Download SSH Keys ==
    4369This can provide an early stumbling block.
    4470* Each instance created needs to start with a unique SSH keypair
     
    6894Thanks to: http://itkbcentral.blogspot.co.uk/2011/07/replace-lost-key-pair-existing-aws-ec2.html
    6995
    70 == Add Swapfile ==
     96== 4. Optimize Instance ==
     97=== Add Swapfile (Optional) ===
    7198You can add swap from a swap file in order to improve performance (especially on a Micro instance):
    7299{{{
     
    84111}}}
    85112
    86 == Add Swap partition ==
     113=== Add Swap partition (Optional) ===
    87114You can add a swap partition in order to improve performance further:
    88115* Create Volume in AWS Console (e.g. 4Gb)
     
    100127
    101128}}}
    102 == Add Storage ==
     129=== Add Storage (Optional) ===
    103130If you need an additional disk for Storage then configure a volume in the AWS console, attach as /dev/sdb1, then in Linux:
    104131{{{
     
    116143mount /data
    117144}}}
    118 == Install ==
     145== 5. Install Sahana ==
    119146* Copy the installation and configuration scripts into the launched instance (assuming [wiki:InstallationGuidelines/Linux/Server/CherokeePostgreSQL Cherokee & PostgreSQL]):
    120147{{{
     
    135162If you wish to update your site from an alternate github repo this can be done using:
    136163* ConfigurationGuidelines#SwitchtoanalternateGitHubrepo
    137 == Configure ==
     164== 6. Configure Sahana ==
    138165Run configure-eden-cherokee-postgis.sh to configure the instance:
    139166{{{
     
    153180[UserGuidelines/Admin/Configuration Admin Guide] - especially read how to set the sender & approver emails
    154181
    155 == Add a Test site ==
     182== 7. Add a Test site (Optional) ==
    156183This script requires at least 4Gb on the main disk
    157184
     
    167194
    168195
    169 == Add a Demo site ==
     196== 8. Add a Demo site (Optional) ==
    170197This script requires at least 6Gb on the main disk.
    171198
     
    183210
    184211
    185 == Grow the Diskspace ==
     212== 9. Grow the Diskspace (Optional) ==
    186213The initial disk space on some images is just 1GB. If you have this, then this should be grown to 4Gb (don't just size the volume to 4Gb to start with as the image only uses 1Gb of it!)
    187214* this is still within the 10Gb free tier.
    188215* 4Gb is needed for Prod & Test instances. If you just need a test then 3Gb is sufficient.
    189216
     217== CLI Tools ==
    190218You can do this using the AWS EC2 Console or else you can do it via the CLI
    191 
    192 === CLI Tools ===
    193219To use any of the AWS CLI tools on your own machine to remotely manage instances, then you need to generate a unique X.509 Certificate per account.
    194220This can be done from the 'Security Credentials' page within your account.
    195221
    196 ==== CLI Management ====
     222=== CLI Management ===
    197223There are extensive CLI tools available to manipulate your instances.
    198224* Java CLI for !Windows/Linux