This repository contains a Flask web application designed to structure DNS change requests for the Operations Engineering team. The goal of the DNS Form is to automate and streamline the process of handling DNS changes, which were previously submitted via email. By using this application, Operations Engineering can track requests more effectively and introduce automation into the DNS change workflow.
Previously, DNS change requests were sent via email, triggering a manual process that required coordination between various team members. The DNS Form replaces this ad-hoc approach by providing a structured and automated solution. By using this tool, the Operations Engineering team can:
- Track DNS change requests in a structured and organized manner.
- Automate the creation of GitHub issues and pull requests for DNS changes.
- Ensure validation and proper formatting of DNS requests, reducing errors and manual intervention.
- Authentication: Only authenticated users can access the DNS request form.
- DNS Request Submission: Users can submit DNS change requests through a web form.
- GitHub Integration: Automatically creates an issue and pull request for DNS changes in a GitHub repository.
- Form Validation: Ensures that DNS records are properly formatted before submission.
- Python 3.x
- Flask
- GitHub Integration for issue and pull request creation
- Authentication: The app uses a custom authentication middleware, and users must be logged in to submit requests.
-
Clone the repository:
git clone <repository-url> cd <repository-directory>
-
Install dependencies: Use
pip
to install the required dependencies:pip install -r requirements.txt
-
Set up environment variables:
- Configure the necessary environment variables for GitHub integration, and authentication. Example
.env
file:FLASK_APP=app FLASK_ENV=development GITHUB_API_TOKEN=your_github_token
- Configure the necessary environment variables for GitHub integration, and authentication. Example
-
Run the Flask application:
flask run
The app will be available at
http://localhost:5000
.
- Login: Authenticate through the Auth0 configured authentication system.
- Submit DNS Request: Fill out the DNS request form and submit.
- Issue and PR Creation: The application will automatically create a GitHub issue and a pull request for the requested DNS changes.
To run the unit tests for the application:
-
Install test dependencies:
pip install -r requirements-dev.txt
-
Run the tests:
python -m unittest discover
Contributions to this repository are welcome. Please follow the code of conduct and ensure your changes are tested before submitting a pull request.