Skip to content

Instantly share code, notes, and snippets.

View jzaccone's full-sized avatar

John Zaccone jzaccone

  • Richmond, VA
View GitHub Profile
@jzaccone
jzaccone / gist:11f7fc69f54bca3aa6b6d499e66bd158
Last active March 22, 2021 13:49
Create Zenhub issues based on CSV input. Used to populate issues for DDC conference
from github import Github
from zenhub import Zenhub
import json
import sys
import re
import pandas as pd
from urllib.parse import quote
from datetime import datetime

Run these steps inside the console-in-a-browser environment provided by your instructor.

Login to the IBM Cloud. When asked to select an account, select "Eric Andersen's Account". Select 'us-east' as the region.

~$ ibmcloud login -a https://cloud.ibm.com

API endpoint: https://cloud.ibm.com

Email> john.zaccone@ibm.com
# Download the project
git clone https://github.com/jzaccone/dotnet-docker-samples.git
# Create Docker Hub Account: https://hub.docker.com/
docker login
# Push Docker image to Docker hub
cd dotnet-docker-samples/aspnetapp/
docker build -t [docker hub username]/asp-net-app
docker push [docker hub username]/asp-net-app
# Get the state of your cluster
$ kubectl cluster-info
# Get all the nodes of your cluster
$ kubectl get nodes -o wide
# Get info about the pods of your cluster
$ kubectl get pods -o wide
# Get info about the replication controllers of your cluster
kubectl create namespace <new namespace>
kubectl config set-context $(kubectl config current-context) --namespace=<insert-namespace-name-here>
kubectl config view | grep namespace:
#Namespaces are intended for use in environments with many users spread across multiple teams, or projects. For clusters with a few to tens of users, you should not need to create or think about namespaces at all. Start using namespaces when you need the features they provide.
#Namespaces provide a scope for names. Names of resources need to be unique within a namespace, but not across namespaces.
#Namespaces are a way to divide cluster resources between multiple uses (via resource quota).
#In future versions of Kubernetes, objects in the same namespace will have the same access control policies by default.
#It is not necessary to use multiple namespaces just to separate slightly different resources, such as different versions of the same software: use labels to distinguish resources within the same namespace.
@jzaccone
jzaccone / play-with-k8s commands.sh
Last active December 30, 2019 21:42
Setting up master for play-with-k8s
# Initializes cluster master node:
kubeadm init --apiserver-advertise-address $(hostname -i)
# Initialize cluster networking:
kubectl apply -n kube-system -f \
"https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"
# (Optional) Initialize kube-dashboard:
@jzaccone
jzaccone / runc_with_tty.md
Last active October 7, 2021 07:03
Start runC container with TTY Device

About

recvtty is a reference implementation of a consumer of runC's --console-socket API. It is automatically built when doing a make on the runc project.

Prereq

These instructions were tested on Ubuntu 16.04. Also go, git are required.

Install runC

go get github.com/opencontainers/runc
cd $GOPATH/src/github.com/opencontainers/runc
@jzaccone
jzaccone / cleanWskEnv.sh
Created February 16, 2017 13:36
Clean up your OpenWhisk environment including packages, triggers, actions and rules
#!/bin/bash
# This script deletes all wsk actions, packages, triggers and rules
# May need to run it twice to delete everything
IFS='
'
context="packages"
for line in `wsk list | awk '{ print $1 }' | tail -n +2`; do
@jzaccone
jzaccone / install_runc
Created June 10, 2016 19:43
Install runc and its dependencies on AWS Redhat instance
wget https://github.com/opencontainers/runc/releases/download/v0.1.1/runc-amd64
sudo mv runc-amd64 /usr/bin/runc
sudo chmod a+x /usr/bin/runc
wget ftp://195.220.108.108/linux/Mandriva/devel/cooker/x86_64/media/contrib/release/lib64apparmor1-2.3-1.1310.4-mdv2012.0.x86_64.rpm
wget ftp://195.220.108.108/linux/centos/7.2.1511/os/x86_64/Packages/libseccomp-2.2.1-1.el7.x86_64.rpm
sudo rpm -i *.rpm