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
@lioneltchami
lioneltchami / 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.
@lioneltchami
lioneltchami / 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
@lioneltchami
lioneltchami / .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
@lioneltchami
lioneltchami / 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
@lioneltchami
lioneltchami / 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
@lioneltchami
lioneltchami / network.tf
Created March 30, 2024 23:00
Deploying Django Application on AWS with Terraform ... Network1
# Production VPC
resource "aws_vpc" "prod" {
cidr_block = "10.0.0.0/16"
enable_dns_support = true
enable_dns_hostnames = true
}
# Public subnets
resource "aws_subnet" "prod_public_1" {
cidr_block = "10.0.1.0/24"
@lioneltchami
lioneltchami / aws-table0.md
Created March 30, 2024 22:49
Deploying Django Application on AWS with Terraform ... table 0
Category Tool Description
Virtual Networking VPC Virtual networking environment provided by AWS for isolating and managing resources.
Compute ECS + Fargate Serverless service offered by AWS for running Docker containers without managing servers.
Load Balancing EC2 Load Balancer AWS service for efficiently distributing incoming application traffic across multiple targets.
DNS Management Route53 Fully-managed DNS service provided by AWS for domain registration and routing.
Security Certificate Manager AWS service for managing and deploying SSL/TLS certificates for secure communication.
Containerization ECR AWS service for securely storing, managing, and deploying D
@lioneltchami
lioneltchami / aws-table.md
Created March 30, 2024 22:44
Deploying Django Application on AWS with Terraform ... table 1
Component Description
ECR Elastic Container Registry (ECR) is a fully-managed Docker container registry. It provides a secure, scalable, and reliable location to store Docker images.
Networking
- VPC Virtual Private Cloud (VPC) is a virtual network in AWS that provides isolated environment where resources can be launched.
- Public and Private Subnets Public and private subnets are subdivisions of the VPC that control the routing of traffic. Public subnets have access to the internet, while private subnets do not.
- Routing Tables Routing tables define the rules for routing network traffic within the VPC.
- **[Internet Gateway](https://aws.amazon
@lioneltchami
lioneltchami / data_eng_challenege.md
Created February 8, 2024 00:06 — forked from jwprillaman/data_eng_challenege.md
Data Engineer Challenge Prompt

Data Engineer - Coding Challenge

This coding exercise is an opportunity for you to show us how you break down product requirements into actual code, as well as to demonstrate quality, coding style, experience, and creativity in problem-solving. This task is designed to be relevant to the kind of work an engineer in this role does at Bitly. You should not expect there to be any gotchas.

For the purpose of this challenge, we will be working with CSV and JSON files rather than database tables/streams/APIs but the following will be a representation of data similar to what you would be seeing on a daily basis as an engineer at Bitly.

This unzipped directory contains the data that you will be using for this challenge:

  • encodes.csv contains information on shortened links or "encodes" to represent existing data infrastructure.
  • decodes.json contains raw data on bitlink clicks as newline-separated JSON to represent a large data stream.