systems_administrator_manual
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
systems_administrator_manual [2019/03/20 23:50] – [Setting Up Email] ghachey | systems_administrator_manual [2020/03/23 08:27] (current) – removed ghachey | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Pacific EMIS Systems Administrator Guide ====== | ||
- | ===== Introduction ===== | ||
- | |||
- | For an introduction to this project refer to the Pacific EMIS User Guide and Developer Guide both offering a detailed background for their respective target users. Otherwise, this is a systems administrator guide and it is understood that the person filling this role is familiar with the project. This guide instead focuses on aspects such as deployment into production and maintenance which includes upgrades, backups and how to report problems so they get fixed. A clear release history with versioning done following the [[http:// | ||
- | |||
- | ===== New Deployment ===== | ||
- | |||
- | A new deployment is done when a new country adopts the Pacific EMIS. Currently a new deployment requires a few tedious steps which only need to be done once and future upgrades are much easier. | ||
- | |||
- | ==== Operating System ==== | ||
- | |||
- | Currently only the Windows operating system is supported. The application can be installed on any recent version of the Windows operating system. | ||
- | |||
- | ^Operating System ^Version Number ^ | ||
- | |Windows 10 | 10.0* | | ||
- | |Windows Server 2016 Technical Preview | 10.0* | | ||
- | |Windows 8.1 | 6.3* | | ||
- | |Windows Server 2012 R2 | 6.3* | | ||
- | |Windows 8 | 6.2 | | ||
- | |Windows Server 2012 | 6.2 | | ||
- | |Windows 7 | 6.1 | | ||
- | |Windows Server 2008 R2 | 6.1 | | ||
- | |Windows Server 2008 | 6.0 | | ||
- | |||
- | If this is a first time trying this out it is recommended to try on a test virtual machine. [[https:// | ||
- | |||
- | ==== Install .NET 4.6 Framework ==== | ||
- | |||
- | Install [[https:// | ||
- | |||
- | ==== Create Account to Run the Application ==== | ||
- | |||
- | Create a Windows user account (on local machine or active directory) to run the application. Call this new user something like **EMISWEB**. This new user should both be owner of the SQL database and the one running the IIS web process. | ||
- | |||
- | {{ : | ||
- | |||
- | {{ : | ||
- | |||
- | <note important> | ||
- | ==== Active Directory Server ==== | ||
- | |||
- | The Pacific EMIS typically uses an Active Directory to manage users, groups and roles (i.e. access permission levels), but it does not required this. You might find yourself in one of the following scenarios: | ||
- | |||
- | * Your organisation already runs an Active Directory in which case this is great, things will be much easier | ||
- | * Your organisation do not run an Active Directory in which case you could deploy one and join workstations to the domain. You have the choice of Microsoft Server' | ||
- | * Your organisation does not run an Active Directory and uses Google Accounts in which case you could deploy a local Active Directory and use Google Sync to sync users between both system | ||
- | * Your organisation does not run an Active Directory and not ready to deploy one. In this case you could opt for a local user deployment setup instead. | ||
- | ==== Database Engine Installation ==== | ||
- | |||
- | The only database engine currently supported is Microsoft SQL Server (MSSQL Server) with most deployments only tested with MSSQL Server 2012 or MSSQL Server 2012 Express Edition. There is no need for an expensive license and the Express edition which is freely available will work fine for this application. If you don't have already a commercial license download the free version [[https:// | ||
- | the system when done. | ||
- | |||
- | <note warning> | ||
- | OBSOLETE WARNING. Problem described here is fixed in recent version. While a default database deployment is fine there is one critical thing that you must configure correctly to save yourself a lot of pain. The default server collation should be set to " | ||
- | </ | ||
- | |||
- | ==== Restoring the Main Application Database ==== | ||
- | |||
- | There are two main ways to installed the main application database: | ||
- | |||
- | - Restore the application database (e.g. FEDEMIS, MIEMIS, SIEMIS, etc.) from a backup given to you by one of the experienced developers (geared towards systems administrators) | ||
- | - Restore the schema from the hosted service and fill up core and meta data yourself (geared towards developers) | ||
- | |||
- | The first option should be your choice unless you are an experienced developer of the EMIS system. If that is the case you can restore from the latest schema by connecting to a hosted service with the local Microsoft SQL Server Management Studio (SSMS) though currently you must be given access to achieve this. | ||
- | |||
- | Open SSMS and connect to the hosted service to get the empty current database as shown on the following screenshot. | ||
- | |||
- | {{ : | ||
- | |||
- | You may have to increase the **Connection time-out** in **Options** and this will require a reliable Internet connection. The database engine connection details are: | ||
- | |||
- | * Server: VCNSQL90.webhost4life.com, | ||
- | * Authentication: | ||
- | * User: youruser | ||
- | * Password: yourpassword | ||
- | |||
- | When you successfully connect to the hosted server you should see a database called **pineapples** which is the empty database to start with. | ||
- | |||
- | Backup this database locally and then restore it into your local database engine with a new name (e.g. MIEMIS for Marshall Islands, SIEMIS for Solomon Islands). This will now serve as your starting point. The only data in this " | ||
- | |||
- | If backup and restore of databases with MSSQL Server is new you to you refer to [[https:// | ||
- | |||
- | <note tip> | ||
- | When doing this if you get a connection error you might want to check if you have Fiddler the debugging tool and proxy. It could be the culprit in connection problems. | ||
- | </ | ||
- | |||
- | <note tip> | ||
- | The database **pineapples** for some users do not show up automatically even if one can execute SQL queries against it. An alternative is to explore it from Visual Studio the programming environment, | ||
- | </ | ||
- | |||
- | ==== Main Configuration ==== | ||
- | |||
- | Most of the configuration resides in the database and most must be loaded there manually. In this project, most of this configuration is called lookups and meta data and are described in the spreadsheet available here (FIXME include link to sample downloadable spreadsheet). The Pacific EMIS lookups spreadsheet includes sample | ||
- | data that must be localised to the adopting country, a task that must be done carefully and can take a fair amount of time. | ||
- | |||
- | Once all the required data has been localised (only the features necessary need to be done, other should be safely ignored) the necessary SQL command to load the data into the database must be prepare. How to automate this work depends on the preference of the responsible person, some developers prefer to use an Excel function to generate the SQL others prefer to manipulate this into their text editor of choice. Whatever the preferred approach you should end up with a file containing all the SQL to load the data which would look like this (FIXME include sample link). | ||
- | |||
- | ==== Setting Up the IdentitiesP Database ==== | ||
- | |||
- | The Pacific EMIS makes use of another auxiliary database called IdentitiesP where two main things are managed: the concept of ASP.NET user, roles and claims, and some details about the navigation system. When deploying a new DB you'll need that one to be given to you by one of the team members. | ||
- | |||
- | Restore this database backup into a database called IdentitiesP. There is a little work to do in this database. For example, it can be used to control the menu showing in the web UI. For example, if a country is not quite ready to adopt a specific feature or simply does not need need it can essentially be deactivated from the deployment by doing a simple modification to the data in table Navigation from the IdentitiesP database. | ||
- | |||
- | More details about how this works is documented in the Developer Guide in [[developer_manual# | ||
- | |||
- | ==== Module Configuration ==== | ||
- | |||
- | Modules in the Pacific EMIS are essential features (e.g. Performance Assessments, | ||
- | |||
- | {{ : | ||
- | |||
- | So for example, you can remove perf assessments by removing it from the children of ALL. I would expect the structure of this to be different from site to site. The leaf nodes define the icon text, and ui-router state associated to the task. For users defined using ASP.NET identity logins, the menu they are given is defined by the MenuKey on AspNetUsers. If you log in using a domain login, you currently get menu key ALL, as previously mentioned, the missing piece here is some mapping between domain groups and user profile to determine the menu key, Roles and filters. | ||
- | |||
- | ==== Make User Owner of both Databases ==== | ||
- | |||
- | Add this user as **db_owner** of the database created earlier in [[#Setting up the New Empty Database]]. You can do this by opening SSMS, browsing to the new database created early on then click **Security--Users** where you can add a new user as show in the following figure (select **Windows user** from **User Type**). Locate the Windows account **miemisweb** and create it. | ||
- | |||
- | {{ : | ||
- | |||
- | Next assign the **db_owner** to that new user in **Membership** as shown below. | ||
- | |||
- | {{ : | ||
- | |||
- | Do the same as above for the **IdentitiesP** database. | ||
- | |||
- | ==== Give User Login Permission ==== | ||
- | |||
- | The user created in [[#Create Account to Run the Application]] must be given permission to login the SQL Server. Do this in the MS SQL Management Studio by adding the user as shown below. | ||
- | |||
- | {{ : | ||
- | |||
- | ==== Deploy the Application ==== | ||
- | |||
- | === Deployment Method === | ||
- | |||
- | The application is deployed using a dropbox share. If you do not have an account create one on the [[https:// | ||
- | |||
- | === Deployment Configuration === | ||
- | |||
- | The share **WebInstall** contains a folder called **Pineapples** which has the application. The Pacific EMIS software project maintainer is usually the one preparing this folder with the latest releases. Before moving to the next step this is a good time to create a folder to hold some key files for your country of deployment. For example, in RMI the folder **RMI-deployment-files** was created in the **WebInstall** share. This folder can hold among, other things, the logo (rename it miemis.png, | ||
- | |||
- | Next you must edit the deployment configuration file called **Web.config**. You can find it in the dropbox **WebInstall** (e.g. **C: | ||
- | |||
- | <code xml> | ||
- | < | ||
- | <!-- Connection to the Identities database , note the factory seetting below will generate this database if going "code first" | ||
- | this connectin string is referenced in ApplicationDbContext constructor | ||
- | --> | ||
- | <add name=" | ||
- | </ | ||
- | <!-- | ||
- | For a description of web.config changes see http:// | ||
- | |||
- | The following attributes can be set on the < | ||
- | < | ||
- | < | ||
- | </ | ||
- | --> | ||
- | < | ||
- | <add key=" | ||
- | <add key=" | ||
- | <add key=" | ||
- | <add key=" | ||
- | <add key=" | ||
- | <add key=" | ||
- | </ | ||
- | </ | ||
- | |||
- | <code xml> | ||
- | < | ||
- | </ | ||
- | |||
- | Note: the document library where incoming documents are stored (both for the teacher images, and upload files such as this) is specified by the AppSetting FileDb | ||
- | |||
- | On your local system, you will need to : | ||
- | * Create a folder for this (e.g. C:\fileDb ) | ||
- | * Make sure that the account running the EMIs apppool has CRUD and Create Folder permissions to this folder | ||
- | * Set the web.config entry | ||
- | | ||
- | |||
- | === Deployment Copy to IIS inetpub === | ||
- | | ||
- | Now use the **deploy.bat** script to copy files into the IIS folder (i.e. **C: | ||
- | |||
- | < | ||
- | > cd C: | ||
- | > deploy.bat miemis | ||
- | </ | ||
- | |||
- | This will create the folder **C: | ||
- | files. If you have already put your logo into **C: | ||
- | |||
- | < | ||
- | > mkdir C: | ||
- | > copy C: | ||
- | > copy C: | ||
- | > copy C: | ||
- | </ | ||
- | |||
- | ==== Web Server (IIS) ==== | ||
- | |||
- | === Enable the IIS Role === | ||
- | |||
- | To enable to **Web Server (IIS)** on the Windows Server open the **Server Manager** and find **Add Roles and Features**. Find the **Web Server (IIS)**, enable it and make sure it contains the following minimum functionalities. | ||
- | |||
- | {{ : | ||
- | |||
- | === Create an Application Pool === | ||
- | |||
- | Next open the Internet Information Services (IIS) Manager and right click on **Application Pools** and **Add Application Pool..** to create an application pool called **EMIS** as shown in figure below. An application pool is essentially an isolated server worker process running that will run our application. | ||
- | |||
- | {{ : | ||
- | |||
- | Apart from the default setting as shown in the above figure you will need to go in the new **EMIS** application pool's **Advanced Settings...** and configure the **Identity** to the Windows account **EMISWEB** we created earlier. Select the **EMIS** application pool and **Advanced Settings...**. The steps involved in setting the custom identity are depicted in the following figure. | ||
- | |||
- | {{ : | ||
- | |||
- | Choose custom account and enter the details for your newly created local account; | ||
- | |||
- | {{ : | ||
- | |||
- | Choose custom account and enter the details for your newly created local account; | ||
- | |||
- | {{ : | ||
- | |||
- | {{ : | ||
- | |||
- | Next on the EMIS app, choose manage app and advanced settings; | ||
- | |||
- | {{ : | ||
- | |||
- | And change to run in your newly created Application Pool | ||
- | |||
- | {{ : | ||
- | |||
- | You may have to **Stop** and **Start** the application pool for this to take effect. Next, look for your new website in **Sites--Default Web Site**, in this case it is **miemis**. Right click it and **Convert to Application**, | ||
- | |||
- | {{ : | ||
- | |||
- | Once this is done you can test by point your browser to [[http:// | ||
- | |||
- | ==== Setting Up Email ==== | ||
- | |||
- | Notes on how to setup email which is used to password reset, sending out reports, notifications, | ||
- | |||
- | === Google G Suite or Plain Google Account === | ||
- | |||
- | Those using Google G Suite or a plain Google account as their email service for their domain can configure like below at the bottom of the Web.config file. Of course you would need an working Google account for this to work. This is the most reliable and easy way to configure the EMIS to send emails. | ||
- | |||
- | <code xml> | ||
- | <!-- Using a Google account is an easy and reliable way. | ||
- | this may require that you " | ||
- | be enabled for the Gmail account used by the NetworkCredential | ||
- | see https:// | ||
- | <smtp deliveryMethod=" | ||
- | <network host=" | ||
- | | ||
- | | ||
- | </ | ||
- | </ | ||
- | |||
- | === Exchange Server === | ||
- | |||
- | With exchange server the setup is a little trickier. we need a receive connector to relay from the IIS server. | ||
- | |||
- | {{ : | ||
- | |||
- | The security has to be set up to allow Windows authentication | ||
- | |||
- | {{ : | ||
- | |||
- | and the IIS Server has to forward mail to the exchange server. | ||
- | |||
- | {{ : | ||
- | |||
- | Currently it was working in at least one country environment by specifying the credentials of a user with an exchange mailbox. It would be best if this can be the same account running the apppool--this account also needs access to the SQL server, so it centralizes security setup in this one place. In that working environment is was only made to work with a Domain Admins user so more to do to figure out what is the minimal security requirement. But the notes herein provide a starting point. | ||
- | |||
- | ==== PDF eSurvey Technology ==== | ||
- | |||
- | An important part of the deployment is the PDF eSurvey Technologies. This is a little different then the remaining of the deployment as it is not part of the web application but seperate components of the whole Pacific EMIS system. | ||
- | |||
- | === Getting the eSurveys on the Server === | ||
- | |||
- | First you will need the actual PDF eSurveys. Those are the PDF used to collect data on the field without a good Internet connection. | ||
- | |||
- | Once you create a bitbucket account you can point your browser to the [[https:// | ||
- | |||
- | {{ : | ||
- | |||
- | Then when SourceTree opens you will be prompt with the following where it would be a good idea to edit the location as shown below. | ||
- | |||
- | {{ : | ||
- | |||
- | If you followed the steps above all your surveys files should be in '' | ||
- | survey changes. | ||
- | |||
- | === PDF eSurvey Technology Manager === | ||
- | |||
- | Second you need to install the PDF eSurvey Technology Manager. Currently this is a standalone desktop application that must be installed on a machine to " | ||
- | |||
- | * Read existing school surveys from a database (production or a test database) | ||
- | * Pre-populate surveys with some data before sending them to schools | ||
- | * Upload completed surveys into the database (again, production or a test database) | ||
- | |||
- | The installation should be done one time on the machines of the data entry officers. The first step is to download the PDF eSurvey Manager (FIXME make link to binary executable). Before going ahead with the installation it is a good idea to create the following folders on a shared drive (or C: drive) of the server running the Pacific EMIS. Of course, the **SIEMIS** would be replace with your own country. | ||
- | |||
- | * P: | ||
- | * P: | ||
- | * P: | ||
- | * P: | ||
- | | ||
- | Double click to install it, you should see the following screenshot. | ||
- | |||
- | {{ : | ||
- | |||
- | Start with the configuration as explained below. | ||
- | |||
- | * Intray Path: is where completed PDF eSurveys should be //dumped// | ||
- | * Outtray Path: is where the tool puts the PDF eSurveys once that have been successfully processed and entered in the database | ||
- | * Server: is the instance name of the SQL Server | ||
- | * Database: database is the name of the database | ||
- | * Template Path: should whole an untouched copy of the PDF eSurveys (e.g. Examples) | ||
- | * Generate OutPut: is where the PDF eSurveys are prepopulated with some data before being sent to schools for completion | ||
- | |||
- | < | ||
- | The drive letter on the screenshot is C:\ as this was done on a test machine directly in the main drive. In production this could be a share drive with a different letter, though it could also be on directly on the C:\ drive of the server | ||
- | </ | ||
- | |||
- | With the settings saved you should see something like the following when starting the tool. This is a list of the current surveys by school already in the database and shows under the **Generator** tab. | ||
- | |||
- | {{ : | ||
- | |||
- | Now is a good time to browse the other tab called **Loader**. The **Settings** tab is the same as the one on startup. | ||
- | |||
- | {{ : | ||
- | |||
- | How to use this tool is documented in the User Guide. | ||
- | |||
- | ===== Upgrade ===== | ||
- | |||
- | Currently upgades are done using Dropbox by a developer with write access to the dropbox share. Essentially, | ||
- | |||
- | <note important> | ||
- | The following process should be tested on a test machine before doing on the live production machine and a backup should be done prior as well. | ||
- | </ | ||
- | |||
- | ==== Cutting a Release ==== | ||
- | |||
- | No official releases are currently being cut. The way upgrades work currently is a developer brings his local '' | ||
- | |||
- | ==== Sync Latest to Dropbox ==== | ||
- | |||
- | Once the local '' | ||
- | |||
- | {{ : | ||
- | |||
- | Wait until the dropbox sync is complete | ||
- | |||
- | ==== Sync Latest to Production ==== | ||
- | |||
- | Login the production server using remote desktop or equivalent. Open the drop box folder as it is shown in the following image. If you have a good Internet connection by the time you get to the production dropbox might have completed the sync, otherwise wait until it is synced also locally on the production server. Then double click on the '' | ||
- | |||
- | {{ : | ||
- | |||
- | ==== Database Schema Change ==== | ||
- | |||
- | Most upgrade will not require an upgrade to the DB schema but occasionally some will. In those case it is best to use SQLDelta to look through each change and carefully apply them. | ||
- | |||
- | ===== Backup and Disaster Recovery ===== | ||
- | |||
- | There are two main was backups are conducted. | ||
- | |||
- | * Platform backup which backs up the whole operating system (virtual machine), its configuration, | ||
- | * Data backup which only backs up the database using MS SQL Servers database backup feature, and everything in '' | ||
- | |||
- | ==== Platform Backup ==== | ||
- | |||
- | Nightly backup of the whole production server should be done and a copy stored locally and another stored to a remote location. Backup recovery should be tested twice a year at least to make sure they are working as expected. | ||
- | |||
- | FIXME - Andrew' | ||
- | |||
- | ==== Data Backup ==== | ||
- | |||
- | Useful to quickly move the whole production system to the MIEMIS-TEST to test MIEMIS upgrades before executing the upgrade into production. Simply backup the DB on MIEMIS-PROD, | ||
- | |||
- | - Restore the DB into an already installed SQL Server | ||
- | - Deploy the application in IIS (this can also be done by simply sync' | ||
- | |||
- | ===== Reporting Issues ===== | ||
- | |||
- | FIXME | ||
- | |||
- | ===== Release History ===== | ||
- | |||
- | FIXME |
systems_administrator_manual.1553125811.txt.gz · Last modified: 2021/02/02 02:10 (external edit)