This guide describes how to bootstrap new Production Core OS Cluster as High Availability Service in a 15 minutes with using etcd2, Fleet, Flannel, Confd, Nginx Balancer and Docker.
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
oc get po glusterblock-storage-provisioner-dc-1-864g5 -o yaml | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
annotations: | |
kubernetes.io/created-by: | | |
{"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"ReplicationController","namespace":"glusterfs","name":"glusterblock-storage-provisioner-dc-1","uid":"4a94ebd4-4402-11e8-8ea9-005056a2d8cc","apiVersion":"v1","resourceVersion":"18370005"}} | |
openshift.io/deployment-config.latest-version: "1" | |
openshift.io/deployment-config.name: glusterblock-storage-provisioner-dc | |
openshift.io/deployment.name: glusterblock-storage-provisioner-dc-1 |
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
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: foo-sa | |
namespace: foo | |
--- | |
kind: SecurityContextConstraints | |
apiVersion: v1 | |
metadata: | |
annotations: |
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
# ------------------------------------ | |
# Docker alias and function | |
# ------------------------------------ | |
# Get latest container ID | |
alias dl="docker ps -l -q" | |
# Get container process | |
alias dps="docker ps" |
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 | |
# | |
# Ansible role test shim. | |
# | |
# Usage: [OPTIONS] ./tests/test.sh | |
# - distro: a supported Docker distro version (default = "centos7") | |
# - playbook: a playbook in the tests directory (default = "test.yml") | |
# - cleanup: whether to remove the Docker container (default = true) | |
# - container_id: the --name to set for the container (default = timestamp) | |
# - test_idempotence: whether to test playbook's idempotence (default = true) |
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
#!/usr/bin/python3 | |
from pyVim.connect import SmartConnect, Disconnect | |
from pyVmomi import vim | |
import ssl | |
import atexit | |
if __name__ == '__main__': | |
# 接続情報 | |
host = 'vCenter IP or Host Name' | |
username = '[email protected]' |
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
- name: Install the required rpms | |
yum: name={{ item }} state=latest | |
with_items: | |
- wget | |
- git | |
- net-tools | |
- bind-utils | |
- iptables-services | |
- bridge-utils | |
- bash-completion |
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
curl -X{{ method }} {{ url }} | |
{%- if query_string|length %}?{% endif %} | |
{{- query_string }} \ | |
{%- for header, value in headers.iteritems() %} | |
-H '{{ header|urlencode }}: {{ value|urlencode }}'{% if not loop.last or params|length or auth %} \{% endif %} | |
{%- endfor -%} | |
{% if params|length %}{% for param, value in params.iteritems() %} | |
-d '{{ param.decode('utf-8')|urlencode }}={{ value.decode('utf-8')|urlencode }}'{% if not loop.last or auth %} \{% endif %} | |
{%- endfor %}{%- endif %} | |
{%- if auth %} |
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
To clone all repos from your organisation, try the following one-liner: | |
ORG=company; curl "https://api.github.com/orgs/$ORG/repos?per_page=1000" | grep -o 'git@[^"]*' | xargs -L1 git clone | |
For user repos, try: | |
USER=foo; curl "https://api.github.com/users/$USER/repos?per_page=1000" | grep -o 'git@[^"]*' | xargs -L1 git clone |
Some investigation and tests on how to upgrade Mint machine.
Tests performed on Mint Cinnamon 14/15/16, on physical machine 14->15 and VirtualBox VMs for 14->15->16 and 14->16.
As usual you could break your machine, so please do backups before and cross fingers.