Theo's Site

Writing about technology, self-hosting, and things I find interesting.

Note: This post is 2 years old and may no longer reflect current thinking or accurate information.

ChatGPT Makes Automation Symmetrical with Doing

by theo

One of the clearest implications of ChatGPT for systems administrators is that it makes automating a task almost symmetrical with doing a task.

On the new file server I use for personal projects (dedicated server with a NVMe SSD boot drive and four hard drives as secondary file storage drives, I recently did a reinstall of Debian. I set this server up with the hard drives in a BTRFS raid 5. I installed Docker on it, and I set up the Apache web server to make the files on that server public. Cloudflare Tunnel was used to put that Apache server behind SSL.

I took quick and rough notes on what commands were used and what may vary between servers and had ChatGPT create an automation script in Python.

The notes can be found here https://gist.github.com/theopjones/a7f2b6ba17f3de23826f688f0a87d01d

The prompt I used is

Create a python script to automate the server setup task in the following notes/log of a manual setup. Assume that the python script is running as root. In the case of commands which require manual intervention, wait for the user to conduct the manual intervention, the command should be started as part of the script.

The result of ChatGPT was the following, which is good enough to make this setup easily reproducible across servers or to document with code what the setup was so that it can be easily reproduced.

https://gist.github.com/theopjones/6147770b550356e55d209e67549fb948

Leave a Comment

Your email address will not be published. Required fields are marked *