SahanaCamp NYC Day 2 PM: Deploying Sahana Eden

1,711 views

Published on

SahanaCamp NYC Day 2 PM session: Deploying Sahana Eden

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,711
On SlideShare
0
From Embeds
0
Number of Embeds
589
Actions
Shares
0
Downloads
16
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

SahanaCamp NYC Day 2 PM: Deploying Sahana Eden

  1. 1. Deploying Sahana Eden Fran Boon fran@sahanafoundation.org SahanaCamp LA 1
  2. 2. AgendaDeployment OptionsHardware RequirementsSkills required For Installation/Configuration For Customization SahanaCamp NYC
  3. 3. Deployment OptionsHost locally in the Host in the Cloudcommand center on a Laptop Synchronize these 2 together... SahanaCamp NYC 3
  4. 4. Hardware RequirementsStandalone PC Windows or MacServer Virtual Server: 512 Mb RAM, 4 Gb HDDCloud Amazon EC2 (free tier available for 1 year) SahanaCamp NYC
  5. 5. Architecture Web Server e.g. Apache Application Sahana Eden Web Framework Web2PyProgramming Language Python Database MySQL or PostgreSQL Operating System Windows, Linux or Mac SahanaCamp NYC
  6. 6. Installation processWizard on Wiki to select correct instructions:http://eden.sahanafoundation.org/wiki/InstallationGuidelinesEnd-User Installer for Windows: Local hard disk Flash drive SahanaCamp NYC
  7. 7. Production ServerPhysical/Dedicated Server or Virtual ServerBase OS Debian Linux best-supportedDatabase MySQL PostgreSQLPre-image Installation scriptPost-Image Configuration script SahanaCamp NYC
  8. 8. Amazon EC2Sign-up with credit cardSelect Data Center closest to you e.g. US East (Virginia)EBS for free tierCommunity AMIs: Debian SqueezeSSH key (private/public)Grow Volume if < 3Gb (hardest part)Normal Server Scripts SahanaCamp NYC
  9. 9. Amazon EC2SahanaCamp NYC
  10. 10. Configurationeden/models/000_config.pydeployment_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") SahanaCamp NYC
  11. 11. 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 SahanaCamp NYC
  12. 12. 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 SahanaCamp NYC
  13. 13. 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 = "," SahanaCamp NYC
  14. 14. Prepopulateprivate/prepopulate tasks.cfgCSVs Lookup Lists Assessment Templates Roles Test/Demo DataImport after Installation Same CSVs SahanaCamp NYC
  15. 15. MaintenanceBackupsUpgrades /usr/local/bin/clean /usr/local/bin/pull /usr/local/bin/compile Maintenance Mode  Disable Web Access: Holding Page  Disable Scheduler SahanaCamp NYC
  16. 16. DevelopmentCustomising Sahana Eden Python JavaScript Version Control: Git Get changes merged upstream SahanaCamp NYC
  17. 17. TestingManual Document Test Cases  Normal Workflows  Exception Conditions  SecurityAutomated Selenium (Browser-based)  Test-friendly code  Suite of reusable libraries  Run with different data sets  Check preconditions directly as faster SahanaCamp NYC
  18. 18. Release Process
  19. 19. SummaryFlexible Deployment Options Laptop: Windows or Mac Server: Linux Cloud: Amazon, LinuxConfiguration Deployment Settings Prepopulate CSVsCustomisation Development: Python & JavaScript Testing Release Management SahanaCamp NYC

×