summaryrefslogtreecommitdiffstats
path: root/tools/clusterdevel/roles/minishift/tasks/main.yml
diff options
context:
space:
mode:
authorMatthew Jones <matburt@redhat.com>2020-04-08 16:02:05 +0200
committerMatthew Jones <matburt@redhat.com>2020-04-08 16:03:22 +0200
commit6abeaf2c55b042e7cdc4a9ecb40b23fe748d84d3 (patch)
tree3bf00928a226c84a9f41d592a086541bfe0611de /tools/clusterdevel/roles/minishift/tasks/main.yml
parentMerge pull request #6607 from ryanpetrello/graphite-no-tags (diff)
downloadawx-6abeaf2c55b042e7cdc4a9ecb40b23fe748d84d3.tar.xz
awx-6abeaf2c55b042e7cdc4a9ecb40b23fe748d84d3.zip
Update some contributing docs
* Update the tools called in the dev environment * More RMQ purges from architecture docs * Remove the old clusterdev target
Diffstat (limited to 'tools/clusterdevel/roles/minishift/tasks/main.yml')
-rw-r--r--tools/clusterdevel/roles/minishift/tasks/main.yml117
1 files changed, 0 insertions, 117 deletions
diff --git a/tools/clusterdevel/roles/minishift/tasks/main.yml b/tools/clusterdevel/roles/minishift/tasks/main.yml
deleted file mode 100644
index 674e963ab8..0000000000
--- a/tools/clusterdevel/roles/minishift/tasks/main.yml
+++ /dev/null
@@ -1,117 +0,0 @@
----
-- name: Get status of minishift
- shell: minishift status
- register: minishift_status
-
-- name: Echo minishift status so if verification fails we can see the results
- debug:
- var: minishift_status.stdout
-
-- name: Verify status of minishift
- assert:
- that:
- - "'Minishift: Running' == minishift_status.stdout_lines[0]"
- - "'OpenShift: Running' in minishift_status.stdout_lines[2]"
-
-- name: Get minishift ip
- shell: minishift ip
- register: minishift_ip
-
-- name: Get minishift oc location
- shell: minishift oc-env
- register: minishift_oc_env
-
-- shell: |
- eval $(minishift oc-env)
- echo $PATH
- register: oc_path
-
-- name: Deploy Tower
- block:
- - name: Login as admin
- shell: "oc login -u system:admin"
-
- - name: Create privileged user service account awx
- shell: "oc adm policy add-scc-to-user privileged system:serviceaccount:{{ awx_dev_project }}:awx"
-
- - name: Unattach AWX dev tree volume locally
- shell: "minishift hostfolder remove awx || true"
-
- - name: Attach AWX dev tree volume locally
- shell: "minishift hostfolder add -t sshfs --source {{ devtree_directory }} --target /mnt/sda1/awx awx"
-
- - name: Unmount AWX dev volume
- shell: "minishift hostfolder umount awx || true"
-
- - name: Mount AWX dev volume
- shell: minishift hostfolder mount awx
-
- - name: Get Project Detail
- shell: "oc get project {{ awx_dev_project }}"
- register: project_details
- ignore_errors: true
-
- - name: Get Postgres Service Detail
- shell: "oc describe svc postgresql -n {{ awx_dev_project }}"
- register: postgres_svc_details
- ignore_errors: true
-
- - name: Create AWX Openshift Project
- shell: "oc new-project {{ awx_dev_project }}"
- when: project_details.rc != 0
-
- - name: Stage serviceacct.yml
- template:
- src: serviceacct.yml.j2
- dest: /tmp/serviceacct.yml
-
- - name: Apply svc account
- shell: "oc apply -f /tmp/serviceacct.yml && rm -rf /tmp/serviceaccount.yml"
-
- - name: Stage hostfolderpvc.yml
- template:
- src: hostfolderpvc.yml.j2
- dest: /tmp/hostfolderpvc.yml
-
- - name: Create PV for host folder
- shell: "oc apply -f /tmp/hostfolderpvc.yml && rm -rf /tmp/hostfolderpvc.yml"
-
- - name: Stage volumeclaim.yml
- template:
- src: volumeclaim.yml.j2
- dest: /tmp/volumeclaim.yml
-
- - name: Create PV for host folder
- shell: "oc apply -f /tmp/volumeclaim.yml && rm -rf /tmp/volumeclaim.yml"
-
- - name: Deploy and Activate Postgres
- shell: "oc new-app --template=postgresql-persistent -e MEMORY_LIMIT={{ pg_memory_limit|default('512') }}Mi -e NAMESPACE=openshift -e DATABASE_SERVICE_NAME=postgresql -e POSTGRESQL_USER={{ pg_username|default('awx') }} -e POSTGRESQL_PASSWORD={{ pg_password|default('awx') }} -e POSTGRESQL_DATABASE={{ pg_database|default('awx') }} -e VOLUME_CAPACITY={{ pg_volume_capacity|default('5')}}Gi -e POSTGRESQL_VERSION=10 -n {{ awx_dev_project }}"
- when: postgres_svc_details is defined and postgres_svc_details.rc != 0
- register: openshift_pg_activate
-
- - name: Wait for Postgres to activate
- pause:
- seconds: 15
- when: openshift_pg_activate|changed
-
- - name: Template configmap
- template:
- src: configmap.yml.j2
- dest: "/tmp/configmap.yml"
-
- - name: Create configmap
- shell: "oc apply -f /tmp/configmap.yml && rm -rf /tmp/configmap.yml"
-
- - name: Template deployment
- template:
- src: hostdev.yml.j2
- dest: "/tmp/hostdev.yml"
-
- - name: Create deployment
- shell: "oc apply -f /tmp/hostdev.yml && rm -rf /tmp/hostdev.yml"
-
- - name: Please login
- debug:
- msg: "Login at https://{{ minishift_ip.stdout }}:8443 with admin / admin"
- environment:
- PATH: '{{ oc_path.stdout }}'