๐ŸŒˆTravis CI : CodeDeploy ์ƒ์„ฑ ๋ฐ ์ค€๋น„

๊น€์„ฑ์ธยท2023๋…„ 9์›” 18์ผ
0

[DevOps] ๐ŸณDocker & Kubernetes

๋ชฉ๋ก ๋ณด๊ธฐ
4/62
post-thumbnail

1. IAM ์—ญํ•  ๋งŒ๋“ค๊ธฐ

2. EC2 IAM ์—ญํ•  ์ˆ˜์ •

3. CodeDeploy ์—์ด์ „ํŠธ ์„ค์น˜

์•„๋งˆ์กด ๊ณต์‹ ๋ฌธ์„œ:
https://docs.aws.amazon.com/ko_kr/codedeploy/latest/userguide/codedeploy-agent-operations-install-ubuntu.html
wget https://aws-codedeploy-ap-northeast-2.s3.ap-northeast-2.amazonaws.com/latest/install

install ํŒŒ์ผ ์‹คํ–‰ sudo ./install auto
codedeploy ์‹คํ–‰ ํ™•์ธ sudo service codedeploy-agent status

4. CodeDeploy ์—ญํ•  ์ƒ์„ฑ

5. CodeDeploy ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜


6. EC2 ๋””๋ ‰ํ„ฐ๋ฆฌ ์ƒ์„ฑ

7. .travis.yml ์ˆ˜์ •

language: java
jdk:
  - openjdk11

branches:
  only:
    - master

cache:
  directories:
    - '$HOME/ .m2/repository'
    - '$HOME/ .gradle'

script: "./gradlew clean build"

before_install:
  - chmod +x gradlew

before_deploy:
  - zip -r practice-build *
  - mkdir -p deploy
  - mv practice-build.zip deploy/practice-build.zip

deploy:
  - provider: s3
    access_key_id: $AWS_ACCESS_KEY
    secret_access_key: $AWS_ACCESS_SECRET
    bucket: practice-build
    region: ap-northeast-2
    skip_cleanup: true
    acl: private
    local_dir: deploy
    wait-until-deployed: true

  - provider: codedeploy
    access_key_id: $AWS_ACCESS_KEY
    secret_access_key: $AWS_ACCESS_SECRET
    bucket:  //s3 ๋ฒ„ํ‚ท ์ด๋ฆ„
    key: //s3์— ์กด์žฌํ•˜๋Š” ํ‚ค ์ด๋ฆ„
    bundle_type: zip
    application: //codedeploy ์• ํ”Œ๋ ˆ์ผ€์ด์…˜์ด๋ฆ„
    deployment_group:  //codedeploy ๊ทธ๋ฃน์ด๋ฆ„
    region: ap-northeast-2
    wait-until-deployed: true

๋‹ค์Œ ํฌ์ŠคํŒ…

profile
๊ฐœ๋ฐœ์ž๊ฐ€ ๊ฟˆ์ธ 25์‚ด ๋Œ€ํ•™์ƒ์ž…๋‹ˆ๋‹ค.

0๊ฐœ์˜ ๋Œ“๊ธ€