Info | |
---|---|
Roadrunner Beta 1 is now available!
Testers needed! Especially those who can point an application at the Roadrunner API instance and see what happens with a realistic sequence of API calls.
|
...
- Scripts are built on assumption of PowerShell version 5 or above.
- Requires .NET Core 2.2 SDK
- For PostgreSQL there are two deployment modes, with different requirements:
- From source scripts: requires .NET Core 2.2 SDKautomatically installs correct version of a custom database deployment tool.
- From backup files: requires
psql
executable to be in your command path- One easy install option: download Enterprise DB. While installing you can choose to install only the command line tools without the server, if desired.
- Internet access - this is not an offline deployment process.
...
Initialize-Environment.ps1
Installs the Admin, ODS, and Security databases into either PostgreSQL or SQL Server. It then reconfigures the web.config files for Swagger and Web API (both optional) to include the correct configuration for the environment. Finally, loads the bulk console into a destination dir.
The $useTemplates
flag is currently only available for PostgreSQL. When used, you must have psql
executable in the execution path.
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>] |
Parameters
Name | Alias | Description | Required? | Default Value |
---|---|---|---|---|
-swaggerIisFolder | Destination folder for Swagger web application. Files will be overwritten. Default value of $null prevents Swagger web application from being configured and deployed. | 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 Swagger 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 |
...
Code Block |
---|
$parameters = @{ engine = "postgresql" databaseServer = "myserver" databaseUser = "postgres" } .\Initialize-Environment.psm1ps1 @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.psm1ps1 @parameters |
Only install databases on PostgreSQL, dropping existing database first.
Code Block |
---|
$parameters = @{ engine = "postgresql" databaseServer = "myserver" databaseUser = "postgres" dropDatabases = $true } .\Initialize-Environment.psm1ps1 @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.psm1ps1 @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.psm1ps1 @parameters |
Configuration
Web.Config
...