国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

? ??? ?? ??? ???? CDKTF? ???? AWS EC? SpringBoot API? ???? ??? ??????

CDKTF? ???? AWS EC? SpringBoot API? ???? ??? ??????

Jan 24, 2025 am 10:11 AM

Java ???? AWS ECS? Spring Boot API? ???? ??? ??? ? ?? ??? CDKTF(Cloud Development Kit for Terraform) ????? ?? ????? ??? ? ?? ??? ???? ??????.

?? ????? Python? ?? ?? ????? ??? ???? IaC(Infrastructure as Code)? ??? ? ?? ?????? CDKTF? ??????. ? ??? CDKTF? ? ?? GA ???? ????? ??? ?? ????? ??? ?????. ? ????? CDKTF? ???? AWS ECS? Spring Boot API? ???? ??? ?????.

? Github ????? ? ??? ??? ?????.

???? ??

??? ?? ??? ???? ?? ????? ????? ??? ?????.

CDKTF? ???? AWS EC? SpringBoot API? ???? ??? ??????

? ??????? ????? 3?? ???? ?? ? ????.

  1. ????:
    • VPC
    • ??? ? ???? ???
    • ??? ?????
    • NAT ?????
  2. ???:
    • ?????? ?? ???(ALB)
    • ???
    • ECS ????
  3. ??? ??:
    • ????
    • ECS ???
    • ?? ??

1??: Spring Boot ?????? ?????

??? ?? ?? Java API? GitHub?? ??? ? ????.

3?? ?????? ?? ??? REST API? ?????.

  1. /ping: "pong" ???? ?????. ? ?????? API? ???? ????? ? ?????. ?? ????? ?? Prometheus ??? ????? ??????.
  2. /healthcheck: "ok"? ???? ??????? ???? ???? ??? ???? ?? ?? ?? ????? ??? ???. /ping? ????? ?? ???? ?? Prometheus ???? ???????.
  3. /hello: ?? ?? ????(???? "World")? ???? ?? ???(?: "Hello, [name]!")? ?????. ? ?????? Prometheus ????? ?????.

Dockerfile? ??? ?????.

FROM maven:3.9-amazoncorretto-21 AS builder

WORKDIR /app

COPY pom.xml .

COPY src src

RUN mvn clean package

# amazon java distribution
FROM amazoncorretto:21-alpine

