Skip to content

Instantly share code, notes, and snippets.

@prein
prein / rexray-config.yml.erb
Last active October 10, 2017 16:46
rexray config chef template for s3 and minio or ceph
libstorage:
service: s3fs
integration:
volume:
operations:
mount:
rootPath: /
preempt: true
remove:
force: true
@prein
prein / attributes.json
Last active October 2, 2017 09:42
recipe from my DC/OS cookbook installing rexray plugin in docker
"external_storage": {
"drivers": {
"rexrayefs": {
"docker_plugin": "rexray/efs",
"version": "latest",
"options": {
"credentials": {
"source": "data_bag",
"bag": "credentials",
"item": "aws_rexray_staging"
@prein
prein / test-rexray-dcos-app.json
Created October 2, 2017 09:30
test-rexray-dcos-app.json
{
"cmd": "df; ls /data; cat /data/test-rexray-volume/test.txt; while true; do sleep 1; date >> /data/test-rexray-volume/test.txt; tail -1 /data/test-rexray-volume/test.txt; done",
"container": {
"docker": {
"forcePullImage": true,
"image": "alpine:3.1"
},
"type": "DOCKER",
"volumes": [
{
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "RexRayMin",
"Effect": "Allow",
"Action": [
"elasticfilesystem:CreateFileSystem",
"elasticfilesystem:CreateTags",
"elasticfilesystem:DeleteTags",
@prein
prein / copy_dns_zones.rb
Last active August 3, 2016 15:46
Copy DNS zones from CloudFlare to Route53
require 'rubyflare'
require 'route53'
require 'yaml'
credentials = YAML.load(File.read("credentials.yml"))
cloudflare_conn = Rubyflare.connect_with(credentials['cloudflare']['email'], credentials['cloudflare']['api_key'])
r53_conn = Route53::Connection.new(credentials['aws']['access_key'],credentials['aws']['secret_key'])
# Get all zones (domains)
@prein
prein / gist:6938818
Created October 11, 2013 17:33
ohai cannot load linux::lsb
[2013-10-11T17:30:45+00:00] WARN: [DEPRECATION] Plugin at /var/lib/gems/1.8/gems/ohai-7.0.0.alpha.0/lib/ohai/plugins/dmi_common.rb is a version 6 plugin. Version 6 plugins will not be supported in future releases of Ohai. Please upgrage your plugin to version 7 plugin syntax. For more information visit here: XXX
[2013-10-11T17:30:45+00:00] WARN: Plugin at /var/lib/gems/1.8/gems/ohai-7.0.0.alpha.0/lib/ohai/plugins/chef.rb threw exception #<LoadError: /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- chef/version> /var/lib/gems/1.8/gems/ohai-7.0.0.alpha.0/lib/ohai/loader.rb:44:in `eval'
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
(eval):19
[2013-10-11T17:30:45+00:00] WARN: [DEPRECATION] Plugin at /var/lib/gems/1.8/gems/ohai-7.0.0.alpha.0/lib/ohai/plugins/uptime.rb is a version 6 plugin. Version 6 plugins will not be supported in future releases of Ohai. Please upgrage your plugin to version 7 plugin syntax. For more information visit here: XXX
[2