Skip to content

Instantly share code, notes, and snippets.

View ksingh7's full-sized avatar

karan singh ksingh7

View GitHub Profile
@ksingh7
ksingh7 / Commands.sh
Created March 8, 2019 00:35 — forked from nrollr/Commands.sh
Install PHP and NGINX on Amazon Linux AMI
## Install NGINX
$ sudo yum install nginx -y
## Install PHP and PHP-FPM
# for PHP version 7.1 use php71 and php71-fpm instead
$ sudo yum install php -y
$ sudo yum install php-fpm -y
## Configure NGINX (see below)
$ sudo nano /etc/nginx/conf.d/default.conf
@ksingh7
ksingh7 / pyspark-test.ipynb
Created April 14, 2019 17:34
pyspark-test.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ksingh7
ksingh7 / 01_kafka_cluster.yaml
Last active July 1, 2020 05:16
Kafka Cluster k8s configuration file
apiVersion: kafka.strimzi.io/v1beta1
kind: Kafka
metadata:
name: my-cluster
labels:
app: my-cluster
spec:
kafka:
version: 2.5.0
replicas: 3
@ksingh7
ksingh7 / 01_kafka_connect.yaml
Last active June 14, 2020 14:20
Kafka connect configuration file
apiVersion: kafka.strimzi.io/v1beta1
kind: KafkaConnect
metadata:
namespace: cc-demo
name: my-connect-cluster
annotations:
strimzi.io/use-connector-resources: "true"
spec:
version: 2.5.0
image: karansingh/camel-aws2-s3-kafka-connector
@ksingh7
ksingh7 / 02_kafka_connector.yaml
Created June 14, 2020 14:49
Kafka Connector YAML for AWS S3
apiVersion: kafka.strimzi.io/v1alpha1
kind: KafkaConnector
metadata:
name: s3-sink-connector
labels:
strimzi.io/cluster: my-connect-cluster
spec:
class: org.apache.camel.kafkaconnector.CamelSinkConnector
tasksMax: 1
config:
@ksingh7
ksingh7 / 02_kafka_connector.yaml
Created June 14, 2020 14:49
Kafka Connector YAML for AWS S3
apiVersion: kafka.strimzi.io/v1alpha1
kind: KafkaConnector
metadata:
name: s3-sink-connector
labels:
strimzi.io/cluster: my-connect-cluster
spec:
class: org.apache.camel.kafkaconnector.CamelSinkConnector
tasksMax: 1
config:
@ksingh7
ksingh7 / prometheus_db_backup_using_Snapshot.md
Last active June 16, 2025 15:39
Prometheus DB Backup using TSDB Snapshot

Get Token for API Authentication

oc whoami -t

Get Prometheus Route URL

oc get route -n openshift-monitoring | grep -i prometheus

Run sample curl request

@ksingh7
ksingh7 / crc_readme.md
Last active June 9, 2021 19:54
My_CRC_Setup

Deploying CRC

crc config set consent-telemetry no
crc config set enable-cluster-monitoring true
crc config set cpus 15
crc config set memory 60000
crc config view
crc setup
crc start  --log-level debug -p /mnt/hdd_space1/pull-secret.txt
@ksingh7
ksingh7 / OCP_Sample_App.md
Last active September 8, 2021 11:13 — forked from exaV/README.md
Ngninx template for Openshift with ConfigMap

Ngninx template for Openshift

Create a full deployment for an Nginx Proxy that reads its configuration from a config map.

The config map can be edited online and only requires a rolling deployment to take effect.

Quickstart:

oc new-app -f https://gist.githubusercontent.com/ksingh7/f6ca0c13cb9902fe96463704d27065af/raw/da5e0cf24f63de0a5b94b0497d5036e9e2f7b1f5/nginx-template.yaml -p NAME="my-proxy"