Skip to content

Instantly share code, notes, and snippets.

@surajssd
surajssd / deploy_opencompose.md
Last active November 13, 2016 13:00
OpenCompose services.yml

The services.yml file

$ cat services.yml 
version: "0.2"

services:
    frontend:
        image: docker.io/surajd/frontend:v1
        ports:

Download kedge for your operating system. And place above two files in single directory and run following:

$ kedge create -f kedge.yaml 
persistentvolumeclaim "orientdb-databases" created
persistentvolumeclaim "orientdb-backup" created
service "orientdbservice" created
deployment "orientdbservice" created
This file has been truncated, but you can view the full file.
-- Logs begin at Mon 2017-11-27 10:33:23 UTC, end at Mon 2017-11-27 12:08:42 UTC. --
Nov 27 10:33:23 minikube localkube[2900]: E1127 10:33:23.049158 2900 kuberuntime_container.go:356] getKubeletContainers failed: rpc error: code = Unknown desc = Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Nov 27 10:33:23 minikube localkube[2900]: E1127 10:33:23.049170 2900 kubelet.go:1212] Container garbage collection failed: rpc error: code = Unknown desc = Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Nov 27 10:33:23 minikube localkube[2900]: I1127 10:33:23.049315 2900 server.go:227] Event(v1.ObjectReference{Kind:"Node", Namespace:"", Name:"minikube", UID:"minikube", APIVersion:"", ResourceVersion:"", FieldPath:""}): type: 'Warning' reason: 'ContainerGCFailed' rpc error: code = Unknown desc = Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Nov 27 10:33:23 miniku
@surajssd
surajssd / README.md
Last active December 22, 2017 07:08
Libpod CPU profile

This has CPU Profile for Libpod

#!/bin/bash
# ref: https://www.if-not-true-then-false.com/2010/install-virtualbox-with-yum-on-fedora-centos-red-hat-rhel/
# ref: https://computingforgeeks.com/how-to-install-virtualbox-on-fedora-linux/
cd /etc/yum.repos.d/
curl -O https://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo
dnf update -y
dnf install -y binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms
systemctl reboot
echo "
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: privileged
annotations:
seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*'
spec:
privileged: true
allowPrivilegeEscalation: true
@surajssd
surajssd / Vagrantfile
Last active July 26, 2020 04:39
kubernetes the hard way
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.define "master" do |master|
master.vm.box = "fedora/28-cloud-base"
master.vm.hostname = "master"
master.vm.network "private_network", ip: "192.168.50.10"
end
sudo dnf -y install git
mkdir ~/git
cd ~/git
git clone https://github.com/surajssd/dotfiles
cd dotfiles
./installers/install-configs.sh
./installers/install-local-bin.sh
sudo -i
echo "
[Allow vagrant libvirt management permissions]
Identity=unix-user:vagrant
Action=org.libvirt.unix.manage
ResultAny=yes
ResultInactive=yes
ResultActive=yes
" | tee /etc/polkit-1/localauthority/50-local.d/vagrant.pkla
-- Logs begin at Tue 2019-01-15 07:46:21 UTC, end at Tue 2019-01-15 07:51:50 UTC. --
Jan 15 07:46:34 minikube systemd[1]: Started kubelet: The Kubernetes Node Agent.
Jan 15 07:46:34 minikube kubelet[2379]: Flag --cluster-dns has been deprecated, This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.
Jan 15 07:46:34 minikube kubelet[2379]: Flag --authorization-mode has been deprecated, This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.
Jan 15 07:46:34 minikube kubelet[2379]: Flag --client-ca-file has been deprecated, This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.
Jan 15 07:46:34 minikube kubelet[2379]