Skip to content

This repository demonstrates my skills in containerization, testing, infrastructure as code, and CI/CD. It includes Dockerfiles, Docker Compose, RSpec, Capybara, Selenium, Terraform, Jenkins, and a CI/CD pipeline. Deployable to S3. The website is my virtual business card/resume www.jdnguyen.tech

Notifications You must be signed in to change notification settings

jonathan-d-nguyen/portfolio-devops_resume

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


DevOps Portfolio: Digital Resume

A Infrastructure-as-Code project that deploys a static S3 website with CloudFront distribution.
Explore the docs »

Report Bug

Table of Contents
  1. About The Project
  2. Quick Start
  3. Deployment & Operations
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

1. About The Project

This repository demonstrates DevOps practices including containerization, testing, infrastructure as code, and CI/CD. It deploys a static website to AWS using S3 and CloudFront, serving as my virtual business card/resume at www.jdnguyen.tech.

Are you looking over projects for the Learn To Cloud internship? Please also check out my Python-based project at https://github.com/jonathan-d-nguyen/payment-notification-aggregator

Thanks!

(back to top)

1.1. Built With

  • Docker
  • Terraform
  • Selenium
  • Jenkins
  • Markdown
  • HTML5
  • JavaScript
  • CSS3

(back to top)

2. Quick Start

Get up and running quickly with these basic steps. For detailed instructions, see Full Installation Steps.

(back to top)

2.1. Prerequisites

  1. AWS CLI

    # Install AWS CLI
    curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
    unzip awscliv2.zip
    sudo ./aws/install
    
    # Configure AWS credentials
    aws configure
  2. Docker

    # Install Docker (Ubuntu example)
    curl -fsSL https://get.docker.com -o get-docker.sh
    sudo sh get-docker.sh
    
    # Start Docker service
    sudo systemctl start docker
    sudo systemctl enable docker
  3. Required AWS Permissions

    • S3 full access
    • CloudFront full access
    • Route 53 domains full access
    • ACM certificate manager full access

(back to top)

2.2. Basic Setup

  1. Clone and prepare

    git clone https://github.com/jonathan-d-nguyen/portfolio-devops_resume.git
    cd portfolio-devops_resume
  2. Deploy infrastructure

    docker-compose run --rm terraform init
    docker-compose run --rm terraform apply
  3. Deploy website

    docker-compose run --rm --entrypoint aws aws s3 cp --recursive /app/website_files s3://your-domain.com

(back to top)

3. Deployment & Operations

(back to top)

3.1. Full Installation Steps

  1. Repository Setup

    git clone https://github.com/jonathan-d-nguyen/portfolio-devops_resume.git
    cd portfolio-devops_resume
  2. Infrastructure Deployment

    # Initialize Terraform
    docker-compose run --rm terraform init
    
    # Preview changes
    docker-compose run --rm terraform plan
    
    # Apply infrastructure
    docker-compose run --rm terraform apply

    Save the outputs:

    cloudfront_distribution_id = "XXXXXXXXXXXX"
    website_bucket_url = "your-domain.com.s3..."
  3. Website Deployment

    docker-compose run --rm --entrypoint aws aws s3 cp --recursive /app/website_files s3://your-domain.com
  4. Domain Configuration

    1. Certificate Setup (ACM)

      • Navigate to ACM in us-east-1 region
      • Request public certificate for your domain
      • Add domain names:
        your-domain.com
        *.your-domain.com
        
      • Choose DNS validation
      • Create validation records in Route 53
    2. DNS Setup (Route 53)

      • Create/select hosted zone
      • Update nameserver records at your registrar
      • Create records:
        A record: your-domain.com → CloudFront distribution
        CNAME record: www.your-domain.com → your-domain.com
        
    3. CloudFront Setup

      • Configure alternate domain names
      • Select ACM certificate
      • Set default root object: index.html
      • Configure price class
      • Set up custom error responses if needed

(back to top)

3.2. Testing & Verification

  1. Infrastructure Tests

    # Run test suite
    docker-compose run --rm test
    
    # Verify S3 bucket
    aws s3 ls s3://your-domain.com
    
    # Check CloudFront status
    aws cloudfront get-distribution --id YOUR_DISTRIBUTION_ID
  2. Website Verification

    • Visit https://your-domain.com
    • Test www and non-www domains
    • Verify all pages load
    • Check SSL certificate validity
    • Confirm CDN caching

(back to top)

3.3. Troubleshooting

  1. Certificate Issues

    # Check certificate status
    aws acm describe-certificate --certificate-arn arn:aws:acm:region:account:certificate/certificate-id
    
    # Verify DNS validation
    dig www.your-domain.com
  2. CloudFront Problems

    # Invalidate cache
    aws cloudfront create-invalidation --distribution-id YOUR_DISTRIBUTION_ID --paths "/*"
    
    # Check distribution status
    aws cloudfront get-distribution --id YOUR_DISTRIBUTION_ID
  3. S3 Access Issues

    • Verify bucket policy
    • Check CloudFront OAC settings
    • Confirm bucket name matches domain

(back to top)

3.4. CI/CD Pipeline

The included Jenkins pipeline automates deployment:

  1. Pipeline Setup

    • Install required Jenkins plugins
    • Create new pipeline job
    • Configure GitHub webhook
    • Point to Jenkinsfile
  2. Pipeline Stages

    • Build
    • Test
    • Deploy infrastructure
    • Deploy website
    • Verification

(back to top)

3.5. Cleanup

# Remove infrastructure
docker-compose run --rm terraform destroy

# Clean Docker resources
docker-compose down -v
docker system prune -f

# Remove local files
rm -rf .terraform
rm -rf terraform.tfstate*

(back to top)

4. Roadmap

  • Jenkins Deploy
    • Implement automated deployment using Jenkins CI/CD pipeline
  • Terraform State Management
    • Implement state persistence in S3 for better collaboration and versioning
  • CloudFront Integration
    • Set up CloudFront distribution for content delivery
    • Configure Origin Access Control for enhanced security
    • Implement public access blocking for S3 origin
    • Integrate AWS Certificate Manager for HTTPS
    • Configure Route 53 for domain management

See the open issues for a full list of proposed features (and known issues).

(back to top)

5. Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

5.1. Top contributors:

contrib.rocks image

(back to top)

6. License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

7. Contact

Jonathan Nguyen - [email protected]

Project Link: https://github.com/jonathan-d-nguyen/portfolio-devops_resume

(back to top)

8. Acknowledgments

(back to top)

About

This repository demonstrates my skills in containerization, testing, infrastructure as code, and CI/CD. It includes Dockerfiles, Docker Compose, RSpec, Capybara, Selenium, Terraform, Jenkins, and a CI/CD pipeline. Deployable to S3. The website is my virtual business card/resume www.jdnguyen.tech

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published