- Ensure you have the latest .pfx certificates for employer and provider in both Local Machine and Current User certificate stores (DevOps can assist)
- Install [.NET 6.0] (https://dotnet.microsoft.com/en-us/download/dotnet/6.0)
- Install Visual Studio 2019 with these workloads:
- ASP.NET and web development
- Azure development
- Install SQL Server 2017 Developer Edition
- Install SQL Management Studio
- Install Azure Storage Emulator (Make sure you are on atleast v5.3)
- Install Azure Storage Explorer
- Administrator Access
- Clone this repository
- Open Visual Studio as an administrator
-
Build the solution SFA.DAS.ProviderApprenticeshipService.sln
-
While running Visual studio in Administrator Mode: Either use Visual Studio's
Publish Database
tool to publish the database project SFA.DAS.ProviderAgreementStatus.Database with name SFA.DAS.ProviderAgreementStatus.Database on ProjectsV13 (or whatever local instance you are using)or
-
Create a database manually named {{database name}} on {{local instance name}} and run each of the
.sql
scripts in the SFA.DAS.ProviderApprenticeshipService.Database project.
Insert the following record into the ProviderAgreementStatus database in order to simulate the given Provider (in this case, 10005077) having signed their agreement with the SFA. This unlocks all of the approval functionality.
insert into ContractFeedEvent (Id, ProviderId, HierarchyType, FundingTypeCode, [Status], ParentStatus, UpdatedInFeed, CreatedDate)
values (NEWID(), '10005077', 'CONTRACT', 'LEVY', 'APPROVED', 'APPROVED', GETDATE(), GETDATE())
- Use the das-employer-config-updater to obtain the latest config
-
Ensure you have the SFA.DAS.Commitments project set up (follow its readme file)
-
Open the solution SFA.DAS.ProviderApprenticeshipService.sln as administrator
-
Open the solution SFA.DAS.Commitments.sln as administrator
-
Close all instances of "Microsoft Azure storage emulator" within the system tray
-
Set SFA.DAS.ProviderApprenticeshipService startup projects to 'Multiple startup projects'. The only projects set to start should be:
- SFA.DAS.PAS.Account.Api (PAS Account API)
- SFA.DAS.ProviderApprenticeshipsService.Web (PAS Web UI)
-
Clean the SFA.DAS.ProviderApprenticeshipService solution
-
Rebuild the SFA.DAS.ProviderApprenticeshipService solution
-
Run the SFA.DAS.Commitments.sln (this should automatically start the Microsoft Azure storage emulator), it normally starts with an error page. You can check if it's running by calling the "/api/healthcheck" endpoint which should return status code 200.
-
Run the SFA.DAS.ProviderApprenticeshipService.sln, it may several minutes to start the first time.
-
Once both solutions are fully running, open an incognito tab in any browser and navigate to the "misc helpers" website (Get link from Approvals / Continous Improvement team)
-
Under the "Providers" tab, click the "Test-U-Good Provider Home" link. Select Pirean PreProd and you will be directed to a log in page.
-
Enter the log in credentials (can be found on the "misc helpers" website) and you should be taken to the "Apprentices" section landing page.
Note: The above startup projects are Azure Cloud Service Definitions and the Service Configurations (*.cscfg) contain the per environment configuration settings; e.g. the 'EnvironmentName' which is used to locate the Azure Storage Configuration Settings.
-
Get the following configuration json files (which are in non-public repositories):
-
Create a Configuration table in your (Development) local Azure Storage account.
-
Add a row to the Configuration table for each configuraiton json file with fields:
- PartitionKey: LOCAL, RowKey: SFA.DAS.ProviderApprenticeshipService_1.0, Data: {{The contents of the local config json file}}.
- PartitionKey: LOCAL, RowKey: SFA.DAS.ProviderUrlHelper_1.0, Data: {{The contents of the local config json file}}.
- PartitionKey: LOCAL, RowKey: SFA.DAS.ContractAgreements_1.0, Data: {{The contents of the local config json file}}.
- PartitionKey: LOCAL, RowKey: SFA.DAS.PasAccountApi_1.0, Data: {{The contents of the local config json file}}.
-
Update Configuration to amend database connection strings
- SFA.DAS.ProviderApprenticeshipService_1.0, Data : "Data Source={{local instance name}};Initial Catalog={{database name}};Integrated Security=True;Pooling=False;Connect Timeout=30" }
- SFA.DAS.ContractAgreements_1.0, Data : "Data Source={{local instance name}};Initial Catalog={{database name}};Integrated Security=True;Pooling=False;Connect Timeout=30" }
Note: The employer config updater will automatically update database connection strings; however it should be used with caution as it will overwrite any manual changes.
To run a fully operational local service you will also require the following fully operational local services or mocks:
Note It is possible to configure the use of test environments however this comes with the usual issues of not having full control of the version under test and the data in a remote service.
It will be sufficient to configure test versions or mocks of the following services:
The following services can be activated (browsed too) from this service; if this is required then having fully operational local services is recommended or having them configured to be the same test services as the required API's to avoid confusion of different data sources.
Licensed under the MIT license
Provider Apprenticeship Service (PAS) Web | |
Info | A service enabling the Apprenticeship Service to be managed from the Provider perspective. |
Build | |
Web | https://localhost:44347/ |
PAS Account Internal API | |
Info | An internal API giving access to user accounts and agreements for providers. |
Build | |
Web | https://localhost:44378/ |
PAS Account Api Client | |
Info | .Net Framework client library for the internal Account API |
Build |
PAS Account Api Client V2 | |
Info | .Net Standard client library for the internal Account API |
Build |
PAS Account Api Types | |
Info | .Net Standard types library for client libraries |
Build |
See Support Site for EFSA developer details.