Inheritance: IIdentityManagementService
コード例 #1
0
        private static void Main(string[] args)
        {
            var configurationProvider = Configuration.Configure<ElasticBeanstalkDeploymentConfigurationProvider>()
                 .CreateAndBind(args);
            Log.Logger = SerilogColoredConsoleConfiguration
                .InitializeColoredConsoleLogger(configurationProvider)
                .ForContext(SerilogTemplateConfiguration.CorrelationIdName, Guid.NewGuid().ToString("N"));
            var loggerProvider = new LoggerProvider();
            var elasticBeanstalkService = new ElasticBeanstalkService(configurationProvider, loggerProvider);
            var s3Service = new S3Service(configurationProvider, loggerProvider);
            var ec2Service = new Ec2Service(configurationProvider, loggerProvider);
            var iamService = new IdentityManagementService(configurationProvider, loggerProvider);
            var smokeTestService = new SmokeTestService(configurationProvider, loggerProvider);
            var route53Service = new Route53Service(configurationProvider, loggerProvider);
            var configurationOptionSettingsProvider = new ConfigurationOptionSettingsProvider(loggerProvider,
                ec2Service,
                configurationProvider);
            var sslUploaderService = new SslUploaderService(configurationProvider, loggerProvider);
            var cloudfrontService = new CloudFrontService(configurationProvider, loggerProvider);
            var ebDeployer = new ElasticBeanstalkDeployer(configurationProvider,
                elasticBeanstalkService,
                s3Service,
                smokeTestService,
                iamService,
                configurationOptionSettingsProvider,
                route53Service,
                sslUploaderService,
                cloudfrontService,
                loggerProvider);

            ebDeployer.DeployDockerApplicationSingleAzAsync().Wait();
        }
コード例 #2
0
        private static void Main(string[] args)
        {
            var configurationProvider = Configuration.Configure<ElasticBeanstalkDeploymentConfigurationProvider>()
                .CreateAndBind(args);

            configurationProvider.ValidateConfig();

            Log.Logger = SerilogColoredConsoleConfiguration
                .InitializeColoredConsoleLogger(configurationProvider)
                .ForContext(SerilogTemplateConfiguration.CorrelationIdName, Guid.NewGuid().ToString("N"));
            var loggerProvider = new LoggerProvider();
            var elasticBeanstalkService = new ElasticBeanstalkService(configurationProvider, loggerProvider);
            var s3Service = new S3Service(configurationProvider, loggerProvider);
            var ec2Service = new Ec2Service(configurationProvider, loggerProvider);
            var iamService = new IdentityManagementService(configurationProvider, loggerProvider);
            var smokeTestService = new SmokeTestService(configurationProvider, loggerProvider);
            var route53Service = new Route53Service(configurationProvider, loggerProvider);
            var configurationOptionSettingProvider = new ConfigurationOptionSettingsProvider(loggerProvider, ec2Service,
                configurationProvider);
            var sslUploaderService = new SslUploaderService(configurationProvider, loggerProvider);
            var cloudfrontService = new CloudFrontService(configurationProvider, loggerProvider);
            var ebDeployer = new ElasticBeanstalkDeployer(configurationProvider,
                elasticBeanstalkService,
                s3Service,
                smokeTestService,
                iamService,
                configurationOptionSettingProvider,
                route53Service,
                sslUploaderService,
                cloudfrontService,
                loggerProvider);

            try
            {

                ebDeployer.DeployIisApplicationSingleAzAsync().Wait();
            }
            catch (Exception e)
            {
                loggerProvider.GetLogger().Fatal("Could not deploy IIS Application to Single AZ: {message}", e.Message);
                throw;
            }
        }