Hosting Your Resume on AWS EC2 with a CI/CD Setup Using GitHub Actions | AWS Project Demo

A Monk in Cloud ☁️
27 Jun 202319:47

Summary

TLDRIn this video, the creator demonstrates how to host a resume on an AWS EC2 instance with a CI/CD setup using GitHub Actions. The tutorial walks through four steps: creating the EC2 instance, adding repository secrets, configuring a GitHub Actions workflow, and testing the setup. Viewers learn how to automate code deployment updates to the EC2 server without logging in, making site changes seamless. The process is well-documented, and all relevant code is available in the linked blog and GitHub repository. The video emphasizes the simplicity and efficiency of the setup.

Takeaways

  • 🚀 The video explains how to host a resume website on an AWS EC2 instance using a CI/CD setup with GitHub Actions.
  • 🔑 Step 1 involves creating an EC2 instance, selecting Ubuntu as the OS, and generating a key pair for secure access.
  • 💾 The video stresses the importance of securely storing the key pair, as losing it will make the EC2 instance inaccessible.
  • 🌐 Step 2 involves creating secrets in the GitHub repository to allow GitHub Actions to connect to the EC2 instance.
  • 🔐 Secrets include the EC2 SSH key, the EC2 instance’s public DNS, the username (Ubuntu), and the target directory.
  • 🛠️ Step 3 is about setting up the GitHub Actions workflow with a YAML file to automate deployment to the EC2 instance.
  • 💻 The workflow is triggered when changes are made to the main branch of the repository, updating the EC2 server automatically.
  • 📄 The resume website is a simple HTML page that can be updated through GitHub without directly accessing the EC2 instance.
  • 💡 The CI/CD process eliminates the need for manual updates, allowing changes from GitHub to be automatically deployed to the server.
  • 📈 The video encourages further enhancement by adding a custom domain and SSL certificates to the resume site for improved security and professionalism.

Q & A

  • What are the four steps to host a resume on AWS EC2 with a CI/CD setup?

    -The four steps are: (1) Create an EC2 instance and download the key pair, (2) Create the secret in your repository, (3) Add your GitHub action workflow, and (4) Check how the setup works.

  • Why is the key pair important when creating an EC2 instance?

    -The key pair is important because it allows you to securely connect to your EC2 instance. Without the key, you won't be able to access your instance.

  • Which security group settings are necessary for the EC2 instance?

    -For the EC2 instance, you need to allow SSH (port 22), HTTP (port 80), and HTTPS (port 443) in the inbound rules of the security group.

  • What is the purpose of the GitHub secrets in this setup?

    -GitHub secrets store sensitive information, such as the EC2 SSH key and the instance’s DNS, securely. They allow GitHub Actions to connect to and deploy code to the EC2 instance without exposing credentials.

  • Why is a CI/CD pipeline useful for this project?

    -A CI/CD pipeline ensures that whenever there is a change in the code (e.g., updates to the resume), the new code is automatically deployed to the EC2 instance without needing to manually access and update the server.

  • How do you trigger deployment using GitHub Actions in this setup?

    -The deployment is triggered when a code change is made to the main branch in the GitHub repository. GitHub Actions automatically deploys the updated code to the EC2 instance using the CI/CD pipeline.

  • What is Apache2 used for in this project?

    -Apache2 is used to serve the web pages, such as the resume site. It is installed on the EC2 instance, and the resume content is placed in the Apache2 default HTML directory for hosting.

  • How can you verify if the CI/CD process is working correctly?

    -You can verify the process by checking the GitHub Actions tab. If the workflow runs successfully, you will see green check marks. You can also verify by visiting the public IP of the EC2 instance and refreshing the page to see the updated content.

  • How would you update your resume on the hosted website?

    -To update your resume, you make changes to the code (e.g., update the `index.html` file) in your GitHub repository. The CI/CD pipeline will automatically deploy these changes to the EC2 instance.

  • What can you do if you want to enhance the hosted resume website?

    -You can enhance the website by adding a custom domain (e.g., resume.yourname.com) and setting up SSL certificates for secure access. You can also modify the design by updating the HTML and CSS files in your repository.

Outlines

plate

Esta sección está disponible solo para usuarios con suscripción. Por favor, mejora tu plan para acceder a esta parte.

Mejorar ahora

Mindmap

plate

Esta sección está disponible solo para usuarios con suscripción. Por favor, mejora tu plan para acceder a esta parte.

Mejorar ahora

Keywords

plate

Esta sección está disponible solo para usuarios con suscripción. Por favor, mejora tu plan para acceder a esta parte.

Mejorar ahora

Highlights

plate

Esta sección está disponible solo para usuarios con suscripción. Por favor, mejora tu plan para acceder a esta parte.

Mejorar ahora

Transcripts

plate

Esta sección está disponible solo para usuarios con suscripción. Por favor, mejora tu plan para acceder a esta parte.

Mejorar ahora
Rate This

5.0 / 5 (0 votes)

Etiquetas Relacionadas
AWS EC2GitHub ActionsCI/CD SetupResume HostingAutomationWeb DevelopmentCloud HostingDevOps TutorialGitHub WorkflowServer Deployment
¿Necesitas un resumen en inglés?