Skip to content

Instantly share code, notes, and snippets.

View lioneltchami's full-sized avatar
🏠
Working from home

Lionel Tchami lioneltchami

🏠
Working from home
View GitHub Profile
Aspect Description
Pre-installed Tools AWS SAM CLI and AWS CLI pre-installed in Cloud9
Benefits - Faster Development Environment Setup
- Streamlined Workflow
- Simplified Management
Development Focus - Development of Full-Stack Application
- Configuration with SAM Templates
- Deployment and Testing
Environment Advantages - Jump right into project development
- Seamlessly switch between SAM templates and AWS CLI
- No worry about versioning conflicts or updates
Project Aspects - Build functionalities and user interface- Define serverless infrastructure using SAM templates- Utilize AWS CLI and SAM for build, deploy, and test
Prerequisite Link Additional Information
AWS Account Create AWS Account Free tier available for new users
GitHub Account GitHub Signup Consider enabling two-factor authentication
AWS CLI AWS CLI Installation Guide Ensure it's configured with your AWS credentials
Docker Docker Desktop Required for local development and testing
NPM NPM Installation Comes bundled with Node.js
Node.js Node.js Download LTS version recommended
AWS SAM CLI SAM CLI Installation Configure on Cloud9 or local machine
Domain Name [AWS Route 53](https://aws.amazon.co
Section Description Additional Information
1. Account Setup and Domain Registration - AWS Account Setup
- Domain name registration
- Use AWS Route 53 for domain registration if possible
- Ensure AWS account has necessary permissions
2. Develop your Application - Develop full-stack application
- Front-end: static website or SPA
- Back-end: serverless functions (Node.js, Python, etc.)
- Use React for front-end
- TypeScript for back-end
- Implement necessary API endpoints
3. Deploy with AWS SAM CLI - Use AWS SAM CLI commands:
sam build
sam package
sam deploy
- Ensure AWS SAM CLI is installed and configured
- Run commands from Cloud9 terminal or local environment
4. Define your SAM Template - Create template.yaml file
- Define resources: Lambda, API Gateway, S3, CloudFront
- Use YAML syntax
- Reference AWS SAM documentation for resource properties
5. Configure Secure HTTPS
#!/usr/bin/env bash
set -euo pipefail
# Configuration
DEFAULT_USER_SUFFIX="-cli"
DEFAULT_GROUP="Admins"
DEFAULT_POLICY="AdministratorAccess"
AWS_CREDENTIALS_FILE="$HOME/.aws/credentials"
# Functions
Step Details
Initial Environment Setup Register your AWS Account; Register your domain name; Create AWS Key Pairs; Create AWS Access Keys; Setup Django Application; Dockerize the Django Application
GitHub Repository Setup Create a GitHub repository for your Django application; Add your Django code to this repository.
Continuous Integration with GitHub Actions Configure GitHub Actions workflows to run tests, linting, and other checks; Utilize Docker containers for consistency across different environments.
Infrastructure Provisioning with Terraform Define infrastructure requirements using Terraform; Provision necessary AWS resources (like EC2 instances, VPC, subnets, etc.) for the Jenkins server, Kubernetes cluster, and other required services.
Continuous Deployment with Jenkins Set up Jenkins on a server; Configure Jenkins pipelines to trigger on successful CI builds; Build Docker images for your Django application; Push Docker images to a Docker registry;

Playbook: Visualizing the History of a Git Repository with Gource

Overview

This playbook provides guidance on using Gource to visualize the history of a Git repository. It covers installing Gource, generating visualizations, customizing visual output, and sharing the visualization.

Prerequisites

@lioneltchami
lioneltchami / haproxy.yml
Created April 13, 2024 21:16
haproxy.yml file
---
- hosts: localhost
become: yes
vars_files:
- aws_credentials.yml # Contains AWS access keys and secret keys
- aws_ec2_configs.yml # Contains configuration such as AWS region
# Handlers are tasks that respond to a notify directive and are typically used to restart services
handlers:
- name: Restart HAProxy service
---
- name: Setup Nginx Web Server and Deploy Website
hosts: localhost
become: yes
vars_files:
- aws_credentials.yml
- aws_ec2_configs.yml
tasks:
- name: Install Nginx
yum:
- hosts: localhost
vars_files:
- aws_credentials.yml
- aws_ec2_configs.yml
tasks:
- name: Installing Python pip
package:
name: python3-pip
state: present