Skip to content

Instantly share code, notes, and snippets.

View sabre1041's full-sized avatar

Andrew Block sabre1041

View GitHub Profile
@sabre1041
sabre1041 / gist:9443277
Created March 9, 2014 05:31
openshift-mobile allow source git repository on new application creation
From 25c1329cc616e6936b257ca492f33cde93c9e92c Mon Sep 17 00:00:00 2001
From: Andrew Block <andy.block@gmail.com>
Date: Sat, 8 Mar 2014 23:15:56 -0600
Subject: [PATCH] Added ability to use git repo as source code for new
application to resolve #61
---
www/index.html | 23 ++++++++++++++++++++++-
www/js/osm-operations.js | 9 ++++++++-
2 files changed, 30 insertions(+), 2 deletions(-)
# Use centos as base
FROM centos:centos6
# Maintainer details
MAINTAINER Andrew Block <andy.block@gmail.com>
# Update System
RUN yum -y update \
&& yum install -y wget java-1.7.0-openjdk-devel git unzip \
&& wget -O /etc/yum.repos.d/epel-apache-maven.repo http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo \
@sabre1041
sabre1041 / ose-update-src-app-url.sh
Created October 7, 2015 14:35
Updates the SRC_APP_URL environment variable in an OpenShift BuildConfig
#!/bin/bash
PORT=8443
usage() {
echo "Usage $0 -h|--host=\"<host>\" -p|--port=\"<port>\" -u|--user=\"<username>\" -w|--password=\"<password>\" -n|--namespace=\"<namespace>\" -a|--app=\"<app>\" -s|--source=\"<source>\" -t|--token=\"<token>\""
}
{
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "ticket-monster",
"namespace": "ci-dev",
"selfLink": "/osapi/v1beta3/namespaces/ci-dev/buildconfigs/ticket-monster",
"uid": "9b8ab99c-62cb-11e5-a6d3-fa163e030a4b",
"resourceVersion": "468282",
"creationTimestamp": "2015-09-24T14:50:33Z",
@sabre1041
sabre1041 / redhat_csp_download.py
Last active September 20, 2022 10:06
Ansible Module to download a file from the Red Hat CSP
---
- hosts: localhost
tasks:
- name: Download from Red Hat Customer Portal
redhat_csp_download:
dest: /tmp/csp-download.zip
url: https://access.redhat.com/jbossnetwork/restricted/softwareDownload.html?softwareId=37193
username: <username>
password: <password>
#!/bin/bash
set -e
CATAPULT_GIT_URI="https://github.com/sabre1041/catapult"
CATAPULT_GIT_BRANCH="s2i"
BASE_IMAGE="openshift/wildfly-100-centos7"
OC_BINARY="/home/atomic-sig/oc"
APP_NAME="catapult"
USERNAME="admin"
@sabre1041
sabre1041 / gist:4dc25624d5d261a9bc004f4b923ef64e
Created June 16, 2016 17:32
swarm-infra jenkinsfile output
node {
env.KUBECONFIG = pwd() + "/.kubeconfig"
def infraProject = "swarm-infra"
def swarmBase = "swarm-s2i"
def WORKSPACE = pwd()
stage 'Checkout'
git url: "https://github.com/sabre1041/summit2016-ose-cicd.git"

OpenShift Behavior Driven Development Demo - Runbook

Overview

This documentation provides information on how to get the demonstration running in an OpenShift Container Platform environment

Prerequisites

@sabre1041
sabre1041 / gist:d734b9c0757f8c36e3e5cd36de6233ab
Last active August 3, 2016 03:53
Continuous Integration

Continuous Integration and Continuous Delivery

One of the core components of this demonstration is to utilize the principles and tools emphasized by continuous integration and continuous delivery. This document explains how these tools and concepts are achieved.

Jenkins

The Jenkins Continuous Integration Server is being used to orchestrate the building, deploying and promoting of applications to OpenShift. It builds upon the official [Jenkins xPaaS image] (https://docs.openshift.com/enterprise/latest/using_images/other_images/jenkins.html) by adding essential plugins and configurations to enable continuous integration and delivery functionality and behavior driven development.

Jenkins Agents

@sabre1041
sabre1041 / openshift-management-prune.yml
Created September 22, 2016 00:56
Ansible OpenShift Management Script - Pruning
---
- hosts: openshift
force_handlers: True
vars:
openshift_master_url: localhost
openshift_login_insecure_flag: --insecure-skip-tls-verify=true
openshift_login_insecure: False
openshift_prune_builds_complete: 5
openshift_prune_builds_failed: 1