Tony Kay
2020-02-13 13519905cf2cebc3fe3b4be0eac0c60fe42011b3
Update three tier app ftl python3 (#1146)

* Fixes for python issues with FTL

* Fixes to three-tier-problem

* Added ftl related vars for three-tier-app using bastion role
5 files modified
49 ■■■■ changed files
ansible/configs/three-tier-app/env_vars.yml 17 ●●●● patch | view | raw | blame | history
ansible/configs/three-tier-app/files/hosts_template.j2 6 ●●●● patch | view | raw | blame | history
ansible/configs/three-tier-app/files/repos_template.j2 14 ●●●● patch | view | raw | blame | history
ansible/configs/three-tier-app/pre_software.yml 11 ●●●●● patch | view | raw | blame | history
ansible/configs/three-tier-app/requirements.yml 1 ●●●● patch | view | raw | blame | history
ansible/configs/three-tier-app/env_vars.yml
@@ -13,8 +13,12 @@
###### VARIABLES YOU SHOULD CONFIGURE FOR YOUR DEPLOYEMNT
###### OR PASS as "-e" args to ansible-playbook command
### Common Host settings
# FTL Settings
install_ftl: true
ftl_use_python3: true
repo_method: file # Other Options are: file, satellite and rhn
@@ -41,10 +45,11 @@
install_bastion: true
install_common: true
## SB Don't set software_to_deploy from here, always use extra vars (-e) or "none" will be used
#software_to_deploy:: none
repo_version: "3.6"
# repo_version: "3.6"
### If you want a Key Pair name created and injected into the hosts,
# set `set_env_authorized_key` to true and set the keyname in `env_authorized_key`
@@ -75,7 +80,7 @@
# This only needs to be defined if your CF template uses route53
HostedZoneId: Z3IHLWJZOU9SRT
# The region to be used, if not specified by -e in the command line
aws_region: ap-southeast-2
aws_region: us-east-1
# The key that is used to
key_name: "default_key_name"
@@ -89,8 +94,8 @@
bastion_instance_type: "t2.medium"
frontend_instance_type: "t2.small"
app_instance_type: "{{frontend_instance_type}}"
appdb_instance_type: "{{frontend_instance_type}}"
app_instance_type: "{{ frontend_instance_type }}"
appdb_instance_type: "{{ frontend_instance_type }}"
support_instance_type: "t2.small"
frontend_instance_count: 1
@@ -224,7 +229,9 @@
rhel_repos:
  - rhel-7-server-rpms
  - rhel-7-server-extras-rpms
  - rhel-server-rhscl-7-rpms
  - epel-release-latest-7
## Currently there is no NFS created for this Environment - See ocp-workshop for clues.
# ## NFS Server settings
# nfs_vg: nfsvg
ansible/configs/three-tier-app/files/hosts_template.j2
@@ -1,6 +1,6 @@
[frontends]
{% for host in groups['frontends'] %}
frontend{{ loop.index }} ansible_host=app{{ loop.index }}.{{ chomped_zone_internal_dns }}
frontend{{ loop.index }} ansible_host=frontend{{ loop.index }}.{{ chomped_zone_internal_dns }}
{% endfor %}
[apps]
@@ -10,12 +10,12 @@
[appdbs]
{% for host in groups['appdbs'] %}
appdb{{ loop.index }} ansible_host=app{{ loop.index }}.{{ chomped_zone_internal_dns }}
appdb{{ loop.index }} ansible_host=appdb{{ loop.index }}.{{ chomped_zone_internal_dns }}
{% endfor %}
[support]
{% for host in groups['support'] %}
support{{ loop.index }} ansible_host=app{{ loop.index }}.{{ chomped_zone_internal_dns }}
support{{ loop.index }} ansible_host=support{{ loop.index }}.{{ chomped_zone_internal_dns }}
{% endfor %}
[threetierapp:children]
ansible/configs/three-tier-app/files/repos_template.j2
@@ -1,24 +1,30 @@
[rhel-7-server-rpms]
name=Red Hat Enterprise Linux 7
baseurl={{own_repo_path}}/rhel-7-server-rpms
baseurl={{own_repo_path}}/{{repo_version}}/rhel-7-server-rpms
enabled=1
gpgcheck=0
[rhel-7-server-rh-common-rpms]
name=Red Hat Enterprise Linux 7 Common
baseurl={{own_repo_path}}/rhel-7-server-rh-common-rpms
baseurl={{own_repo_path}}/{{repo_version}}/rhel-7-server-rh-common-rpms
enabled=1
gpgcheck=0
[rhel-7-server-extras-rpms]
name=Red Hat Enterprise Linux 7 Extras
baseurl={{own_repo_path}}/rhel-7-server-extras-rpms
baseurl={{own_repo_path}}/{{repo_version}}/rhel-7-server-extras-rpms
enabled=1
gpgcheck=0
[rhel-7-server-optional-rpms]
name=Red Hat Enterprise Linux 7 Optional
baseurl={{own_repo_path}}/rhel-7-server-optional-rpms
baseurl={{own_repo_path}}/{{repo_version}}/rhel-7-server-optional-rpms
enabled=1
gpgcheck=0
[rhel-7-server-rhscl-rpms]
name=Red Hat Enterprise Linux 7 Optional
baseurl={{own_repo_path}}/{{repo_version}}/rhel-server-rhscl-7-rpms
enabled=1
gpgcheck=0
ansible/configs/three-tier-app/pre_software.yml
@@ -24,17 +24,6 @@
    - step004
    - bastion_tasks
#- name: Inject and configure FTL on bastion as grader host
#  hosts: bastions
#  become: true
#  tasks:
#    - name: Setup FTL
#      include_role:
#        name: ftl-injector
#  tags:
#    - step004
#    - ftl-injector
- name: PreSoftware flight-check
  hosts: localhost
  connection: local
ansible/configs/three-tier-app/requirements.yml
@@ -3,4 +3,3 @@
- src: https://github.com/redhat-gpte-devopsautomation/ftl-injector
  name: ftl-injector
  version: v0.16.0