예제 #1
0
# import cdk classes
from vpc.vpc_stack import VpcStack
from kafka.kafka_stack import KafkaStack
from elastic.elastic_stack import ElasticStack
from logstash.logstash_stack import LogstashStack
from filebeat.filebeat_stack import FilebeatStack
from athena.athena_stack import AthenaStack
from kibana.kibana_stack import KibanaStack

app = core.App()

# Vpc stack
vpc_stack = VpcStack(
    app,
    "elkk-vpc",
    env=core.Environment(
        account=os.environ["CDK_DEFAULT_ACCOUNT"],
        region=os.environ["CDK_DEFAULT_REGION"],
    ),
)

# Kafka stack
kafka_stack = KafkaStack(
    app,
    "elkk-kafka",
    vpc_stack,
    client=True,
    env=core.Environment(
        account=os.environ["CDK_DEFAULT_ACCOUNT"],
        region=os.environ["CDK_DEFAULT_REGION"],
    ),
)
예제 #2
0
파일: app.py 프로젝트: ericdahl/cdk-ecs
#!/usr/bin/env python3

from aws_cdk import core

from vpc.vpc_stack import VpcStack
from ecs_cluster.ecs_cluster_stack import EcsClusterStack
from ecs_service_fargate_nginx.ecs_service_fargate_nginx import EcsServiceFargateNginx
from ecs_service_ec2_nginx.ecs_service_ec2_nginx import EcsServiceEc2Nginx

app = core.App()

vpc_stack = VpcStack(app, "cdk-ecs")
ecs_cluster_stack = EcsClusterStack(app,
                                    "cdk-ecs-cluster",
                                    vpc=vpc_stack.vpc,
                                    ec2_capacity=True)

ecs_service_fargate_nginx_stack = EcsServiceFargateNginx(
    app, "cdk-ecs-fargate-nginx", cluster=ecs_cluster_stack.cluster)

ecs_service_ec2_nginx_stack = EcsServiceEc2Nginx(
    app, "cdk-ecs-ec2-nginx", cluster=ecs_cluster_stack.cluster)

app.synth()
예제 #3
0
#!/usr/bin/env python3

from aws_cdk import core

from vpc.vpc_stack import VpcStack
from eks_cluster.eks_cluster_stack import EksClusterStack
from env import aws_account

app = core.App()

# VPC

vpc_stack = VpcStack(app, 'vpc-stack', env=aws_account)

# EKS

eks_cluster_stack = EksClusterStack(app, "eks-cluster", vpc=vpc_stack.eks_vpc, env=aws_account)

eks_cluster_stack.add_dependency(vpc_stack)

app.synth()
예제 #4
0
#!/usr/bin/env python3

from aws_cdk import core
from vpc.vpc_stack import VpcStack
import os

ACCOUNT_ID = os.environ.get('ACCOUNT_ID')
REGION = os.environ.get('REGION')
if not ACCOUNT_ID:
    raise Exception('[error] ACCOUNT_ID')
if not REGION:
    raise Exception('[error] REGION')
env = {
    'region': REGION,
    'account': ACCOUNT_ID,
}
app = core.App()
VpcStack(app, "vpc", env=env)
app.synth()
예제 #5
0
#!/usr/bin/env python3

from aws_cdk import core

from vpc.vpc_stack import VpcStack

app = core.App()
VpcStack(app, "vpc", env={"region": "us-east-2"})

app.synth()
예제 #6
0
#!/usr/bin/env python3

from aws_cdk import core
import os
from vpc.vpc_stack import VpcStack

app = core.App()
VpcStack(app,
         "vpc",
         env={
             'account': os.environ['CDK_DEFAULT_ACCOUNT'],
             'region': os.environ['CDK_DEFAULT_REGION']
         })

app.synth()
예제 #7
0
#!/usr/bin/env python3

from aws_cdk import core

from vpc.vpc_stack import VpcStack

app = core.App()
VpcStack(app, "vpc")

app.synth()