How to launch the 6zap pre-configured Amazon EC2 AMI

Introduction

There are two ways to launch the 6zap AMI.

  • Use the Elasticfox Firefox Extension for Amazon EC2. This is a GUI that makes it easy to figure out which options to use, and how to configure various things.
  • More advanced users might prefer to use command line commands such as "ec2-run-instance".

In both examples we'll show how to initially launch the AMI and configure it. Subsequent launches of the AMI are going to be slightly different. You are not going to need to fill out configuration information after the AMI is up. You will instead be able to use a file downloaded during the initial run.

 NOTE: When AMI is initialized it downloads the latest sources from http://6zap.com.

Using Firefox Elasticfox extension

The Elasticfox Firefox Extension for Amazon EC2 is available at http://developer.amazonwebservices.com/connect/entry.jspa?externalID=609
It provides a GUI to operations on EC2.

In our examples we'll use "example.com" as name your 6zap mail domain  (our domain, for instance, is "6zap.com"). 

Install Elasticfox

Initial run

  • allocate a static IP address
    • Choose the Elastic IPs tab
    • Click on the '+' button to allocate a new IP
  • Run the 6zap instance
    • Switch to the AMIs and Instances
    • Type 6zap in the search box
    • Right click on the 6zap instance
    • Choose launch instance of this AMI
    • Click on Launch Instance
    • Refresh the "Your Instances" list by clicking on the "Refresh" button and wait till the AMI changes from "pending" to "running"
    • Right click on the AMI and choose "Copy Instance ID to clipboard"
  • assign allocated static IP to instance
    • Choose the "Elastic IPs" tab
    • Right click on the IP that you previously allocated
    • Choose "Associate this address"
    • Paste the instance ID using CTRL-V or SHIFT-INS.
  • setup DNS for your domain:
  1. setup domain record to allocated public IP 
  2. setup MX record for domain above
  • Do one of the following
    • load http://example.com in browser you should see 6zap AMI wizard. 
      • Use Amazon's DNS. 
        • Right click on the instance.  
        • Choose "Copy public DNS to clipboard"
        • Paste the DNS into your browser. You should see the following form:
null
  • Enter the following data:
  1. ADMIN - administrator mail. Backup reports, logs, etc, will be email to this address.
  2. DOMAIN - chosen mail domain that will powered with 6zap.
  3. Information about your s3 account for automated backup
    • PASSPHRASE - passphrase for the encrypted backup to S3 storage (uses duplicity). This is your password for the backups on s3. It will be used for encryption and decryption of the saved data to S3. You can use your AWS secret key for this or choose something different.
    • AWS_KEY/AWS_SECRET key/secret for Amzon S3 storage account.
  4. BUCKET_PREFIX - all backup will be created withthis prefix to avoid bucket names overlaps - choose some unique prefix. Something like yourdomain_6zap will probably be unique, in our example, example_com_6zap.
  • Click proceed:
  1. The file 6zap_public_ami.gpg is generated and you can save it.  Save it on desktop. It will be used for subsequent run of AMI.
  2. instance will now setup your new domain and email you a report
  • The new 6zap powered domain is now available by URL: http://example.com
  • Admin user data: login: "admin" , password: "demo"
  • Click on profile and change the password
  • Login to the admin interface. Go to http://example.com/cake
  • Use username admin and the new password you chose above.

Congratulations! You have now deployed your 6zap AMI. Tell your users to go to http://example.com and sign up for accounts.

Subsequent runs (custom AMI)

  • Run the 6zap instance
    • Switch to the AMIs and Instances
    • Type 6zap in the search box
    • Right click on the 6zap instance
    • Choose launch instance of this AMI
    • Click on Launch Instance
    • Click on "Open File" under "User Data"
    • Choose the file file 6zap_public_ami.gpg that you saved to your desktop.
    • Refresh the "Your Instances" list by clicking on the "Refresh" button and wait till the AMI changes from "pending" to "running
    • Right click on the AMI and choose "Copy Instance ID to clipboard"
  • assign allocated static IP to instance
    • Choose the "Elastic IPs" tab
    • Right click on the IP that you previously allocated
    • Choose "Associate this address"
    • Paste the instance ID using CTRL-V or SHIFT-INS.

Using the command line interface

Initial run

In our examples we'll use example.com as name your 6zap mail domain  (our domain, for instance, is "6zap.com"). 

  • allocate static IP address for use with example.com  (ec2-allocate-address)
  • run instance of 6zap public AMI: ami-XXXXXXXX (ec2-run-instance)
  • assign allocated static IP to instance (ec2-associate-address)
  • setup DNS for your domain:
  1. setup domain record to allocated public IP 
  2. setup MX record for domain above
  1. ADMIN - administrator mail , here emailed backup reports, logs, etc
  2. DOMAIN - chosen mail domain that will powered with 6zap
  3. PASSPHRASE - passphrase for backup to S3 storage (duplicity)
  4. AWS_KEY/AWS_SECRET key/secret for Amzon S3 storage account
  5. BUCKET_PREFIX - all backup will be created withthis prefix to avoid bucket names overlaps - choose some unique prefix !
  • push proceed:
  1. you get 6zap_public_ami.gpg file - save it on desktop (it's user data for subsequent runs of AMI)
  2. instance setup new domain and send to you report
  • new 6zap powered domain available by URL: http://example.com
  • Admin user data: login: "admin" , password: "demo"

Subsequent runs (custom AMI)

  • run instance of 6zap public AMI: ami-XXXXXXXX with user data file from initial run: (ec2-run-instance ami-XXXXXXXX -k your_key -f  6zap_public_ami.gpg)
  • assign allocated static IP to instance (ec2-disassociate-address, ec2-associate-address)
  • instance run, parse your user data, restore configuration , data and send to ADMIN email report
  • 6zap powered domain available by URL: http://example.com