Starbucks System deployment Preprequirements 1. 2. 3. 4. 5. IIS with Web, FTP and SMTP features enabled MSSQL 2008 R2 .Net Framework 4 All applications extracted from provided binaries package on server Installed Crystal Reports redistributable (http://resources.businessobjects.com/support/downloads/redistributables/vs_2008/redist/x64 /CRRedist2008_x64.msi) Servers configuration FTP 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. Go to control panel -> User accounts Create a user which going to be used to access FTP, set a password for it Start IIS Manager Navigate to “Sites” Right click on “Sites” and select “Add FTP site” Enter site name (any) and select FTP root folder Navigate to create site, then “FTP Authentication” Make sure that anonymous auth is disabled and basic auth is enabled Now go to “FTP Authorization”, click “Add Allow Rule” Select “specified user”, enter login of user created on step 2, allow both read and write permissons 11. Create following subfolders inside FTP root folder: a. audit-in b. audit-out c. audit-in-archive d. audit-out-archive 12. Make sure that user, created on step 2, have full access to FTP root folder and it’s subfolders and files (using Windows security settings on folder) 13. FTP configuration done SMTP 1. 2. 3. 4. Start IIS 6.0 Manager Right click on computer, select New -> SMTP Virtual Server Enter name and create server Right click on created server and select Properties 5. 6. 7. 8. 9. 10. 11. 12. 13. Go to “access” tab Click “Connection” Make sure that “Only the list below” Click “Add”, select IP address and enter 127.0.0.1 Click “OK” In connection windows Click “Relay” Perform same settings (7-9) in this window Click “OK” in properties windows SMTP configuration done Web 1. 2. 3. 4. 5. 6. 7. Start IIS Manager Navigate to “Application Pools” Create a new application pool Give it a name, select .Net Framework 4, Integrated mode, Start immediately Click OK Navigate to sites -> Default Web Site By right clicking on it and selecting “Add Application” create applications for each within the list below 8. When creating each application – name it the same as folder name in binaries package. Point to corresponding folder in Binary package, select the application pool created on step 3 9. List of apps to be created: a. PhotosControlPanel b. PictureService c. ReportExtractor (path is ReportPortal\ReportExtractor) d. ReportPortalService (path is ReportPortal\Service) e. Service f. StarbucksManagementPortal g. StarbucksReportPortal 10. Web server configuration done Crystal Reports 1. Modiby delivered starbucksLive.dsn file in text editor and set: a. Database server host b. Database username c. Database password 2. Place modified file on server under following locations: a. C:\ReportPortal\Reports\ b. C:\ProgramFiles\Common Files\ODBC\Data Sources\ 3. Crystal reports configuration done DBs 1. Create following 4 database on server and restore them from corresponding backup files: a. aspnetdb b. ReportPortal c. Starbucks d. StarbucksPhotos 2. Configure an SQL login with full access to those databases Databases Central Database Name: Starbucks Contents: Main system data – the data parsed from audit-in file, modified by iPad application (thru main webservice) and outputted in audit-out file Database tables: parsed_files – a log of all audit-in files parsed generated_files – a log of all audit-out files generated routes – routes, grouped by date stores – stores, grouped by date and route store_audit – store audit records, grouped by date and route subtypes – product subtypes products_store – products list for in-store audit, grouped by date, route, store products_bulk – products list for buld audit, grouped by date, route products_ware – products list for warehouse audit, grouped by date, route, store route_dairy_control – route dairy control records for in-store audit route_dairy_control_bulk – route dairy control records for bulk audit route_dairy_control_ware – route dairy control records for warehouse audit Photos Database Name: StarbucksPhotos Contents: Photos, taken by auditors thru iPad app and reviewed thru pictures portal Database tables: pictures – a list of all photos, stored inside DB in blob data column with a relation to store and date from central database Report Portal Database Name: ReportPortal Contents: Report Portal users, reports and supplementary data needed for report portal operation Database tables: AUTO_REPORT – auto generated reports configuration (set in management portal, used by auto report generator) LOGIN_MESSAGES, OPERATOR_CONNECTS, OPERATOR_GROUP_STUFFS, OPERATOR_GROUPS, OPERATORS, PASSWORDS – users and access management tables REPORTS – list of all reports available on portals REPORT_PARAMETERS, PARAM_CONTROLS, PARAM_TYPES – report parameters (set when generating a report) REPORT_CONNECTIONS, REPORT_PERMISSIONS, REPORT_TYPES – supplementary tables controlling access to reports Management Portal Database Name: aspnedb Contents: Contains users information and credentials. Managed by management portal. Used to authorize management portal, photos portal and report portal users Database tables: Database structure is automatically generated by ASP.Net and is a standard ASP.Net users management database Applications configuration All applications are configured via standard .Net configuration files. For Web applications this is a “Web.config” files in the root folder of the app, for desktop/console apps it’s “<executable_name>.config” files in the same folder as executable Please find below details on configuration of each application in chapters below StarbucksParser Overview Console application, which parses audit-in file uploaded to FTP on daily basis and saves it to central database. Regarding the logs – some application write file logs. They should be configured to write logs to different files. I.e. one log file per application. It’s adviced to make log files folder and all files in it writable by everyone to avoid permissions issues Configuration 1. Following options to be set in StarbucksTxtParser.exe.config file: a. connectionStrings -> serviceConnectLocal – connection string to central database b. appSettings -> _serverName – IP address of server c. appSettings -> parseFilePath - <ftp root>\audit-in\ d. appSettings -> processedFilesPath - <ftp root>\audit-in-archive\ e. log4net -> appender -> file – path to application log file (make sure that file is writable) 2. Go to control panel -> administrative tools -> task scheduler and create a daily execution task at desired time for parsing. Pick StarbucksTxtParser.exe as task executable StarcbuksGenerator Overview Generate application, which generates and saves audit-out from central database to be downloaded from FTP on daily basis. Configuration 1. Following options to be set in StarbucksTxtGenerator.exe.config file: a. connectionStrings -> serviceConnectLocal – connection string to central database a. appSettings -> _serverName – IP address of server b. appSettings -> generateFilePath - <ftp root>\audit-out\ c. appSettings -> processedFilesPath - <ftp root>\audit-out-archive\ d. log4net -> appender -> file – path to application log file (make sure that file is writable) 2. Go to control panel -> administrative tools -> task scheduler and create a daily execution task at desired time for generation. Pick StarbucksTxtGenerator.exe as task executable Service Overview Main application webservice. Provides CRUD access to central database. Configuration Following options to be set in Web.config file: a. connectionStrings -> serviceConnectLocal – connection string to central dataset b. log4net -> appender -> file – path to application log file (make sure that file is writable) PictureService Overview Webservice, support for photos functionality. Provides CRUD access to photos database. Configuration Following options to be set in Web.config file: a. appSettings -> PictureUploadDirectory – path to temp directory b. connectionStrings -> StarbucksEntities – connection string to photos database ReportAutoGenerator Overview Console application which generates PDF reports according to configuration set on management portal, and sends PDFs to configured emails Configuration 1. Following options to be set in AutoReportGenerator.exe.config file: a. connectionStrings -> ReportPortal – path to report portal database 2. Go to control panel -> administrative tools -> task scheduler and create a daily execution task at desired time for generation. Pick AutoReportGenerator.exe as task executable StarbucksManagementPortal Overview A web application allowing to manage users permissions to access the rest of portals and manage automatic PDF reports. Configuration Following options to be set in Web.config file: a. connectionStrings -> ApplicationServices – connection string to Management Portal database b. connectionStrings -> ReportPortal – connection string to Report Portal database PhotosControlPanel (pictures portal) Overview Allows users to review photos, uploaded by auditors, per date, route, store. Then – select and send photos to entered email address Configuration Following options to be set in Web.config file: a. connectionStrings -> ApplicationServices – connection string to Management Portal database b. appSettings -> absoluteUrl – http://<server address>/PhotosControlPanel/ ReportExtractor Overview A webservice used by report portal and auto report generator. It uses Crystal Reports component to actually generate PDF report Configuration Following options to be set in Web.config file: a. b. c. a. appSettings -> REPORTAPPSERVER – database host (usually – localhost) appSettings -> REPORT_DB_USER_NAME – database user name appSettings -> REPORT_DB_USER_PASSWORD – database password log4net -> appender -> file – path to application log file (make sure that file is writable) ReportPortalService Overview Webservice, provides CRUD access to report portal database. Configuration Following options to be set in Web.config file: a. connectionStrings -> ReportPortalEntities – connection string to Report Portal database StarbucksReportPortal Overview Allows users to manage and generate reports Configuration Following options to be set in Web.config file: a. connectionStrings -> ApplicationServices – connection string to Management Portal database