Skip to content

Instantly share code, notes, and snippets.

View sdeoras's full-sized avatar
:octocat:

Saurabh Deoras sdeoras

:octocat:
View GitHub Profile
@sdeoras
sdeoras / influxdb2-default-config.yaml
Created December 1, 2021 12:29
influxdb2-config-default
apiVersion: influxdb2.deoras-labs.io/v1beta1
kind: Config
metadata:
name: default
namespace: sensor-system
spec:
addr: http://influxdb2.influxdb2-system.svc.cluster.local
orgName: sensor-system
tokenSecretName: admin-token
tokenSecretNamespace: sensor-system
@sdeoras
sdeoras / dapr-influxdb2-component.yaml
Created November 30, 2021 22:15
dapr-influxdb2-component
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
annotations:
meta.helm.sh/release-name: sensor-config
meta.helm.sh/release-namespace: sensor-system
creationTimestamp: "2021-11-30T18:00:19Z"
generation: 1
labels:
app.kubernetes.io/managed-by: Helm
@sdeoras
sdeoras / julia-pluto.yaml
Last active March 15, 2023 19:03
deploy julia-pluto notebook
apiVersion: v1
kind: Namespace
metadata:
name: julia-system
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: julia
labels:
@sdeoras
sdeoras / vault-admin-policy.hcl
Created March 16, 2020 18:18
Admin policy in vault
path "auth/userpass/users/+" {
capabilities = ["create", "read", "delete", "update", "list"]
allowed_parameters = {
"token-policies" = ["default", "policies/*"]
"policies" = ["default", "policies/*"]
"*" = []
}
}
path "auth/userpass/users/+/policies" {
@sdeoras
sdeoras / vault-auto-unseal-gcp-kms.md
Last active July 11, 2024 14:28
vault auto-unseal using gcp kms

Steps required to setup auto-unseal of vault using GCP KMS on k8s are as follows:

  • Create a keyring and key
  • Generate a service account credentials with encrypter-decryper role
  • Download https://github.com/hashicorp/vault-helm
  • Checkout a particular version (say tags/v0.3.0)
  • Edit values.yaml and update it as shown below.
  • Install helm/tiller and install vault component

diff for values.yaml

@sdeoras
sdeoras / gvisor-sandbox-error.md
Last active September 4, 2019 01:37
Steps to repro gvisor sandbox pod communication error

create sandboxed cluster

please set PROJECT env. var to your Google Cloud project name.

gcloud beta container \
    --project "${PROJECT}" \
    clusters create "sandboxed" \
    --zone "us-west1-a" \
    --no-enable-basic-auth \
    --cluster-version "1.13.7-gke.24" \
podman --runtime=runsc run --rm -it docker.io/library/ubuntu:latest bash
I0604 20:47:56.621539 21217 x:0] ***************************
I0604 20:47:56.621611 21217 x:0] Args: [/usr/bin/runsc start fb6738612f208a2786470ab33803763b976290531168c3716ea72b30ae74f310]
I0604 20:47:56.621673 21217 x:0] Version 90a116890fce
I0604 20:47:56.621686 21217 x:0] PID: 21217
I0604 20:47:56.621698 21217 x:0] UID: 0, GID: 0
I0604 20:47:56.621706 21217 x:0] Configuration:
I0604 20:47:56.621712 21217 x:0] RootDir: /run/user/1000/runsc
I0604 20:47:56.621720 21217 x:0] Platform: ptrace
I0604 20:47:56.621734 21217 x:0] FileAccess: exclusive, overlay: false
@sdeoras
sdeoras / JetsonNanoTensorFlowBuildGPU.md
Last active April 16, 2024 19:15
Building TensorFlow C-library for Nvidia Jetson Nano

Steps to build TensorFlow v1.12.0 C-library on Jetson Nano for GPU

Jetson Nano configuration

  • ARM 64 (aarch64)
  • gcc 7.3
  • cuda 10
  • cudnn 7

TensorFlow configuration

  • v1.12.0
@sdeoras
sdeoras / gist:9cb23148d0b7bc446f62991fad70ebf8
Created March 17, 2019 20:39
Install NVIDIA CUDA 10 on Ubuntu 18.04 LTS for TF 1.13.x
Follow instructions here: https://www.tensorflow.org/install/gpu#ubuntu_1804_cuda_10
Download and install Anaconda with Python 3.7: https://www.anaconda.com/distribution/#linux
pip install --upgrade tensorflow-gpu
python -c "import tensorflow as tf; tf.enable_eager_execution(); print(tf.reduce_sum(tf.random_normal([1000, 1000])))"
@sdeoras
sdeoras / Install NVIDIA Driver and CUDA.md
Last active March 16, 2019 22:54 — forked from zhanwenchen/Install NVIDIA Driver and CUDA.md
Install NVIDIA CUDA 9.0 on Ubuntu 16.04.4 LTS