Browse Source

Merge branch 'main' into dev

pull/37/head
yusufkaratoprak 6 years ago
committed by GitHub
parent
commit
750cc0fd7d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 65
      azure-pipelines-1.yml
  2. 2
      azure-pipelines.yml
  3. 5
      etc/docker/docker-compose.infrastructure.override.yml
  4. 10
      etc/docker/docker-compose.infrastructure.yml
  5. 19
      manifests/deployment.yml
  6. 10
      manifests/service.yml
  7. 2
      src/EventHub.BackgroundServices/appsettings.json
  8. 2
      src/EventHub.DbMigrator/appsettings.json
  9. 2
      src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EventHubMigrationsDbContextFactory.cs
  10. 2633
      src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210307195605_Initial.Designer.cs
  11. 31
      src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210321144318_Added_Indexes.cs
  12. 5273
      src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210421100913_Initial.Designer.cs
  13. 3149
      src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210421100913_Initial.cs
  14. 863
      src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/EventHubMigrationsDbContextModelSnapshot.cs
  15. 6
      src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubEntityFrameworkCoreModule.cs
  16. 2
      src/EventHub.EntityFrameworkCore/EventHub.EntityFrameworkCore.csproj
  17. 2
      src/EventHub.HttpApi.Host/appsettings.json
  18. 2
      src/EventHub.IdentityServer/appsettings.json

65
azure-pipelines-1.yml

@ -0,0 +1,65 @@
# Deploy to Azure Kubernetes Service
# Build and push image to Azure Container Registry; Deploy to Azure Kubernetes Service
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker
trigger:
- dev
variables:
# Container registry service connection established during pipeline creation
dockerRegistryServiceConnection: '0648130a-0d3e-41f3-b92e-fc7f620264e8'
imageRepository: 'voloeventhub'
containerRegistry: 'voloeventhub.azurecr.io'
dockerfilePath: '**/Dockerfile'
tag: '$(Build.BuildName)'
# Agent VM image name
vmImageName: 'ubuntu-latest'
stages:
- stage: Build
displayName: Build stage
jobs:
- job: Build
displayName: Build
pool:
vmImage: $(vmImageName)
steps:
- task: Docker@2
displayName: Build and push an image to container registry
inputs:
command: buildAndPush
repository: $(imageRepository)
dockerfile: $(dockerfilePath)
containerRegistry: $(dockerRegistryServiceConnection)
tags: |
$(tag)
- publish: manifests
artifact: manifests
- stage: Deploy
displayName: Deploy stage
dependsOn: Build
jobs:
- deployment: Deploy
displayName: Deploy
pool:
vmImage: $(vmImageName)
environment: 'volosofteventhub.default'
strategy:
runOnce:
deploy:
steps:
- task: KubernetesManifest@0
displayName: Deploy to Kubernetes cluster
inputs:
action: deploy
manifests: |
$(Pipeline.Workspace)/manifests/deployment.yml
$(Pipeline.Workspace)/manifests/service.yml
containers: |
$(containerRegistry)/$(imageRepository):$(tag)

2
azure-pipelines.yml

@ -12,7 +12,7 @@ variables:
imageRepository: 'voloeventhub' imageRepository: 'voloeventhub'
containerRegistry: 'voloeventhub.azurecr.io' containerRegistry: 'voloeventhub.azurecr.io'
dockerfilePath: '**/Dockerfile' dockerfilePath: '**/Dockerfile'
tag: '$(Build.BuildName)' tag: '$(Build.BuildNumber)'
# Agent VM image name # Agent VM image name
vmImageName: 'ubuntu-latest' vmImageName: 'ubuntu-latest'

5
etc/docker/docker-compose.infrastructure.override.yml

@ -3,4 +3,7 @@ version: '3.7'
services: services:
redis: redis:
ports: ports:
- "6379:6379" - "6379:6379"
postgresql:
ports:
- "5432:5432"

10
etc/docker/docker-compose.infrastructure.yml

@ -5,7 +5,15 @@ services:
image: redis:6.0.10-alpine image: redis:6.0.10-alpine
networks: networks:
- eventhub-network - eventhub-network
postgresql:
image: postgres
restart: always
environment:
POSTGRES_USER: "root"
POSTGRES_PASSWORD: "root"
networks:
- eventhub-network
networks: networks:
eventhub-network: eventhub-network:
external: true external: true

19
manifests/deployment.yml

@ -0,0 +1,19 @@
apiVersion : apps/v1
kind: Deployment
metadata:
name: voloeventhub
spec:
replicas: 1
selector:
matchLabels:
app: voloeventhub
template:
metadata:
labels:
app: voloeventhub
spec:
containers:
- name: voloeventhub
image: voloeventhub.azurecr.io/voloeventhub
ports:
- containerPort: 80

