Skip to content

Commit be4d836

Browse files
committed
Merge branch 'main' into wdekort/setupcnabv2
2 parents 552c4ea + f28cddb commit be4d836

File tree

13 files changed

+97
-51
lines changed

13 files changed

+97
-51
lines changed

.github/actions/build_docker/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ runs:
5151
registry: ${{ inputs.registry_prod }}
5252
username: ${{ inputs.registry_username }}
5353
password: ${{ inputs.registry_password }}
54-
54+
5555
- name: Build Image
56-
uses: docker/build-push-action@v5
56+
uses: docker/build-push-action@v6
5757
with:
5858
push: true
5959
context: .

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ on: [push]
44

55
jobs:
66
build:
7-
runs-on: windows-2019
7+
runs-on: ubuntu-latest
88
steps:
99
- name: Setup .NET
10-
uses: actions/setup-dotnet@v1
10+
uses: actions/setup-dotnet@v4
1111
with:
12-
dotnet-version: 6.0.x
13-
- uses: actions/checkout@v1
12+
dotnet-version: 8.0.x
13+
- uses: actions/checkout@v4
1414
- name: Build with dotnet
1515
run: dotnet build

.github/workflows/workflow_build_and_release_containers.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,20 @@ jobs:
6363
- name: Create Octo Release if main or deploy to sandbox label present
6464
if: env.SHOULD_CREATE_RELEASE == 'true'
6565
run: |
66-
octoSpaceId="Spaces-1"
67-
octoProjectId="Projects-2241"
66+
octoSpaceId="Default"
67+
octoProjectId="Opserver"
6868
6969
dotnet octo create-release --project=$octoProjectId --space=$octoSpaceId --version=${{ needs.generate_date_version.outputs.version }} \
7070
--gitRef=main --server=${{ vars.OCTOPUS_CLOUD_URL }} --apiKey=${{ secrets.OCTOPUS_CLOUD_API_KEY }}
7171
# Note: The gitRef param is for the Octo config repo and not the git repo for the code
72-
- name: Deploy via Octopus if main or deploy to sandbox label present
72+
73+
- name: Deploy via Octopus if main or deploy to ascn-dev if label present
7374
if: env.SHOULD_CREATE_RELEASE == 'true'
7475
run: |
75-
octoSpaceId="Spaces-1"
76-
octoProjectId="Projects-2241"
76+
octoSpaceId="Default"
77+
octoProjectId="OpServer"
7778
environmentId="${{ github.ref_name == 'main' && 'main-test' || 'ascn-dev' }}"
7879
7980
dotnet octo deploy-release --project=$octoProjectId --space=$octoSpaceId --version=${{ needs.generate_date_version.outputs.version }} \
8081
--server=${{ vars.OCTOPUS_CLOUD_URL }} --apiKey=${{ secrets.OCTOPUS_CLOUD_API_KEY }} --deployTo=$environmentId
81-
# Note: The gitRef param is for the Octo config repo and not the git repo for the code
82+
# Note: The gitRef param is for the Octo config repo and not the git repo for the code

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
1+
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
22
WORKDIR /app
33

44
# Global
@@ -22,7 +22,7 @@ WORKDIR /app/src/Opserver.Web
2222
RUN dotnet publish -c Release -o publish
2323

2424
# Build runtime image
25-
FROM cr.stackoverflow.software/so-aspnet:6.0-jammy-chiseled-extra AS base
25+
FROM cr.stackoverflow.software/so-aspnet:8.0-jammy-chiseled-extra AS base
2626

2727
USER $APP_UID
2828

cnab/app/gcp-cluster-discovery.ps1

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
function Find-DeploymentGroup([string]$filter) {
2+
Write-MinorStep "Finding GCP deployment group (project) using filter: $filter"
3+
$projects = (gcloud projects list --filter=$filter --format=json | ConvertFrom-Json)
4+
if ($null -eq $projects -Or $projects.Count -eq 0) {
5+
Write-MinorStep "No projects found"
6+
exit 1
7+
}
8+
elseif ($projects.Count -gt 1) {
9+
Write-MinorStep "$project_count projects found, cannot continue"
10+
exit 1
11+
}
12+
$project = $projects[0].projectId
13+
Write-MinorStep "Project: $project"
14+
return $project
15+
}
16+
17+
function Find-DeploymentTarget([string]$filter, [string]$deploymentGroup) {
18+
Write-MinorStep "Finding GCP deployment target (cluster) using filter: $filter and deployment group (project): $deploymentGroup"
19+
20+
$clusters = (gcloud container clusters list --filter=$filter --project=$deploymentGroup --format=json | ConvertFrom-Json)
21+
$cluster_count = $clusters.Count
22+
if ($cluster_count -eq 0) {
23+
Write-MinorStep "No clusters found"
24+
exit 1
25+
}
26+
elseif ($cluster_count -gt 1) {
27+
Write-MinorStep "$cluster_count clusters found, cannot continue"
28+
exit 1
29+
}
30+
$firstCluster = $clusters[0]
31+
$target = new-object psobject -property @{
32+
Name = $firstCluster.name
33+
Location = $firstCluster.location
34+
}
35+
Write-MinorStep "DeploymentTarget: $($target | ConvertTo-Json)"
36+
37+
return $target
38+
}

