Skip to content

Instantly share code, notes, and snippets.

View khusseini's full-sized avatar

Khairi Husseini khusseini

View GitHub Profile
@khusseini
khusseini / bootstrap.sh
Created May 17, 2024 12:20
Create eks cluster and bootstrap gitlab project with flux
#!/bin/env bash
set -e
set -a
source .env
set +a
# Check if the cluster already exists
CLUSTER_STATUS=$(eksctl get cluster --name ${EKS_CLUSTER_NAME} --region ${EKS_CLUSTER_REGION} --output json | jq -r '.[0].Status')
from crewai import Agent
from langchain_community.llms import Ollama
from .tools.kubernetes_events import retrieve_kubernetes_events
from .tools.search import search_tool
def create_kubernetes_cluster_state_agent(llm=None):
if not llm:
llm = Ollama(model="llama2")
agent = Agent(

Usage


sudo create-k0s-virtual-network-device.sh $(ip route get 8.8.8.8 | awk -- '{printf $5}')

k0s config create >/tmp/k0s.yaml

yq -i \
 '.spec.extensions.storage.type = "openebs_local_storage" | .spec.extensions.storage.create_default_storage_class = true' \
#!/usr/bin/env bash
install_yq() {
wget https://github.com/mikefarah/yq/releases/download/${VERSION}/${BINARY} -O /usr/bin/yq &&\
chmod +x /usr/bin/yq
}
if [[ ! -f /usr/bin/yq ]]
then
VERSION=v4https://gist.github.com/khusseini/7ec66d3f7f361674c46952bb0a42c978.18.1
{
"ROOT":{
"type":{
"resolvedName":"MiroraShop"
},
"isCanvas":true,
"props":{
},
"displayName":"Mirora Shop",
{
"ROOT": {
"type": {
"resolvedName": "MiroraShop"
},
"isCanvas": true,
"props": {
},
"displayName": "Canvas",
@khusseini
khusseini / README.md
Last active August 25, 2022 04:04
Adding traefik to LKS

Setup Traefik 2.2 with Let's Encrypt On LKE

If you searched for this article I chances are you know what LKE, Traefik and Let's Encrypt are, else here is a quick primer:

What is LKE?

"The Linode Kubernetes Engine (LKE) is a fully-managed container orchestration engine for deploying and managing containerized applications and workloads.". For more information please have a look at "Deploy and manage a cluster with Linode Kubernetes Engine"

<?php
namespace App\Form\Extension;
use CoreShop\Bundle\OrderBundle\Form\Type\CartItemType;
use CoreShop\Component\Core\Model\CartItemInterface;
use Pimcore\Model\DataObject\AbstractObject;
use Pimcore\Model\DataObject\CoreShopProduct;
use Pimcore\Model\DataObject\Objectbrick\Data\AbstractData;
use Symfony\Component\Form\AbstractTypeExtension;
@khusseini
khusseini / Makefile
Last active March 18, 2022 03:28
Update your #hosts file to point to #docker #container #ip
Update your hosts file to point to docker container ip
MAKEFLAGS += --warn-undefined-variables
SHELL := bash
.SHELLFLAGS := -eu -o pipefail -c
.DELETE_ON_ERROR:
.SUFFIXES:
##Option: Development domain
domain = mysite.development.local
container = mysite
[Unit]
Description=Provides Docker-Compose
After=docker.service
Requires=docker.service
[Service]
Type=oneshot
ExecStart=/bin/bash -c "wget -O /opt/bin/docker-compose https://github.com/docker/compose/releases/download/1.16.1/docker-compose-`uname -s`-`uname -m`"