Skip to content

Instantly share code, notes, and snippets.

View rthallisey's full-sized avatar

Ryan Hallisey rthallisey

View GitHub Profile
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root." 1>&2
exit 1
fi
TMPDIR=$(mktemp -d /tmp/tripleo-docker-patches.XXXXXXXXXX) || exit 1
INSTACK_UNDERCLOUD_PATCHES=(
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root." 1>&2
exit 1
fi
TMPDIR=$(mktemp -d /tmp/tripleo-docker-patches.XXXXXXXXXX) || exit 1
INSTACK_UNDERCLOUD_PATCHES=(
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root." 1>&2
exit 1
fi
TMPDIR=$(mktemp -d /tmp/tripleo-docker-patches.XXXXXXXXXX) || exit 1
INSTACK_UNDERCLOUD_PATCHES=(
#!/usr/bin/env python
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#!/bin/bash
git clone https://github.com/openstack/puppet-tripleo
pushd puppet-tripleo
git checkout stable/newton
popd
declare -a IP_LIST
IP_LIST=$(nova list | grep 'overcloud' | cut -d '|' -f 7 | cut -d '=' -f 2)
#!/bin/bash
sudo apt-get update
sudo apt-get install -y python-apt autoconf pkg-config e2fslibs-dev libblkid-dev zlib1g-dev liblzo2-dev asciidoc
curl -o get-docker.sh https://get.docker.com/
sudo chmod +x get-docker.sh
./get-docker.sh
sudo apt-get install -y libpq-dev python-dev libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev libffi-dev
  1. jinja2 template the resources

  2. Abstract different resource calls behind an ansible module

- name: scale deployment down
  cluster_deployment:
    name: postgresql
    namespace: '{{ namespace }}'
    replicas: 0
@rthallisey
rthallisey / asb-upgrade.txt
Last active April 6, 2018 16:25
Developer upgrade from openshift-ansible 3.9 broker to lastest broker with CRDs
# Developer upgrade from openshift-ansible 3.9 broker to lastest broker with CRDs
oc project openshift-ansible-service-broker
oc create ns ansible-service-broker
curl -s https://raw.githubusercontent.com/openshift/ansible-service-broker/release-1.1/templates/deploy-ansible-service-broker.template.yaml | oc process -f - | oc delete -f -
oc project ansible-service-broker
echo "Allowing services to terminate..."
sleep 20
curl -s https://raw.githubusercontent.com/openshift/ansible-service-broker/master/scripts/run_latest_build.sh | bash -
#!/bin/bash
oc get clusterserviceclass --no-headers | awk '{ print $1 }' | xargs oc delete clusterserviceclass
oc get clusterserviceplan --no-headers | awk '{ print $1 }' | xargs oc delete clusterserviceplan
apb bootstrap
apb relist
apiVersion: v1
kind: ServiceAccount
metadata:
name: cdi-operator
namespace: cdi-2
labels:
operator.cdi.kubevirt.io: ""
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding