diff --git a/playbooks/inventory/group_vars/all b/playbooks/inventory/group_vars/all index 7ddd89e07..42d2b7011 100644 --- a/playbooks/inventory/group_vars/all +++ b/playbooks/inventory/group_vars/all @@ -14,13 +14,14 @@ mysql_password: # connectivity during atest sequence testing_user: ubuntu http_boot_folder: /httpboot +nginx_port: 8080 ssh_public_key_path: "{{ ansible_env.HOME }}/.ssh/id_rsa.pub" latest_os_ironic_url: https://raw.githubusercontent.com/juliakreger/ansible-modules-extras/features/new-openstack/cloud/os_ironic.py latest_os_ironic_node_url: https://raw.githubusercontent.com/juliakreger/ansible-modules-extras/features/new-openstack/cloud/os_ironic_node.py deploy_kernel: "{{http_boot_folder}}/coreos_production_pxe.vmlinuz" deploy_ramdisk: "{{http_boot_folder}}/coreos_production_pxe_image-oem.cpio.gz" -deploy_kernel_url: "http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:8080/coreos_production_pxe.vmlinuz" -deploy_ramdisk_url: "http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:8080/coreos_production_pxe_image-oem.cpio.gz" +deploy_kernel_url: "http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:{{nginx_port}}/coreos_production_pxe.vmlinuz" +deploy_ramdisk_url: "http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:{{nginx_port}}/coreos_production_pxe_image-oem.cpio.gz" # When using disk image builder based image generation, which is the # default at this time, the deploy_image_filename must end with .qcow2 # due to the image creation process. diff --git a/playbooks/roles/bifrost-setup-nodes/tasks/main.yml b/playbooks/roles/bifrost-setup-nodes/tasks/main.yml index 8e34b9ca9..f5b056005 100644 --- a/playbooks/roles/bifrost-setup-nodes/tasks/main.yml +++ b/playbooks/roles/bifrost-setup-nodes/tasks/main.yml @@ -22,9 +22,9 @@ ironic_url: "{{ ironic_url }}" uuid: "{{item.split(',')[9]}}" state: present - config_drive: "http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:8080/configdrive-{{item.split(',')[9]}}.iso.gz" + config_drive: "http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:{{nginx_port}}/configdrive-{{item.split(',')[9]}}.iso.gz" instance_info: - image_source: "http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:8080/{{deploy_image_filename}}" + image_source: "http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:{{nginx_port}}/{{deploy_image_filename}}" image_checksum: "{{ test_deploy_image.stat.md5 }}" image_disk_format: "raw" root_gb: 10 diff --git a/playbooks/roles/ironic-install/defaults/main.yml b/playbooks/roles/ironic-install/defaults/main.yml index 30dfb42a5..ca5d0a853 100644 --- a/playbooks/roles/ironic-install/defaults/main.yml +++ b/playbooks/roles/ironic-install/defaults/main.yml @@ -30,6 +30,7 @@ required_packages_ubuntu: - kpartx - qemu-utils http_boot_folder: /httpboot +nginx_port: 8080 ironicclient_source_install: false shade_source_install: true # Configuration information for diskimage-builder @@ -50,8 +51,8 @@ latest_os_ironic_url: https://raw.githubusercontent.com/juliakreger/ansible-modu latest_os_ironic_node_url: https://raw.githubusercontent.com/juliakreger/ansible-modules-extras/features/new-openstack/cloud/os_ironic_node.py deploy_kernel: "{{http_boot_folder}}/coreos_production_pxe.vmlinuz" deploy_ramdisk: "{{http_boot_folder}}/coreos_production_pxe_image-oem.cpio.gz" -deploy_kernel_url: "http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:8080/coreos_production_pxe.vmlinuz" -deploy_ramdisk_url: "http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:8080/coreos_production_pxe_image-oem.cpio.gz" +deploy_kernel_url: "http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:{{nginx_port}}/coreos_production_pxe.vmlinuz" +deploy_ramdisk_url: "http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:{{nginx_port}}/coreos_production_pxe_image-oem.cpio.gz" deploy_image_filename: "trusty-server-cloudimg-amd64.img" deploy_image: "{{http_boot_folder}}/{{deploy_image_filename}}" # Use cirros instead of building an image via diskimage-builder diff --git a/playbooks/roles/ironic-install/tasks/main.yml b/playbooks/roles/ironic-install/tasks/main.yml index efe56bf5f..c726eda71 100644 --- a/playbooks/roles/ironic-install/tasks/main.yml +++ b/playbooks/roles/ironic-install/tasks/main.yml @@ -270,7 +270,7 @@ - name: "Creating image via disk image builder" include: create_dib_image.yml when: test_os_image_present.stat.exists == false and transform_boot_image == false and create_image_via_dib == true -- name: "Explicitly permit TCP/8080 for file downloads from nodes to be provisioned" - command: iptables -I INPUT -p tcp --dport 8080 -i {{network_interface}} -j ACCEPT +- name: "Explicitly permit nginx port (TCP) for file downloads from nodes to be provisioned" + command: iptables -I INPUT -p tcp --dport {{nginx_port}} -i {{network_interface}} -j ACCEPT - name: "Explicitly permit TCP/6385 for IPA callback" command: iptables -I INPUT -p tcp --dport 6385 -i {{network_interface}} -j ACCEPT diff --git a/playbooks/roles/ironic-install/templates/agent_config.template.j2 b/playbooks/roles/ironic-install/templates/agent_config.template.j2 index 9c691baf3..95b4b2f55 100644 --- a/playbooks/roles/ironic-install/templates/agent_config.template.j2 +++ b/playbooks/roles/ironic-install/templates/agent_config.template.j2 @@ -5,8 +5,8 @@ dhcp goto deploy :deploy -kernel http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:8080{{ '{{' }} pxe_options.deployment_aki_path {{ '}}' }} ip=${ip}:${next-server}:${gateway}:${netmask} BOOTIF=${mac} text {{ '{{' }} pxe_options.pxe_append_params {{ '}}' }} ipa-api-url={{ '{{' }} pxe_options['ipa-api-url'] {{ '}}' }} ipa-driver-name={{ '{{' }} pxe_options['ipa-driver-name'] {{ '}}' }} +kernel http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:{{nginx_port}}{{ '{{' }} pxe_options.deployment_aki_path {{ '}}' }} ip=${ip}:${next-server}:${gateway}:${netmask} BOOTIF=${mac} text {{ '{{' }} pxe_options.pxe_append_params {{ '}}' }} ipa-api-url={{ '{{' }} pxe_options['ipa-api-url'] {{ '}}' }} ipa-driver-name={{ '{{' }} pxe_options['ipa-driver-name'] {{ '}}' }} -initrd http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:8080{{ '{{' }} pxe_options.deployment_ari_path {{ '}}' }} +initrd http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:{{nginx_port}}{{ '{{' }} pxe_options.deployment_ari_path {{ '}}' }} boot diff --git a/playbooks/roles/ironic-install/templates/dnsmasq.conf.j2 b/playbooks/roles/ironic-install/templates/dnsmasq.conf.j2 index 7f9ceeab2..9a45b6010 100644 --- a/playbooks/roles/ironic-install/templates/dnsmasq.conf.j2 +++ b/playbooks/roles/ironic-install/templates/dnsmasq.conf.j2 @@ -436,9 +436,9 @@ dhcp-range={{dhcp_pool_start}},{{dhcp_pool_end}},12h dhcp-match=set:ipxe,175 # iPXE sends a 175 option. dhcp-boot=tag:!ipxe,undionly.kpxe {% if testing %} -dhcp-boot=http://192.168.122.1:8080/boot.ipxe +dhcp-boot=http://192.168.122.1:{{nginx_port}}/boot.ipxe {% else %} -dhcp-boot=http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:8080/boot.ipxe +dhcp-boot=http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:{{nginx_port}}/boot.ipxe {% endif %} # Encapsulated options for Etherboot gPXE. All the options are diff --git a/playbooks/roles/ironic-install/templates/ironic.conf.j2 b/playbooks/roles/ironic-install/templates/ironic.conf.j2 index 355b9336c..7d4025a12 100644 --- a/playbooks/roles/ironic-install/templates/ironic.conf.j2 +++ b/playbooks/roles/ironic-install/templates/ironic.conf.j2 @@ -1310,8 +1310,8 @@ pxe_bootfile_name=undionly.kpxe #uefi_pxe_bootfile_name=elilo.efi # Ironic compute node's HTTP server URL. Example: -# http://192.1.2.3:8080 (string value) -http_url=http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:8080/ +# http://192.1.2.3:{{nginx_port}} (string value) +http_url=http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:{{nginx_port}}/ # Ironic compute node's HTTP root path. (string value) http_root={{ http_boot_folder }} diff --git a/playbooks/roles/ironic-install/templates/nginx.conf.j2 b/playbooks/roles/ironic-install/templates/nginx.conf.j2 index 532ce06d9..b2cfdcb5a 100644 --- a/playbooks/roles/ironic-install/templates/nginx.conf.j2 +++ b/playbooks/roles/ironic-install/templates/nginx.conf.j2 @@ -40,7 +40,7 @@ http { gzip on; server { - listen 8080; + listen {{nginx_port}}; server_name {{ ansible_hostname }}; root {{ http_boot_folder }}; location {{ http_boot_folder }}/ {