10
manifests/service.yml

@ -0,0 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: voloeventhub
spec:
type: LoadBalancer
ports:
- port: 80
selector:
app: voloeventhub

2
src/EventHub.BackgroundServices/appsettings.json

@ -1,6 +1,8 @@
{ {
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=tcp:volosofteventhub.database.windows.net,1433;Initial Catalog=volosofteventhub;Persist Security Info=False;User ID=volosoft;Password=@Palandoken2021;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;" "Default": "Server=tcp:volosofteventhub.database.windows.net,1433;Initial Catalog=volosofteventhub;Persist Security Info=False;User ID=volosoft;Password=@Palandoken2021;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"
}, },
"Redis": { "Redis": {
"Configuration": "Server=tcp:volosofteventhub.database.windows.net,1433;Initial Catalog=volosofteventhub;Persist Security Info=False;User ID=volosoft;Password=@Palandoken2021;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;" "Configuration": "Server=tcp:volosofteventhub.database.windows.net,1433;Initial Catalog=volosofteventhub;Persist Security Info=False;User ID=volosoft;Password=@Palandoken2021;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"

2
src/EventHub.DbMigrator/appsettings.json

@ -1,6 +1,8 @@
{ {
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=tcp:volosofteventhub.database.windows.net,1433;Initial Catalog=volosofteventhub;Persist Security Info=False;User ID=volosoft;Password=@Palandoken2021;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;" "Default": "Server=tcp:volosofteventhub.database.windows.net,1433;Initial Catalog=volosofteventhub;Persist Security Info=False;User ID=volosoft;Password=@Palandoken2021;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"
}, },
"IdentityServer": { "IdentityServer": {
"Clients": { "Clients": {

2
src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EventHubMigrationsDbContextFactory.cs

@ -16,7 +16,7 @@ namespace EventHub.EntityFrameworkCore
var configuration = BuildConfiguration(); var configuration = BuildConfiguration();
var builder = new DbContextOptionsBuilder<EventHubMigrationsDbContext>() var builder = new DbContextOptionsBuilder<EventHubMigrationsDbContext>()
.UseSqlServer(configuration.GetConnectionString("Default")); .UseNpgsql(configuration.GetConnectionString("Default"));
return new EventHubMigrationsDbContext(builder.Options); return new EventHubMigrationsDbContext(builder.Options);
} }

2633
src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210307195605_Initial.Designer.cs

File diff suppressed because it is too large

31
src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210321144318_Added_Indexes.cs

@ -1,31 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace EventHub.Migrations
{
public partial class Added_Indexes : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateIndex(
name: "IX_EhEvents_IsEmailSentToMembers",
table: "EhEvents",
column: "IsEmailSentToMembers");
migrationBuilder.CreateIndex(
name: "IX_EhEvents_IsRemindingEmailSent_StartTime",
table: "EhEvents",
columns: new[] { "IsRemindingEmailSent", "StartTime" });
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_EhEvents_IsEmailSentToMembers",
table: "EhEvents");
migrationBuilder.DropIndex(
name: "IX_EhEvents_IsRemindingEmailSent_StartTime",
table: "EhEvents");
}
}
}

5273
src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210321144318_Added_Indexes.Designer.cs → src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210421100913_Initial.Designer.cs

File diff suppressed because it is too large

3149
src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210307195605_Initial.cs → src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210421100913_Initial.cs

File diff suppressed because it is too large

863
src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/EventHubMigrationsDbContextModelSnapshot.cs

File diff suppressed because it is too large

6
src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubEntityFrameworkCoreModule.cs

@ -2,13 +2,13 @@ using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AuditLogging.EntityFrameworkCore; using Volo.Abp.AuditLogging.EntityFrameworkCore;
using Volo.Abp.BackgroundJobs.EntityFrameworkCore; using Volo.Abp.BackgroundJobs.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.SqlServer;
using Volo.Abp.Identity.EntityFrameworkCore; using Volo.Abp.Identity.EntityFrameworkCore;
using Volo.Abp.IdentityServer.EntityFrameworkCore; using Volo.Abp.IdentityServer.EntityFrameworkCore;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.EntityFrameworkCore; using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore; using Volo.Abp.SettingManagement.EntityFrameworkCore;
using Volo.Abp.BlobStoring.Database.EntityFrameworkCore; using Volo.Abp.BlobStoring.Database.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.PostgreSql;
namespace EventHub.EntityFrameworkCore namespace EventHub.EntityFrameworkCore
{ {
@ -18,7 +18,7 @@ namespace EventHub.EntityFrameworkCore
typeof(AbpIdentityServerEntityFrameworkCoreModule), typeof(AbpIdentityServerEntityFrameworkCoreModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule), typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpSettingManagementEntityFrameworkCoreModule), typeof(AbpSettingManagementEntityFrameworkCoreModule),
typeof(AbpEntityFrameworkCoreSqlServerModule), typeof(AbpEntityFrameworkCorePostgreSqlModule),
typeof(AbpBackgroundJobsEntityFrameworkCoreModule), typeof(AbpBackgroundJobsEntityFrameworkCoreModule),
typeof(AbpAuditLoggingEntityFrameworkCoreModule), typeof(AbpAuditLoggingEntityFrameworkCoreModule),
typeof(BlobStoringDatabaseEntityFrameworkCoreModule) typeof(BlobStoringDatabaseEntityFrameworkCoreModule)
@ -43,7 +43,7 @@ namespace EventHub.EntityFrameworkCore
{ {
/* The main point to change your DBMS. /* The main point to change your DBMS.
* See also EventHubMigrationsDbContextFactory for EF Core tooling. */ * See also EventHubMigrationsDbContextFactory for EF Core tooling. */
options.UseSqlServer(); options.UseNpgsql();
}); });
} }
} }

