Skip to content

Instantly share code, notes, and snippets.

Huamin Chen rootfs

View GitHub Profile
View build-out.md

First run

# kubectl -n default logs -c build-step-node-ftl steren-sample-function-v29fs-6s4bj
2018-06-22,14:40:57.207 INFO     Loading Docker credentials for repository 'launcher.gcr.io/google/nodejs:latest'
2018-06-22,14:40:57.207 INFO     Loading Docker credentials for repository 'gcr.io/openshift-gce-devel/kn/sample-fn:latest'
2018-06-22,14:41:27.238 INFO     builder initialization took 30 seconds
2018-06-22,14:41:27.239 INFO     full build took 30 seconds
Traceback (most recent call last):
  File "/app/ftl/node_builder_image.binary.runfiles/__main__/ftl/node/main.py", line 54, in <module>
    main(sys.argv[1:])
View install tensorflow on fedora 28.md

add python site

export PYTHONPATH=${PYTHONPATH}:/usr/lib64/python3.6

install cuda and nvdia driver

dnf config-manager --add-repo=http://negativo17.org/repos/fedora-nvidia.repo
# yum-config-manager --add-repo=http://negativo17.org/repos/epel-nvidia.repo
View azure-file-class.yaml
kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
name: slow
provisioner: kubernetes.io/azure-file
parameters:
skuName: Standard_LRS
location: eastus
secretnamespace: azure-file-ns
---
View azure-file-rbac.yaml
apiVersion: v1
kind: Namespace
metadata:
name: azure-file-ns
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: system:controller:persistent-volume-binder
namespace: azure-file-ns
View dev-ro.yaml
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
labels:
app: rook-ds
name: rook-ds
namespace: rook-system
spec:
selector:
matchLabels:
View rook-dev.md
  1. Make changes locally
  2. Build (go and docker images)
  3. tests/scripts/minikube.sh up
  4. Go get a snack
  5. After the VM is up, kubernetes is ready now. Verify with a simple kubectl command from your host
  6. kubectl create -f rook-operator.yaml
  7. kubectl create -f rook-cluster.yaml
  8. go test -run -v SmokeSuite github.com/rook/rook/tests/integration/
View Dockerfile.containerized-kubelet
FROM centos:7
RUN yum install -y ebtables ethtool iptables ipset docker
ADD hyperkube /bin/hyperkube
ADD kubelet /bin/kubelet
View containerized-kubelet.sh
#!/bin/bash
docker run \
--volume=/:/rootfs:rw \
--volume=/var/run:/var/run:rw \
--volume=/sys:/sys:rw \
--volume=/sys/fs/cgroup:/sys/fs/cgroup:rw \
--volume=/var/lib/docker:/var/lib/docker:rw \
--volume=/var/lib/kubelet/:/var/lib/kubelet:rw \
--volume=/dev:/dev \
View iscsi-csi-pv.yaml
apiVersion: v1
kind: PersistentVolume
metadata:
name: csi-iscsi-pv
labels:
name: csi-iscsi-pv
spec:
accessModes:
- ReadWriteOnce
capacity:
View CryptoKitties.solidity
pragma solidity ^0.4.11;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
You can’t perform that action at this time.