COPY --from=builder /app/target/*.jar /app/java-api.jar

EXPOSE 8080

ENTRYPOINT ["java","-jar","/app/java-api.jar"]

??????? ??? ??? ?????!

2??: AWS CDKTF ??

AWS CDKTF? ???? Python? ???? AWS ???? ???? ??? ? ????.

1. ????

- [**python (3.13)**](https://www.python.org/)
- [**pipenv**](https://pipenv.pypa.io/en/latest/)
- [**npm**](https://nodejs.org/en/)

2. CDKTF ? ??? ??

CDKTF ? ?? ?? ??? ???? ??? ??? ??? ?????.

$ npm install -g cdktf-cli@latest

??? ?? ??? ??? ?? ? ????? ??? ? ?? cdktf CLI? ?????.

3. CDKTF ?????? ???

??? ???? ??? Python ????? ????? ? ????.

FROM maven:3.9-amazoncorretto-21 AS builder

WORKDIR /app

COPY pom.xml .

COPY src src

RUN mvn clean package

# amazon java distribution
FROM amazoncorretto:21-alpine

COPY --from=builder /app/target/*.jar /app/java-api.jar

EXPOSE 8080

ENTRYPOINT ["java","-jar","/app/java-api.jar"]
????? ?? ? ?? ??? ??? ?? ???? ?????. ??? ?? main.pyfile??? : ???

3 ?? : ?? ?

a stack
- [**python (3.13)**](https://www.python.org/)
- [**pipenv**](https://pipenv.pypa.io/en/latest/)
- [**npm**](https://nodejs.org/en/)
? Terraform (CDKTF)? CDK? ??? TerraForm ???? ????? ??? ??? ??? ?????. ??? ?? ???? ?? ?? ??? ?? ??? ?? ??? ???????. ?? ?? ???? ????? ??? ?? ??? ?????.

1. ???? ??

<_> ????? Network_stack.py ??? ? ?????? ?? ???? ???? ????? ?? ??? ??????.

?? ?? ??? ?????? ?? ??? ???? Terraform ?? ??? ?????.

???? ??? ? ??????

$ npm install -g cdktf-cli@latest


??? VPC? ???? ???? ?? ???? ???? :

# init the project using aws provider
$ mkdir samples-fargate

$ cd samples-fargate && cdktf init --template=python --providers=aws

2. ??? ?? ???? ?
infra_stack.py ??? ??????

#!/usr/bin/env python
from constructs import Construct
from cdktf import App, TerraformStack

class MyStack(TerraformStack):
    def __init__(self, scope: Construct, id: str):
        super().__init__(scope, id)

        # define resources here

app = App()
MyStack(app, "aws-cdktf-samples-fargate")

app.synth()
?? ??? ???? ???? ?? ?? ??? ??????. <p> <br> ??? ?????? : </p> <pre class="brush:php;toolbar:false">$ mkdir infra $ cd infra &amp;&amp; touch network_stack.py </pre> <p> <inf> ? ?????? <br> <n> alb? DNS ??? ??????. </n></inf></p> <pre class="brush:php;toolbar:false">from constructs import Construct from cdktf import S3Backend, TerraformStack from cdktf_cdktf_provider_aws.provider import AwsProvider from cdktf_cdktf_provider_aws.vpc import Vpc from cdktf_cdktf_provider_aws.subnet import Subnet from cdktf_cdktf_provider_aws.eip import Eip from cdktf_cdktf_provider_aws.nat_gateway import NatGateway from cdktf_cdktf_provider_aws.route import Route from cdktf_cdktf_provider_aws.route_table import RouteTable from cdktf_cdktf_provider_aws.route_table_association import RouteTableAssociation from cdktf_cdktf_provider_aws.internet_gateway import InternetGateway class NetworkStack(TerraformStack): def __init__(self, scope: Construct, ns: str, params: dict): super().__init__(scope, ns) self.region = params[&quot;region&quot;] # configure the AWS provider to use the us-east-1 region AwsProvider(self, &quot;AWS&quot;, region=self.region) # use S3 as backend S3Backend( self, bucket=params[&quot;backend_bucket&quot;], key=params[&quot;backend_key_prefix&quot;] + &quot;/network.tfstate&quot;, region=self.region, ) # create the vpc vpc_demo = Vpc(self, &quot;vpc-demo&quot;, cidr_block=&quot;192.168.0.0/16&quot;) # create two public subnets public_subnet1 = Subnet( self, &quot;public-subnet-1&quot;, vpc_id=vpc_demo.id, availability_zone=f&quot;{self.region}a&quot;, cidr_block=&quot;192.168.1.0/24&quot;, ) public_subnet2 = Subnet( self, &quot;public-subnet-2&quot;, vpc_id=vpc_demo.id, availability_zone=f&quot;{self.region}b&quot;, cidr_block=&quot;192.168.2.0/24&quot;, ) # create. the internet gateway igw = InternetGateway(self, &quot;igw&quot;, vpc_id=vpc_demo.id) # create the public route table public_rt = Route( self, &quot;public-rt&quot;, route_table_id=vpc_demo.main_route_table_id, destination_cidr_block=&quot;0.0.0.0/0&quot;, gateway_id=igw.id, ) # create the private subnets private_subnet1 = Subnet( self, &quot;private-subnet-1&quot;, vpc_id=vpc_demo.id, availability_zone=f&quot;{self.region}a&quot;, cidr_block=&quot;192.168.10.0/24&quot;, ) private_subnet2 = Subnet( self, &quot;private-subnet-2&quot;, vpc_id=vpc_demo.id, availability_zone=f&quot;{self.region}b&quot;, cidr_block=&quot;192.168.20.0/24&quot;, ) # create the Elastic IPs eip1 = Eip(self, &quot;nat-eip-1&quot;, depends_on=[igw]) eip2 = Eip(self, &quot;nat-eip-2&quot;, depends_on=[igw]) # create the NAT Gateways private_nat_gw1 = NatGateway( self, &quot;private-nat-1&quot;, subnet_id=public_subnet1.id, allocation_id=eip1.id, ) private_nat_gw2 = NatGateway( self, &quot;private-nat-2&quot;, subnet_id=public_subnet2.id, allocation_id=eip2.id, ) # create Route Tables private_rt1 = RouteTable(self, &quot;private-rt1&quot;, vpc_id=vpc_demo.id) private_rt2 = RouteTable(self, &quot;private-rt2&quot;, vpc_id=vpc_demo.id) # add default routes to tables Route( self, &quot;private-rt1-default-route&quot;, route_table_id=private_rt1.id, destination_cidr_block=&quot;0.0.0.0/0&quot;, nat_gateway_id=private_nat_gw1.id, ) Route( self, &quot;private-rt2-default-route&quot;, route_table_id=private_rt2.id, destination_cidr_block=&quot;0.0.0.0/0&quot;, nat_gateway_id=private_nat_gw2.id, ) # associate routes with subnets RouteTableAssociation( self, &quot;public-rt-association&quot;, subnet_id=private_subnet2.id, route_table_id=private_rt2.id, ) RouteTableAssociation( self, &quot;private-rt1-association&quot;, subnet_id=private_subnet1.id, route_table_id=private_rt1.id, ) RouteTableAssociation( self, &quot;private-rt2-association&quot;, subnet_id=private_subnet2.id, route_table_id=private_rt2.id, ) # terraform outputs self.vpc_id = vpc_demo.id self.public_subnets = [public_subnet1.id, public_subnet2.id] self.private_subnets = [private_subnet1.id, private_subnet2.id] </pre> <p> 3. <service> ??? ?? <img src="/static/imghw/default1.png" data-src="https://img.php.cn/upload/article/000/000/000/173768468278252.png" class="lazy" alt="Network Deployment" loading="lazy" style="max-width:90%" style="max-width:90%"> </service></p> ???? ? service_stack.py <lo> ??? ?????? <p> </p> <code> ?? ECS ??? ???? ????? ?? ??? ??????. <p> <img src="/static/imghw/default1.png" data-src="https://img.php.cn/upload/article/000/000/000/173768468369073.png" class="lazy" alt="Network Map" loading="lazy" style="max-width:90%" style="max-width:90%"> <..> main.py? ???????? (??????) : </..></p> <h3> ??? ?? ? ?????? </h3> ?? ??? ??! <created> ??? AWS ECS Fargate? ??? ???? ???? ?? ?? ???? ????? ??????. <to> ?? ??? ???? ??? ??????. <p> <strong> </strong> <br></p> <h2> 4??: Github ?? ???? </h2> <p>??? ????? ?? GitHub Actions ????? <strong>java-api</strong>? ??? ?????. Github Actions? ????? ???? ??? ??? ??? ? .github/workflows/deploy.yml ??? ???? ?? ???? ?????.<br> </p> <pre class="brush:php;toolbar:false">FROM maven:3.9-amazoncorretto-21 AS builder WORKDIR /app COPY pom.xml . COPY src src RUN mvn clean package # amazon java distribution FROM amazoncorretto:21-alpine COPY --from=builder /app/target/*.jar /app/java-api.jar EXPOSE 8080 ENTRYPOINT [&quot;java&quot;,&quot;-jar&quot;,&quot;/app/java-api.jar&quot;] </pre> <p>????? ? ???? ????.</p> <p><img src="/static/imghw/default1.png" data-src="https://img.php.cn/upload/article/000/000/000/173768468718392.png" class="lazy" alt="Github Actions" loading="lazy" style="max-width:90%" style="max-width:90%"></p> <p>?? ???? ?? ???? ????? ???????.</p> <p><img src="/static/imghw/default1.png" data-src="https://img.php.cn/upload/article/000/000/000/173768468825982.png" class="lazy" alt="ECS Service" loading="lazy" style="max-width:90%" style="max-width:90%"></p> <h2> 5??: ?? ?? </h2> <p>?? ????? ???? ??? ??????(<em>ALB URL? ??? URL? ??</em>).<br> </p> <pre class="brush:php;toolbar:false">- [**python (3.13)**](https://www.python.org/) - [**pipenv**](https://pipenv.pypa.io/en/latest/) - [**npm**](https://nodejs.org/en/) </pre> <blockquote> <p>?? ALB? ???? ??? ??? ?????!</p> </blockquote> <h2> <strong>?? ??</strong> </h2> <p>AWS CDKTF? ???? Python? ???? ???? ?? ??? ??? IaC ??? ??? ? ????. ? ?? ??? AWS ECS Fargate?? Spring Boot API? ?? ?????? ?????? ??? ??????.</p> <p>CDKTF? ???? Terraform? ??? ??? ???? ?? ???? ??? ?? ??? ??? ???.</p> <p>CDKTF ????? ??? ??? ?? ?? ???? ??? ????? ??? ?? ????? ??? ?? ??? ?? ???? ???.</p> <p>CDKTF? ?? ??? ???? ??? ??? ?????</p> <p>??? ??? ???? ??? ???.</p> </to></created>

? ??? CDKTF? ???? AWS EC? SpringBoot API? ???? ??? ??????? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? ????? ??
? ?? ??? ????? ???? ??? ??????, ???? ?????? ????. ? ???? ?? ???? ?? ??? ?? ????. ???? ??? ???? ???? ??? ?? admin@php.cn?? ?????.

? AI ??

Undresser.AI Undress

Undresser.AI Undress

???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover

AI Clothes Remover

???? ?? ???? ??? AI ?????.

Video Face Swap

Video Face Swap

??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

???

??? ??

???++7.3.1

???++7.3.1

???? ?? ?? ?? ???

SublimeText3 ??? ??

SublimeText3 ??? ??

??? ??, ???? ?? ????.

???? 13.0.1 ???

???? 13.0.1 ???

??? PHP ?? ?? ??

???? CS6

???? CS6

??? ? ?? ??

SublimeText3 Mac ??

SublimeText3 Mac ??

? ??? ?? ?? ?????(SublimeText3)

???

??? ??

?? ????
1787
16
Cakephp ????
1730
56
??? ????
1581
29
PHP ????
1448
31
???
Python? Unittest ?? Pytest ??? ??? ??? ??? ? ???? ?????? Python? Unittest ?? Pytest ??? ??? ??? ??? ? ???? ?????? Jun 19, 2025 am 01:10 AM

Python? Unittest ? Pytest? ??? ? ???? ??, ?? ? ??? ????? ? ?? ?? ???? ??? ??? ?????. 1. ??? ??? ?? ??? ???? ??? ??? ??? ?????. UnitTest? ??? ??? ???? ???? Test \ _? ???? ???? ?????. Pytest? ? ?????. Test \ _?? ???? ?? ? ??????. 2. ??? ?? ?? ? ?? ? ??? ??? ????. UnitTest? Assertequal, AssertTrue ? ?? ??? ???? ?? Pytest? ??? Assert ?? ???? ?? ?? ??? ???? ?????. 3. ?? ??? ?? ? ?? ????? ????? ????.

Numpy ? Pandas? ?? ??????? ??? ?? ? ??? Python? ??? ??? ? ????? Numpy ? Pandas? ?? ??????? ??? ?? ? ??? Python? ??? ??? ? ????? Jun 19, 2025 am 01:04 AM

pythonisidealfordataanalysisduetonumpyandpandas.1) numpyexcelsatnumericalcomputationsfast, multi-dimensionalArraysandectorizedOferationsLikenp.sqrt ()

?? ????? ???? ???? Python?? ??? ?????? ?? ????? ???? ???? Python?? ??? ?????? Jun 20, 2025 am 12:57 AM

?? ????? (DP)? ??? ??? ? ??? ?? ??? ??? ??? ? ??? ??? ?? ??? ???? ??? ????? ??????. ? ?? ?? ??? ????. 1. ??? (??) : ??? ?? ??? ???? ??? ???? ?? ??? ??????. 2. ??? (?) : ?? ???? ???? ????? ?????. ???? ???, ?? ?? ?? ?? ??/?? ?, ??? ??? ?? ?? ?? ??? ??? ????? ?????. ?????? ????? ?? ???? ?? ??? ? ???, ?? ??? ???? ?? ?? ??? ???? ??? ???? ????? ???? ???????.

__iter__ ? __next__? ???? ????? ??? ?? ???? ??? ??? ? ????? __iter__ ? __next__? ???? ????? ??? ?? ???? ??? ??? ? ????? Jun 19, 2025 am 01:12 AM

??? ?? ???? ????? ????? __iter_ ? __next__ ???? ???????. ① __iter__ ???? ??? ? ?? ??? ???? ??? ?? ?? ??? ?????. ② __next__ ???? ? ??? ?? ????, ?? ??? ??? ????, ? ?? ??? ??? stopiteration ??? ??????. status ??? ???? ??????? ?? ??? ??? ?? ?? ??? ???????. pile ?? ?? ???? ?? ??? ?? ? ??? ?? ? ??? ?????? ?????. simple ??? ??? ?? ?? ??? ?? ???? ???? ?? ??? ? ??? ?? ????? ???? ??? ??? ???????.

Python ????? ??? ???? ??? ??? ?? ?? ??? ?????? Python ????? ??? ???? ??? ??? ?? ?? ??? ?????? Jun 19, 2025 am 01:09 AM

Python? ?? ???? ?? ???, ?? ?? ????, ?? ???? ?? ? AI/ML ??? ???? ??? ?????. ??, Cpython? ???? ????? ?? ??, ?? ?? ??? ? ?? ? ?? ??? ?? ??? ??????. ??, ??? ????? ?? ?? ? ?? ??? ????? ?? ?? ? ? ??? ?? ?????. ??, Pyscript ? Nuitka? ?? ?? ???? ??? ??? ?? ??? ?????. ?????, AI ? ??? ?? ??? ?? ???? ??? ?? ???????? ???? ?? ? ??? ?????. ??? ??? Python? ??? ??? ????? ???? ?? ??? ???? ??? ?????.

??? ???? ????? ???? ?????? ??? ?????? ??? ???? ????? ???? ?????? ??? ?????? Jun 20, 2025 am 12:56 AM

Python? ?? ??? ???? ?????? ????, ????? ? ?? ??????? ???? ? ??? ??? ???? ?? ??? ?????. ?? TCP ??? ????? Socket.Socket ()? ???? ??? ??? ?? ? ??? ????? .listen ()? ???? ??? ?? .accept ()? ?? ????? ??? ???????. TCP ?????? ????? ?? ??? ??? ??? ????? .connect ()? ?? ? ?? .sendall ()? ???? ???? ??? .recv ()? ?? ??? ??????. ?? ?????? ????? 1. ??? : ??? ??? ? ???? ??? ? ????. 2. ??? I/O : ?? ??, Asyncio ?????? ? ??? ??? ?? ? ? ????. ???? ? ?

Python?? ??? ??? ???????? Python?? ??? ??? ???????? Jun 20, 2025 am 12:51 AM

Python List ????? ?? ?? ??? [Start : End : Step] ??? ????? ??? ???? ????. 1. ?? ????? ?? ??? ?? [start : end : step]???. ??? ?? ??? (??), ?? ? ??? (???? ??)?? ??? ?? ?????. 2. ????? ???? 0?? ????? ???? ????? ??? ??? ???? ????? ??? 1? ??????. 3. my_list [: n]? ???? ? ?? n ??? ?? my_list [-n :]? ???? ??? n ??? ????. 4. My_List [:: 2]? ?? ??? ?? ?? ??? ???? ??? ??? ?? ?? ?? ??? ???? ? ????. 5. ???? ???? ? ???? ???? ????

Python?? ??? ???? ???? ?? DateTime ??? ??? ?????? Python?? ??? ???? ???? ?? DateTime ??? ??? ?????? Jun 20, 2025 am 12:58 AM

Python? DateTime ??? ?? ?? ? ?? ?? ?? ??? ?? ? ? ????. 1. DateTime.now ()? ?? ?? ??? ??? ?? ? ??? ?? .date () ? .time ()? ?? ? ? ????. 2. DateTime (? = 2025, ? = 12, ? = 25, ?? = 18, ? = 30)? ?? ?? ?? ? ?? ??? ???? ?? ? ? ????. 3. .strftime ()? ???? ???? ???? ??????. ???? ??? %y, %m, %d, %h, %m ? %s; strptime ()? ???? ???? datetime ??? ?? ??????. 4. ?? ??? Timedelta? ??????

See all articles