docs/Configuration.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ The dashboard can currently monitor via SignalFx, Bosun, Orion or limited amount
197197
/* If using Orion, a host (for links, not API) and a connection string needs to be provided */
198198
//"orion": {
199199
// "host": "orion.mydomain.com",
200-
// "connectionString": "Data Source=ny-orionsql01;Initial Catalog=SolarWindsOrion;Integrated Security=SSPI;Timeout=10"
200+
// "connectionString": "Data Source=ny-orionsql01;Initial Catalog=SolarWindsOrion;Integrated Security=SSPI;Timeout=10;TrustServerCertificate=True"
201201
//}
202202
},
203203
/* General dashboard UI settings */
@@ -319,7 +319,7 @@ Exceptions from a [StackExchange.Exceptional](https://nickcraver.com/StackExchan
319319
"queryTimeoutMs": 2000, // (Optional - default: 30000) The query timeout before giving up on this store (when shit hits the fan...maybe a store isn't available)
320320
"pollIntervalSeconds": 30, // (Optional - default: 300) How often to poll this store for new/changed exceptions
321321
// SQL Server connection string to the Exceptional store
322-
"connectionString": "Server=ny-sql01;Database=NY.Exceptions;Integrated Security=SSPI;"
322+
"connectionString": "Server=ny-sql01;Database=NY.Exceptions;Integrated Security=SSPI;TrustServerCertificate=True"
323323
}
324324
],
325325
/* (Optional) Replacements for Stack Trace descriptions. It's general purpose with specific uses in mind.
@@ -494,7 +494,7 @@ Because AlwaysOn AGs can get into a state where the master does not know about t
494494
{
495495
// (Optional) The default connection string used unless specifically provided on a node
496496
// $ServerName$ gets replaces with the name property of the instance
497-
"defaultConnectionString": "Data Source=$ServerName$;Initial Catalog=master;Integrated Security=SSPI;",
497+
"defaultConnectionString": "Data Source=$ServerName$;Initial Catalog=master;Integrated Security=SSPI;TrustServerCertificate=True",
498498
"refreshIntervalSeconds": 30, // (Optional - default: 60) How often to poll all servers
499499
"clusters": [ // (Optional) Always On Availability Group Clusters
500500
{
@@ -510,7 +510,7 @@ Because AlwaysOn AGs can get into a state where the master does not know about t
510510
"instances": [ // (Optional) Standalone instances
511511
{ // An example with all the options configured
512512
"name": "NY-DB05",
513-
"connectionString": "Data Source=NY-DB05;Initial Catalog=bob;Integrated Security=SSPI;",
513+
"connectionString": "Data Source=NY-DB05;Initial Catalog=bob;Integrated Security=SSPI;TrustServerCertificate=True",
514514
"refreshIntervalSeconds": 200
515515
},
516516
// Some standalone servers (default instance) using default refresh and connection strings:

docs/Docs.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<Project Sdk="Microsoft.Build.NoTargets/3.2.14">
22
<PropertyGroup>
3-
<TargetFramework>net6.0</TargetFramework>
3+
<TargetFramework>net8.0</TargetFramework>
44
</PropertyGroup>
55
</Project>

src/Opserver.Core/Helpers/OpserverConfigException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ public class OpserverConfigException : Exception
88
public OpserverConfigException() { }
99
public OpserverConfigException(string message) : base(message) { }
1010
public OpserverConfigException(string message, Exception innerException) : base(message, innerException) { }
11-
protected OpserverConfigException(SerializationInfo info, StreamingContext context) : base(info, context) { }
11+
1212
}
1313
}

src/Opserver.Core/Opserver.Core.csproj

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,35 @@
22
<PropertyGroup>
33
<RootNamespace>Opserver</RootNamespace>
44
<AssemblyName>Opserver.Core</AssemblyName>
5-
<TargetFrameworks>net6.0</TargetFrameworks>
5+
<TargetFrameworks>net8.0</TargetFrameworks>
66
<DebugSymbols>true</DebugSymbols>
77
<DebugType>embedded</DebugType>
88
</PropertyGroup>
99
<ItemGroup>
10-
<PackageReference Include="Dapper" Version="2.0.123" />
11-
<PackageReference Include="Enums.NET" Version="4.0.0" />
10+
<PackageReference Include="Dapper" Version="2.1.35" />
11+
<PackageReference Include="Enums.NET" Version="5.0.0" />
1212
<PackageReference Include="Jil" Version="2.17.0" />
1313
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.2" />
14-
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="6.0.0" />
15-
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0" />
16-
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="6.0.0" />
17-
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
18-
<PackageReference Include="Microsoft.Net.Http.Headers" Version="2.2.8" />
19-
<PackageReference Include="MiniProfiler.Shared" Version="4.3.8" />
14+
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="9.0.0" />
15+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.0" />
16+
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="9.0.0" />
17+
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.0" />
18+
<PackageReference Include="Microsoft.Net.Http.Headers" Version="8.0.11" />
19+
<PackageReference Include="MiniProfiler.Shared" Version="4.5.4" />
2020
<PackageReference Include="Sigil" Version="5.0.0" />
21-
<PackageReference Include="StackExchange.Exceptional.Shared" Version="2.2.32" />
22-
<PackageReference Include="StackExchange.Redis" Version="2.6.122" />
21+
<PackageReference Include="StackExchange.Exceptional.Shared" Version="3.0.1" />
22+
<PackageReference Include="StackExchange.Redis" Version="2.8.22" />
2323
<PackageReference Include="StackExchange.Utils.Http" Version="0.3.48" />
24-
<PackageReference Include="System.DirectoryServices" Version="6.0.0" />
25-
<PackageReference Include="System.Management" Version="6.0.0" />
26-
<PackageReference Include="System.Runtime.Caching" Version="6.0.0" />
24+
<PackageReference Include="System.DirectoryServices" Version="9.0.0" />
25+
<PackageReference Include="System.Management" Version="9.0.0" />
26+
<PackageReference Include="System.Runtime.Caching" Version="9.0.0" />
2727
</ItemGroup>
2828
<ItemGroup>
2929
<Compile Update="Data\SQL\QueryPlans\ShowPlanXML.cs" SubType="Code" />
3030
<Compile Update="Data\SQL\QueryPlans\ShowPlanXML.generated.cs" SubType="Code" />
3131
</ItemGroup>
32+
<ItemGroup>
33+
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="8.0.0" />
34+
<PackageReference Update="Nerdbank.GitVersioning" Version="3.7.112" />
35+
</ItemGroup>
3236
</Project>

src/Opserver.Web/Opserver.Web.csproj

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,29 @@
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
44
<RootNamespace>Opserver</RootNamespace>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
</PropertyGroup>
77
<ItemGroup>
8-
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.1" />
9-
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
8+
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="9.0.0" />
109
<ProjectReference Include="..\Opserver.Core\Opserver.Core.csproj" />
1110
<PackageReference Include="BuildBundlerMinifier" Version="3.2.449" PrivateAssets="all" />
1211
<PackageReference Include="BuildWebCompiler" Condition="'$(OS)' == 'Windows_NT'" Version="1.12.405" PrivateAssets="all" />
13-
<PackageReference Include="MiniProfiler.AspNetCore.Mvc" Version="4.2.22" />
14-
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="6.35.0" />
15-
<PackageReference Include="Serilog" Version="4.1.0" />
12+
<PackageReference Include="MiniProfiler.AspNetCore.Mvc" Version="4.5.4" />
13+
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="8.3.0" />
14+
<PackageReference Include="Serilog" Version="4.2.0" />
1615
<PackageReference Include="SerilogAnalyzer" Version="0.15.0" />
17-
<PackageReference Include="Serilog.AspNetCore" Version="8.0.3" />
16+
<PackageReference Include="Serilog.AspNetCore" Version="9.0.0" />
1817
<PackageReference Include="Serilog.Enrichers.Environment" Version="3.0.1" />
1918
<PackageReference Include="Serilog.Enrichers.Sensitive" Version="1.7.3" />
2019
<PackageReference Include="Serilog.Enrichers.Thread" Version="4.0.0" />
2120
<PackageReference Include="Serilog.Exceptions" Version="8.4.0" />
2221
<PackageReference Include="Serilog.Expressions" Version="5.0.0" />
23-
<PackageReference Include="Serilog.Settings.Configuration" Version="8.0.4" />
22+
<PackageReference Include="Serilog.Settings.Configuration" Version="9.0.0" />
2423
<PackageReference Include="Serilog.Sinks.Async" Version="2.1.0" />
2524
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
2625
<PackageReference Include="Serilog.Sinks.Debug" Version="3.0.0" />
27-
<PackageReference Include="StackExchange.Exceptional.AspNetCore" Version="2.2.32" />
28-
<PackageReference Include="System.DirectoryServices.AccountManagement" Version="6.0.0" />
26+
<PackageReference Include="StackExchange.Exceptional.AspNetCore" Version="3.0.1" />
27+
<PackageReference Include="System.DirectoryServices.AccountManagement" Version="9.0.0" />
2928
<Reference Include="System.Management" />
3029
</ItemGroup>
3130
<ItemGroup>
@@ -37,4 +36,8 @@
3736
<None Include="Config\*.example.json" />
3837
<None Include="compilerconfig.json" />
3938
</ItemGroup>
39+
<ItemGroup>
40+
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="8.0.0" />
41+
<PackageReference Update="Nerdbank.GitVersioning" Version="3.7.112" />
42+
</ItemGroup>
4043
</Project>

src/Opserver.Web/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public void ConfigureServices(IServiceCollection services)
166166
foreach (var knownNetwork in knownNetworks)
167167
{
168168
var ipNet = IPNet.Parse(knownNetwork);
169-
options.KnownNetworks.Add(new IPNetwork(ipNet.IPAddress, ipNet.CIDR));
169+
options.KnownNetworks.Add(new Microsoft.AspNetCore.HttpOverrides.IPNetwork(ipNet.IPAddress, ipNet.CIDR));
170170
}
171171
}
172172
}

src/Opserver.Web/opserverSettings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"Modules": {
88
/* Configuration for the SQL Server dashboard */
99
"Sql": {
10-
//"defaultConnectionString": "Data Source=$ServerName$;Initial Catalog=master;Integrated Security=SSPI;",
10+
//"defaultConnectionString": "Data Source=$ServerName$;Initial Catalog=master;Integrated Security=SSPI;TrustServerCertificate=True",
1111
//"refreshIntervalSeconds": 30,
1212
//"instances": [
1313
// { "name": "localhost" }
@@ -42,7 +42,7 @@
4242
// {
4343
// "name": "Local",
4444
// "queryTimeoutMs": 2000,
45-
// "connectionString": "Server=.;Database=Local.Exceptions;Integrated Security=SSPI;"
45+
// "connectionString": "Server=.;Database=Local.Exceptions;Integrated Security=SSPI;TrustServerCertificate=True"
4646
// }
4747
//],
4848
"stackTraceReplacements": [

tests/Opserver.Tests/Opserver.Tests.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
<PropertyGroup>
33
<RootNamespace>Opserver.Tests</RootNamespace>
44
<AssemblyName>Opserver.Tests</AssemblyName>
5-
<TargetFrameworks>net6.0</TargetFrameworks>
5+
<TargetFrameworks>net8.0</TargetFrameworks>
66
</PropertyGroup>
77
<ItemGroup>
88
<ProjectReference Include="../../src/Opserver.Web/Opserver.Web.csproj" />
9-
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
10-
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="6.0.1" />
11-
</ItemGroup>
9+
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.0" />
10+
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="8.0.11" />
11+
</ItemGroup>
1212
</Project>

0 commit comments

Comments
 (0)