diff --git a/ansible/configs/sap-hana-rhel9/.cleanup/default_vars_osp.yml b/ansible/configs/sap-hana-rhel9/.cleanup/default_vars_osp.yml deleted file mode 100644 index 7667475146f..00000000000 --- a/ansible/configs/sap-hana-rhel9/.cleanup/default_vars_osp.yml +++ /dev/null @@ -1,234 +0,0 @@ -## Environment Sizing and OS - -bastion_instance_image: rhel-8.4 -bastion_instance_type: "sap-2-16" -bastion_instance_count: 1 -rootfs_size_bastion: "{{ rootfs_size_bastion }}" - -hana_instance_image: rhel-8.4 -hana_instance_type: "sap-4-64" -hana_instance_count: 2 -rootfs_size_hana: "{{ rootfs_size_hana }}" -pv_size_hana: 500 - -s4hana_instance_image: rhel-8.4 -s4hana_instance_type: "sap-4-32" -s4hana_instance_count: 1 -rootfs_size_s4hana: "{{ rootfs_size_s4hana }}" -pv_size_s4hana: 200 - -## Variables required when deploying Ansible Tower alongside the HANA and bastion instances -tower_instance_image: rhel-8.6 -tower_instance_type: "sap-4-32" -tower_instance_count: "{{ tower_instance_count }}" -rootfs_size_tower: "{{ rootfs_size_tower }}" - -sap_extra_device: vdb -sap_software_device: vdb - -ansible_user: cloud-user -remote_user: cloud-user - -# SAP Software image and variables -sap_software_image: sap-software-v1.2 -sap_software_size: "{{ sap_software_size }}" - -# OSP Security Groups -security_groups: - - name: HanaSG - rules: - - name: HanaSSHPrivate - description: "SSH private" - from_port: 22 - to_port: 22 - protocol: tcp - cidr: "0.0.0.0/0" - rule_type: Ingress - group: BastionSG - - name: HanaUDPPortsPrivate - description: "Only from bastion" - from_port: 1 - to_port: 65535 - protocol: udp - group: BastionSG - rule_type: Ingress - - name: HanaTCPPPortsPrivate - description: "Only from bastion" - from_port: 1 - to_port: 65535 - protocol: tcp - group: BastionSG - rule_type: Ingress - - name: BastionSG - rules: - - name: BastionUDPPortsPrivate - description: "Only from bastion" - from_port: 1 - to_port: 65535 - protocol: udp - group: HanaSG - rule_type: Ingress - - name: BastionTCPPPortsPrivate - description: "Only from bastion" - from_port: 1 - to_port: 65535 - protocol: tcp - group: HanaSG - rule_type: Ingress - - name: TowerSG - rules: - - name: TowerHTTP - description: "Tower HTTP" - from_port: 80 - to_port: 80 - protocol: tcp - rule_type: Ingress - - name: TowerHTTPS - description: "Tower HTTPS" - from_port: 443 - to_port: 443 - protocol: tcp - rule_type: Ingress - - name: TowerSSHPrivate - description: "SSH private" - from_port: 22 - to_port: 22 - protocol: tcp - cidr: "0.0.0.0/0" - rule_type: Ingress - group: BastionSG - - name: TowerUDPPortsPrivate - description: "Only from bastion" - from_port: 1 - to_port: 65535 - protocol: udp - group: BastionSG - rule_type: Ingress - - name: TowerTCPPPortsPrivate - description: "Only from bastion" - from_port: 1 - to_port: 65535 - protocol: tcp - group: BastionSG - rule_type: Ingress - -instances: - - name: "bastion-{{ guid }}" - count: "{{ bastion_instance_count }}" - unique: true - public_dns: true - dns_loadbalancer: true - floating_ip: true - image_id: "{{ bastion_instance_image }}" - sofware_image_id: "{{ sap_software_image }}" - flavor: - osp: "{{ bastion_instance_type }}" - tags: - - key: "AnsibleGroup" - value: "bastions" - - key: "ostype" - value: "linux" - - key: "instance_filter" - value: "{{ env_type }}-{{ email }}" - - key: ansible_python_interpreter - value: /usr/libexec/platform-python - rootfs_size: "50" - softwarefs_size: "{{ sap_software_size }}" - security_groups: - - BastionSG - - - name: "hana-{{ guid }}" - count: "{{ hana_instance_count }}" - public_dns: false - dns_loadbalancer: false - floating_ip: false - image_id: "{{ hana_instance_image }}" - flavor: - osp: "{{ hana_instance_type }}" - tags: - - key: "AnsibleGroup" - value: "hanas" - - key: "ostype" - value: "rhel" - - key: "instance_filter" - value: "{{ env_type }}-{{ email }}" - - key: ansible_python_interpreter - value: /usr/libexec/platform-python - rootfs_size: "100" - volumes: - - volume_name: "hana_pv" - volume_size: "{{ pv_size_hana }}" - security_groups: - - HanaSG - - - name: "s4hana-{{ guid }}" - count: "{{ s4hana_instance_count }}" - public_dns: true - dns_loadbalancer: false - floating_ip: true - image_id: "{{ s4hana_instance_image }}" - flavor: - osp: "{{ s4hana_instance_type }}" - tags: - - key: "AnsibleGroup" - value: "s4hanas" - - key: "ostype" - value: "rhel" - - key: "instance_filter" - value: "{{ env_type }}-{{ email }}" - - key: ansible_python_interpreter - value: /usr/libexec/platform-python - rootfs_size: "100" - volumes: - - volume_name: "s4hana_pv" - volume_size: "{{ pv_size_s4hana }}" - security_groups: - - HanaSG - - - name: "tower-{{ guid }}" - count: "{{ tower_instance_count }}" - public_dns: true - dns_loadbalancer: true - floating_ip: true - image_id: "{{ tower_instance_image }}" - flavor: - osp: "{{ tower_instance_type }}" - tags: - - key: "AnsibleGroup" - value: "towers" - - key: "ostype" - value: "rhel" - - key: "instance_filter" - value: "{{ env_type }}-{{ email }}" - - key: ansible_python_interpreter - value: /usr/libexec/platform-python - rootfs_size: "200" - security_groups: - - TowerSG - - -zone_internal_dns: "{{guid}}.internal." -chomped_zone_internal_dns: "{{guid}}.internal" - -bastion_public_dns: "bastion-{{ guid }}.{{ guid }}.{{ osp_cluster_dns_zone }}." -bastion_public_dns_chomped: "bastion-{{ guid }}.{{ guid }}.{{ osp_cluster_dns_zone }}" -tower_public_dns_chomped: "tower-{{ guid }}.{{ guid }}.{{ osp_cluster_dns_zone }}" -vpcid_cidr_block: "192.168.0.0/16" -vpcid_name_tag: "{{ subdomain_base }}" - - -rtb_public_name_tag: "{{ subdomain_base }}-public" -rtb_private_name_tag: "{{ subdomain_base }}-private" - -ansible_hana1_hostname: "{{ hostvars[groups.hanas[0]].ansible_hostname }}" -ansible_hana1_fqdn_hostname: "{{ hostvars[groups.hanas[0]].ansible_fqdn }}" -ansible_hana1_ip: "{{ hostvars[groups.hanas[0]].ansible_default_ipv4.address }}" -ansible_hana2_hostname: "{{ hostvars[groups.hanas[1]].ansible_hostname }}" -ansible_hana2_fqdn_hostname: "{{ hostvars[groups.hanas[1]].ansible_fqdn }}" -ansible_hana2_ip: "{{ hostvars[groups.hanas[1]].ansible_default_ipv4.address }}" -ansible_hana_hostname: "hana-{{ guid }}" -ansible_s4hana_hostname: "s4hana-{{ guid }}" -bastion_hostname: "bastion-{{ guid }}" -deployment_db_host: "hana-{{ guid }}1" - -__run_aap_deployment: true diff --git a/ansible/configs/sap-hana-rhel9/.cleanup/files/cloud_providers/osp_cloud_template_master.j2 b/ansible/configs/sap-hana-rhel9/.cleanup/files/cloud_providers/osp_cloud_template_master.j2 deleted file mode 100644 index f7e50259979..00000000000 --- a/ansible/configs/sap-hana-rhel9/.cleanup/files/cloud_providers/osp_cloud_template_master.j2 +++ /dev/null @@ -1,225 +0,0 @@ -#jinja2: lstrip_blocks: "True" ---- -heat_template_version: 2018-03-02 - -description: >- - Top level HOT for creating new project, network resources and instances. - This template relies on ResourceGroups and a nested template that is - called to provision instances, ports, & floating IPs. - -resources: - - {{ guid }}-infra_key: - type: OS::Nova::KeyPair - properties: - name: {{ guid }}-infra_key - save_private_key: true - -{% for network in networks %} - {{ network['name'] }}-network: - type: OS::Neutron::Net - properties: - name: "{{ guid }}-{{ network['name'] }}-network" - shared: {{ network['shared'] }} - - {{ network['name'] }}-subnet: - type: OS::Neutron::Subnet - properties: - name: "{{ guid }}-{{ network['name'] }}-subnet" - network_id: {get_resource: {{ network['name'] }}-network} -{% if network['dns_nameservers'] is defined %} - dns_nameservers: [{{ network['dns_nameservers'] | list | join(",") }}] -{% endif %} - cidr: {{ network['subnet_cidr'] }} - gateway_ip: {{ network['gateway_ip'] }} - allocation_pools: - - start: {{ network['allocation_start'] }} - end: {{ network['allocation_end'] }} - depends_on: - - {{ network['name'] }}-network - -{% if network['create_router'] %} - {{ network['name'] }}-router: - type: OS::Neutron::Router - properties: - name: "{{ guid }}-{{ network['name'] }}-router" - external_gateway_info: - network: "{{ provider_network }}" - - {{ network['name'] }}-router_private_interface: - type: OS::Neutron::RouterInterface - properties: - router: {get_resource: {{ network['name'] }}-router} - subnet: {get_resource: {{ network['name'] }}-subnet} -{% endif %} -{% endfor %} - - ################### - # Security groups # - ################### -{% for security_group in security_groups | list + default_security_groups | list - if security_group.name in used_security_groups %} - {{ security_group['name'] }}: - type: OS::Neutron::SecurityGroup - properties: - name: {{ guid }}-{{ security_group['name'] }} -{% if security_group['description'] is defined %} - description: "{{ security_group['description'] }}" -{% endif %} - -{% for rule in security_group.rules %} -{% if rule['name'] is defined %} - {{ guid }}-{{ security_group['name'] }}-rule_{{ rule['name'] }}: -{% else %} - {{ guid }}-{{ security_group['name'] }}-rule_{{ lookup('password', '/dev/null length=5 chars=ascii_letters,digits') }}: -{% endif %} - type: OS::Neutron::SecurityGroupRule - properties: - security_group: {get_resource: {{ security_group['name'] }}} - direction: {{ rule['direction'] | default(rule.rule_type) | lower }} - protocol: {{ rule['protocol'] | lower }} -{% if rule['description'] is defined %} - description: {{ rule['description'] }} -{% endif %} -{% if rule['port_range_min'] is defined or - rule.from_port is defined %} - port_range_min: {{ rule['port_range_min'] | default(rule.from_port) }} -{% endif %} -{% if rule['port_range_max'] is defined or - rule.to_port is defined %} - port_range_max: {{ rule['port_range_max'] | default(rule.to_port) }} -{% endif %} -{% if rule['remote_ip_prefix'] is defined or - rule.cidr is defined %} - remote_ip_prefix: {{ rule['remote_ip_prefix'] | default(rule.cidr) }} -{% endif %} -{% if rule['remote_group'] is defined or - rule.from_group is defined %} - remote_group: {get_resource: {{ rule['remote_group'] | default(rule.from_group) }}} -{% endif %} - depends_on: {{ security_group['name'] }} -{% endfor %} -{% endfor %} - - ############# - # Instances # - ############# -{% for instance in instances %} - {% for myinstanceindex in range(instance.count|int) %} - {% set iname = instance.name if instance.count == 1 else [instance.name, loop.index] | join() %} - ########### {{ iname }} ########### - port_{{ iname }}: - type: OS::Neutron::Port - properties: - network: { get_resource: {{ instance['network'] | default('default') }}-network } - security_groups: - {% if instance.security_groups is defined %} - {% for security_group in instance.security_groups %} - - {get_resource: {{ security_group }}} - {% endfor %} - {% endif %} - depends_on: - - {{ instance['network'] | default('default') }}-router_private_interface - {% if instance.security_groups is defined %} - {% for security_group in instance.security_groups %} - - {{ security_group }} - {% endfor %} - {% endif %} - - - {% if instance.floating_ip | default(false) or instance.public_dns | default(false) %} - fip_{{ iname }}: - type: OS::Neutron::FloatingIP - properties: - floating_network: {{ provider_network }} -{% if osp_public_subnet is defined %} - floating_subnet: "{{ osp_public_subnet }}" -{% endif %} - depends_on: - - {{ instance['network'] | default('default') }}-router_private_interface - - fip_association_{{ iname }}: - type: OS::Neutron::FloatingIPAssociation - properties: - floatingip_id: {get_resource: fip_{{ iname }}} - port_id: {get_resource: port_{{ iname }}} - {% endif %} - - server_{{ iname }}: - type: OS::Nova::Server - properties: - name: {{ iname }} - flavor: {{ instance.flavor.osp }} - key_name: {get_resource: {{ guid }}-infra_key} - config_drive: True - block_device_mapping_v2: - - image: {{ instance.image_id | default(instance.image) }} - delete_on_termination: true - volume_size: {{ instance['rootfs_size'] | default(osp_default_rootfs_size) }} - boot_index: 0 - {% if iname == "bastion-" + guid %} - - image: {{ instance.sofware_image_id | default("software-sap") }} - delete_on_termination: true - volume_size: {{ instance['softwarefs_size'] }} - boot_index: -1 - {% endif %} - - user_data: | - #cloud-config - ssh_authorized_keys: {{ all_ssh_authorized_keys | to_json }} - user_data_format: RAW - networks: - - port: {get_resource: port_{{ iname }}} - {% if instance['metadata'] is defined %} - metadata: {{ instance.metadata | combine(default_metadata) | to_json }} - {% endif %} - - {% if instance.tags is defined %} - # Convert EC2 tags - metadata: - {% for key, value in default_metadata.items() %} - '{{ key }}': {{ value | to_json }} - {% endfor %} - {% for tag in instance.tags %} - '{{ tag.key }}': {{ tag.value | to_json }} - {% endfor %} - {% endif %} - - depends_on: - - {{ instance['network'] | default('default') }}-router_private_interface - {% if 'security_groups' in instance %} - {% for security_group in instance.security_groups %} - - {{ security_group }} - {% endfor %} - {% endif %} - - port_{{ iname }} - - {% if instance.volumes is defined %} - #### Volumes for {{ iname }} #### - {% for volume in instance.volumes %} - {% set loopvolume = loop %} - {% set vname = ["volume", iname, loopvolume.index] | join('_') %} - {{ vname }}: - type: OS::Cinder::Volume - properties: - size: {{ volume.volume_size | default(volume.size) }} - {% if volume.volume_name is defined %} - name: {{ volume.volume_name | default(volume.name) }} - {% endif %} - - volume_attachment_{{ vname }}: - type: OS::Cinder::VolumeAttachment - properties: - volume_id: {get_resource: {{ vname }}} - instance_uuid: {get_resource: server_{{ iname }}} - {% endfor %} - {% endif %} - {% endfor %} -{% endfor %} - - -outputs: - - {{ guid }}-infra_key: - description: The SSH infra key - value: {get_attr: [{{ guid }}-infra_key, private_key]} diff --git a/ansible/configs/sap-hana-rhel9/.cleanup/files/hosts_template.j2 b/ansible/configs/sap-hana-rhel9/.cleanup/files/hosts_template.j2 deleted file mode 100644 index ddb24ce15ea..00000000000 --- a/ansible/configs/sap-hana-rhel9/.cleanup/files/hosts_template.j2 +++ /dev/null @@ -1,35 +0,0 @@ -[hanas] -{% if hana_instance_count == 2 %} -{{ ansible_hana1_hostname }} -{{ ansible_hana2_hostname }} -{% else %} -{{ ansible_hana_hostname }} -{% endif %} - -{% if s4hana_instance_count == 1 %} -[s4hanas] -{{ ansible_s4hana_hostname }} -{% endif %} - -[hana:children] -hanas - -{% if s4hana_instance_count == 1 %} -[s4hana:children] -s4hanas -{% endif %} - -[sap:children] -hanas -{% if s4hana_instance_count == 1 %} -s4hanas -{% endif %} - -[sap:vars] -timeout=60 -ansible_become=yes -ansible_user={{remote_user}} -ansible_ssh_common_args="-o StrictHostKeyChecking=no" -sap_preconfigure_modify_etc_hosts=true -sap_domain=automation.local - diff --git a/ansible/configs/sap-hana-rhel9/.cleanup/files/inventory.j2 b/ansible/configs/sap-hana-rhel9/.cleanup/files/inventory.j2 deleted file mode 100644 index 4fd51bf2998..00000000000 --- a/ansible/configs/sap-hana-rhel9/.cleanup/files/inventory.j2 +++ /dev/null @@ -1,25 +0,0 @@ - -[tower] -localhost ansible_connection=local - -[database] - -[all:vars] -admin_password='{{ ansible_tower.admin_password }}' - -pg_host="{{ ansible_tower.install.pg.host | default('') }}" -pg_port="{{ ansible_tower.install.pg.port | default('') }}" -pg_database="{{ ansible_tower.install.pg.database | default('awx') }}" -pg_username="{{ ansible_tower.install.pg.username | default('awx') }}" -pg_password="{{ ansible_tower.install.pg.password | default(ansible_tower.admin_password) }}" - -{% if not ansible_tower_37_later %} - -rabbitmq_port="{{ ansible_tower.install.rabbitmq.port | default(5672) }}" -rabbitmq_vhost="{{ ansible_tower.install.rabbitmq.vhost | default('tower') }}" -rabbitmq_username="{{ ansible_tower.install.rabbitmq.username | default('tower') }}" -rabbitmq_password='{{ ansible_tower.install.rabbitmq.password | default(ansible_tower.admin_password) }}' -rabbitmq_cookie="{{ ansible_tower.install.rabbitmq.cookie | default('cookiemonster') }}" -rabbitmq_use_long_name="{{ ansible_tower.install.rabbitmq.use_long_name | default(false) }}" - -{% endif %} diff --git a/ansible/configs/sap-hana-rhel9/.cleanup/print_info.yml b/ansible/configs/sap-hana-rhel9/.cleanup/print_info.yml deleted file mode 100644 index b88689a3b63..00000000000 --- a/ansible/configs/sap-hana-rhel9/.cleanup/print_info.yml +++ /dev/null @@ -1,45 +0,0 @@ -- name: Set agnosticd user info data for bastion - agnosticd_user_info: - data: - bastion_ssh_command: "ssh cloud-user@bastion-{{ guid }}.{{ guid }}.{{ osp_cluster_dns_zone }}" - bastion_ssh_key: "{{ lookup('file', '{{ output_dir }}/{{ guid }}_infra_ssh_key.pem') }}" - -- name: Set agnosticd user info data for tower - when: tower_instance_count > 0 - agnosticd_user_info: - data: - tower_url: "https://tower-{{ guid }}.{{ guid }}.{{ osp_cluster_dns_zone }}" - tower_username: "admin" - tower_password: "{{ tower_password }}" - -- name: Set agnosticd user info messages - agnosticd_user_info: - msg: "{{ item }}" - loop: >- - {{ - [ - "You can access your bastion via SSH:", - "", - "ssh cloud-user@bastion-{{ guid }}.{{ guid }}.{{ osp_cluster_dns_zone }}", - "", - "", - "Make sure you use the following RSA key while connecting to the Bastion Host:", - "" - ] - + lookup('file', '{{ output_dir }}/{{ guid }}_infra_ssh_key.pem').splitlines() - + ( - [ - "", - "", - "You can access your Ansible Tower instance via HTTPS:", - "", - "https://{{ tower_public_dns_chomped }}", - "", - "", - "Make sure you are using the following credentials:", - "", - "Username: admin", - "Password: {{ tower_password }}" - ] if tower_instance_count > 0 else [] - ) - }} diff --git a/ansible/configs/sap-hana-rhel9/.cleanup/sample_vars_osp.yml b/ansible/configs/sap-hana-rhel9/.cleanup/sample_vars_osp.yml deleted file mode 100644 index 8b7d8ced343..00000000000 --- a/ansible/configs/sap-hana-rhel9/.cleanup/sample_vars_osp.yml +++ /dev/null @@ -1,16 +0,0 @@ -cloud_provider: osp -env_type: sap-hana -email: mak@redhat.com -software_to_deploy: none - - -subdomain_base_short: "{{ guid }}" -subdomain_base_suffix: ".630d.sandbox256.opentlc.com" -subdomain_base: "{{subdomain_base_short}}{{subdomain_base_suffix}}" - -repo_method: satellite -satellite_org: Red_Hat_GPTE_Labs -use_content_view: true - -rh_internal: true -tower_instance_count: 1 \ No newline at end of file diff --git a/ansible/configs/sap-hana-rhel9/ec2-lateruse/default_vars_ec2.yml b/ansible/configs/sap-hana-rhel9/ec2-lateruse/default_vars_ec2.yml deleted file mode 100644 index 13dab0b628c..00000000000 --- a/ansible/configs/sap-hana-rhel9/ec2-lateruse/default_vars_ec2.yml +++ /dev/null @@ -1,166 +0,0 @@ -bastion_instance_type: "t2.medium" -tower_instance_type: "t2.xlarge" -s4hana_instance_type: "r4.xlarge" -hana_instance_type: "r4.2xlarge" - -bastion_instance_image: rhel-8.4 -tower_instance_image: rhel-8.4 -s4hana_instance_image: rhel-8.1 -hana_instance_image: rhel-8.1 - -hana_instance_count: 2 -s4hana_instance_count: 1 -tower_instance_count: 1 - -ansible_user: ec2-user -remote_user: ec2-user - -bastion_public_dns: "bastion.{{subdomain_base}}." -bastion_public_dns_chomped: "bastion.{{subdomain_base}}" -tower_public_dns: "tower.{{subdomain_base}}." -tower_public_dns_chomped: "tower.{{subdomain_base}}" - -aws_public_subnet_cidr: "192.168.0.0/24" - -cloudformation_retries: 2 - -rootfs_size_bastion: 50 -rootfs_size_tower: 100 -rootfs_size_s4hana: 100 -rootfs_size_hana: 100 - -sap_extra_device: xvdf -sap_software_device: xvdg -sap_software_snapshot_name: "sap-software-v1.0" - -security_groups: - - name: WebSG - rules: - - name: HTTPPorts - description: "HTTP Public" - from_port: 80 - to_port: 80 - protocol: tcp - cidr: "0.0.0.0/0" - rule_type: Ingress - - - name: HTTPSPorts - description: "HTTP Public" - from_port: 443 - to_port: 443 - protocol: tcp - cidr: "0.0.0.0/0" - rule_type: Ingress - - - name: HostSG - rules: - - name: FromHostSG - description: "Allow everything from HostSG nodes" - from_port: 0 - to_port: 65535 - protocol: -1 - from_group: HostSG - rule_type: Ingress - -instances: -- name: "bastion" - count: 1 - unique: true - public_dns: true - dns_loadbalancer: true - floating_ip: true - image: "{{ bastion_instance_image }}" - flavor: - ec2: "{{ bastion_instance_type }}" - tags: - - key: "AnsibleGroup" - value: "bastions" - - key: "ostype" - value: "linux" - - key: ansible_python_interpreter - value: /usr/libexec/platform-python - rootfs_size: "{{ rootfs_size_bastion }}" - volumes: - - name: /dev/sdg - size: 60 - snapshot_id: "{{ sap_software_snapshot_id }}" - security_groups: - - HostSG - - BastionSG - -- name: "tower" - count: "{{ tower_instance_count }}" - unique: true - public_dns: true - dns_loadbalancer: true - floating_ip: true - image: "{{ tower_instance_image }}" - flavor: - ec2: "{{ tower_instance_type }}" - tags: - - key: "AnsibleGroup" - value: "towers" - - key: "ostype" - value: "linux" - - key: ansible_python_interpreter - value: /usr/libexec/platform-python - rootfs_size: "{{ rootfs_size_tower }}" - security_groups: - - HostSG - - BastionSG - - WebSG - -- name: "s4hana" - count: "{{ s4hana_instance_count }}" - unique: true - public_dns: true - dns_loadbalancer: true - floating_ip: false - image: "{{ s4hana_instance_image }}" - flavor: - ec2: "{{ s4hana_instance_type }}" - tags: - - key: "AnsibleGroup" - value: "s4hanas" - - key: "ostype" - value: "linux" - - key: ansible_python_interpreter - value: /usr/libexec/platform-python - rootfs_size: "{{ rootfs_size_s4hana }}" - volumes: - - name: /dev/sdf - size: 100 - security_groups: - - HostSG - -- name: "hana" - count: "{{ hana_instance_count }}" - unique: false - public_dns: true - dns_loadbalancer: true - floating_ip: false - image: "{{ hana_instance_image }}" - flavor: - ec2: "{{ hana_instance_type }}" - tags: - - key: "AnsibleGroup" - value: "hanas" - - key: "ostype" - value: "linux" - - key: ansible_python_interpreter - value: /usr/libexec/platform-python - rootfs_size: "{{ rootfs_size_hana }}" - volumes: - - name: /dev/sdf - size: 500 - security_groups: - - HostSG - -ansible_hana1_hostname: "hana1" -ansible_hana1_fqdn_hostname: "hana1.{{ guid }}.internal" -ansible_hana2_hostname: "hana2" -ansible_hana2_fqdn_hostname: "hana2.{{ guid }}.internal" -ansible_hana_hostname: "hana1" -ansible_s4hana_hostname: "s4hana" -bastion_hostname: "bastion.{{ guid }}.internal" -deployment_db_host: "hana1.{{ guid }}.internal" diff --git a/ansible/configs/sap-hana-rhel9/ec2-lateruse/find_snapshot.yml b/ansible/configs/sap-hana-rhel9/ec2-lateruse/find_snapshot.yml deleted file mode 100644 index 44e19c17ed4..00000000000 --- a/ansible/configs/sap-hana-rhel9/ec2-lateruse/find_snapshot.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -- name: Find out SnapShot ID for SAP Software - amazon.aws.ec2_snapshot_info: - region: "{{ aws_region_final | default(aws_region) }}" - aws_access_key: "{{ aws_access_key_id }}" - aws_secret_key: "{{ aws_secret_access_key }}" - filters: - description: "{{ sap_software_snapshot_name }}" - owner-id: "{{ sap_software_snapshot_owner_id }}" - register: sap_snapshot - -- name: Stop the deployment if the snapshot is not available - ansible.builtin.fail: - msg: "There are not Snapshots available with SAP Software to be used" - when: sap_snapshot.snapshots[0].snapshot_id is not defined - -- name: Set local fact for sap_software_snapshot_id - ansible.builtin.set_fact: - sap_software_snapshot_id: "{{ sap_snapshot.snapshots[0].snapshot_id }}" diff --git a/ansible/configs/sap-hana-rhel9/ec2-lateruse/sample_vars_ec2.yml b/ansible/configs/sap-hana-rhel9/ec2-lateruse/sample_vars_ec2.yml deleted file mode 100644 index f6576d57663..00000000000 --- a/ansible/configs/sap-hana-rhel9/ec2-lateruse/sample_vars_ec2.yml +++ /dev/null @@ -1,20 +0,0 @@ -cloud_provider: ec2 -env_type: sap-hana -aws_region: us-east-1 -HostedZoneId: Z09717862MUAYG7P3BER6 -email: mak@redhat.com -software_to_deploy: none - -sap_software_snapshot_id: snap-12345abc123456 -sap_software_snapshot_owner_id: "337334234598" - -subdomain_base_short: "{{ guid }}" -subdomain_base_suffix: ".630d.sandbox256.opentlc.com" -subdomain_base: "{{subdomain_base_short}}{{subdomain_base_suffix}}" - -repo_method: satellite -satellite_org: Red_Hat_GPTE_Labs -use_content_view: true - -rh_internal: true -tower_instance_count: 1 diff --git a/ansible/configs/sap-hana-rhel9/ec2_lateruse.tgz b/ansible/configs/sap-hana-rhel9/ec2_lateruse.tgz new file mode 100644 index 00000000000..7a5a8454b3b Binary files /dev/null and b/ansible/configs/sap-hana-rhel9/ec2_lateruse.tgz differ diff --git a/ansible/configs/sap-hana-rhel9/oldstuff.tgz b/ansible/configs/sap-hana-rhel9/oldstuff.tgz new file mode 100644 index 00000000000..c8cb734572d Binary files /dev/null and b/ansible/configs/sap-hana-rhel9/oldstuff.tgz differ diff --git a/ansible/configs/sap-hana-rhel9/requirements.yml b/ansible/configs/sap-hana-rhel9/requirements.yml index 1002a748fd0..7e6dec312fa 100644 --- a/ansible/configs/sap-hana-rhel9/requirements.yml +++ b/ansible/configs/sap-hana-rhel9/requirements.yml @@ -3,7 +3,6 @@ roles: - src: https://github.com/redhat-cop/infra-ansible.git name: infra-ansible version: v2.0.8 - - name: redhat_sap.sap_rhsm version: v1.1.2 @@ -18,3 +17,5 @@ collections: version: 2.11.0 - name: kubevirt.core version: 1.1.0 +- name: infra.aap_utilities + version: 2.5.1 diff --git a/ansible/configs/sap-hana-rhel9/software.yml b/ansible/configs/sap-hana-rhel9/software.yml index 33a0622108e..460eaa2a397 100644 --- a/ansible/configs/sap-hana-rhel9/software.yml +++ b/ansible/configs/sap-hana-rhel9/software.yml @@ -199,6 +199,8 @@ - certbot - certonly - --standalone + - --key-type + - rsa - -d - tower-{{ guid }}.{{ guid }}.{{ sandbox_openshift_apps_domain }} - -m @@ -224,7 +226,6 @@ - fullchain.pem - privkey.pem - # Should move into secret file - name: Create offline token ansible.builtin.set_fact: offline_token: "{{ rhsm_api_offline_token }}" @@ -261,11 +262,27 @@ when: cloud_provider == "openshift_cnv" # NOTE: Download role is only for "localhost" - - name: Download AAP2 + # - name: Download AAP2 + # ansible.builtin.include_role: + # name: "aap_download" + # tags: + # - step004 + + - name: Download AAP ansible.builtin.include_role: - name: "aap_download" - tags: - - step004 + name: infra.aap_utilities.aap_setup_download + vars: + aap_setup_down_offline_token: "{{ rhsm_api_offline_token }}" # noqa: var-naming[no-role-prefix] + aap_setup_down_version: 2.5 + # aap_setup_down_dest_dir: "{{ playbook_dir }}" + aap_setup_down_type: "setup-bundle" + aap_setup_rhel_version: 9 + aap_setup_containerized: true + aap_setup_arch: x86_64 + + - name: Debug filename + ansible.builtin.debug: + var: aap_setup_down_installer_file - name: Ensure aap_unpacked directory exist ansible.builtin.file: @@ -275,15 +292,15 @@ owner: cloud-user group: cloud-user - - name: Unpack previously downloaded aap2.tar.gz in playbook_dir + - name: Unpack previously downloaded AAP installer ansible.builtin.unarchive: - src: "{{ playbook_dir }}/aap.tar.gz" + src: "{{ aap_setup_down_installer_file }}" dest: "/home/cloud-user/aap_unpacked/" owner: cloud-user group: cloud-user extra_opts: - --strip-components=1 - # remote_src: true + remote_src: true - name: Create Random Controller Admin password ansible.builtin.set_fact: @@ -323,7 +340,7 @@ # until: r_aap_deploy is succeeded - name: Wait for AAP installation playbook to finish - # when: purpose != "development" + # when: purpose != "development" (uncomment if you want to debug the ansible installer) ansible.builtin.async_status: jid: "{{ r_aap_deploy.ansible_job_id }}" become: true