Skip to content

Instantly share code, notes, and snippets.

View jroneil's full-sized avatar

Joseph ONeil jroneil

  • Massachussetts
View GitHub Profile
@jroneil
jroneil / Terraform_Ansible.md
Created March 1, 2025 00:04
Setup terraform and ansible on ubuntu

Option 1: Run Commands on an Ubuntu Server VM in Proxmox

This is the recommended approach because:

  • It provides a consistent Linux environment for running Terraform and Ansible.
  • It avoids potential compatibility issues with Windows.

Steps:

  1. Create an Ubuntu Server VM in Proxmox:
    • Use the Proxmox web interface to create a new VM.
@jroneil
jroneil / bastion_server.md
Created February 28, 2025 23:54
Bastion server setup

A bastion server (also known as a jump box) is a secure server that acts as a gateway between your local machine and your private servers (e.g., in a cloud environment or a private network). It is used to control and monitor access to your internal infrastructure, reducing the attack surface and improving security.

Here’s a step-by-step guide to setting up a bastion server:


Step 1: Choose a Bastion Server

  • The bastion server should be a dedicated machine with minimal software installed to reduce vulnerabilities.
  • It should be placed in a DMZ (Demilitarized Zone) or a publicly accessible subnet, but it should only allow SSH access.
@jroneil
jroneil / SSHKeys.md
Last active February 28, 2025 23:53
Setting up SSH keys

Source Server vs. Target Server

  1. Source Server:

    • This is the machine from which you are initiating the SSH connection.
    • It is where your private key is stored.
    • Example: Your local laptop or desktop.
  2. Target Server:

  • This is the machine you are trying to connect to (the remote server).
@jroneil
jroneil / TFAns.md
Created February 2, 2025 00:08
Terriform Ansible compare

Ansible and Terraform are both popular infrastructure automation tools, but they serve different purposes and have distinct strengths. Here's a detailed comparison to help you understand how they differ and when to use each:


1. Purpose and Use Cases

Aspect Terraform Ansible
Primary Purpose Infrastructure as Code (IaC) for provisioning and managing cloud resources. Configuration management and application deployment.
Use Cases - Provisioning cloud infrastructure (e.g., AWS, Azure, GCP).- Managing Kubernetes resources.- Creating and managing infrastructure components (e.g., VMs, networks
@jroneil
jroneil / GQLSB.md
Created January 31, 2025 00:45
GraphQL, Spring Boot, AI, and automated testing

Combining GraphQL, Spring Boot, AI, and automated testing is a fantastic way to build a modern, full-stack project that covers a wide range of skills. Here's a project idea that incorporates all these technologies and helps you become familiar with them:


Project Idea: AI-Powered Recommendation System with GraphQL and Automated Testing

Overview

Build a recommendation system that suggests products, movies, or books to users based on their preferences. The system will use AI (machine learning) to generate recommendations, expose the data via a GraphQL API built with Spring Boot, and include automated testing to ensure reliability.


@jroneil
jroneil / graphql.md
Created January 31, 2025 00:39
graphql spring boot

The learning curve for GraphQL compared to SQL or MongoDB depends on your background, the complexity of your use case, and your familiarity with query languages and data modeling. Here's a breakdown of the learning curves for each:


1. GraphQL

Learning Curve: Moderate

GraphQL is a query language for APIs, not a database query language like SQL or MongoDB. It sits between the client and the backend (which could use SQL, MongoDB, or any other data source). Here's what makes GraphQL's learning curve unique:

What You Need to Learn:

  • GraphQL Schema Definition: You need to understand how to define types, queries, mutations, and subscriptions in the GraphQL schema.
@jroneil
jroneil / scalling.md
Created January 31, 2025 00:34
scalling

Scaling is the process of increasing the capacity of a system to handle more load. There are two primary strategies for scaling: horizontal scaling and vertical scaling. Each approach has its own advantages, disadvantages, and use cases. Let’s break them down:


1. Vertical Scaling (Scaling Up)

Vertical scaling involves adding more resources (e.g., CPU, RAM, storage) to an existing machine or server to handle increased load.

How It Works:

  • You upgrade the hardware of a single server (e.g., add more CPUs, increase RAM, or use faster storage).
  • The application continues to run on a single, more powerful machine.
@jroneil
jroneil / springboot_kafka.md
Created January 29, 2025 21:40
springboot kafka

Using Kafka with Spring Boot: A Step-by-Step Tutorial

Apache Kafka is a distributed streaming platform that allows you to build real-time data pipelines and streaming applications. Spring Boot provides excellent support for integrating with Kafka through the Spring for Apache Kafka project.

In this tutorial, we’ll walk through setting up a Spring Boot application that produces and consumes messages using Kafka.


Prerequisites

  1. Apache Kafka: Install and run Kafka on your local machine. You can follow the official Kafka quickstart guide.
@jroneil
jroneil / reactive_springboot.md
Created January 29, 2025 21:36
reactive spring boot

Difference Between Regular Spring Boot and Reactive Spring Boot

Regular Spring Boot:

  • Blocking I/O: Regular Spring Boot applications typically use blocking I/O, meaning that each request ties up a thread until the operation (like a database query or an HTTP call) completes.
  • Thread-Per-Request Model: Each request is handled by a separate thread. If the operation is slow, the thread remains blocked, leading to potential resource exhaustion under high load.
  • Synchronous: Operations are performed sequentially, and the next operation waits for the current one to complete.
  • Use Cases: Suitable for applications with low to moderate concurrency and where blocking operations are not a bottleneck.

Reactive Spring Boot:

  • Non-Blocking I/O: Reactive Spring Boot uses non-blocking I/O, allowing a single thread to handle multiple requests concurrently. This is achieved using reactive programming paradigms.
@jroneil
jroneil / code-editor-rules.md
Created December 30, 2024 12:55 — forked from yifanzz/code-editor-rules.md
EP12 - The One File to Rule Them All

[Project Name]

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

Project Context

[Brief description ]

  • [more description]
  • [more description]
  • [more description]