Skip to main content

Exploring the Feasibility of ChatGPT for Improving the Quality of Ansible Scripts in Edge-Cloud Infrastructures Through Code Recommendation

  • Conference paper
  • First Online:
Current Trends in Web Engineering (ICWE 2023)

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 1898))

Included in the following conference series:

Abstract

Edge-cloud system aims to reduce the processing time of Big data by bringing massive infrastructures closer to the source of data. Infrastructure as Code (IaC) supports the automatic deployment and management of these infrastructures through reusable code, and Ansible is the most popular IaC tool. As the quality of Ansible script directly influences the quality of Edge-cloud system, many researchers have studied improving the quality of Ansible scripts. However, there has yet to be an attempt to leverage the power of ChatGPT. Thus, we study to explore the feasibility of ChatGPT to improve the quality of Ansible scripts. Three raters evaluate ChatGPT’s code recommendation ability on 48 code revision cases from 25 Ansible project GitHub repositories, and we analyze the rating results. As a result, we can confirm that ChatGPT can recognize and understand Ansible script. However, its ability largely depends on how to user formulates the questions. Thus, we can confirm the need for prompt engineering for ChatGPT to acquire stable code recommendation results.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. Agapito, G., et al.: Current trends in web engineering. In: ICWE 2022 International Workshops, BECS, Bari, Italy, Revised Selected Papers. Springer, Cham (2023). https://doi.org/10.1007/978-3-031-25380-5

  2. Buyya, R., et al.: Fog and Edge Computing: Principles and Paradigms. Wiley, Hoboken (2019)

    Book  Google Scholar 

  3. Palma, D., et al.: Within-project defect prediction of infrastructure-as-code using product and process metrics. IEEE Trans. Software Eng. 14(8), 1 (2020)

    Google Scholar 

  4. Fleiss, J.L.: Measuring nominal scale agreement among many raters. Psychol. Bull. 76(5), 378 (1971)

    Article  Google Scholar 

  5. Guerriero, M, et al.: Adoption, support, and challenges of infrastructure-as-code: insights from industry. In: 2019 IEEE International Conference on Software Maintenance and Evolution (ICSME), pp. 580–589.IEEE (2019)

    Google Scholar 

  6. Kokuryo, S., Kondo, M., Mizuno, O.: An empirical study of utilization of imperative modules in ansible. In: 2020 IEEE 20Th International Conference on Software Quality, Reliability and Security (QRS), pp. 442–449. IEEE (2020)

    Google Scholar 

  7. Kwon, S., et al.: Codebert based software defect prediction for edge-cloud systems. In: Agapito, G., et al. Current Trends in Web Engineering: ICWE2022 Communications in Computer and Information Science, vol. 1668, pp. 11–21. Springer, Cham (2023). https://doi.org/10.1007/978-3-031-25380-5_1

  8. Li, Z., et al.: Codereviewer: Pre-training for automating codereview activities. arXiv preprint arXiv:2203.09095 (2022)

  9. Meijer, B., et al.: Ansible: Up and Running. O’Reilly Media Inc, Sebastopol (2022)

    Google Scholar 

  10. Morris, K.: Infrastructure as Code: Managing Servers. O’Reilly Media, Inc Sebastopol (2016)

    Google Scholar 

  11. Opdebeeck, R., et al.: Andromeda: a dataset of ansible galaxy roles and their evolution. In: 2021 IEEE/ACM 18th International Conference on Mining Software Repositories (MSR), pp. 580–584. IEEE (2021)

    Google Scholar 

  12. Opdebeeck, R., et al.: Smelly variables in ansible infrastructure code: detection, prevalence, and lifetime. In: Proceedings of the 19th International Conference on Mining Software Repositories, pp. 61–72 (2022)

    Google Scholar 

  13. Rahman, A., et al.: Security smells in ansible and chef scripts: a replication study. ACM Trans. Softw. Eng. Methodol. (TOSEM) 30(1), 1–31 (2021)

    Article  Google Scholar 

  14. Sobania, D., Briesch, M., Hanna, C., Petke, J.: An analysis of the automatic bug fixing performance of ChatGPT. arXiv preprint arXiv:2301.08653 (2023)

  15. White, J et al.: ChatGPT prompt patterns for improving code quality, refactoring, requirements elicitation, and softwaredesign. arXiv preprint arXiv:2303.07839 (2023)

  16. Xia, C.S., Zhang, L.: Keep the conversation going: Fixing 162 out of 337 bugs for $0.42 each using chatGPT. arXiv preprint arXiv:2304.00385 (2023)

  17. Xu, J., Yan, L., Wang, F., Ai, J.: A github-based data collection method for software defect prediction. In: 2019 6th International Conference on Dependable Systems and Their Applications (DSA), pp. 100–108. IEEE (2020)

    Google Scholar 

Download references

Acknowledgment

This research was supported by Information Technology Research Center (ITRC) support program supervised by the Institute of Information & Communications Technology Planning & Evaluation (IITP-2023–2020-0–01795), and the Basic Science Research Program through the National Research Foundation of Korea (NRF) funded by the Ministry of Education (NRF- 2022R1I1A3069233).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jongmoon Baik .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Kwon, S., Lee, S., Kim, T., Ryu, D., Baik, J. (2024). Exploring the Feasibility of ChatGPT for Improving the Quality of Ansible Scripts in Edge-Cloud Infrastructures Through Code Recommendation. In: Casteleyn, S., Mikkonen, T., García Simón, A., Ko, IY., Loseto, G. (eds) Current Trends in Web Engineering. ICWE 2023. Communications in Computer and Information Science, vol 1898. Springer, Cham. https://doi.org/10.1007/978-3-031-50385-6_7

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-50385-6_7

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-50384-9

  • Online ISBN: 978-3-031-50385-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics