Skip to content

ashith18/devops-github-copilot

Repository files navigation

🤖 Generate DevOps solutions using github copilot.

What is GitHub Copilot?

GitHub Copilot is based upon the GPT-3 AI model, a large language model released by OpenAI back in 2020 and has been trained using public git repositories. This ultimately means that the more publicly available repositories for a certain language, the better GitHub Copilot will perform for it.

GitHub Copilot offers code suggestions based on code you either start writing OR based on comments that you write within your source code. At the same time, CoPilot analyses your source code files to offer suggestions based on ultimately what you’re trying to achieve within your application.

Installing CoPilot

  • step 1 :- Ensure Visual Studio Compatibility - On macOS, go to Code > About Visual Studio Code. On Windows and Linux, go to Help > About Microsoft VS.

  • step 2 :- Install GitHub Copilot Extension Go to the “Extensions” (“Ctrl+Shift+X” ) search for “GitHub Copilot,” and click on the “Download” or “Install” button.

  • step 3 :- Restart Visual Studio Congratulations, you now have CoPilot installed on your machine!

Using Co-Pilot

  • step 1 :- Launch Visual Studio and open a project in which you want to use Co-Pilot. It could be an existing project or a new one. If you have a GitHub Account already set: A prompt will pop-up asking to authenticate to GitHub. A code will be outputted in the output window, copy this code, click on the link and paste it onto the GitHub page. Then select authorise the GitHub CoPilot plugin.

  • step 2 :- To use chat bot - on left side click on chat icon and do sign-in.

1) Dockerfile

prompt:- @workspace create a Dockerfile

Image Alt text

2) Azure-pipeline ☁️

prompt:- @workspace create azure pipeline for CI part - use docker add task to push docker image to docker hub registry add artifact, cache and also add stage for deployment I had manifest files in root dir - deployment is in azure kubernetes service, - and also optimise full azure-pipeline configuration file

Image Alt text Image Alt text

3) k8s manifest files - Deployment file

prompt:- @workspace create kubernetes deployment.yaml which should have all the security concepts and also add livenessprobe readinerssprobe

Image Alt text

4) Service manifest file

A Kubernetes Service is a resource that defines a policy to access the pods in a Kubernetes application. The Service resource abstracts the way to access a set of pods as a network service.

prompt:- @workspace create k8s service for deployment

Image Alt text

5) HPA

This Horizontal Pod Autoscaler (HPA) manifest automatically scales the number of pods in a deployment based on observed CPU utilization.

prompt:- @workspace and also add HPA to deployment

Image Alt text

6) Persistent Volume and Persistent Volume claim

Persistent Volumes (PVs) and Persistent Volume Claims (PVCs) are Kubernetes resources that allow you to manage durable storage in a cluster. This mechanism allows for storage to be provisioned on-demand, without requiring direct intervention by the cluster administrator, and for the lifecycle of storage to be managed independently from the lifecycle of the Pods that use it.

prompt:- @workspace use azure blob storage for persistent volume storage create respective PV,PVC files and also update deployment file

Image Alt text

7) Ingress

An Ingress file in Kubernetes is a configuration file that defines rules for routing external HTTP(S) traffic to services within a Kubernetes cluster. It acts as an HTTP(S) router and is responsible for managing access to the applications running in the cluster from outside the Kubernetes cluster.

prompt:- @workspace create ingress file

Image Alt text

8) Jenkinsfile

Jenkinsfile automates the process of building, storing, and deploying applications, making it easier to manage deployments and ensure that the latest version of the application is always deployed in a consistent manner.

prompt:- @workspace Generate Jenkinsfile Stages include:- Build Docker Image Push image to ECR Deploy to EKS

Image Alt text Image Alt text Image Alt text

To see the Generated files

This project needs a ⭐️ from you. Don't forget to leave a star ⭐️.

appLight

English | Türkçe | Russian

📜 Simple blog app built with Flask.

📧 Contact
👨🏻‍💻 Dogukan Urker

📸 Images
📽️ Preview Video

🆕 Changelog V2

📄 Table of Contents

💫 Features

  • Admin Panel
  • Comment
    • Comment Delete
  • Custom Profile Picture
  • Dashboard Page
  • Dark/Light Themes
  • Database Checker
  • Debug Messages
  • Docker
  • Google reCAPTCHA v3
  • Logging
  • Password
    • Password Change
    • Password Reset
  • Post
    • Post Banner Photos
    • Post Categories
    • Post Creation
    • Post Delete
    • Post Edit
    • Post Views
  • Responsive Design w/TailwindCSS
  • Search Bar
  • Summer Note Editor
  • Testing w/PlayWright
  • Time Zone Awareness
  • User
    • User Delete
    • User Login
    • User Log Out
    • User Name Change
    • User Page
    • User Points
    • User Profile Pictures
    • User Settings Page
    • User Sign Up
    • User Verification

📦 Requirements

  • Flask
  • Passlib
  • WTForms
  • Requests
  • Flask-WTF
  • Playwright
  • Pipenv
  • Python 3.10 or newer

🧑🏻‍💻 Languages

  • Python
  • HTML | Jinja
  • CSS
  • JavaScript

📚 Technologies

⚙️ Backend

  • SQLite3
  • Passlib
  • Flask
  • WTForms
  • Flask_WTF
  • Requests
  • Playwright

🔮 Frontend

  • jQuery
  • TailwindCSS
  • Tabler Icons
  • Summer Note Editor

🔨 Tools

  • Black formatter
  • Prettier formatter
  • VSCode editor
  • Docker
  • Pipnv
  • Git

🚦 Running the Project

download source code from Github 💾 git clone https://github.com/DogukanUrker/flaskBlog.git

go to directory 📁 cd flaskBlog

install requirements.txt 🔽 pip install -r requirements.txt

it's ready to run 🎉 python app.py

🧑🏻‍💼 Default Admin Account

Username: admin

Password: admin

🎨 Figma Design Files

Files in *.fig format

🧠 What I Learned

FlaskBlog has been an enriching journey, marking a significant milestone in my development career. Through its creation, I delved deep into various facets of web development and programming, expanding my skill set and understanding. Here's an elaboration on some of the key learnings:

🔥 New Technologies Explored

  • Docker: Embracing containerization streamlined deployment and enhanced scalability.
  • Playwright: Automating browser interactions empowered smoother testing and validation processes.
  • Summer Note Editor: Integrating this versatile editor facilitated a richer content creation experience.
  • Tabler Icons: Leveraging these icons added visual appeal and improved user experience.
  • Google reCAPTCHA v3: Implementing advanced security measures fortified the application against bots and malicious activities.
  • Figma: Utilizing Figma for design provided insights into collaborative design processes and enhanced UI/UX planning.
  • Time Zone Awareness Design: Incorporating time zone awareness ensured a seamless experience for users across different geographical locations.
  • Secure SQL Connections: Implementing secure SQL connections bolstered data integrity and confidentiality.

💪🏻 Enhanced Proficiency in

  • Python: Mastery over Python deepened, enabling more efficient and robust backend development.
  • JavaScript: Strengthening JavaScript skills facilitated dynamic frontend interactions and enhanced user engagement.
  • TailwindCSS: Proficiency in TailwindCSS led to more streamlined and maintainable CSS code, accelerating frontend development.
  • CSS: Further exploration of CSS enhanced styling capabilities, enabling finer control over the application's visual presentation.
  • WTForms: Deeper understanding and utilization of WTForms facilitated seamless form handling and validation.
  • SQLite3: Familiarity with SQLite3 improved database management and optimization strategies.
  • Jinja: Mastery over Jinja templating engine facilitated more dynamic and efficient content rendering.

Embarking on the FlaskBlog project has been immensely rewarding, not only in terms of skill enhancement but also in personal fulfillment. As a full-stack developer, this endeavor has honed my abilities and deepened my passion for crafting elegant, functional solutions. I take pride in the outcome of this project and sincerely hope it resonates with you as well. 😊

🫂 Contributors

✨ Stars

Stargazers for @DogukanUrker/flaskBlog

🍴 Forks

Forkers for @DogukanUrker/flaskBlog

💰 Support

Buy Me A Coffee

⭐ Star History

Star History Chart

⚠️ Warning

The sample data was created using AI(ChatGPT 3.5 and Microsoft Copilot) which means that some sample data may contain incorrect information.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published