This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for i in $(crioctl pod list | grep ^ID: | cut -f2 -d' ') | |
do | |
crioctl pod stop --id $i | |
crioctl pod remove --id $i | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# on fedora 26 (as root) | |
dnf --enablerepo=updates-testing -y install cri-o | |
systemctl disable --now docker | |
systemctl enable --now cri-o | |
# cd to kubernetes repo | |
CGROUP_DRIVER=systemd CONTAINER_RUNTIME=remote CONTAINER_RUNTIME_ENDPOINT='/var/run/crio.sock' IMAGE_SERVICE_ENDPOINT='/var/run/crio.sock' ./hack/local-up-cluster.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Golang | |
export GOPATH=$HOME/projects/go | |
export GOROOT=$HOME/bin/go | |
export PATH=$GOROOT/bin:$GOPATH/bin:$PATH | |
# Kubernetes | |
export PATH=$GOPATH/src/k8s.io/kubernetes/third_party/etcd:$PATH | |
export KUBECONFIG=/var/run/kubernetes/admin.kubeconfig | |
# Aliases |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_output/local/bin/linux/amd64/openshift start --write-config=openshift.local.config | |
sudo _output/local/bin/linux/amd64/openshift start --master-config openshift.local.config/master/master-config.yaml --node-config openshift.local.config/node-<node-name>/node-config.yaml | |
export KUBECONFIG=openshift.local.config/master/admin.kubeconfig | |
export PATH=$PATH:$PWD/_output/local/bin/linux/amd64 | |
oc get nodes (should work) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[OSEv3:children] | |
masters | |
etcd | |
nodes | |
[OSEv3:vars] | |
ansible_ssh_user=centos | |
ansible_become=yes | |
deployment_type=origin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[OSEv3:children] | |
masters | |
etcd | |
nodes | |
[OSEv3:vars] | |
ansible_ssh_user=centos | |
ansible_become=yes | |
deployment_type=origin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# THIS IS NOT RUNNABLE, JUST SUFFIXED WITH .SH FOR SYNTAX HIGHLIGHT | |
# tested on fedora 25 with kube 1.8 | |
# setup env | |
dnf install git docker gcc -y | |
systemctl enable --now docker | |
curl -OL https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz | |
tar -C /usr/local -xzf go1.8.3.linux-amd64.tar.gz | |
# add following to $HOME/.bashrc | |
#export GOPATH=$HOME/go |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"gopkg.in/gographics/imagick.v2/imagick" | |
) | |
type asset struct { | |
size float32 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Until packages hit repo: | |
curl -O https://kojipkgs.fedoraproject.org//packages/cri-o/1.0.0.alpha.0/0.git5dcbdc0.fc26.2/x86_64/cri-o-1.0.0.alpha.0-0.git5dcbdc0.fc26.2.x86_64.rpm | |
dnf install -y cri-o-1.0.0.alpha.0-0.git5dcbdc0.fc26.2.x86_64.rpm | |
Otherwise just: | |
dnf install -y cri-o | |
curl -L -O https://github.com/containernetworking/cni/releases/download/v0.5.2/cni-amd64-v0.5.2.tgz | |
mkdir -p /opt/cni/bin | |
tar xf cni-amd64-v0.5.2.tgz -C /opt/cni/bin/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Attempt to recreate pod stuck in Terminating | |
STOP=0 | |
function testrun { | |
while [ $STOP -eq 0 ]; do | |
project=$1 | |
template=$2 |