Skip to content

ogulcanaydogan/AWS-Django-Blog-Deployment

Repository files navigation

BlogDjango

Description

The TechPro Education Blog Page Application aims to deploy blog application as a web application written Django Framework on AWS Cloud Infrastructure. This infrastructure has Application Load Balancer with Auto Scaling Group of Elastic Compute Cloud (EC2) Instances and Relational Database Service (RDS) on defined VPC. Also, The Cloudfront and Route 53 services are located in front of the architecture and manage the traffic in secure. User is able to upload pictures and videos on own blog page and these are kept on S3 Bucket. This architecture will be created by Firms DevOps Guy.

Problem Statement

  • Your company has recently ended up a project that aims to serve as Blog web application on isolated VPC environment. You and your colleagues have started to work on the project. Your Developer team has developed the application and you are going to deploy the app in production environment.

  • Application is coded by TechPro Education Fullstack development team and given you as DevOps team. App allows users to write their own blog page to whom user registration data should be kept in separate MySQL database in AWS RDS service and pictures or videos should be kept in S3 bucket. The object list of S3 Bucket containing movies and videos is recorded on DynamoDB table.

  • The web application will be deployed using Django framework.

  • The Web Application should be accessible via web browser from anywhere in secure.

  • You are requested to push your program to the project repository on the Github. You are going to pull it into the webservers in the production environment on AWS Cloud.

In the architecture, you can configure your infrastructure using the followings,

Blog Project Tasks

Infrastructure Setup

  1. Create VPC and all components

    • Create VPC
    • Create Subnets
    • Create and attach an internet gateway
    • Create Route Tables
    • Create Endpoint
  2. Create Security Groups (ALB ---> EC2 ---> RDS)

    • ALB Security Group
    • EC2 Security Groups
    • RDS Security Groups
    • NAT Instance Security Group
  3. Create RDS

    • Create a subnet group for our custom VPC
    • Create Database
      • Database engine: MySQL
      • Version: 8.0.28
  4. Create two S3 Buckets and set one of these as static website

    • Failover Scenario
    • Web Site

Application Deployment

  1. Copy files downloaded or cloned from Techproeducation repo on Github
  2. Prepare your Github repository
  3. Prepare a userdata to be utilized in Launch Template
  4. Write RDS database endpoint and S3 Bucket name in settings file given by Developer and push your application into your own repo on Github
  5. Create NAT Instance in Public Subnet
  6. Create Launch Template and IAM role for it
  7. Create certification for secure connection
  8. Create ALB and Target Group
  9. Create Autoscaling Group with Launch Template
  10. Create Cloudfront in front of ALB
  11. Create Route 53 with Failover settings
  12. Create DynamoDB Table
  13. Create Lambda function
  14. Create S3 Event and set it as trigger for Lambda Function

Server Specifications

  • Operating System: Ubuntu Server 20.04

Project Skeleton

BlogDjango (folder)
|
|----Readme.md               # Given to the students (Definition of the project)
|----src (folder)            # Given to the students (Django Application's )
|----requirements.txt        # Given to the students (txt file)
|----lambda_function.py      # Given to the students (python file)
|----developer_notes.txt     # Given to the students (txt file)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published