25 | | * 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 |
26 | | * Remember to set up Reverse DNS for your Elastic IP to be able to send emails reliably: |
27 | | * https://aws-portal.amazon.com/gp/aws/html-forms-controller/contactus/ec2-email-limit-rdns-request |
| 24 | |
| 25 | == AMI == |
| 26 | * The community EBS Debian Squeeze-base i386 AMI can be turned into an Eden instance via the scripts found in [wiki:InstallationGuidelines/Linux/Server/CherokeePostgreSQL Cherokee & PostgreSQL]. |
| 27 | * Alternately, pre-built "Sahana Eden" AMIs are available in some regions (us-west). These just need to be configured via: |
| 28 | {{{ |
| 29 | ./configure-eden-cherokee-postgis.sh |
| 30 | |
| 31 | }}} |
| 32 | |
| 33 | == Elastic IP == |
| 34 | 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 |
| 35 | * Remember to set up Reverse DNS for your Elastic IP to be able to send emails reliably: |
| 36 | * https://aws-portal.amazon.com/gp/aws/html-forms-controller/contactus/ec2-email-limit-rdns-request |
| 37 | |
42 | | == Using Sahana Eden prebuilt AMIs == |
43 | | You will find a prebuilt instance of Sahana Eden in some zones [Currently: us-west], that can help you in quickly setting up an instance. |
44 | | |
45 | | These are built using [wiki:InstallationGuidelines/Linux/Server/CherokeePostgreSQL Cherokee & PostgreSQL]. |
46 | | |
47 | | * Search for "Sahana Eden" in the AMI's section. |
48 | | * Launch the instance. |
49 | | * SSH into the instance by following the steps mentioned in the section above. |
50 | | * run configure-eden-cherokee-postgis.sh to configure the instance. |
51 | | {{{ |
52 | | |
53 | | ./configure-eden-cherokee-postgis.sh |
54 | | |
55 | | }}} |
56 | | |
57 | | * The disk space on the pre-built AMIs is 1GB - Instructions to grow the disk are given below. |
58 | | * You can add swap from a swap file : |
59 | | {{{ |
60 | | |
61 | | dd if=/dev/zero of=/swapfile1 bs=1024 count=524288 |
62 | | |
63 | | mkswap /swapfile1 |
64 | | chown root:root /swapfile1 |
65 | | chmod 0600 /swapfile1 |
66 | | swapon /swapfile1 |
67 | | }}} |
68 | | |
69 | | Make this persistent across reboots by adding the following to your /etc/fstab |
70 | | {{{ |
71 | | /swapfile1 swap swap defaults 0 0 |
72 | | }}} |
73 | | == Building AMIs for easier deployment == |
74 | | If your region doesn't yet have a Sahana AMI in, then it is easy to create one which allows easier deployment of future instances for both you & others. The only cost to you is a small amount of time to publish it & then using up your 1Gb Snapshot allowance within the free tier. |
75 | | |
76 | | * Choose a debian AMI in your desired ZONE with 1 GB of EBS storage [This enables AMI registration in AWS free tier.] |
77 | | * Launch the instance. |
78 | | * Copy the installation and configuration scripts -> [http://eden.sahanafoundation.org/raw-attachment/wiki/InstallationGuidelines/Linux/Server/CherokeePostgreSQL/install-eden-cherokee-postgis.sh install-eden-cherokee-postgis.sh] and [http://eden.sahanafoundation.org/raw-attachment/wiki/InstallationGuidelines/Linux/Server/CherokeePostgreSQL/configure-eden-cherokee-postgis.sh configure-eden-cherokee-postgis.sh] into the launched instance. |
79 | | {{{ |
80 | | wget http://eden.sahanafoundation.org/raw-attachment/wiki/InstallationGuidelines/Linux/Server/CherokeePostgreSQL/install-eden-cherokee-postgis.sh |
81 | | chmod a+x install-eden-cherokee-postgis.sh |
82 | | wget http://eden.sahanafoundation.org/raw-attachment/wiki/InstallationGuidelines/Linux/Server/CherokeePostgreSQL/configure-eden-cherokee-postgis.sh |
83 | | chmod a+x configure-eden-cherokee-postgis.sh |
84 | | }}} |
85 | | |
86 | | * Run the install-eden-cherokee-postgis.sh script and delete it. [Note: This step takes about 10min - grab a coffee] |
87 | | {{{ |
88 | | ./install-eden-cherokee-postgis.sh |
89 | | rm install-eden-cherokee-postgis.sh |
90 | | }}} |
91 | | |
92 | | * Shutdown the EBS instance. |
93 | | {{{ |
94 | | shutdown -h now |
95 | | }}} |
96 | | |
97 | | * Go to your aws console for the current region at [https://console.aws.amazon.com/ec2/home | EC2 Console] |
98 | | |
99 | | * Select the debian instance you just prepared in the "Instances" |
100 | | |
101 | | * Select " Create Image (EBS AMI) " in the "Instance Actions" drop down. |
102 | | |
103 | | |
104 | | [[Image(http://eden.sahanafoundation.org/raw-attachment/wiki/InstallationGuidelines/Amazon/create-image.png, 75%)]] |
105 | | |
106 | | * Choose a Image name - Lets say - "Sahana Eden" and fill in a description. |
107 | | |
108 | | |
109 | | [[Image(http://eden.sahanafoundation.org/raw-attachment/wiki/InstallationGuidelines/Amazon/create-image-config.png, 75%)]] |
110 | | |
111 | | |
112 | | * Click "Create this Image" |
113 | | |
114 | | * Go to the "AMIS" menu and select "Owned by me" and "All Platforms" in the Viewing dropdown. |
115 | | |
116 | | [[Image(http://eden.sahanafoundation.org/raw-attachment/wiki/InstallationGuidelines/Amazon/ami-built.png, 75%)]] |
117 | | |
118 | | * Wait for about 5 minutes and hit refresh for the AMI you just built to appear. |
119 | | |
120 | | * Select the AMI and click the Permissions button - Select public, to make the image public. |
121 | | |
122 | | |
123 | | [[Image(http://eden.sahanafoundation.org/raw-attachment/wiki/InstallationGuidelines/Amazon/ami-permissions.png, 75%)]] |
124 | | |
125 | | === CLI === |
| 53 | == Grow the Diskspace == |
| 54 | The disk space on the initial image is just 1GB. This should be grown to 3Gb (don't just size the volume to 3Gb to start with as the image only uses 1Gb of it!) |
| 55 | * this is still within the 10Gb free tier. |
| 56 | |
| 57 | You can do this using the AWS EC2 Console or else you can do it via the CLI |
| 58 | |
| 59 | === CLI Tools === |
210 | | }}} |
| 145 | |
| 146 | }}} |
| 147 | |
| 148 | == Add Swapfile == |
| 149 | * You can add swap from a swap file : |
| 150 | {{{ |
| 151 | dd if=/dev/zero of=/swapfile1 bs=1024 count=524288 |
| 152 | mkswap /swapfile1 |
| 153 | chown root:root /swapfile1 |
| 154 | chmod 0600 /swapfile1 |
| 155 | swapon /swapfile1 |
| 156 | |
| 157 | }}} |
| 158 | |
| 159 | Make this persistent across reboots by adding the following to your /etc/fstab |
| 160 | {{{ |
| 161 | /swapfile1 swap swap defaults 0 0 |
| 162 | |
| 163 | }}} |
| 164 | |
| 165 | == Install == |
| 166 | * Copy the installation and configuration scripts -> [http://eden.sahanafoundation.org/raw-attachment/wiki/InstallationGuidelines/Linux/Server/CherokeePostgreSQL/install-eden-cherokee-postgis.sh install-eden-cherokee-postgis.sh] and [http://eden.sahanafoundation.org/raw-attachment/wiki/InstallationGuidelines/Linux/Server/CherokeePostgreSQL/configure-eden-cherokee-postgis.sh configure-eden-cherokee-postgis.sh] into the launched instance. |
| 167 | {{{ |
| 168 | wget http://eden.sahanafoundation.org/raw-attachment/wiki/InstallationGuidelines/Linux/Server/CherokeePostgreSQL/install-eden-cherokee-postgis.sh |
| 169 | chmod a+x install-eden-cherokee-postgis.sh |
| 170 | wget http://eden.sahanafoundation.org/raw-attachment/wiki/InstallationGuidelines/Linux/Server/CherokeePostgreSQL/configure-eden-cherokee-postgis.sh |
| 171 | chmod a+x configure-eden-cherokee-postgis.sh |
| 172 | }}} |
| 173 | |
| 174 | * Run the install-eden-cherokee-postgis.sh script and delete it. [Note: This step takes about 10min - grab a coffee] |
| 175 | {{{ |
| 176 | ./install-eden-cherokee-postgis.sh |
| 177 | rm install-eden-cherokee-postgis.sh |
| 178 | }}} |
| 179 | |
| 180 | == Configure == |
| 181 | Run configure-eden-cherokee-postgis.sh to configure the instance: |
| 182 | {{{ |
| 183 | ./configure-eden-cherokee-postgis.sh |
| 184 | |
| 185 | }}} |
| 186 | |
| 187 | == Building AMIs for easier deployment == |
| 188 | If your region doesn't yet have a Sahana AMI in, then it is easy to create one which allows easier deployment of future instances for both you & others. The only cost to you is a small amount of time to publish it & then using up your 1Gb Snapshot allowance within the free tier. |
| 189 | |
| 190 | * Install the instance as-above |
| 191 | * Don't run the configure script |
| 192 | * Shutdown the EBS instance. |
| 193 | {{{ |
| 194 | shutdown -h now |
| 195 | |
| 196 | }}} |
| 197 | |
| 198 | * Go to your aws console for the current region at [https://console.aws.amazon.com/ec2/home | EC2 Console] |
| 199 | |
| 200 | * Select the debian instance you just prepared in the "Instances" |
| 201 | |
| 202 | * Select " Create Image (EBS AMI) " in the "Instance Actions" drop down. |
| 203 | |
| 204 | [[Image(http://eden.sahanafoundation.org/raw-attachment/wiki/InstallationGuidelines/Amazon/create-image.png, 75%)]] |
| 205 | |
| 206 | * Choose an Image name - Lets say - "Sahana Eden" and fill in a description. |
| 207 | |
| 208 | [[Image(http://eden.sahanafoundation.org/raw-attachment/wiki/InstallationGuidelines/Amazon/create-image-config.png, 75%)]] |
| 209 | |
| 210 | * Click "Create this Image" |
| 211 | |
| 212 | * Go to the "AMIS" menu and select "Owned by me" and "All Platforms" in the Viewing dropdown. |
| 213 | |
| 214 | [[Image(http://eden.sahanafoundation.org/raw-attachment/wiki/InstallationGuidelines/Amazon/ami-built.png, 75%)]] |
| 215 | |
| 216 | * Wait for about 5 minutes and hit refresh for the AMI you just built to appear. |
| 217 | |
| 218 | * Select the AMI and click the Permissions button - Select public, to make the image public. |
| 219 | |
| 220 | [[Image(http://eden.sahanafoundation.org/raw-attachment/wiki/InstallationGuidelines/Amazon/ami-permissions.png, 75%)]] |