Skip to content

Instantly share code, notes, and snippets.

View eriknelson's full-sized avatar
🤘

Erik Nelson eriknelson

🤘
  • ammosquared.com
  • Raleigh, NC
  • 11:12 (UTC -04:00)
View GitHub Profile
diff --git a/pkg/broker/broker.go b/pkg/broker/broker.go
index 8f5f6445..dfb2a93e 100644
--- a/pkg/broker/broker.go
+++ b/pkg/broker/broker.go
@@ -470,8 +470,22 @@ func (a AnsibleBroker) Deprovision(instanceUUID uuid.UUID, async bool) (*Deprovi
return nil, err
}
- var token string
+ // NOTE, HACK: Check to see if there are any outstanding jobs for the
################################################################################
# Shared Parameters
################################################################################
_p: &_p
- name: postgresql_database
default: admin
type: string
title: PostgreSQL Database Name
required: true
- name: postgresql_password
name: rhscl-postgresql-apb
image: eriknelson/rhscl-postgresql-apb
description: SCL PostgreSQL apb implementation
bindable: True
async: optional
metadata:
documentationUrl: https://www.postgresql.org/docs/
longDescription: An apb that deploys postgresql 9.4 or 9.5.
dependencies: ['registry.access.redhat.com/rhscl/postgresql-95-rhel7']
displayName: PostgreSQL (APB)
{
"services": [
{
"name": "dockerhub-eriknelson-postgresql-demo-apb",
"id": "564b88d0b86bf60bed98971daa33040c",
"description": "PostgreSQL apb implementation",
"bindable": true,
"metadata": {
"displayName": "Postgresql demo",
"documentationUrl": "https://www.postgresql.org/docs/",
@eriknelson
eriknelson / main.go
Last active July 8, 2017 02:47
listprocessing
package main
import (
"fmt"
"regexp"
"sync"
)
func _totallist() []string {
return []string{
+ '[' 1001 '!=' 1001 ']'
+ oc-login.sh
Attempting to login with a service account...
Logged into "https://kubernetes.default:443" as "system:serviceaccount:foo:apb-f3f74be0-79d2-4979-a84d-02a72d2b2024" using the token provided.
You have one project on this server: "foo"
Using project "foo".
Welcome! See 'oc help' to get started.
+ touch /etc/apb/bind-creds
+ [[ -e /opt/apb/actions/provision.yaml ]]
+ [[ -e /opt/apb/actions/provision.yml ]]
+ '[' 1001 '!=' 1001 ']'
+ oc-login.sh
Attempting to login with a service account...
Logged into "https://kubernetes.default:443" as "system:serviceaccount:foo:apb-d708c176-57e3-41cd-98b0-ea34ca18d363" using the token provided.
You have one project on this server: "foo"
Using project "foo".
Welcome! See 'oc help' to get started.
+ touch /etc/apb/bind-creds
+ [[ -e /opt/apb/actions/provision.yaml ]]
+ ansible-playbook /opt/apb/actions/provision.yml --extra-vars '{"namespace":"foo","postgresql_database":"admin","postgresql_password":"admin","postgresql_user":"admin","postgresql_version":"9.5"}'
# oc logs apb-72ebeb87-ab95-4583-b5a8-ac7b135cba98
Openshift cluster credentials not provided. Assuming the broker is running inside an Openshift cluster
Attempting to login with a service account...
Logged into "https://kubernetes.default:443" as "system:serviceaccount:foo:apb-72ebeb87-ab95-4583-b5a8-ac7b135cba98" using the token provided.
You have one project on this server: "foo"
Using project "foo".
Welcome! See 'oc help' to get started.
PLAY [hello-world-apb provision] ***********************************************
TASK [ansible.kubernetes-modules : Intall latest openshift client] *************
skipping: [localhost]
# oc logs apb-06fe9d3f-7271-4c8d-9561-7132a60056f0
error: A server URL must be specified
PLAY [hello-world-apb provision] ***********************************************
TASK [ansible.kubernetes-modules : Intall latest openshift client] *************
skipping: [localhost]
TASK [provision-hello-world-apb : create project if it doesn't exist] **********
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: Exception: ("Error initializing AnsibleModuleHelper: [Errno 2] No such file or directory: '/opt/apb/.kube/config'",)
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_8I9FSC/ansible_module_openshift_v1_project.py\", line 347, in <module>\n main()\n File \"/tmp/ansible_8I9FSC/ansible_module_openshift_v1_project.py\", line 338, in main\n raise Exception(exc.message)\nException: (\"Error initializing AnsibleModuleHelper: [Errno 2] No such file or directory: '/opt/apb/.kub
diff --git a/ansible/roles/ansible_service_broker_setup/tasks/main.yml b/ansible/roles/ansible_service_broker_setup/tasks/main.yml
index 0a4c124..959449e 100644
--- a/ansible/roles/ansible_service_broker_setup/tasks/main.yml
+++ b/ansible/roles/ansible_service_broker_setup/tasks/main.yml
@@ -1,63 +1,63 @@
---
- - name: Docker pull {{ broker_image }}
- docker_image:
- name: "{{ broker_image }}"
+ #- name: Docker pull {{ broker_image }}