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
| # 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
| [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
| _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
| # 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
| # 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
| #!/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
| module kubedns 1.0; | |
| require { | |
| type container_var_run_t; | |
| type container_t; | |
| class file { open read ioctl }; | |
| } | |
| #============= container_t ============== | |
| allow container_t container_var_run_t:file read; |
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
| # edit /etc/sysconfig/docker-storage | |
| DOCKER_STORAGE_OPTIONS=--storage-driver=overlay2 | |
| # edit /etc/sysconfig/docker | |
| OPTIONS=' --selinux-enabled --log-driver=journald --graph=/var/lib/containers/storage/docker' | |
| # edit /etc/systemd/system/atomic-openshift-node.service | |
| WorkingDirectory=/var/lib/containers/storage/origin/ | |
| # atomic-openshift-node.service has PreExec commands that expect the WorkingDirectory to exist already |