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
.PHONY: clean prepare rpmbuild | |
# | |
# Author: dataday | |
# | |
# Description: | |
# | |
# Provides common make script functions for | |
# building RPM versioned packages | |
# | |
# Usage: |
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
#!/usr/bin/env python | |
# | |
# Author: dataday (2015) | |
# | |
# Description: influxdb updates for new users and databases | |
# | |
# To remove influx data and meta | |
# rm -rf /var/opt/influxdb/meta/*; rm -rf /var/opt/influxdb/data/*; rm -rf /var/opt/influxdb/wal/* | |
# service influxdb restart | |
# |
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 make_request(url, secure = false) | |
url = url(url) # Make Addressable | |
opts = secure ? { verify_ssl: OpenSSL::SSL::VERIFY_PEER } : {} | |
opts.merge!(content_type: @config[:content_type], user_agent: @config[:agent]) | |
cert = @config[:cert_path] || '' | |
pass = @config[:cert_password] || '' |
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
# Author: dataday | |
# http://ruby-doc.org/stdlib-2.0.0/libdoc/json/rdoc/JSON.html | |
require 'json' | |
# https://github.com/sporkmonger/addressable | |
require 'addressable/uri' | |
# http://www.rubydoc.info/gems/activesupport/5.0.0 | |
require 'active_support' |
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
FROM centos:centos7 | |
MAINTAINER dataday <[email protected]> | |
COPY repositories/ /etc/yum.repos.d/ | |
RUN yum update -y && yum install -y yum-utils | |
COPY bashrc /tmp/bashrc | |
RUN cat "/tmp/bashrc" >> ~/.bashrc && rm -f /tmp/bashrc |
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
#!/usr/bin/env bash | |
# | |
# Author: dataday | |
# created: 23/02/2016 | |
# | |
# Description: | |
# Runs release tasks on CI (Delivery Pipeline) | |
# For input variables see $SCRIPT_ROOT/environment-ci | |
# debug: $0 2>&1 | tee $SCRIPT_ROOT/release.log | |
# |
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
#!/usr/bin/env bash | |
# | |
# Author: dataday | |
# created: 23/02/2016 | |
# | |
# Description: | |
# Runs release (delivery pipeline) or | |
# development tasks locally or on CI | |
# | |
# fail on error |
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
module.exports = function (grunt) { | |
// passed environment via Makefile | |
var env = process.env.APP_TARGET_ENV; | |
// sets task type based on environment | |
var task_type = (['int', 'test', 'live'].indexOf(env) >= 0) ? | |
'dist' : | |
'dev'; |
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
FROM registry.ci.api.domain.co.uk/rmp/centos6:base | |
MAINTAINER dataday <[email protected]> | |
VOLUME /usr/share/webapp-base | |
WORKDIR /usr/share/webapp-base | |
# machine dependencies | |
RUN yum update -y && yum install -y epel-release | |
RUN rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm | |
RUN rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm |
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
#!/usr/bin/env ruby | |
# Manages AWS hosted S3 bucket content via the aws-sdk for Ruby. | |
# @author: dataday | |
# Example input: | |
# bundle exec ruby exe/bucket.rb bucket service-cookbook --create-bucket | |
# bundle exec ruby exe/bucket.rb bucket service-cookbook --delete-bucket | |
# bundle exec ruby exe/bucket.rb bucket service-cookbook --list-objects | |
# bundle exec ruby exe/bucket.rb bucket service-cookbook --upload-object local/file.suffix remote/path |