fusor / catasb

Ansible scripts to setup an 'oc cluster up' environment for testing the Service Catalog and Ansible Service Broker on EC2 or Local
47 stars 33 forks source link

Parameterize docker org for pulling broker apbs #37

Closed eriknelson closed 7 years ago

eriknelson commented 7 years ago

It would be very useful for testing to fully parameterize the org where the broker will be checked out from so it's easier to test outside of ansibleplaybookbundle.

eriknelson commented 7 years ago

Diff I needed to use to switch to eriknelson org.

diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml
index 963c92d..780aeb0 100644
--- a/ansible/group_vars/all.yml
+++ b/ansible/group_vars/all.yml
@@ -75,9 +75,9 @@ rds_subnet_group_name: "{{ aws_tag_prefix }}_rds_group"

 # These docker images we want to remove and fetch on each setup
 docker_images_group1:
-  - { img: "docker.io/ansibleplaybookbundle/ansible-service-broker-apb", tag: "latest" }
-  - { img: "docker.io/ansibleplaybookbundle/ansible-service-broker-asb", tag: "latest" }
-  - { img: "docker.io/ansibleplaybookbundle/ansible-service-broker-etcd", tag: "latest" }
+  - { img: "docker.io/eriknelson/ansible-service-broker-apb", tag: "latest" }
+  - { img: "docker.io/eriknelson/ansible-service-broker-asb", tag: "latest" }
+  - { img: "docker.io/eriknelson/ansible-service-broker-etcd", tag: "latest" }
   - { img: "docker.io/ansibleplaybookbundle/postgresql-demo-apb", tag: "latest" }
   - { img: "docker.io/ansibleplaybookbundle/rds-postgres-apb", tag: "latest" }
   - { img: "manageiq/manageiq-pods", tag: "app-latest" }
diff --git a/ansible/roles/ansible_service_broker_setup/tasks/main.yml b/ansible/roles/ansible_service_broker_setup/tasks/main.yml
index 149c076..4ff99ec 100644
--- a/ansible/roles/ansible_service_broker_setup/tasks/main.yml
+++ b/ansible/roles/ansible_service_broker_setup/tasks/main.yml
@@ -13,9 +13,9 @@
     when: git_clone_asb.changed
     become: 'true'

-  - name: Docker pull ansibleplaybookbundle/ansible-service-broker-apb:latest
+  - name: Docker pull eriknelson/ansible-service-broker-apb:latest
     docker_image:
-      name: ansibleplaybookbundle/ansible-service-broker-apb:latest
+      name: eriknelson/ansible-service-broker-apb:latest

   - name: Check if ansible-service-broker project already exists from a prior run
     shell: "{{ oc_cmd }} get project --no-headers=true | awk '{ print $1 }' | grep -E '^ansible-service-broker( |$)' | cat"
eriknelson commented 7 years ago

I also needed to update asbcli to pull from a different org for asbcli up, then commit that to an ansible-service-broker branch, then instruct the ansible scripts to git clone that branch.

This can be majorly improved upon when we move to deploying the broker via template.

jwmatthews commented 7 years ago

We support this now by copying https://github.com/fusor/catasb/blob/master/config/my_vars.yml.example

to config/my_vars.yml

and updated the references for dockerhub user/pass/org