Skip to content

Instantly share code, notes, and snippets.

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

Lionel Tchami apotitech

🏠
Working from home
View GitHub Profile

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

@apotitech
apotitech / 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
@apotitech
apotitech / table2.md
Created April 13, 2024 20:43
project md table
File Name Description
key.pem This is the SSH private key file used for SSH access into our instances. Update this file with the key you're going to use on your instance.
index.html This file is for hosting our web page. You can use any code you want for your webpage.
inventory This inventory file will contain our list of hosts. Simply create an empty file named inventory. Later, when we run our playbooks, it will automatically update with our host information.
@apotitech
apotitech / ansible.cfg
Created April 13, 2024 20:31
ansible.cfg file
[defaults]
# (boolean) By default Ansible will issue a warning when received from a task action (module or action plugin)
# These warnings can be silenced by adjusting this setting to False.
;action_warnings=True
# (list) Accept list of cowsay templates that are 'safe' to use, set to empty list if you want to enable all installed templates.
;cowsay_enabled_stencils=bud-frogs, bunny, cheese, daemon, default, dragon, elephant-in-snake, elephant, eyes, hellokitty, kitty, luke-koala, meow, milk, moofasa, moose, ren, sheep, small, stegosaurus, stimpy, supermilker, three-eyes, turkey, turtle, tux, udder, vader-koala, vader, www
# (string) Specify a custom cowsay path or swap in your cowsay implementation of choice
;cowpath=
Variable Name Description Where to Find
RDS_HOSTNAME The hostname of the DB instance Connectivity & security tab: Endpoint
RDS_PORT The port where the DB instance accepts connections Connectivity & security tab: Port
RDS_DB_NAME The database name, ebdb Configuration tab: DB Name
RDS_USERNAME The username configured for your database Configuration tab: Master username
RDS_PASSWORD The password configured for your database Not available in the Amazon RDS console
@apotitech
apotitech / .gitignore
Created March 30, 2024 23:59
Deploying Django Application on AWS with Terraform ... gitignore
# Local .terraform directories
**/.terraform/*
# .tfstate files
*.tfstate
*.tfstate.*
# Crash log files
crash.log
crash.*.log
@apotitech
apotitech / ecs.tf
Created March 30, 2024 23:12
Deploying Django Application on AWS with Terraform ... ECS
# Production cluster
resource "aws_ecs_cluster" "prod" {
name = "prod"
}
# Backend web task definition and service
resource "aws_ecs_task_definition" "prod_backend_web" {
network_mode = "awsvpc"
requires_compatibilities = ["FARGATE"]
cpu = 256
@apotitech
apotitech / loadbalancer.tf
Created March 30, 2024 23:05
Deploying Django Application on AWS with Terraform ... LB
# Application Load Balancer for production
resource "aws_lb" "prod" {
name = "prod"
load_balancer_type = "application"
internal = false
security_groups = [aws_security_group.prod_lb.id]
subnets = [aws_subnet.prod_public_1.id, aws_subnet.prod_public_2.id]
}
# Target group for backend web application