Warning |
---|
INTERNAL DRAFT |
...
Install Process
1. Download
Roadrunner binaries and automation scripts are available via a NuGet package. You should download this on your webserver. Two options: NuGet command line or direct download.
This command will automatically unzip the contents into the working directory, under EdFi.Ods.RoadRunner.1.0.0-rc1
.
|
Alternately, download from https://www.myget.org/F/ed-fi/api/v2/package/EdFi.ODS.Roadrunner/1.0.0-rc1. This is just a fancy zip file - so if you want to inspect it, just open it with your favorite zip file client.
2. Run Initialize-Environment.ps1
Inside that NuGet package, you'll find Initialize-Environment.ps1
. This orchestration script handles all of the deployment processes described above - installation to either database engine, download of the applications, and setting up connection strings.
...
- Database server name
- In either case, is the database engine running on a non-default port? (1433 for SQL Server, 5432 for PostgreSQL)
- In either case, is the database engine running on a non-default port? (1433 for SQL Server, 5432 for PostgreSQL)
Database user credentials
Note These credentials will be inserted into the web application connection strings. If using integrated security with SQL Server, then be sure to setup the IIS Appol Pool Identity user or the IIS service user, as appropriate, with
db_datareader
anddb_datawriter
access in all three databases.If SQL Server, either the deployment account must have admin rights in the database (integrated security), or you need to provide SQL credentials that have admin rights. You can set the password via environment variable
$env:SQLSERVERPASSWORD
or pass it as a parameter.If PostgreSQL, then you need to provide database credentials. While the username is passed in as a parameter, the password must be passed through environment variable
$env:PGPASSWORD
or, if the client tools are installed, through the pgpass config file.
- If your PostgreSQL instance requires SSL/TLS encryption, then set environment variable
$env:PGSSLMODE="require"
.
If installing on PostgreSQL, do- Do you want the standard install or the template-based install? If using templates, you can choose from "empty", "minimal" (includes descriptors), and "populated" (includes a small set of sample data).
- If your instance requires SSL/TLS encryption, then set environment variable
$env:PGSSLMODE="require"
.
- Additional database options
- If the destination databases already exist, do you want to drop them? (
for PostgreSQL, requires that you have the client utilities installed on the deployment server).
- Do you want to change the database names away from the defaults of
EdFi_Admin
,EdFi_ODS
, andEdFi_Security
?
- If the destination databases already exist, do you want to drop them? (
- Destination folder paths for the four applications:
- Web API
- Swagger UI
- Admin App
- API Bulk Loader
This script has a long list of parameters. It can be useful to create a PowerShell object (dictionary) with the values, instead of trying to string all of the values together in a single command. Doing so makes it easier to review your parameters before running the script.
Code Block | ||
---|---|---|
| ||
# Prepare an object dictionary with your parameters $parameters = @{ # Add parameters here, e.g. engine = "postgresql" } # Can also set parameters one-by one $parameters.databaseServer = "myserver" # Can review all parameters $parameters # Everything look good? Then pass the parameters to the deployment script: .\Initialize-Environment.ps1 @parameters |
...
Command Syntax
Code Block |
---|
Initialize-Environment [[-swaggerIisFolder] <String>] [[-webApiBaseUrl] <String>] [[-webApiIisFolder] <String>] [[-apiBulkFolder] <String>] [-engine] <String> [-databaseServer] <String> [[-databasePort] <String>] [[-databaseUser] <String>] [[-databasePassword] <String>] [-useIntegratedSecurity] [[-adminDatabaseName] <String>] [[-odsDatabaseName] <String>] [[-securityDatabaseName] <String>] [-useTemplates] [[-odsTemplate] <String>] [-noDuration] [-dropDatabases] [<CommonParameters>] |
Parameter List
Name | Alias | Description | Required? | Default Value |
---|---|---|---|---|
-swaggerIisFolder | Destination folder for Swagger web application. Files will be overwritten.
| false | ||
-webApiBaseUrl | Base URL that Swagger should use when connecting to the Web API. Defaults to "http://localhost:54746". | false | http://localhost:54746 | |
-webApiIisFolder | Destination folder for Web API web application. Files will be overwritten. Default value of $null prevents Web API web application from being configured and deployed. | false | ||
-apiBulkFolder | Destination folder for installing the API bulk loader program. | false | ||
-engine | The database engine that will be used: SqlServer or PostgreSQL. | true | ||
-databaseServer | The network name or IP address of the database server. | true | ||
-databasePort | Database port number. For PostgreSQL, defaults to 5432. For SQL Server, defaults to 1433. | false | ||
-databaseUser | Username for connection to the database instance, both during installation and during runtime. User must have permission to drop and create databases. | false | ||
-databasePassword | Optionally provide a database password for non integrated-security. Alternately, can provide via environment variable $env:SqlServerPassword. Note that this is only supported for SQL Server, not PostgreSQL. | false | $env:SqlServerPassword | |
-useIntegratedSecurity | Switch to enable use of Windows Integrated Security instead of a database username and password. When true, any values provided for user name and password are ignored. | false | False | |
-adminDatabaseName | Name of the Admin database. Defaults to EdFi_Admin. | false | EdFi_Admin | |
-odsDatabaseName | Name of the ODS database. Defaults to EdFi_ODS. | false | EdFi_ODS | |
-securityDatabaseName | Name of the Security database. Defaults to EdFi_Security. | false | EdFi_Security | |
-useTemplates | Switch to install from template databases instead of the original SQL scripts used by the EdFi.Db.Deploy executable. Currently only available for PostgreSQL. | false | False | |
-odsTemplate | Template to use when $useTemplates is true. Allowed values: empty, minimal, populated. Defaults to empty. | false | empty | |
-noDuration | When true, does not report task duration. | false | False | |
-dropDatabases | When true, drops databases if they already exist. Defaults to false. If databases exists and $dropDatabases is false, then deploy from templates will fail, but deploy from Db Deploy will succeed. | false | False |
Examples
Only install databases on PostgreSQL, using all available default values.
Code Block |
---|
$parameters = @{
engine = "postgresql"
databaseServer = "myserver"
databaseUser = "postgres"
}
.\Initialize-Environment.ps1 @parameters |
Only install databases on PostgreSQL, using templates (populated ODS).
Code Block |
---|
$parameters = @{
engine = "postgresql"
databaseServer = "myserver"
databaseUser = "postgres"
useTemplates = $true
odsTemplate = "populated"
}
.\Initialize-Environment.ps1 @parameters |
Only install databases on PostgreSQL, dropping existing database first.
Code Block |
---|
$parameters = @{
engine = "postgresql"
databaseServer = "myserver"
databaseUser = "postgres"
dropDatabases = $true
}
.\Initialize-Environment.ps1 @parameters |
Install databases on SQL Server, with alternate port 1450, and deploy the Web API.
Code Block |
---|
$parameters = @{
engine = "sqlserver"
databaseServer = "myserver"
databasePort = 1450
useIntegratedSecurity = $true
dropDatabases = $true
webApiIisFolder = "c:\inetpub\ed-fi\webapi"
}
.\Initialize-Environment.ps1 @parameters |
Install on SQL Server, override the default database, and deploy both the Web API and Swagger UI.
Code Block |
---|
$parameters = @{
engine = "sqlserver"
databaseServer = "myserver"
databasePort = 1450
useIntegratedSecurity = $true
dropDatabases = $true
webApiIisFolder = "c:\inetpub\ed-fi\webapi"
swaggerIisFolder = "c:\inetpub\ed-fi\swagger"
admindatabase = "edfi_admin_rr"
odsdatabase = "edfi_ods_rr"
securitydatabase = "edfi_security_rr"
}
.\Initialize-Environment.ps1 @parameters |
3. Setup IIS Applications
If the deployment server is not also the web server, and if your "IIS Folder" paths were local rather than remote, then copy/move the three web application folders to your IIS web server(s). In IIS Manager, setup an Application for each, with custom app pools. If using integrated security in your connection strings, then we recommend setting App Pool Identity as the user and granting that user access rights to read and write in the three remote databases
Running the Applications
Now that everything is setup, you can start using the applications. As a first step, you may want to confirm that the Web API is running. If you installed on server "myserver" with IIS Application named "webapi", then try loading https://myserver/webapi in a browser to confirm that the version endpoint does not generate any errors. If that works, next try https://myserver/webapi/metadata. Any problems? Check the ODS/API error log, which by default is in c:\ProgramData\Ed-Fi-ODS-API.
Before accessing Swagger UI or loading data via the API Bulk Loader, you'll need to generate client credentials (key and secret). If you installed Admin App on server "myserver" with IIS Application named "AdminApp", then try loading htts://myserver/AdminApp. Click through the initial setup, and then stop and restart the web site via IIS Manager to force a security cache refresh.
For more information on Admin App, please see:
After creating client credentials, you can use them in SwaggerUI or in the API Bulk Loader.
Providing Feedback
Found a bug? Please file a Bug Report in the ODS project in Tracker. Ideally, use "roadrunner" in the labels field and put the name "Roadrunner" in the summary.
Feedback on the deployment scripts? Either file a ticket in Tracker, post a comment below, respond in #dev-roadrunner in Slack, or send email to Vinaya Mayya and Stephen Fuqua.