jbride
2018-12-01 cc7c4585f43d11e3e0ed05634847199631df59c8
https://github.com/redhat-gpe/bxms_decision_mgmt_foundations/issues/107
2 files added
2 files modified
238 ■■■■■ changed files
ansible/roles/ocp-workload-bxms-dm/defaults/main.yml 19 ●●●●● patch | view | raw | blame | history
ansible/roles/ocp-workload-bxms-dm/tasks/workload.yml 23 ●●●●● patch | view | raw | blame | history
ansible/roles/ocp-workload-bxms-dm/templates/limitrange.yaml.j2 23 ●●●●● patch | view | raw | blame | history
ansible/roles/ocp-workload-bxms-dm/templates/rhdm71-image-streams.yaml 173 ●●●●● patch | view | raw | blame | history
ansible/roles/ocp-workload-bxms-dm/defaults/main.yml
@@ -25,6 +25,23 @@
deploy_status_retries: 25
deploy_status_delay: 20
DM_IS_URL: https://raw.githubusercontent.com/jboss-container-images/rhdm-7-openshift-image/7.1.1.GA/rhdm71-image-streams.yaml
# OCP Limit Range
pod_min_mem: 10Mi
pod_max_mem: 6Gi
container_max_mem: 4Gi
default_min_mem: 256Mi
default_max_mem: 1Gi
default_min_cpu: 250m
default_max_cpu: 1000m
#DM_IS_URL: https://raw.githubusercontent.com/jboss-container-images/rhdm-7-openshift-image/7.1.1.GA/rhdm71-image-streams.yaml
DM_IS_FILE_NAME: "rhdm71-image-streams.yaml"
DM_IS_URL: "/tmp/{{DM_IS_FILE_NAME}}"
#DM_IMAGE_REGISTRY: registry.redhat.io
DM_IMAGE_REGISTRY: registry.access.redhat.com
# DM_TEMPLATE_URL: https://raw.githubusercontent.com/gpe-mw-training/bxms_decision_mgmt_foundations_lab/master/resources/rhdm7-full-ng.yaml
DM_TEMPLATE_URL: https://raw.githubusercontent.com/hwurht/bxms_decision_mgmt_foundations_lab/master/resources/rhdm7-full-ng.yaml
ocp_apps_domain: apps.{{subdomain_base}}
ansible/roles/ocp-workload-bxms-dm/tasks/workload.yml
@@ -12,11 +12,32 @@
- name: Make sure we go back to default project
  shell: "oc project default"
# Note; depending on the environment, OCP projects may or may not have default limit ranges
- name: Delete default limitrange
  shell: |
    oc delete limitrange {{ocp_project}}-core-resource-limits -n {{ocp_project}}
  ignore_errors: true
- name: Create a new limitrange
  template:
    src: templates/limitrange.yaml.j2
    dest: /tmp/{{ocp_project}}_limitrange.yaml
- shell: |
    oc create -f /tmp/{{ocp_project}}_limitrange.yaml -n {{ocp_project}}
# Imagestreams are beginning to reference the new and secured registry.redhat.io .
# Will switch this back to registry.access.redhat.com  (until GPTE has an elab solution that allows for pull down from secured registries that is seemless to student
- name: Update DM image streams
  template:
    src: "{{DM_IS_FILE_NAME}}"
    dest: "{{DM_IS_URL}}"
- name: Load dm imagestream
  shell: "oc create -f {{DM_IS_URL}} -n {{ocp_project}}"
- name: Initialize the project template
  shell: "oc create -f https://raw.githubusercontent.com/gpe-mw-training/bxms_decision_mgmt_foundations_lab/master/resources/rhdm7-full-ng.yaml -n {{ocp_project}}"
  shell: "oc create -f {{DM_TEMPLATE_URL}} -n {{ocp_project}}"
- name: Prep local filesystem for temp files
  file:
ansible/roles/ocp-workload-bxms-dm/templates/limitrange.yaml.j2
New file
@@ -0,0 +1,23 @@
apiVersion: v1
kind: LimitRange
metadata:
  name: {{ocp_project}}-core-resource-limits
  namespace: {{ocp_project}}
spec:
  limits:
  - default:
      cpu: {{default_max_cpu}}
      memory: {{default_max_mem}}
    defaultRequest:
      cpu: {{default_min_cpu}}
      memory: {{default_min_mem}}
    max:
      memory: {{container_max_mem}}
    min:
      memory: 10Mi
    type: Container
  - max:
      memory: {{pod_max_mem}}
    min:
      memory: {{pod_min_mem}}
    type: Pod
ansible/roles/ocp-workload-bxms-dm/templates/rhdm71-image-streams.yaml
New file
@@ -0,0 +1,173 @@
kind: List
apiVersion: v1
metadata:
  name: rhdm71-image-streams
  annotations:
    description: ImageStream definitions for Red Hat Decision Manager 7.1
    openshift.io/provider-display-name: Red Hat, Inc.
