This is just an example that will only work for specific network interfaces and addresses. Modify as needed.
Create data directories for etcd members:
mkdir -p e{0,1,2}
Remove data directories:
kublr: | |
# Values in fixed section cannot be changed dynamically, they may be hardcoded in other places, although every effort | |
# will be made to reduce duplication | |
fixed: | |
# This path is defined by the actual location of the config file used and cannot be overridden | |
# in the config file. | |
# | |
# Any alternative value of this property specified in a user config file or in extensions' | |
# default config files will be ignored and overridden by this value. | |
# |
'use strict'; | |
var fs = require('fs'); | |
var yaml = require('js-yaml'); | |
var inputStr = fs.readFileSync('../../out/aws-cloud-formation-template-1.template', {encoding: 'UTF-8'}); | |
var CF_SCHEMA = yaml.Schema.create([ | |
new yaml.Type('!Ref', { kind: 'scalar', construct: function (data) { return { 'Ref': data }; } }), | |
new yaml.Type('!Equals', { kind: 'sequence', construct: function (data) { return { 'Fn::Equals': data }; } }), |
package main | |
import ( | |
"bytes" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"net/http" | |
"os" | |
"strconv" |
find . -path ./.git -prune -o -path */target -prune -o -path ./binary -prune -o -type f -print | xargs sed -i 's/1\.6\.0-SNAPSHOT/1.7.0-SNAPSHOT/g' |
#!/bin/bash | |
# This code is originally from http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in | |
# It is a useful one-liner which will give you the full directory name of the script no matter where it is being called from | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
# Or, to get the dereferenced path (all directory symlinks resolved), do this: | |
DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
This is just an example that will only work for specific network interfaces and addresses. Modify as needed.
Create data directories for etcd members:
mkdir -p e{0,1,2}
Remove data directories:
These scripts are used for simple management of hostnames for several VirtualBox VMs comprising a test or sandbox environment on your local machine.
Architecture:
each VM is configured to use bridged network adapter, so all VMs and the host can see each other
a script is installed in each VM to run on post-ifup, which grabs VM's IP, puts "$IP $desired-hostname $desired-fully-qualified-hostname" into /etc/hosts, changes hostname correspondingly, and puts VM's hostname and fq-hostname into VM's properties
a script is used on the host machine, which loops through running VMs, and updates /etc/hosts on the host machine and on the VMs
I hereby claim:
To claim this, I am signing this object:
Hello: X=$X | |
Hello: X=$X''' | |
Hello: X="$X" | |
Hello: X=$X "kjh | |
kjd" | |
$(date) |
#!/usr/bin/env python | |
import math | |
from gimpfu import * | |
import os | |
import re | |
import sys | |
sys.stderr = open('C:/Temp/python-fu-output.txt','a') |