14P by ironlung 8달전 | favorite | 댓글과 토론
  • 문서화

    • 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 방향 설정과 제안받음
  • 리팩토링

    • “작성한 코드 리팩토링 해줘”와 같은 질문으로 코드 리팩토링 제안받음