This file contains hidden or 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
oc run ansible-service-broker-ansibleapp --env "OPENSHIFT_TARGET=10.1.2.2:8443" --env "OPENSHIFT_USER=admin" --env "OPENSHIFT_PASS=ppp" --image=ansibleapp/ansible-service-broker-ansibleapp --restart=Never -- provision -e "dockerhub_user=eriknelson" -e "dockerhub_pass=ppp" -e "openshift_target=10.1.2.2:8443" -e "openshift_user=admin" -e "openshift_pass=ppp" |
This file contains hidden or 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
[Prereq] | |
1) **DNS setup** | |
/etc/NetworkManager/dnsmasq.d/custom-example.com | |
address=/master.example.com/192.168.156.5 | |
address=/.master.example.com/192.168.156.5 | |
address=/node1.example.com/192.168.156.6 | |
address=/.node1.example.com/192.168.156.6 | |
address=/node2.example.com/192.168.156.7 |
This file contains hidden or 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
#!/bin/bash | |
vagrantDir=/home/ernelson/cluster/centos-origin-cluster | |
vagrantHosts=(master node1 node2) | |
searchTerm=$1 | |
if [[ "$searchTerm" == "" ]]; then | |
echo "ERROR: Must provide search term." | |
exit 1 | |
fi |
This file contains hidden or 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
docker run -it -p 1338:1338 \ | |
-e "APPS_URL=https://gist.githubusercontent.com/eriknelson/3c7b8c7b341b18929c6d18309ddb0d3f/raw/24239e0e1884396b509a0a252ebe464e5c645aa8/example_dat.json" \ | |
eriknelson/demo-broker |
This file contains hidden or 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
E0324 19:41:06.002901 1 controller.go:269] Error creating serviceClass ansibleapp/galera-ansibleapp from Broker ansible-service-broker: ServiceClass.servicecatalog.k8s.io "ansibleapp/galera-ansibleapp" is invalid: metadata.name: Inva | |
lid value: "ansibleapp/galera-ansibleapp": must match the regex [a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)* (e.g. 'example.com') |
This file contains hidden or 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
diff --git a/Makefile b/Makefile | |
index 1cd1e89..a36c730 100644 | |
--- a/Makefile | |
+++ b/Makefile | |
@@ -1,7 +1,7 @@ | |
REGISTRY ?= docker.io | |
PROJECT ?= ansibleplaybookbundle | |
TAG ?= latest | |
-BROKER_APB_IMAGE = $(REGISTRY)/$(PROJECT)/ansible-service-broker-apb | |
+BROKER_IMAGE = $(REGISTRY)/$(PROJECT)/ansible-service-broker |
This file contains hidden or 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
# The following variables need to be set at the bottom of the template | |
# DOCKERHUB_ORG - Dockerhub organization name | |
# DOCKERHUB_USER - Dockerhub username | |
# DOCKERHUB_PASS - Dockerhub password | |
# OPENSHIFT_TARGET - IP address and port to access the Cluster | |
# OPENSHIFT_USER - Cluster username | |
# OPENSHIFT_PASS - Cluster password | |
# | |
# Create the broker with: | |
# oc create -f ansible-service-broker-all.yaml |
This file contains hidden or 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
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 }} |
This file contains hidden or 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
# 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 |
This file contains hidden or 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
# 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] |