공부기록
[실습] CICD-4
jhs0129
2023. 9. 29. 19:07
320x100
반응형
320x100
Trouble Shooting
문제점 1
Github Action을 통한 S3 bucket에 application zip file upload
- Unable to locate credentials
- AWS CLI 사용 시 권한이 없어서 생기는 문제
- S3에 접근 가능한 IAM USER 생성 후 Access key 할당
- github repository -> settings -> secrets and variables -> Action 탭에 할당받은 access key & secret key 추가
- S3 전송 전에 해당 step 추가
- name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v3 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: us-east-2
- An error occurred (DeploymentGroupNameRequiredException) when calling the CreateDeployment operation: Deployment Group name is missing An error occurred (ApplicationDoesNotExistException) when calling the CreateDeployment operation: Applications not found for
- EC2를 못찾는 경우
- region 확인 잘하자.. 시드니에 만들고 서울에 없으니 당연히 안나오지..
- The overall deployment failed because too many individual instances failed deployment, too few healthy instances are available for deployment, or some instances in your deployment group are experiencing problems.
- 권한 설정한 부분이 인식이 안된 경우
- codeDeploy agent restart
- nohup: failed to run command 'java'
- java download
반응형
문제점 2
submodule 내부 파일 복사 안되는 문제
프로젝트를 진행하면서 외부에 노출이 되면 안되는 키들을 Github Submodule을 통해서 관리를 해왔는데 해당 값들을 Github Action Workflow를 통해서 읽어오지 못하는 문제들이 있었다
- actions/checkout@v3에서 submodule 에 대한 속성 값을 설정해주어야 서브 모듈까지 checkout 할 수 있음
- submodule repo가 private일 경우 해당 repo에 접근 가능한 사람의 token을 필요로 함
```
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check Repo code With Submodules
uses: actions/checkout@v3
with:
submodules: 'true'
token: ${{secrets.GH_ACCESS_TOKEN}}
```
Github Token을 받아오는 방법은 해당 블로그를 참고해서 해결했다
Github 토큰 발급
GitHub 토큰 인증 로그인: Personal Access Token 생성 및 사용 방법
Git Hub에서 ID/PW기반의 Basic Authentication 인증을 금지하고, ID/Personal Access Token 방식의 Token Authentication 인증을 요구하고 있다. 앞으로는 소스코드를 push/clone하려고 하면, 아래와 같은 문구가 뜨면서
curryyou.tistory.com
320x100
반응형