SahanaCamp NYC Day 2 PM: Deploying Sahana Eden

Preview:

DESCRIPTION

SahanaCamp NYC Day 2 PM session: Deploying Sahana Eden

Citation preview

11SahanaSahanaCampCamp LALA

Deploying Sahana EdenFran Boon

fran@sahanafoundation.org

SahanaSahanaCampCamp NYCNYC

Agenda

Deployment Options

Hardware Requirements

Skills required For Installation/Configuration

For Customization

33SahanaSahanaCampCamp NYCNYC

Deployment Options

Host locally in the command center

on a Laptop

Host in the Cloud

Synchronize these 2 together...

SahanaSahanaCampCamp NYCNYC

Hardware RequirementsStandalone PC Windows or Mac

Server Virtual Server 512 Mb RAM, 4 Gb HDD:

Cloud Amazon EC2 (free tier available for 1 year)

SahanaSahanaCampCamp NYCNYC

Architecture

Operating System

Database

Programming Language

Web Framework

Sahana Eden

Web Server e.g. Apache

Application

Web2Py

Python

MySQL or PostgreSQL

Windows, Linux or Mac

SahanaSahanaCampCamp NYCNYC

Installation processWizard on Wiki to select correct instructions:http //eden.sahanafoundation.org/wiki/InstallationGuidelines:

End-User Installer for Windows: Local hard disk

Flash drive

SahanaSahanaCampCamp NYCNYC

Production ServerPhysical/Dedicated Server or Virtual Server

Base OS Debian Linux best-supported

Database MySQL

PostgreSQL

Pre-image Installation script

Post-Image Configuration script

SahanaSahanaCampCamp NYCNYC

Amazon EC2Sign-up with credit card

Select Data Center closest to you e.g. US East (Virginia)

EBS for free tier

Community AMIs Debian Squeeze:SSH key (private/public)

Grow Volume if 3Gb (hardest part)<Normal Server Scripts

SahanaSahanaCampCamp NYCNYC

Amazon EC2

SahanaSahanaCampCamp NYCNYC

Configurationeden/models/000 config.py_deployment settings_ Databasedatabase.db type mysql_ = " "database.host 10.14.6.3= " " Enable/Disable/Rename Modules("org", Storage( name_nice = T("Organizations"), Brandingsystem_name = T("Sahana Eden Emergency Portal")

SahanaSahanaCampCamp NYCNYC

ConfigurationSecurity Policy

1 Simple (default) Global as Reader, Authenticated as Editor: : 2 Editor role required for Update/Delete, unless record owned :

by session 3 Apply Controller ACLs: 4 Apply both Controller & Function ACLs: 5 Apply Controller, Function & Table ACLs: 6 Apply Controller, Function, Table ACLs and Entity Realm: 7 Apply Controller, Function, Table ACLs and Entity Realm : +

Hierarchy 8 Apply Controller, Function, Table ACLs, Entity Realm : +

Hierarchy and Delegations

SahanaSahanaCampCamp NYCNYC

Configuration Authentication optionsself_registration = Trueregistration_requires_verification = Trueregistration_requires_approval = True

Facebook, Google, LDAPgoogle_id = "645861.apps.googleusercontent.com"google_secret = "1EZYxpRV4iMAVvv_pA"

Workflowsreq.use_commit = Falsereq.generate_req_number = False

SahanaSahanaCampCamp NYCNYC

Configuration Localization optionsdeployment_settings.L10n.languages = OrderedDict([

("ar", "العربية"), ("zh-cn", "中文 (简体 )"), ("zh-tw", "中文 (繁體 )"),

L10n.date_format = T("%m-%d-%Y")L10n.decimal_separator = "."L10n.thousands_separator = ","

SahanaSahanaCampCamp NYCNYC

Prepopulateprivate/prepopulate tasks.cfg

CSVs Lookup Lists

Assessment Templates

Roles

Test/Demo Data

Import after Installation Same CSVs

SahanaSahanaCampCamp NYCNYC

MaintenanceBackups

Upgrades /usr/local/bin/clean /usr/local/bin/pull /usr/local/bin/compile Maintenance Mode

Disable Web Access Holding Page: Disable Scheduler

SahanaSahanaCampCamp NYCNYC

DevelopmentCustomising Sahana Eden Python

JavaScript

Version Control Git: Get changes merged upstream

SahanaSahanaCampCamp NYCNYC

Testing

Manual Document Test Cases

Normal Workflows Exception Conditions Security

Automated Selenium (Browser-based)

Test-friendly code Suite of reusable libraries Run with different data sets Check preconditions directly as faster

Release Process

SahanaSahanaCampCamp NYCNYC

Summary

Flexible Deployment Options Laptop Windows or Mac: Server Linux: Cloud Amazon, Linux:Configuration Deployment Settings

Prepopulate CSVs

Customisation Development Python & JavaScript: Testing

Release Management