Skip to content

Instantly share code, notes, and snippets.

View rthallisey's full-sized avatar

Ryan Hallisey rthallisey

View GitHub Profile
#!/bin/bash
TEST="${TEST:-idk}"
echo $1
echo $TEST
#!/bin/bash
set -ex
# Create the namespace for the HCO
oc create ns kubevirt-hyperconverged || true
# Create an OperatorGroup
cat <<EOF | oc create -f -
apiVersion: operators.coreos.com/v1alpha2
# Ask rbean@redhat.com for granting access
# to redhat-operators-stage
QUAY_USERNAME="USERNAME"
QUAY_PASSWORD="PASSWORD"
TOKEN=$(curl -sH "Content-Type: application/json" -XPOST https://quay.io/cnr/api/v1/users/login -d '
{
"user": {
"username": "'"${QUAY_USERNAME}"'",
"password": "'"${QUAY_PASSWORD}"'"
}
#!/bin/bash
set -e
oc delete csv kubevirt-hyperconverged-operator.v0.0.1 || true
# Create the namespace for the HCO
oc create ns kubevirt-hyperconverged || true
# Create an OperatorGroup
#!/bin/bash
set -ex
# Create the namespace for the HCO
oc create ns kubevirt-hyperconverged || true
# Create an OperatorGroup
cat <<EOF | oc create -f -
apiVersion: operators.coreos.com/v1alpha2
apiVersion: v1
kind: ServiceAccount
metadata:
name: cdi-operator
namespace: cdi-2
labels:
operator.cdi.kubevirt.io: ""
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
#!/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
@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 -
  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
#!/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