This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"app": "npx ts-node bin/aws-cdk.ts", | |
"context": { | |
"app:name": "my-app", | |
"app:fullname": "My Awesome App", | |
"app:prodAwsAccountNumber": "", | |
"app:prodAwsRegion": "us-east-1", | |
"app:nonProdAwsAccountNumber": "[YOUR_NON_PROD_AWS_SUBACCOUNT_NUMBER]", | |
"app:nonProdAwsRegion": "us-east-1", | |
"@aws-cdk/core:enableStackNameDuplicates": "true", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Running a different platform | |
const env = new elasticbeanstalk.CfnEnvironment(this, `${appName}-eb-${props.envName}`, { | |
environmentName: `${appName}-${props.envName}`, | |
applicationName: appName, | |
solutionStackName: '64bit Amazon Linux 2 v3.1.2 running Python 3.7', | |
optionSettings: options | |
}) | |
// A specific AMI: | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# AWS CodeBuild buildspec file to run in a [mcr.microsoft.com/dotnet/sdk:5.0.101-focal](https://hub.docker.com/_/microsoft-dotnet-sdk) image | |
# "POST_BUILD will always run as long as BUILD was also run (regardless of BUILD's success or failure.) | |
# The same goes for UPLOAD_ARTIFACTS. This is so you can retrieve debug information/artifacts." | |
# So that is why we have tests as an independent step instead of having in buildspec.yml file | |
version: 0.2 | |
#env: | |
#variables: | |
#ASPNETCORE_ENVIRONMENT: Test | |
#ConnectionStrings__IntegrationTestsDb: Host=localhost;Port=5432;Database=integration_tests_{0};Username=integration_tests;Password=reallyStrongPwd123;Maximum Pool Size=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.eShopWeb.ApplicationCore.Entities.BasketAggregate; | |
using Microsoft.eShopWeb.ApplicationCore.Interfaces; | |
using Microsoft.eShopWeb.ApplicationCore.Services; | |
using Microsoft.eShopWeb.UnitTests.Builders; | |
using System.Collections.Generic; | |
using System.Threading.Tasks; | |
using Xunit; | |
namespace Microsoft.eShopWeb.IntegrationTests.Repositories.BasketRepositoryTests | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Microsoft.EntityFrameworkCore; | |
using Microsoft.eShopWeb.ApplicationCore.Entities; | |
using Microsoft.eShopWeb.ApplicationCore.Interfaces; | |
using Microsoft.eShopWeb.Infrastructure.Data; | |
using Microsoft.Extensions.DependencyInjection; | |
namespace Microsoft.eShopWeb.IntegrationTests.Repositories | |
{ | |
// Based on https://github.com/ardalis/CleanArchitecture/blob/master/tests/CleanArchitecture.IntegrationTests/Data/BaseEfRepoTestFixture.cs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<TargetFramework>net5.0</TargetFramework> | |
<RootNamespace>Microsoft.eShopWeb.IntegrationTests</RootNamespace> | |
<IsPackable>false</IsPackable> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="EFCore.NamingConventions" Version="5.0.0" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.EntityFrameworkCore; | |
using Microsoft.eShopWeb.ApplicationCore.Entities.BasketAggregate; | |
using Microsoft.eShopWeb.ApplicationCore.Interfaces; | |
using Microsoft.eShopWeb.ApplicationCore.Services; | |
using Microsoft.eShopWeb.Infrastructure.Data; | |
using Microsoft.eShopWeb.UnitTests.Builders; | |
using System.Collections.Generic; | |
using System.Threading.Tasks; | |
using Microsoft.Extensions.DependencyInjection; | |
using Xunit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- create native DB backup | |
exec msdb.dbo.rds_backup_database | |
@source_db_name='MY_DB_NAME', | |
@s3_arn_to_backup_to='arn:aws:s3:::my-db-name-rds-backups/0.9.9.bak', | |
@overwrite_s3_backup_file=1, | |
@type='FULL'; | |
-- see status of backup | |
exec msdb.dbo.rds_task_status @task_id=7; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ItemGroup> | |
<!-- AWS Elastic Beanstalk stuff https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-dotnet-core-linux.html --> | |
<None Include=".ebextensions\alb-default-process.config" CopyToOutputDirectory="Always" /> | |
<None Include=".ebextensions\env.config" CopyToOutputDirectory="Always" /> | |
<None Include=".ebextensions\logging.config" CopyToOutputDirectory="Always" /> | |
</ItemGroup> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
option_settings: | |
- namespace: aws:elasticbeanstalk:application:environment | |
option_name: PORT | |
value: 5000 |
NewerOlder