items:
- kind: ImageStream
  apiVersion: v1
  metadata:
    name: rhdm71-decisioncentral-openshift
    annotations:
      openshift.io/display-name: Red Hat Decision Manager Decision Central 7.1
      openshift.io/provider-display-name: Red Hat, Inc.
  spec:
    tags:
    - name: '1.0'
      annotations:
        description: Red Hat Decision Manager 7.1 - Decision Central image.
        iconClass: icon-jboss
        tags: rhdm
        supports: rhdm:7.1
        version: '1.0'
      referencePolicy:
        type: Local
      from:
        kind: DockerImage
        name: {{DM_IMAGE_REGISTRY}}/rhdm-7/rhdm71-decisioncentral-openshift:1.0
    - name: '1.1'
      annotations:
        description: Red Hat Decision Manager 7.1.1 - Decision Central image.
        iconClass: icon-jboss
        tags: rhdm
        supports: rhdm:7.1
        version: '1.1'
      referencePolicy:
        type: Local
      from:
        kind: DockerImage
        name: {{DM_IMAGE_REGISTRY}}/rhdm-7/rhdm71-decisioncentral-openshift:1.1
- kind: ImageStream
  apiVersion: v1
  metadata:
    name: rhdm71-controller-openshift
    annotations:
      openshift.io/display-name: Red Hat Decision Manager Standalone Controller 7.1
      openshift.io/provider-display-name: Red Hat, Inc.
  spec:
    tags:
    - name: '1.0'
      annotations:
        description: Red Hat Decision Manager 7.1 - Standalone Controller image.
        iconClass: icon-jboss
        tags: rhdm
        supports: rhdm:7.1
        version: '1.0'
      referencePolicy:
        type: Local
      from:
        kind: DockerImage
        name: {{DM_IMAGE_REGISTRY}}/rhdm-7/rhdm71-controller-openshift:1.0
    - name: '1.1'
      annotations:
        description: Red Hat Decision Manager 7.1.1 - Standalone Controller image.
        iconClass: icon-jboss
        tags: rhdm
        supports: rhdm:7.1
        version: '1.1'
      referencePolicy:
        type: Local
      from:
        kind: DockerImage
        name: {{DM_IMAGE_REGISTRY}}/rhdm-7/rhdm71-controller-openshift:1.1
- kind: ImageStream
  apiVersion: v1
  metadata:
    name: rhdm71-kieserver-openshift
    annotations:
      openshift.io/display-name: Red Hat Decision Manager KIE Server 7.1
      openshift.io/provider-display-name: Red Hat, Inc.
  spec:
    tags:
    - name: '1.0'
      annotations:
        description: Red Hat Decision Manager 7.1 - KIE Server image.
        iconClass: icon-jboss
        tags: rhdm
        supports: rhdm:7.1
        version: '1.0'
      referencePolicy:
        type: Local
      from:
        kind: DockerImage
        name: {{DM_IMAGE_REGISTRY}}/rhdm-7/rhdm71-kieserver-openshift:1.0
    - name: '1.1'
      annotations:
        description: Red Hat Decision Manager 7.1.1 - KIE Server image.
        iconClass: icon-jboss
        tags: rhdm
        supports: rhdm:7.1
        version: '1.1'
      referencePolicy:
        type: Local
      from:
        kind: DockerImage
        name: {{DM_IMAGE_REGISTRY}}/rhdm-7/rhdm71-kieserver-openshift:1.1
- kind: ImageStream
  apiVersion: v1
  metadata:
    name: rhdm71-decisioncentral-indexing-openshift
    annotations:
      openshift.io/display-name: Red Hat Decision Manager Decision Central Indexing 7.1
      openshift.io/provider-display-name: Red Hat, Inc.
  spec:
    tags:
    - name: '1.0'
      annotations:
        description: Red Hat Decision Manager 7.1 - Decision Central Indexing image.
        iconClass: icon-jboss
        tags: rhdm
        supports: rhdm:7.1
        version: '1.0'
      referencePolicy:
        type: Local
      from:
        kind: DockerImage
        name: {{DM_IMAGE_REGISTRY}}/rhdm-7-tech-preview/rhdm71-decisioncentral-indexing-openshift:1.0
    - name: '1.1'
      annotations:
        description: Red Hat Decision Manager 7.1.1 - Decision Central Indexing image.
        iconClass: icon-jboss
        tags: rhdm
        supports: rhdm:7.1
        version: '1.1'
      referencePolicy:
        type: Local
      from:
        kind: DockerImage
        name: {{DM_IMAGE_REGISTRY}}/rhdm-7-tech-preview/rhdm71-decisioncentral-indexing-openshift:1.1
- kind: ImageStream
  apiVersion: v1
  metadata:
    name: rhdm71-optaweb-employee-rostering-openshift
    annotations:
      openshift.io/display-name: Red Hat Decision Manager KIE Server 7.1
      openshift.io/provider-display-name: Red Hat, Inc.
  spec:
    tags:
    - name: '1.0'
      annotations:
        description: Red Hat Decision Manager 7.1 - Business Optimizer OptaWeb Employee Rostering image.
        iconClass: icon-jboss
        tags: rhdm
        supports: rhdm:7.1
        version: '1.0'
      referencePolicy:
        type: Local
      from:
        kind: DockerImage
        name: {{DM_IMAGE_REGISTRY}}/rhdm-7-tech-preview/rhdm71-optaweb-employee-rostering-openshift:1.0
    - name: '1.1'
      annotations:
        description: Red Hat Decision Manager 7.1.1 - Business Optimizer OptaWeb Employee Rostering image.
        iconClass: icon-jboss
        tags: rhdm
        supports: rhdm:7.1
        version: '1.1'
      referencePolicy:
        type: Local
      from:
        kind: DockerImage
        name: {{DM_IMAGE_REGISTRY}}/rhdm-7-tech-preview/rhdm71-optaweb-employee-rostering-openshift:1.1