1. Install nginx
2. Install minio
3. Install mc client
$ mc mb myminio/static
Bucket created successfully ‘myminio/static’.
sudo apt-get install qemu-utils | |
sudo modprobe nbd | |
sudo qemu-nbd --connect=/dev/nbd0 /full/path/to/qcow2/image/file | |
sudo mkdir /mnt/ubuntu | |
sudo mount /dev/nbd0p1 /mnt/ubuntu |
/** | |
* Fancy ID generator that creates 20-character string identifiers with the following properties: | |
* | |
* 1. They're based on timestamp so that they sort *after* any existing ids. | |
* 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs. | |
* 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly). | |
* 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the | |
* latter ones will sort after the former ones. We do this by using the previous random bits | |
* but "incrementing" them by 1 (only in the case of a timestamp collision). | |
*/ |
echo "$STRING" | iconv -t ascii//TRANSLIT | sed -r s/[^a-zA-Z0-9]+/-/g | sed -r s/^-+\|-+$//g | tr A-Z a-z |
#!/bin/bash | |
# This is meant to be executed from packer | |
if [ -z "$PACKER_BUILD_NAME" ] && [ -z "$PACKER_BUILDER_TYPE" ]; then | |
echo "Do not run by hand, this is run by packer" | |
exit 1 | |
fi | |
export DEBIAN_FRONTEND=noninteractive |
"""Creates a python socket client that will interact with javascript.""" | |
import socket | |
socket_path = '/tmp/node-python-sock' | |
# connect to the unix local socket with a stream type | |
client = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) | |
client.connect(socket_path) | |
# send an initial message (as bytes) | |
client.send(b'python connected') | |
# start a loop |
When the shared files on Google Drive is downloaded, it is necessary to change the download method by the file size. The boundary of file size when the method is changed is about 40MB.
filename="### filename ###"
fileid="### file ID ###"
curl -L -o ${filename} "https://drive.google.com/uc?export=download&id=${fileid}"
# This will use osd.5 as an example | |
# ceph commands are expected to be run in the rook-toolbox | |
1) disk fails | |
2) remove disk from node | |
3) mark out osd. `ceph osd out osd.5` | |
4) remove from crush map. `ceph osd crush remove osd.5` | |
5) delete caps. `ceph auth del osd.5` | |
6) remove osd. `ceph osd rm osd.5` | |
7) delete the deployment `kubectl delete deployment -n rook-ceph rook-ceph-osd-id-5` | |
8) delete osd data dir on node `rm -rf /var/lib/rook/osd5` |
Notes on setting up a Kubernetes cluster on CoreOS (stable) with DigitalOcean's platform.
Partially stolen from this guide by kevashcraft
k8s:master
and k8s:worker
respectively, along with a tag for the clusterCLUSTER_NAME
, CLUSTER_DOMAIN
, and SSHKEY_ID
values below to match your own, then save the file to cluster_create.sh
, chmod +x cluster_create.sh
, then run it ./cluster_create.sh
. If you don't already have doctl setup, it will probably be easier to just do this from the DO control panel if you only need to do a one-time setup for development.