tech 1 - deploying sahana eden

20
1 Sahana Sahana Camp Camp Viet Nam Viet Nam Deploying Sahana Eden Fran Boon [email protected]

Upload: aidiq

Post on 15-Jan-2015

385 views

Category:

Technology


7 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Tech 1  - Deploying Sahana Eden

11SahanaSahanaCampCamp Viet NamViet Nam

Deploying Sahana EdenFran Boon

[email protected]

Page 2: Tech 1  - Deploying Sahana Eden

SahanaSahanaCampCamp Viet NamViet Nam

Agenda

Project Plan

Deployment Options

Hardware Requirements

Skills required For Installation/Configuration

For Customization

Page 3: Tech 1  - Deploying Sahana Eden

SahanaSahanaCampCamp Viet NamViet Nam

Project Plan

IT costs of a project unlikely to be the largest element Building Buy-In

Requirements Gathering

Change Management

User Training

User Support

Page 4: Tech 1  - Deploying Sahana Eden

44SahanaSahanaCampCamp Viet NamViet Nam

Deployment Options

Host locally in the command center

on a Laptop

Host in the Cloud

Synchronize these 2 together...

Page 5: Tech 1  - Deploying Sahana Eden

SahanaSahanaCampCamp Viet NamViet Nam

Hardware RequirementsStandalone PC Windows or Mac

Server Virtual Server 512 Mb RAM, 4 Gb HDD:

Cloud Amazon EC2 (free tier available for 1 year)

Heroku

OpenShift

Page 6: Tech 1  - Deploying Sahana Eden

SahanaSahanaCampCamp Viet NamViet Nam

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

Page 7: Tech 1  - Deploying Sahana Eden

SahanaSahanaCampCamp Viet NamViet Nam

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

Windows Installer: Local hard disk

Flash drive

Page 8: Tech 1  - Deploying Sahana Eden

SahanaSahanaCampCamp Viet NamViet Nam

Production ServerPhysical/Dedicated Server or Virtual Server

Base OS Debian Linux best-supported

Database MySQL

PostgreSQL

Installation scripts Pre-image

Post-Image configuration

Page 9: Tech 1  - Deploying Sahana Eden

SahanaSahanaCampCamp Viet NamViet Nam

Amazon EC2Sign-up with credit card

Select Data Center closest to you e.g. Singapore

SSH key (private/public)

Marketplace AMI Debian Wheezy:Normal Server Install Scripts

Page 10: Tech 1  - Deploying Sahana Eden

SahanaSahanaCampCamp Viet NamViet Nam

Scaling Amazon EC2:

Page 11: Tech 1  - Deploying Sahana Eden

SahanaSahanaCampCamp Viet NamViet Nam

Configurationeden/models/000 config.py_settings. Databasedatabase.db type mysql_ =" "database.host 10.14.6.3=" " Select Templatetemplate = "IFRC"

Brandingsystem_name = T("Sahana Eden Emergency Portal")

Page 12: Tech 1  - Deploying Sahana Eden

SahanaSahanaCampCamp Viet NamViet Nam

ConfigurationSecurity Policy

1 : Simple (default): Global as Reader Authenticated as Editor

2 : Editor role required for Update/Delete unless record owned by session

3 : Controller ACLs

4 : +Function ACLs

5 : +Table ACLs

6 : +Entity Realm (Multi-tenant) 7 : +Hierarchy

8 : +Delegations

Page 13: Tech 1  - Deploying Sahana Eden

SahanaSahanaCampCamp Viet NamViet Nam

Configuration Authentication optionsself_registration = True

registration_requires_verification = True

registration_requires_approval = True

Facebook, Google, LDAPgoogle_id = "645861.apps.googleusercontent.com"

google_secret = "1EZYxpRV4iMAVvv_pA"

Workflowsreq.use_commit = False

req.generate_req_number = False

Page 14: Tech 1  - Deploying Sahana Eden

SahanaSahanaCampCamp Viet NamViet Nam

Configuration Localization optionssettings.L10n.languages = OrderedDict([

("vi", "Tiếng Việt"),

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

L10n.decimal_separator = "."

L10n.thousands_separator = ","

Page 15: Tech 1  - Deploying Sahana Eden

SahanaSahanaCampCamp Viet NamViet Nam

Templatesprivate/templates config.py

CSVs to prepopulate data tasks.cfg

Roles

Lookup Lists (Types)

Assessment Templates

Test/Demo Data

Import data after Install Same CSVs

Page 16: Tech 1  - Deploying Sahana Eden

SahanaSahanaCampCamp Viet NamViet Nam

MaintenanceBackups

Upgrades /usr/local/bin/clean

/usr/local/bin/pull

/usr/local/bin/compile

Maintenance Mode Disable Web Access Holding Page: Disable Scheduler

Page 17: Tech 1  - Deploying Sahana Eden

SahanaSahanaCampCamp Viet NamViet Nam

DevelopmentCustomising Sahana Eden Python & JavaScript

Version Control Git: Get changes merged upstream to simplify upgrades

Page 18: Tech 1  - Deploying Sahana Eden

SahanaSahanaCampCamp Viet NamViet Nam

Testing

Manual Document Test Cases

Normal Workflows Exception Conditions Security

Automated Selenium (Browser-based)

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

Page 19: Tech 1  - Deploying Sahana Eden

Release Process

Page 20: Tech 1  - Deploying Sahana Eden

SahanaSahanaCampCamp Viet NamViet Nam

Summary

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

Templates

Import CSVs

Customisation Development Python & JavaScript: Testing, Release Management