# ChatGPT로 DevOps 워크플로 개선하는 방법

> Clean Markdown view of GeekNews topic #10589. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=10589](https://news.hada.io/topic?id=10589)
- GeekNews Markdown: [https://news.hada.io/topic/10589.md](https://news.hada.io/topic/10589.md)
- Type: news
- Author: [ironlung](https://news.hada.io/@ironlung)
- Published: 2023-08-28T12:54:24+09:00
- Updated: 2023-08-28T12:54:24+09:00
- Original source: [insight.infograb.net](https://insight.infograb.net/blog/2023/06/27/harnessing-chatgpt-potential-to-improve-devops-workflows/)
- Points: 14
- Comments: 0

## Topic Body

- 문서화  
  - ChatGPT에 “DevOps 초급자용 튜토리얼 문서를 작성해달라”고 요청하는 상황  
  - “write a detailed tutorial for DevOps beginners”라는 프롬프트를 사용하고, 출력되는 파일 형식은 “markdown”으로 지정. 저장될 파일 이름은 “tutorial.md”로 지정  
  - CLI 명령어: python3 code_genetate.py --prompt "write a detailed tutorial for devops beginners" --format "markdown" --file_name "tutorial.md"  
  - 위 결과로 tutorial.md 파일 만들어짐  
  
- 실시간 번역  
  - 위에서 만든 tutorial.md 파일을 한국어로 번역해 한국어용 tutorial-kr.md파일을 만들기  
  - CLI 명령어: python3 file_process.py --input tutorial.md --output tutorial-kr.md --prompt "translate the above file into Korean"  
  - 위 결과로 tutorial-kr.md 파일 만들어짐  
  
- 코드 생성  
  - 위 내용 기반으로 Ansible 코드 생성  
  - CLI 명령어: python3 write_with_chatgpt.py --prompt "having public and private subnet, attach internet gateway and nat gateway to the subnets also launch an instance inside the public subnet" --format "ansible" --file_name "ansible.yaml"  
  - 위 결과로 ansible.yaml 파일 만들어짐  
  
- 코드 검토, 이해  
  - ChatGPT 도움으로 위에서 만든 Ansible 코드를 이해하기  
  - CLI 명령어: python3 file_process.py --input ansible.yaml --output report.txt --prompt "explain the above code in detail"  
  - 위 결과로 report.txt 파일 만들어짐  
  
- 오류 감지, 해결  
  - “위 코드에서 하드코딩된 비밀 키가 있다면 알려줘”와 같은 질문을 사용해 오류를 감지하고 해결  
  
- 개념 증명(PoC)  
  - “하루 평균 10000명의 유저가 사용할 node.js 애플리케이션을 배포하려고 하는데 AWS에서 어떤 인스턴스 타입이 괜찮은가?”라는 질문을 사용해 PoC 방향 설정과 제안받음  
  
- 리팩토링  
  - “작성한 코드 리팩토링 해줘”와 같은 질문으로 코드 리팩토링 제안받음

## Comments



_No public comments on this page._
