This file contains 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/sh | |
if [[ $1 == "delete" ]]; then | |
kubectl delete -f https://raw.githubusercontent.com/rook/rook/master/cluster/examples/kubernetes/ceph/common.yaml | |
kubectl delete -f https://raw.githubusercontent.com/rook/rook/master/cluster/examples/kubernetes/ceph/operator.yaml | |
kubectl delete -f https://raw.githubusercontent.com/rook/rook/master/cluster/examples/kubernetes/ceph/cluster.yaml | |
kubectl delete -f https://raw.githubusercontent.com/rook/rook/master/cluster/examples/kubernetes/ceph/csi/rbd/storageclass.yaml | |
kubectl delete -f https://raw.githubusercontent.com/rook/rook/master/cluster/examples/kubernetes/ceph/toolbox.yaml | |
elif [[ $1 == "create" ]]; then | |
kubectl apply -f https://raw.githubusercontent.com/rook/rook/master/cluster/examples/kubernetes/ceph/common.yaml |
This file contains 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/sh | |
echo "Init env" | |
curl https://gist.githubusercontent.com/Vaayne/043226626c1e7987613b9b5e7ea7bbaa/raw/b64f6c1c47e7f7aa2ec25431583259eea8bcde86/kubeadm_init_install.sh -o install.sh | |
sh install.sh | |
echo "Kubeadm init" | |
kubeadm init | |
echo "make kubectl usable" |
This file contains 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/sh | |
echo "Install Docker" | |
curl -fsSL https://get.docker.com -o get-docker.sh | |
sh get-docker.sh | |
# Setup daemon. | |
cat >/etc/docker/daemon.json <<EOF | |
{ | |
"exec-opts": ["native.cgroupdriver=systemd"], |
This file contains 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
def get_cookie_headers(): | |
headers = { | |
'Referer': 'https://xueqiu.com/', | |
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36', | |
} | |
r = requests.get('https://xueqiu.com/', headers=headers) | |
if r.status_code == 200: | |
cookies = r.raw.getheaders().get('Set-Cookie') | |
headers['Cookies'] = cookies |
This file contains 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
jupyter: | |
image: jupyter/datascience-notebook | |
environment: | |
- PASSWORD=${PASSWORD} | |
nginx: | |
image: nginx | |
links: | |
- jupyter |