2
src/EventHub.EntityFrameworkCore/EventHub.EntityFrameworkCore.csproj

@ -10,7 +10,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Volo.Abp.BlobStoring.Database.EntityFrameworkCore" Version="4.2.1" /> <PackageReference Include="Volo.Abp.BlobStoring.Database.EntityFrameworkCore" Version="4.2.1" />
<ProjectReference Include="..\EventHub.Domain\EventHub.Domain.csproj" /> <ProjectReference Include="..\EventHub.Domain\EventHub.Domain.csproj" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" Version="4.2.1" /> <PackageReference Include="Volo.Abp.EntityFrameworkCore.PostgreSql" Version="4.2.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="4.2.1" /> <PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="4.2.1" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="4.2.1" /> <PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="4.2.1" />
<PackageReference Include="Volo.Abp.Identity.EntityFrameworkCore" Version="4.2.1" /> <PackageReference Include="Volo.Abp.Identity.EntityFrameworkCore" Version="4.2.1" />

2
src/EventHub.HttpApi.Host/appsettings.json

@ -3,7 +3,9 @@
"CorsOrigins": "https://*.EventHub.com,https://localhost:44307,https://localhost:44308" "CorsOrigins": "https://*.EventHub.com,https://localhost:44307,https://localhost:44308"
}, },
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=tcp:volosofteventhub.database.windows.net,1433;Initial Catalog=volosofteventhub;Persist Security Info=False;User ID=volosoft;Password=@Palandoken2021;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;" "Default": "Server=tcp:volosofteventhub.database.windows.net,1433;Initial Catalog=volosofteventhub;Persist Security Info=False;User ID=volosoft;Password=@Palandoken2021;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"
}, },
"Redis": { "Redis": {
"Configuration": "volosofteventhub.redis.cache.windows.net:6380,password=9Kc6E1lbwy5c+RHR1KZS26JPydYR5SeR8UixdECQWv4=,ssl=True,abortConnect=False" "Configuration": "volosofteventhub.redis.cache.windows.net:6380,password=9Kc6E1lbwy5c+RHR1KZS26JPydYR5SeR8UixdECQWv4=,ssl=True,abortConnect=False"

2
src/EventHub.IdentityServer/appsettings.json

@ -5,7 +5,9 @@
"RedirectAllowedUrls": "http://localhost:4200,https://localhost:44307" "RedirectAllowedUrls": "http://localhost:4200,https://localhost:44307"
}, },
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=tcp:volosofteventhub.database.windows.net,1433;Initial Catalog=volosofteventhub;Persist Security Info=False;User ID=volosoft;Password=@Palandoken2021;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;" "Default": "Server=tcp:volosofteventhub.database.windows.net,1433;Initial Catalog=volosofteventhub;Persist Security Info=False;User ID=volosoft;Password=@Palandoken2021;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"
}, },
"Redis": { "Redis": {
"Configuration": "volosofteventhub.redis.cache.windows.net:6380,password=9Kc6E1lbwy5c+RHR1KZS26JPydYR5SeR8UixdECQWv4=,ssl=True,abortConnect=False" "Configuration": "volosofteventhub.redis.cache.windows.net:6380,password=9Kc6E1lbwy5c+RHR1KZS26JPydYR5SeR8UixdECQWv4=,ssl=True,abortConnect=False"

Loading…
Cancel
Save