diff --git a/multi-node-aio-xenial-ansible b/multi-node-aio-xenial-ansible new file mode 120000 index 00000000..fd2dd80c --- /dev/null +++ b/multi-node-aio-xenial-ansible @@ -0,0 +1 @@ +multi-node-aio \ No newline at end of file diff --git a/multi-node-aio-xenial-ansible/LICENSE.txt b/multi-node-aio-xenial-ansible/LICENSE.txt deleted file mode 100644 index 8863b74f..00000000 --- a/multi-node-aio-xenial-ansible/LICENSE.txt +++ /dev/null @@ -1,229 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -------------------------------------------------------------------------------- - -The MIT License (MIT) - -Copyright (c) [year] [fullname] - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -Files in this project licensed under the MIT license: - - - playbooks/plugins/callbacks/profile_tasks.py diff --git a/multi-node-aio-xenial-ansible/README.rst b/multi-node-aio-xenial-ansible/README.rst deleted file mode 100644 index 9f52d636..00000000 --- a/multi-node-aio-xenial-ansible/README.rst +++ /dev/null @@ -1,15 +0,0 @@ -OpenStack-Ansible Multi-Node AIO Xenial Ansible -################################################ -:date: 2016-02-23 -:tags: rackspace, openstack, ansible -:category: \*openstack, \*nix - - -About this repository ---------------------- - -This is a re-engineered version of the Multi-Node AIO Cobbler has been removed -and replaced with Ansible to do the deploy of the KVM virtual machines. With time the intent here is to -replace the bash which deploys this all with Ansible. - -Trusty will not be supported. diff --git a/multi-node-aio-xenial-ansible/build.sh b/multi-node-aio-xenial-ansible/build.sh deleted file mode 100755 index 8fbaf926..00000000 --- a/multi-node-aio-xenial-ansible/build.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env bash -set -eu -# Copyright [2016] [Kevin Carter] -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Load all functions -source functions.rc - -# bring in variable definitions if there is a variables.sh file -[[ -f variables.sh ]] && source variables.sh - -# Provide defaults for unset variables -# Set first two octets of network used for containers, storage, etc -NETWORK_BASE=${NETWORK_BASE:-10.29} - -# Instruct the system do all of the require host setup -SETUP_HOST=${SETUP_HOST:-true} -[[ "${SETUP_HOST}" = true ]] && source setup-host.sh - -SETUP_PXEBOOT=${SETUP_PXEBOOT:-true} -[[ "${SETUP_PXEBOOT}" = true ]] && source setup-pxeboot.sh - -# Instruct the system do all of the virsh setup -SETUP_VIRSH_NET=${SETUP_VIRSH_NET:-true} -[[ "${SETUP_VIRSH_NET}" = true ]] && source setup-virsh-net.sh - -# Instruct the system to create and boot all of the VMs -CREATE_VMS=${CREATE_VMS:-true} -[[ "${CREATE_VMS}" = true ]] && source no-cobbler-create-vms.sh - -# Instruct the system to configure all of the VMs -CONFIGURE_VMS=${CONFIGURE_VMS:-true} -[[ "${CONFIGURE_VMS}" = true ]] && source no-cobbler-configure-vms.sh - -# Instruct the system to deploy OpenStack Ansible -DEPLOY_OSA=${DEPLOY_OSA:-true} -[[ "${DEPLOY_OSA}" = true ]] && source config-deploy-node.sh - diff --git a/multi-node-aio-xenial-ansible/config-deploy-node.sh b/multi-node-aio-xenial-ansible/config-deploy-node.sh deleted file mode 100755 index 219bf0c5..00000000 --- a/multi-node-aio-xenial-ansible/config-deploy-node.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash - -# Load all functions -source functions.rc - -# bring in variable definitions if there is a variables.sh file -[[ -f variables.sh ]] && source variables.sh - -if [[ "${DEPLOY_OSA}" = true ]]; then - # Copy private key and public key to deploy node - scp -r -o StrictHostKeyChecking=no ~/.ssh deploy1:/root/ - - # Copy multi-node-aio folder to deploy node - scp -r -o StrictHostKeyChecking=no ../multi-node-aio deploy1:/root - - # Deploy openstack-ansible from deploy node and export all variables deploy-osa.sh needs - ssh -o StrictHostKeyChecking=no deploy1 "export NETWORK_BASE=${NETWORK_BASE} RUN_OSA=${RUN_OSA} " \ - "OSA_BRANCH=${OSA_BRANCH} PRE_CONFIG_OSA=${PRE_CONFIG_OSA}; apt update; cd /root/multi-node-aio/; ./deploy-osa.sh" -fi - -if [[ "${CONFIG_PREROUTING}" = true ]]; then - EXTERNAL_IP="$(ip route get 1 | awk '{print $NF;exit}')" - # Add 2222 rules to iptables for ssh directly into deployment node. - iptables_filter_rule_add nat "PREROUTING -p tcp -d ${EXTERNAL_IP} --dport 2222 -j DNAT --to 10.0.0.150:22" - - scp -o StrictHostKeyChecking=no deploy1:/opt/openstack-ansible/playbooks/vars/configs/haproxy_config.yml . - PORTS="$(get_osad_ports) $OSA_PORTS" - for port in $PORTS ; do - iptables_filter_rule_add nat "PREROUTING -p tcp -d ${EXTERNAL_IP} --dport ${port} -j DNAT --to 10.0.0.150:${port}" - done -fi \ No newline at end of file diff --git a/multi-node-aio-xenial-ansible/create_pxeboot_server.yml b/multi-node-aio-xenial-ansible/create_pxeboot_server.yml deleted file mode 100644 index 4ac0a484..00000000 --- a/multi-node-aio-xenial-ansible/create_pxeboot_server.yml +++ /dev/null @@ -1,139 +0,0 @@ ---- -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# create_pxeboot_server.yml -# -# This playbook contains all the data to deploy a PXE server with TFTP/ Apache and the preseed -# environment for Ubuntu Xenial. This is to replace Cobbler. - -- hosts: all - become: yes - become_method: sudo - - vars: - proxy: "{{ lookup('env','http_proxy') }}" - - # - List of DHCP Subnets - dhcp_list: - - netmask: 255.255.255.0 - gateway: 10.0.0.200 - dns: "{{ ansible_dns.nameservers.0 }}" - subnet: 10.0.0.0 # Subnet mask - default_lease_time: 21600 # Subnet Default lease time - The default is used if this is not defined - max_lease_time: 43200 # Subnet Max lease time - The default is used if this is not defined - tftp_boot_path: /pxelinux.0 # Path for tftp of where to boot from first - The default is used if this is not defined - tftp_server: 10.0.0.200 # The server hosting the TFTP server - The default is used if this is not defined - dhcp_default_domain_name: openstackci.local # The domain-name option - the above global default is used if this is not defined - - # - tftpboot_configure - tftp_mirror: 10.0.0.200 - tftp_proxy: "{{ proxy }}" - - webserver_ip_address: 10.0.0.200 - ntp_server: "{{ lookup('pipe','grep -m 1 pool /etc/ntp.conf').split(' ').1 }}" # Check in NTP directory, look for the first pool match and use as our NTP server - atftpd_path: /srv/tftp - tftp_source: /srv/tftp/pxelinux.cfg - atftp_user: atftp - atftp_group: atftp - distro_name: ubuntu-16.04.2-server-amd64.iso - distro_url : "http://releases.ubuntu.com/16.04/{{ distro_name }}" - - # These below variables rely on apache being set up and is where the preseed is set up - apache_url: files - apache_path: /var/www/html - - tftp_directories: - - pxe - - ubuntu - - # - List of static DHCP hosts - These are iterated though and each will be created - # last byte of hwaddr matches last two digits of ip address - server_list: - - name: cinder1 - hwaddr: "52:54:00:bd:81:30" - ip: "10.0.0.130" - distro: xenial - preseed_file: ubuntu-server-16.04-unattended-cinder.seed - - - name: cinder2 - hwaddr: "52:54:00:bd:81:31" - ip: "10.0.0.131" - distro: xenial - preseed_file: ubuntu-server-16.04-unattended-cinder.seed - - - name: infra1 - hwaddr: "52:54:00:bd:81:00" - ip: "10.0.0.100" - distro: xenial - preseed_file: ubuntu-server-16.04-unattended-infra.seed - - - name: infra2 - hwaddr: "52:54:00:bd:81:01" - ip: "10.0.0.101" - distro: xenial - preseed_file: ubuntu-server-16.04-unattended-infra.seed - - - name: infra3 - hwaddr: "52:54:00:bd:81:02" - ip: "10.0.0.102" - distro: xenial - preseed_file: ubuntu-server-16.04-unattended-infra.seed - - - name: logging1 - hwaddr: "52:54:00:bd:81:10" - ip: "10.0.0.110" - distro: xenial - preseed_file: ubuntu-server-16.04-unattended-logging.seed - - - name: compute1 - hwaddr: "52:54:00:bd:81:20" - ip: "10.0.0.120" - distro: xenial - preseed_file: ubuntu-server-16.04-unattended-nova_compute.seed - - - name: compute2 - hwaddr: "52:54:00:bd:81:21" - ip: "10.0.0.121" - distro: xenial - preseed_file: ubuntu-server-16.04-unattended-nova_compute.seed - - - name: swift1 - hwaddr: "52:54:00:bd:81:40" - ip: "10.0.0.140" - distro: xenial - preseed_file: ubuntu-server-16.04-unattended-swift.seed - - - name: swift2 - hwaddr: "52:54:00:bd:81:41" - ip: "10.0.0.141" - distro: xenial - preseed_file: ubuntu-server-16.04-unattended-swift.seed - - - name: swift3 - hwaddr: "52:54:00:bd:81:42" - ip: "10.0.0.142" - distro: xenial - preseed_file: ubuntu-server-16.04-unattended-swift.seed - - - name: deploy1 - hwaddr: "52:54:00:bd:81:50" - ip: "10.0.0.150" - distro: xenial - preseed_file: ubuntu-server-16.04-unattended-deploy.seed - - roles: - - { role: proxy_install, when: proxy|length > 0 } - - { role: dhcpd_install } - - { role: atftpd_install } - - { role: apache_install } - - { role: tftpboot_configure } \ No newline at end of file diff --git a/multi-node-aio-xenial-ansible/deploy-osa.sh b/multi-node-aio-xenial-ansible/deploy-osa.sh deleted file mode 100755 index 9895efc8..00000000 --- a/multi-node-aio-xenial-ansible/deploy-osa.sh +++ /dev/null @@ -1,150 +0,0 @@ -#!/usr/bin/env bash -# Copyright [2016] [Kevin Carter] -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -MAX_RETRIES=${MAX_RETRIES:-5} - -# Load all functions -source functions.rc - -# bring in variable definitions if there is a variables.sh file -[[ -f variables.sh ]] && source variables.sh - -# Provide defaults for unset variables -# Set first two octets of network used for containers, storage, etc -NETWORK_BASE=${NETWORK_BASE:-10.29} - -# Reset the ssh-agent service to remove potential key issues -ssh_agent_reset - -# Install git and tmux for use within the OSA deploy -apt-get install -y git tmux - -# Clone the OSA source code -git clone https://git.openstack.org/openstack/openstack-ansible /opt/openstack-ansible || true - -# Ensure the "/etc/openstack_deploy" exists -mkdir_check "/etc/openstack_deploy" - -pushd /opt/openstack-ansible/ - # Fetch all current refs - git fetch --all - - # Checkout the OpenStack-Ansible branch - git checkout "${OSA_BRANCH:-master}" - - # Copy the etc files into place - cp -vR etc/openstack_deploy/* /etc/openstack_deploy/ -popd - -# Create a secondary static inventory for hosts -ansible_static_inventory "/opt/ansible-static-inventory.ini" - -# Create the OpenStack User Config -HOSTIP="$(ip route get 1 | awk '{print $NF;exit}')" -sed -e "s/__HOSTIP__/${HOSTIP}/g" -e "s/__NETWORK_BASE__/${NETWORK_BASE}/g" templates/openstack_user_config.yml > /etc/openstack_deploy/openstack_user_config.yml - -# Create the swift config: function group_name host_type -cp -v templates/osa-swift.yml /etc/openstack_deploy/conf.d/swift.yml - - -### =========== WRITE OF conf.d FILES =========== ### -# Setup cinder hosts: function group_name host_type -write_osa_general_confd storage-infra_hosts cinder -write_osa_cinder_confd storage_hosts cinder - -# Setup nova hosts: function group_name host_type -write_osa_general_confd compute_hosts nova_compute - -# Setup infra hosts: function group_name host_type -write_osa_general_confd identity_hosts infra -write_osa_general_confd repo-infra_hosts infra -write_osa_general_confd os-infra_hosts infra -write_osa_general_confd shared-infra_hosts infra - -# Setup logging hosts: function group_name host_type -write_osa_general_confd log_hosts logging - -# Setup network hosts: function group_name host_type -write_osa_general_confd network_hosts infra - -# Setup swift hosts: function group_name host_type -write_osa_swift_proxy_confd swift-proxy_hosts swift -write_osa_swift_storage_confd swift_hosts swift -### =========== END WRITE OF conf.d FILES =========== ### - -# Enable pre-config the OSA enviroment for deploying OSA. -PRE_CONFIG_OSA=${PRE_CONFIG_OSA:-true} -if [[ "${PRE_CONFIG_OSA}" = true ]]; then - pushd /opt/openstack-ansible/ - # Bootstrap ansible into the environment - bash ./scripts/bootstrap-ansible.sh - - # Generate the passwords for the environment - python ./scripts/pw-token-gen.py --file /etc/openstack_deploy/user_secrets.yml - - # This is happening so the VMs running the infra use less storage - osa_user_var_add lxc_container_backing_store 'lxc_container_backing_store: dir' - - # Tempest is being configured to use a known network - osa_user_var_add tempest_public_subnet_cidr 'tempest_public_subnet_cidr: '${NETWORK_BASE}'.248.0/26' - - # This makes running neutron in a distributed system easier and a lot less noisy - osa_user_var_add neutron_l2_population 'neutron_l2_population: True' - - # This makes the glance image store use swift instead of the file backend - osa_user_var_add glance_default_store 'glance_default_store: swift' - - # Propagate host proxy settings (if set) into /etc/environment in the targets - if [ ! -z ${http_proxy+x} ]; then - osa_user_var_add proxy_env_url 'proxy_env_url: '${http_proxy} - osa_user_var_add no_proxy_env 'no_proxy_env: "localhost,127.0.0.1,{{ internal_lb_vip_address }},{{ external_lb_vip_address }},{% for host in groups['\''all_containers'\''] %}{{ hostvars[host]['\''container_address'\''] }}{% if not loop.last %},{% endif %}{% endfor %}"' - osa_user_var_add global_environment_variables 'global_environment_variables:' - osa_user_var_add ' HTTP_PROXY:' ' HTTP_PROXY: "{{ proxy_env_url }}"' - osa_user_var_add ' HTTPS_PROXY:' ' HTTPS_PROXY: "{{ proxy_env_url }}"' - osa_user_var_add ' NO_PROXY:' ' NO_PROXY: "{{ no_proxy_env }}"' - osa_user_var_add ' http_proxy:' ' http_proxy: "{{ proxy_env_url }}"' - osa_user_var_add ' https_proxy:' ' https_proxy: "{{ proxy_env_url }}"' - osa_user_var_add ' no_proxy:' ' no_proxy: "{{ no_proxy_env }}"' - # Propagate proxy setting to glance api conf. Note the unusual format - instead of the typical - # http_proxy=http://proxy.example.com ; https_proxy=http://proxy.example.com - # it uses - # http:proxy.example.com, https:proxy.example.com - # - osa_user_var_add glance_glance_api_conf_overrides 'glance_glance_api_conf_overrides:' - osa_user_var_add ' glance_store' ' glance_store:' - osa_user_var_add ' http_proxy_information' " http_proxy_information: \"http:${http_proxy#http://}, https:${http_proxy#http://}\"" - fi - popd -fi - -# Enable deploy OSA of the "${RUN_OSA}" -RUN_OSA=${RUN_OSA:-true} -if [[ "${RUN_OSA}" = true ]]; then - # Set the number of forks for the ansible client calls - export ANSIBLE_FORKS=${ANSIBLE_FORKS:-15} - - pushd /opt/openstack-ansible - export DEPLOY_AIO=true - bash ./scripts/run-playbooks.sh - popd - - EXEC_DIR="$(pwd)" - pushd /opt/openstack-ansible/playbooks - if [[ -f "/usr/local/bin/openstack-ansible.rc" ]]; then - source /usr/local/bin/openstack-ansible.rc - fi - ansible -m script -a "${EXEC_DIR}/openstack-service-setup.sh ${NETWORK_BASE}" 'utility_all[0]' - popd -fi diff --git a/multi-node-aio-xenial-ansible/functions.rc b/multi-node-aio-xenial-ansible/functions.rc deleted file mode 100755 index 45d8325a..00000000 --- a/multi-node-aio-xenial-ansible/functions.rc +++ /dev/null @@ -1,257 +0,0 @@ -#!/usr/bin/env bash -# Copyright [2016] [Kevin Carter] -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -function mkdir_check { - if [ ! -d "$1" ];then - mkdir -p "$1" - fi -} - -function ssh_agent_reset { - # If you were running ssh-agent with forwarding this will clear out the keys - # in your cache which can cause confusion. - if pgrep ssh-agent; then - killall ssh-agent; eval `ssh-agent` - fi -} - -function iptables_general_rule_add { -if ! iptables -w -C $1;then - iptables -w -I $1 -fi -} - -function iptables_filter_rule_add { -if ! iptables -w -t $1 -C $2;then - iptables -w -t $1 -I $2 -fi -} - -function get_host_type { -python < /dev/null; do - sleep 15 - done -done -} - -function rekick_vms { -# If you pass the short name of the host to the function it will only force rekick just the ONE host. -# Set the VM disk size in gigabytes -VM_DISK_SIZE="${VM_DISK_SIZE:-252}" -for node in ${1:-$(get_all_hosts)}; do - for node_name in $(virsh list --all --name | grep "${node%%":"*}"); do - virsh destroy "${node_name}" || true - done - # Instruct the system to run the image create. - # If you have the option ``VM_IMAGE_CREATE=true`` the system will reformat the disk image - # destroying anything that was it image previously. - VM_IMAGE_CREATE=${VM_IMAGE_CREATE:-true} - if [[ "${VM_IMAGE_CREATE}" = true ]]; then - qemu-img create -f qcow2 \ - -o preallocation=metadata,compat=1.1,lazy_refcounts=on \ - /var/lib/libvirt/images/${node%%":"*}.openstackci.local.img \ - "${VM_DISK_SIZE}G" - fi - VM_NAME=$(virsh list --all --name | grep "${node%%":"*}" || echo "") - if [[ -z "${VM_NAME}" ]]; then - virsh define /etc/libvirt/qemu/${node%%":"*}.openstackci.local.xml || true - virsh create /etc/libvirt/qemu/${node%%":"*}.openstackci.local.xml || true - else - virsh start "${VM_NAME}" - fi -done -} - -function write_osa_general_confd { -CONFD_FILE="/etc/openstack_deploy/conf.d/${1}.yml" -echo "## DO NOT WRITE TO THIS FILE, CHANGES WILL BE LOST!" > ${CONFD_FILE} -echo "---" >> ${CONFD_FILE} -echo "$1:" >> ${CONFD_FILE} -for node in $(get_host_type ${2}); do -echo " ${node%%':'*}:" >> ${CONFD_FILE} -echo " ip: ${NETWORK_BASE}.236.${node#*":"}" >> ${CONFD_FILE} -done -} - -function write_osa_cinder_confd { -CONFD_FILE="/etc/openstack_deploy/conf.d/${1}.yml" -echo "## DO NOT WRITE TO THIS FILE, CHANGES WILL BE LOST!" > ${CONFD_FILE} -echo "---" >> ${CONFD_FILE} -echo "$1:" >> ${CONFD_FILE} -for node in $(get_host_type ${2}); do -echo " ${node%%':'*}:" >> ${CONFD_FILE} -echo " ip: ${NETWORK_BASE}.236.${node#*":"}" >> ${CONFD_FILE} -cat >> ${CONFD_FILE} < ${CONFD_FILE} -echo "---" >> ${CONFD_FILE} -echo "$1:" >> ${CONFD_FILE} -for node in $(get_host_type ${2}); do -echo " ${node%%':'*}:" >> ${CONFD_FILE} -echo " ip: ${NETWORK_BASE}.236.${node#*":"}" >> ${CONFD_FILE} -cat >> ${CONFD_FILE} < ${CONFD_FILE} -echo "---" >> ${CONFD_FILE} -echo "$1:" >> ${CONFD_FILE} -for node in $(get_host_type ${2}); do -echo " ${node%%':'*}:" >> ${CONFD_FILE} -echo " ip: ${NETWORK_BASE}.236.${node#*":"}" >> ${CONFD_FILE} -cat >> ${CONFD_FILE} < ${CONFD_FILE} -for node_type in $(get_all_types); do - echo "[${node_type}]" >> ${CONFD_FILE} - for node in $(get_host_type ${node_type}); do - echo "10.0.0.${node#*":"}" >> ${CONFD_FILE} - done -done -} - -function install_bits { -successerator openstack-ansible $@ -} - -function successerator { -set +e -# Get the time taht the method was started -OP_START_TIME=$(date +%s) -#Set the initial return value to failure. -false -for ((RETRY=0; $? != 0 && RETRY < MAX_RETRIES; RETRY++)); do - if [ ${RETRY} -gt 1 ]; then - $@ -vvvv - else - $@ - fi -done - -# If max retries were hit, fail. -if [ $? -ne 0 && [ ${RETRY} -eq ${MAX_RETRIES} ];then - echo -e "\n Hit maximum number of retries, giving up..\n" - exit -fi - -# Print the time that the method completed. -OP_TOTAL_SECONDS="$(( $(date +%s) - OP_START_TIME ))" -REPORT_OUTPUT="${OP_TOTAL_SECONDS} seconds" -REPORT_DATA+="- Operation: [ $@ ]\t${REPORT_OUTPUT}\tNumber of Attempts [ ${RETRY} ]\n" -echo -e "Run Time = ${REPORT_OUTPUT}" -set -e -} - -# Return 1 if the second argument is a substring of the first argument, otherwise return 0 -contains() { - string="$1" - substring="$2" - if test "${string#*$substring}" == "$string" - then - echo 0 # $substring is not in $string - else - echo 1 # $substring is in $string - fi -} - -# Return all service ports -function get_osad_ports { -python < "/tmp/keys/$i" -done - -# Ensure that all running VMs have an updated apt-cache with keys -# and copy our http proxy settings into each VM (in the environment and apt.conf) -for node in $(get_all_hosts); do - if [ ! -z ${http_proxy+x} ]; then - ssh -q -n -f -o StrictHostKeyChecking=no 10.0.0.${node#*":"} "mkdir -p /tmp/keys; \ - echo \"http_proxy=$http_proxy\" >> /etc/environment; \ - echo \"https_proxy=$https_proxy\" >> /etc/environment; \ - echo \"no_proxy=localhost,127.0.0.1,10.0.0.200\" >> /etc/environment; \ - echo \"Acquire::http::Proxy \\\"$http_proxy\\\";\" >> /etc/apt/apt.conf" - else - ssh -q -n -f -o StrictHostKeyChecking=no 10.0.0.${node#*":"} "mkdir -p /tmp/keys" - fi - for i in /etc/apt/apt.conf.d/00-nokey /etc/apt/sources.list /etc/apt/sources.list.d/* /tmp/keys/*; do - if [[ -f "$i" ]]; then - scp "$i" "10.0.0.${node#*":"}:$i" - fi - done - ssh -q -n -f -o StrictHostKeyChecking=no 10.0.0.${node#*":"} "(for i in /tmp/keys/*; do \ - apt-key add \$i; \ - apt-key adv --keyserver keyserver.ubuntu.com --recv-keys \$(basename \$i); done); \ - apt-get clean; \ - apt-get update" -done - -# Add node hostname into /etc/hosts -if ! grep -q "10.0.0.150" /etc/hosts; then - for node_type in $(get_all_types); do - for node in $(get_host_type ${node_type}); do - echo "10.0.0.${node#*":"} ${node%%':'*}" >> /etc/hosts - done - done -fi - -# Add autocomplete ssh via /etc/hosts and ssh_config to all nodes -for node in $(get_all_hosts); do - echo ' -_complete_hosts () { - COMPREPLY=() - cur="${COMP_WORDS[COMP_CWORD]}" - host_list=`{ - sed -n -e "s/^[0-9][0-9\.]*//p" /etc/hosts; }|tr " " "\n"|grep -v "*"` - COMPREPLY=( $(compgen -W "\${host_list}" -- $cur)) - return 0 -} -complete -F _complete_hosts host -complete -F _complete_hosts ssh -' | ssh -o StrictHostKeyChecking=no 10.0.0.${node#*":"} "cat >> /root/.bashrc" -done diff --git a/multi-node-aio-xenial-ansible/no-cobbler-create-vms.sh b/multi-node-aio-xenial-ansible/no-cobbler-create-vms.sh deleted file mode 100755 index 02bd800e..00000000 --- a/multi-node-aio-xenial-ansible/no-cobbler-create-vms.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env bash -set -eu -# Copyright [2016] [Kevin Carter] -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Load all functions -source functions.rc - -# bring in variable definitions if there is a variables.sh file -[[ -f variables.sh ]] && source variables.sh - -# Reset the ssh-agent service to remove potential key issues -ssh_agent_reset -# Set the default preseed device name. -# This is being set because sda is on hosts, vda is kvm, xvda is xen. -DEVICE_NAME="${DEVICE_NAME:-vda}" - -# Set Ethernet type -ETH_TYPE="${ETH_TYPE:-eth}" - -# Create VM Basic Configuration files -for node_type in $(get_all_types); do - for node in $(get_host_type ${node_type}); do - cp -v "templates/vmnode-config/${node_type}.openstackci.local.xml" /etc/libvirt/qemu/${node%%":"*}.openstackci.local.xml - sed -i "s|__NODE__|${node%%":"*}|g" /etc/libvirt/qemu/${node%%":"*}.openstackci.local.xml - sed -i "s|__COUNT__|${node:(-2)}|g" /etc/libvirt/qemu/${node%%":"*}.openstackci.local.xml - sed -i "s|__DEVICE_NAME__|${DEVICE_NAME}|g" /etc/libvirt/qemu/${node%%":"*}.openstackci.local.xml - sed -i "s|__CONTAINER_VMS__|${CONTAINER_VMS}|g" /etc/libvirt/qemu/${node%%":"*}.openstackci.local.xml - done -done -# Populate network configurations based on node type -for node_type in $(get_all_types); do - for node in $(get_host_type ${node_type}); do - sed -e "s/__COUNT__/${node#*":"}/g" -e "s/__DEFAULT_NETWORK__/${DEFAULT_NETWORK}/g" -e "s/__NETWORK_BASE__/${NETWORK_BASE}/g" -e "s/__ETH_TYPE__/${ETH_TYPE}/g" "templates/network-interfaces/vm.openstackci.local-bonded-bridges.cfg" > "/var/www/html/osa-${node%%":"*}-bridges.cfg" - done -done -# Kick all of the VMs to run the cloud -# !!!THIS TASK WILL DESTROY ALL OF THE ROOT DISKS IF THEY ALREADY EXIST!!! -rekick_vms diff --git a/multi-node-aio-xenial-ansible/openstack-service-setup.sh b/multi-node-aio-xenial-ansible/openstack-service-setup.sh deleted file mode 100644 index ddecf854..00000000 --- a/multi-node-aio-xenial-ansible/openstack-service-setup.sh +++ /dev/null @@ -1,175 +0,0 @@ -#!/usr/bin/env bash - -# Load service variables -source openrc - -# bring in variable definitions if there is a variables.sh file -[[ -f variables.sh ]] && source variables.sh - -# Provide defaults for unset variables -# Set first two octets of network used for containers, storage, etc -NETWORK_BASE=${NETWORK_BASE:-10.29} - -# Create base flavors for the new deployment -for flavor in micro tiny mini small medium large xlarge heavy; do - NAME="m1.${flavor}" - ID="${ID:-0}" - RAM="${RAM:-256}" - DISK="${DISK:-1}" - VCPU="${VCPU:-1}" - SWAP="${SWAP:-0}" - EPHEMERAL="${EPHEMERAL:-0}" - nova flavor-delete $ID > /dev/null || echo "No Flavor with ID: [ $ID ] found to clean up" - nova flavor-create $NAME $ID $RAM $DISK $VCPU --swap $SWAP --is-public true --ephemeral $EPHEMERAL --rxtx-factor 1 - let ID=ID+1 - let RAM=RAM*2 - if [ "$ID" -gt 5 ];then - let VCPU=VCPU*2 - let DISK=DISK*2 - let EPHEMERAL=256 - let SWAP=4 - elif [ "$ID" -gt 4 ];then - let VCPU=VCPU*2 - let DISK=DISK*4+$DISK - let EPHEMERAL=$DISK/2 - let SWAP=4 - elif [ "$ID" -gt 3 ];then - let VCPU=VCPU*2 - let DISK=DISK*4+$DISK - let EPHEMERAL=$DISK/3 - let SWAP=4 - elif [ "$ID" -gt 2 ];then - let VCPU=VCPU+$VCPU/2 - let DISK=DISK*4 - let EPHEMERAL=$DISK/3 - let SWAP=4 - elif [ "$ID" -gt 1 ];then - let VCPU=VCPU+1 - let DISK=DISK*2+$DISK - fi -done - -# Neutron provider network setup -neutron net-create GATEWAY_NET \ - --router:external=True \ - --provider:physical_network=flat \ - --provider:network_type=flat - -neutron subnet-create GATEWAY_NET ${NETWORK_BASE}.248.0/22 \ - --name GATEWAY_NET_SUBNET \ - --gateway ${NETWORK_BASE}.248.1 \ - --allocation-pool start=${NETWORK_BASE}.248.201,end=${NETWORK_BASE}.248.255 \ - --dns-nameservers list=true ${DNS_NAMESERVER} - -# Neutron private network setup -neutron net-create PRIVATE_NET \ - --shared \ - --router:external=True \ - --provider:network_type=vxlan \ - --provider:segmentation_id 101 - -neutron subnet-create PRIVATE_NET 192.168.0.0/24 \ - --name PRIVATE_NET_SUBNET - -# Neutron router setup -ROUTER_ID=$(neutron router-create GATEWAY_NET_ROUTER | grep -w id | awk '{print $4}') -neutron router-gateway-set \ - ${ROUTER_ID} \ - $(neutron net-list | awk '/GATEWAY_NET/ {print $2}') - -neutron router-interface-add \ - ${ROUTER_ID} \ - $(neutron subnet-list | awk '/PRIVATE_NET_SUBNET/ {print $2}') - -# Neutron security group setup -for id in $(neutron security-group-list -f yaml | awk '/- id\:/ {print $3}'); do - # Allow ICMP - neutron security-group-rule-create --protocol icmp \ - --direction ingress \ - $id || true - # Allow all TCP - neutron security-group-rule-create --protocol tcp \ - --port-range-min 1 \ - --port-range-max 65535 \ - --direction ingress \ - $id || true - # Allow all UDP - neutron security-group-rule-create --protocol udp \ - --port-range-min 1 \ - --port-range-max 65535 -\ - -direction ingress \ - $id || true -done - -# Create some default images -wget http://uec-images.ubuntu.com/releases/14.04/release/ubuntu-14.04-server-cloudimg-amd64-disk1.img -glance image-create --name 'Ubuntu 14.04 LTS' \ - --container-format bare \ - --disk-format qcow2 \ - --visibility public \ - --progress \ - --file ubuntu-14.04-server-cloudimg-amd64-disk1.img -rm ubuntu-14.04-server-cloudimg-amd64-disk1.img - -wget http://uec-images.ubuntu.com/releases/16.04/release/ubuntu-16.04-server-cloudimg-amd64-disk1.img -glance image-create --name 'Ubuntu 16.04' \ - --container-format bare \ - --disk-format qcow2 \ - --visibility public \ - --progress \ - --file ubuntu-16.04-server-cloudimg-amd64-disk1.img -rm ubuntu-16.04-server-cloudimg-amd64-disk1.img - -wget http://dfw.mirror.rackspace.com/fedora/releases/24/CloudImages/x86_64/images/Fedora-Cloud-Base-24-1.2.x86_64.qcow2 -glance image-create --name 'Fedora 24' \ - --container-format bare \ - --disk-format qcow2 \ - --visibility public \ - --progress \ - --file Fedora-Cloud-Base-24-1.2.x86_64.qcow2 -rm Fedora-Cloud-Base-24-1.2.x86_64.qcow2 - -wget http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2 -glance image-create --name 'CentOS 7' \ - --container-format bare \ - --disk-format qcow2 \ - --visibility public \ - --progress \ - --file CentOS-7-x86_64-GenericCloud.qcow2 -rm CentOS-7-x86_64-GenericCloud.qcow2 - -wget http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.1/images/openSUSE-Leap-42.1-OpenStack.x86_64-0.0.4-Build2.12.qcow2 -glance image-create --name 'OpenSuse Leap 42' \ - --container-format bare \ - --disk-format qcow2 \ - --visibility public \ - --progress \ - --file openSUSE-Leap-42.1-OpenStack.x86_64-0.0.4-Build2.12.qcow2 -rm openSUSE-Leap-42.1-OpenStack.x86_64-0.0.4-Build2.12.qcow2 - -wget http://cdimage.debian.org/cdimage/openstack/current/debian-8.6.0-openstack-amd64.qcow2 -glance image-create --name 'Debian 8.6.0' \ - --container-format bare \ - --disk-format qcow2 \ - --visibility public \ - --progress \ - --file debian-8.6.0-openstack-amd64.qcow2 -rm debian-8.6.0-openstack-amd64.qcow2 - -wget http://cdimage.debian.org/cdimage/openstack/testing/debian-testing-openstack-amd64.qcow2 -glance image-create --name "Debian TESTING $(date +%m-%d-%y)" \ - --container-format bare \ - --disk-format qcow2 \ - --visibility public \ - --progress \ - --file debian-testing-openstack-amd64.qcow2 -rm debian-testing-openstack-amd64.qcow2 - -wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img -glance image-create --name "Cirros-0.3.4" \ - --container-format bare \ - --disk-format qcow2 \ - --visibility public \ - --progress \ - --file cirros-0.3.4-x86_64-disk.img -rm cirros-0.3.4-x86_64-disk.img diff --git a/multi-node-aio-xenial-ansible/roles/apache_install/README.md b/multi-node-aio-xenial-ansible/roles/apache_install/README.md deleted file mode 100644 index acffb058..00000000 --- a/multi-node-aio-xenial-ansible/roles/apache_install/README.md +++ /dev/null @@ -1,23 +0,0 @@ -apache_install -========= - -This module installs Apache2 and configures a site - -Requirements ------------- - -This module requires Ansible 2.0+ - -Role Variables --------------- - -See defaults for variables and descriptions - -Example Playbook ----------------- - -Example to call: - - - hosts: all - roles: - - { role: url: default } diff --git a/multi-node-aio-xenial-ansible/roles/apache_install/defaults/main.yml b/multi-node-aio-xenial-ansible/roles/apache_install/defaults/main.yml deleted file mode 100644 index 1ef303e7..00000000 --- a/multi-node-aio-xenial-ansible/roles/apache_install/defaults/main.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# name: apache_install/defaults -# description: ALL our default variables for apache_install go in here -#------------------------------------------------------------------------------ -# Packages - All our required packages we need installing -#------------------------------------------------------------------------------ - -# - pre-requisites - -packages: # Packages required for apache role to work - - apache2 - -# - variables - -apache_url: blank # Default sub folder -publish_root: blank # What will the default path be for the apache site diff --git a/multi-node-aio-xenial-ansible/roles/apache_install/handlers/main.yml b/multi-node-aio-xenial-ansible/roles/apache_install/handlers/main.yml deleted file mode 100644 index 7c223848..00000000 --- a/multi-node-aio-xenial-ansible/roles/apache_install/handlers/main.yml +++ /dev/null @@ -1,20 +0,0 @@ ---- -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# name: apache_install/handlers -# description: All our handlers for apache_install go in here - -- name: restart_apache2 - service: - name: apache2 - state: restarted diff --git a/multi-node-aio-xenial-ansible/roles/apache_install/meta/main.yml b/multi-node-aio-xenial-ansible/roles/apache_install/meta/main.yml deleted file mode 100644 index 40077de8..00000000 --- a/multi-node-aio-xenial-ansible/roles/apache_install/meta/main.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -galaxy_info: - author: "Stuart Grace - BBC R&D" - license: Apache2 - min_ansible_version: 2.0 - platforms: - - name: Ubuntu - versions: - - xenial -dependencies: [] diff --git a/multi-node-aio-xenial-ansible/roles/apache_install/tasks/configure.yml b/multi-node-aio-xenial-ansible/roles/apache_install/tasks/configure.yml deleted file mode 100644 index 6d887e53..00000000 --- a/multi-node-aio-xenial-ansible/roles/apache_install/tasks/configure.yml +++ /dev/null @@ -1,40 +0,0 @@ ---- -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# module: apache_install/tasks/configure -# description: Configure apache_install - -- name: Create default index to show host info - copy: - content: "System - {{ ansible_fqdn }}" - dest: /var/www/html/index.html - -- name: Create control file for apache site - template: - src: sites-allowed.j2 - dest: "/etc/apache2/sites-available/{{ apache_url }}.conf" - mode: 0644 - notify: restart_apache2 - -- name: Create publish root path - file: - path: "{{ apache_path }}" - state: directory - recurse: yes - -- name: Enable apache site using symlink - file: - path: "/etc/apache2/sites-enabled/{{ apache_url }}.conf" - src: "/etc/apache2/sites-available/{{ apache_url }}.conf" - state: link - notify: restart_apache2 diff --git a/multi-node-aio-xenial-ansible/roles/apache_install/tasks/install.yml b/multi-node-aio-xenial-ansible/roles/apache_install/tasks/install.yml deleted file mode 100644 index b3b46f0a..00000000 --- a/multi-node-aio-xenial-ansible/roles/apache_install/tasks/install.yml +++ /dev/null @@ -1,25 +0,0 @@ ---- -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# module: apache_install/tasks/install -# description: Install our required packages for apache_install - -- name: Install all required packages for apache_install - apt: - pkg: "{{ packages }}" - state: latest - -- name: Make sure Apache2 is enabled - service: - name: apache2 - enabled: yes diff --git a/multi-node-aio-xenial-ansible/roles/apache_install/tasks/main.yml b/multi-node-aio-xenial-ansible/roles/apache_install/tasks/main.yml deleted file mode 100644 index de5dbba4..00000000 --- a/multi-node-aio-xenial-ansible/roles/apache_install/tasks/main.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# module: apache_install/tasks -# description: Install apache onto an Ubuntu 16.xx server - -- include: install.yml -- include: configure.yml diff --git a/multi-node-aio-xenial-ansible/roles/apache_install/templates/sites-allowed.j2 b/multi-node-aio-xenial-ansible/roles/apache_install/templates/sites-allowed.j2 deleted file mode 100644 index 95a91284..00000000 --- a/multi-node-aio-xenial-ansible/roles/apache_install/templates/sites-allowed.j2 +++ /dev/null @@ -1,7 +0,0 @@ -### MANAGED BY {{ role_path|basename }} ANSIBLE ROLE ### - -Alias /{{apache_url}} {{apache_path}} - - Require all granted - Options +Indexes - diff --git a/multi-node-aio-xenial-ansible/roles/atftpd_install/README.md b/multi-node-aio-xenial-ansible/roles/atftpd_install/README.md deleted file mode 100644 index 7160a76d..00000000 --- a/multi-node-aio-xenial-ansible/roles/atftpd_install/README.md +++ /dev/null @@ -1,23 +0,0 @@ -atftpd_install -========= - -This module installs atftpd and allows you to set the path of where it reads tftp from - -Requirements ------------- - -This module requires Ansible 2.0 - -Role Variables --------------- - -See defaults for variables and descriptions - -Example Playbook ----------------- - -Example to call: - - - hosts: all - roles: - - { role: atftpd_install, atftpd_path: /tftpboot } diff --git a/multi-node-aio-xenial-ansible/roles/atftpd_install/defaults/main.yml b/multi-node-aio-xenial-ansible/roles/atftpd_install/defaults/main.yml deleted file mode 100644 index 38f97185..00000000 --- a/multi-node-aio-xenial-ansible/roles/atftpd_install/defaults/main.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# name: atftpd_install/defaults -# description: ALL our default variables for atftpd_install go in here -#------------------------------------------------------------------------------ -# Packages - All our required packages we need installing -#------------------------------------------------------------------------------ - -packages: - - atftpd - -# - variables -atftpd_path: /srv/tftp # Where is our defined atftp path -atftp_user: nobody # What user does ATFTPd run as -atftp_group: nogroup # What group does ATFTPd run as diff --git a/multi-node-aio-xenial-ansible/roles/atftpd_install/handlers/main.yml b/multi-node-aio-xenial-ansible/roles/atftpd_install/handlers/main.yml deleted file mode 100644 index b236c07d..00000000 --- a/multi-node-aio-xenial-ansible/roles/atftpd_install/handlers/main.yml +++ /dev/null @@ -1,20 +0,0 @@ ---- -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# name: atftpd_install/handlers -# description: All our handlers for atftpd_install go in here - -- name: atftpd_restart - service: - name: atftpd - state: restarted diff --git a/multi-node-aio-xenial-ansible/roles/atftpd_install/meta/main.yml b/multi-node-aio-xenial-ansible/roles/atftpd_install/meta/main.yml deleted file mode 100644 index fe3e481e..00000000 --- a/multi-node-aio-xenial-ansible/roles/atftpd_install/meta/main.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -galaxy_info: - author: "Rick Box - BBC R&D" - license: Apache2 - min_ansible_version: 2.0 - platforms: - - name: Ubuntu - versions: - - xenial -dependencies: [] diff --git a/multi-node-aio-xenial-ansible/roles/atftpd_install/tasks/configure.yml b/multi-node-aio-xenial-ansible/roles/atftpd_install/tasks/configure.yml deleted file mode 100644 index 2c67a4fb..00000000 --- a/multi-node-aio-xenial-ansible/roles/atftpd_install/tasks/configure.yml +++ /dev/null @@ -1,39 +0,0 @@ ---- -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# module: atftpd_install/tasks/configure -# description: Configure atftpd_install - -- name: Create group for application to run under - group: - name: "{{ atftp_group }}" - state: present - -- name: Create user for application to run under - user: - name: "{{ atftp_user }}" - group: "{{ atftp_group }}" - state: present - -- name: Atftp create directory and set permissions - file: - path: "{{ atftpd_path }}" - state: directory - owner: "{{ atftp_user }}" - group: "{{ atftp_group }}" - -- name: Atftpd set /etc/init.d/atftpd to not use xinetd and set our tftp path - template: - src: atftpd.j2 - dest: /etc/default/atftpd - notify: atftpd_restart diff --git a/multi-node-aio-xenial-ansible/roles/atftpd_install/tasks/install.yml b/multi-node-aio-xenial-ansible/roles/atftpd_install/tasks/install.yml deleted file mode 100644 index 14c4bf46..00000000 --- a/multi-node-aio-xenial-ansible/roles/atftpd_install/tasks/install.yml +++ /dev/null @@ -1,25 +0,0 @@ ---- -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# module: atftpd_install/tasks/install -# description: Install our required packages for atftpd_install - -- name: Install all required packages for atftpd_install - apt: - pkg: atftpd - state: latest - -- name: Enable Atftpd on boot - service: - name: atftpd - enabled: yes diff --git a/multi-node-aio-xenial-ansible/roles/atftpd_install/tasks/main.yml b/multi-node-aio-xenial-ansible/roles/atftpd_install/tasks/main.yml deleted file mode 100644 index c2b8e5a4..00000000 --- a/multi-node-aio-xenial-ansible/roles/atftpd_install/tasks/main.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# module: atftpd_install/tasks -# description: Install atftpd_install onto an Ubuntu 16.xx server - -- include: install.yml -- include: configure.yml diff --git a/multi-node-aio-xenial-ansible/roles/atftpd_install/templates/atftpd.j2 b/multi-node-aio-xenial-ansible/roles/atftpd_install/templates/atftpd.j2 deleted file mode 100644 index b88263ef..00000000 --- a/multi-node-aio-xenial-ansible/roles/atftpd_install/templates/atftpd.j2 +++ /dev/null @@ -1,3 +0,0 @@ -### MANAGED BY {{ role_path|basename }} ANSIBLE ROLE ### -USE_INETD=false -OPTIONS="--user {{ atftp_user }}.{{ atftp_group }} --tftpd-timeout 300 --retry-timeout 5 --mcast-port 1758 --mcast-addr 239.239.239.0-255 --mcast-ttl 1 --maxthread 100 --verbose=5 {{ atftpd_path }}" diff --git a/multi-node-aio-xenial-ansible/roles/dhcpd_install/README.md b/multi-node-aio-xenial-ansible/roles/dhcpd_install/README.md deleted file mode 100644 index fed557ee..00000000 --- a/multi-node-aio-xenial-ansible/roles/dhcpd_install/README.md +++ /dev/null @@ -1,23 +0,0 @@ -dhcpd_install -========= - -This module installs dhcpd - -Requirements ------------- - -This module requires Ansible 2.x - -Role Variables --------------- - -See defaults for variables and descriptions - -Example Playbook ----------------- - -Example to call: - - - hosts: all - roles: - - { role: dhcpd_install } diff --git a/multi-node-aio-xenial-ansible/roles/dhcpd_install/defaults/main.yml b/multi-node-aio-xenial-ansible/roles/dhcpd_install/defaults/main.yml deleted file mode 100644 index 15deba58..00000000 --- a/multi-node-aio-xenial-ansible/roles/dhcpd_install/defaults/main.yml +++ /dev/null @@ -1,45 +0,0 @@ ---- -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# name: dhcpd_install/defaults -# description: ALL our default variables for dhcpd_install go in here -#------------------------------------------------------------------------------ -# Packages - All our required packages we need installing -#------------------------------------------------------------------------------ - -# - pre-requisites - -packages: # Packages required for dhcpd - - isc-dhcp-server - -# - general variables - -dhcp_default_lease_time: 21600 # Default lease time -dhcp_max_lease_time: 43200 # Max lease time -tftp_server: 10.0.2.100 # The server hosting the TFTP server -tftp_boot_path: /pxelinux.0 # Path of where to boot from first - -# - List of DHCP Subnets - These are iterated though and each will be created -dhcp_list: - - netmask: 255.255.255.0 # Netmask - gateway: 10.0.2.1 # Gateway - dns: 8.8.8.8 # DNS - subnet: 10.0.2.0 # Subnet mask - default_lease_time: 21600 # Subnet Default lease time - The default is used if this is not defined - max_lease_time: 43200 # Subnet Max lease time - The default is used if this is not defined - tftp_boot_path: /pxelinux.0 # Path for tftp of where to boot from first - The default is used if this is not defined - tftp_server: 10.0.2.100 # The server hosting the TFTP server - The default is used if this is not defined - -# - List of static DHCP hosts - These are iterated though and each will be created -server_list: - - name: host # Server hostname - hwaddr: "aa:aa:aa:aa:aa:aa" # Server MAC - ip: "10.0.2.2" # Server IP diff --git a/multi-node-aio-xenial-ansible/roles/dhcpd_install/handlers/main.yml b/multi-node-aio-xenial-ansible/roles/dhcpd_install/handlers/main.yml deleted file mode 100644 index 12c0b2a5..00000000 --- a/multi-node-aio-xenial-ansible/roles/dhcpd_install/handlers/main.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# name: dhcpd_install/handlers -# description: All our handlers for dhcpd_install go in here - -- name: restart dhcpd - service: - name: "{{ item }}" - state: restarted - with_items: "{{ packages }}" diff --git a/multi-node-aio-xenial-ansible/roles/dhcpd_install/meta/main.yml b/multi-node-aio-xenial-ansible/roles/dhcpd_install/meta/main.yml deleted file mode 100644 index fe3e481e..00000000 --- a/multi-node-aio-xenial-ansible/roles/dhcpd_install/meta/main.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -galaxy_info: - author: "Rick Box - BBC R&D" - license: Apache2 - min_ansible_version: 2.0 - platforms: - - name: Ubuntu - versions: - - xenial -dependencies: [] diff --git a/multi-node-aio-xenial-ansible/roles/dhcpd_install/tasks/configure.yml b/multi-node-aio-xenial-ansible/roles/dhcpd_install/tasks/configure.yml deleted file mode 100644 index 6ce8873e..00000000 --- a/multi-node-aio-xenial-ansible/roles/dhcpd_install/tasks/configure.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# module: dhcpd_install/tasks/configure -# description: Configure dhcpd_install - -- name: Create a template in /etc/dhcp/dhcpd.conf - template: - src: dhcpd.conf.j2 - dest: /etc/dhcp/dhcpd.conf - mode: 0644 - owner: root - group: root - notify: restart dhcpd diff --git a/multi-node-aio-xenial-ansible/roles/dhcpd_install/tasks/install.yml b/multi-node-aio-xenial-ansible/roles/dhcpd_install/tasks/install.yml deleted file mode 100644 index 463ef474..00000000 --- a/multi-node-aio-xenial-ansible/roles/dhcpd_install/tasks/install.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# module: dhcpd_install/tasks/install -# description: Install our required packages for dhcpd_install - -- name: Install all required packages for dhcpd_install - apt: - pkg: "{{ packages }}" - state: latest - -- name: Make sure -{{ packages }}- are enabled - service: - name: "{{ item }}" - enabled: yes - with_items: "{{ packages }}" diff --git a/multi-node-aio-xenial-ansible/roles/dhcpd_install/tasks/main.yml b/multi-node-aio-xenial-ansible/roles/dhcpd_install/tasks/main.yml deleted file mode 100644 index 0bd2f9c7..00000000 --- a/multi-node-aio-xenial-ansible/roles/dhcpd_install/tasks/main.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# module: dhcpd_install/tasks -# description: Install dhcpd_install onto an Ubuntu 16.xx server - -- include: install.yml -- include: configure.yml diff --git a/multi-node-aio-xenial-ansible/roles/proxy_install/README.md b/multi-node-aio-xenial-ansible/roles/proxy_install/README.md deleted file mode 100644 index 1a1530f9..00000000 --- a/multi-node-aio-xenial-ansible/roles/proxy_install/README.md +++ /dev/null @@ -1,28 +0,0 @@ -proxy_install -========= - -This module sets up a web and apt proxy on Ubuntu 16 - -Requirements ------------- - -This module requires Ansible 2.x - -Role Variables --------------- - -See defaults for variables and descriptions - -Dependencies ------------- - -This role has no dependencies - -Example Playbook ----------------- - -Example to call: - - - hosts: all - roles: - - { role: proxy_install } diff --git a/multi-node-aio-xenial-ansible/roles/proxy_install/defaults/main.yml b/multi-node-aio-xenial-ansible/roles/proxy_install/defaults/main.yml deleted file mode 100644 index 7ee19479..00000000 --- a/multi-node-aio-xenial-ansible/roles/proxy_install/defaults/main.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# name: proxy_install/defaults -# description: ALL our default variables for proxy_install go in here -#------------------------------------------------------------------------------ -# Packages - All our required packages we need installing -#------------------------------------------------------------------------------ - -# - Proxy URL - -proxy: http://proxy.example.com:8080 # Example proxy URL -environment_path: /etc/environment # Default path for environment -apt_proxy_path: /etc/apt/apt.conf.d/80proxy # Default path for apt proxy diff --git a/multi-node-aio-xenial-ansible/roles/proxy_install/meta/main.yml b/multi-node-aio-xenial-ansible/roles/proxy_install/meta/main.yml deleted file mode 100644 index fe3e481e..00000000 --- a/multi-node-aio-xenial-ansible/roles/proxy_install/meta/main.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -galaxy_info: - author: "Rick Box - BBC R&D" - license: Apache2 - min_ansible_version: 2.0 - platforms: - - name: Ubuntu - versions: - - xenial -dependencies: [] diff --git a/multi-node-aio-xenial-ansible/roles/proxy_install/tasks/configure.yml b/multi-node-aio-xenial-ansible/roles/proxy_install/tasks/configure.yml deleted file mode 100644 index 7bb45ff7..00000000 --- a/multi-node-aio-xenial-ansible/roles/proxy_install/tasks/configure.yml +++ /dev/null @@ -1,37 +0,0 @@ ---- -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# module: proxy_install/tasks/configure -# description: Configure proxy_install - -- name: Setup http proxy for APT - template: - src: 80proxy.j2 - dest: "{{ apt_proxy_path }}" - mode: 0644 - owner: root - group: root - -- name: Setup http proxy environment variables - lineinfile: - dest: "{{ environment_path }}" - line: "{{ item.line }}" - regexp: "{{ item.regexp }}" - with_items: - - { line: "http_proxy={{ proxy }}", regexp: "^http_proxy=" } - - { line: "https_proxy={{ proxy }}", regexp: "^https_proxy=" } - - { line: "RSYNC_PROXY={{ proxy }}", regexp: "^RSYNC_PROXY=" } - -- name: Change current environment variables, change disabled since it runs each time - shell: "export http_proxy={{ proxy }}; export https_proxy={{ proxy }}; export RSYNC_PROXY={{ proxy }}" - changed_when: false diff --git a/multi-node-aio-xenial-ansible/roles/proxy_install/tasks/main.yml b/multi-node-aio-xenial-ansible/roles/proxy_install/tasks/main.yml deleted file mode 100644 index b75c3f89..00000000 --- a/multi-node-aio-xenial-ansible/roles/proxy_install/tasks/main.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# module: proxy_install/tasks -# description: Install proxy_install onto an Ubuntu 16.xx server - -- include: configure.yml diff --git a/multi-node-aio-xenial-ansible/roles/proxy_install/templates/80proxy.j2 b/multi-node-aio-xenial-ansible/roles/proxy_install/templates/80proxy.j2 deleted file mode 100644 index af4314c4..00000000 --- a/multi-node-aio-xenial-ansible/roles/proxy_install/templates/80proxy.j2 +++ /dev/null @@ -1,2 +0,0 @@ -### MANAGED BY {{ role_path|basename }} ANSIBLE ROLE ### -Acquire::http::Proxy "{{ proxy }}"; diff --git a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/README.md b/multi-node-aio-xenial-ansible/roles/tftpboot_configure/README.md deleted file mode 100644 index 493e27ac..00000000 --- a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/README.md +++ /dev/null @@ -1,28 +0,0 @@ -tftpboot_configure -========= - -This module configures custom tftp allowing for netboot of an Ubuntu system. It dynamically creates a TFTBoot based on the MAC addresses passed in. It also generates a preseed and late command which are used to install the system - -Requirements ------------- - -This module requires Ansible 2.x - -Role Variables --------------- - -See defaults for variables and descriptions - -Dependencies ------------- - -This role depends on a DHCPD and ATFTP roles - -Example Playbook ----------------- - -Example to call: - - - hosts: all - roles: - - { role: tftpboot_configure } diff --git a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/defaults/main.yml b/multi-node-aio-xenial-ansible/roles/tftpboot_configure/defaults/main.yml deleted file mode 100644 index cdbde4b2..00000000 --- a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/defaults/main.yml +++ /dev/null @@ -1,49 +0,0 @@ ---- -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# name: tftpboot_configure/defaults -# description: ALL our default variables for tftpboot_configure go in here -#------------------------------------------------------------------------------ -# Packages - All our required packages we need installing -#------------------------------------------------------------------------------ - -# - variables - -tftp_mirror: archive.ubuntu.com # Where will we pull our linux boot environment from -tftp_proxy: blank # What proxy will we use, if any. -tftp_distro: [ xenial ] # What distribution will we pull -tftp_files: [ initrd.gz, linux ] - -ntp_server: pool.ntp.org -atftpd_path: /srv/tftp # What is the path for our tftpd -tftp_source: /srv/tftp_source/ # What is the path where the source pxe config files are placed per server - -atftp_user: nobody # What user does this environment get set up as -atftp_group: nogroup # What group does this environment get set up as - -preseed_password: hackme # Default password placed into pre-seed file -vm_disk_device: vda # Default disk device used in pre-seed -vm_net_iface: eth0 # Default interface used in pre-seed -ssh_key: blank -distro_url: - -# These below variables rely on apache being set up and is where the preseed is set up - -preseed_apache_url: pxe # What is the url http://server/THISVARHERE -preseed_path: /var/www/html/pxe # What path -webserver_ip_address: "{{ ansible_default_ipv4.address }}" - -server_list: # What is our list of servers - - name: blank - hwaddr: "aa:aa:aa:aa:aa:aa" - distro: xenial - preseed_file: my-preseed-file # Allow a custom preseed on a per server basis diff --git a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/files/memdisk b/multi-node-aio-xenial-ansible/roles/tftpboot_configure/files/memdisk deleted file mode 100755 index a532e907..00000000 Binary files a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/files/memdisk and /dev/null differ diff --git a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/files/menu.c32 b/multi-node-aio-xenial-ansible/roles/tftpboot_configure/files/menu.c32 deleted file mode 100755 index 1af2b909..00000000 Binary files a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/files/menu.c32 and /dev/null differ diff --git a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/files/pxelinux.0 b/multi-node-aio-xenial-ansible/roles/tftpboot_configure/files/pxelinux.0 deleted file mode 100755 index e5995512..00000000 Binary files a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/files/pxelinux.0 and /dev/null differ diff --git a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/meta/main.yml b/multi-node-aio-xenial-ansible/roles/tftpboot_configure/meta/main.yml deleted file mode 100644 index fe3e481e..00000000 --- a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/meta/main.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -galaxy_info: - author: "Rick Box - BBC R&D" - license: Apache2 - min_ansible_version: 2.0 - platforms: - - name: Ubuntu - versions: - - xenial -dependencies: [] diff --git a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/tasks/configure.yml b/multi-node-aio-xenial-ansible/roles/tftpboot_configure/tasks/configure.yml deleted file mode 100644 index 60c0efa7..00000000 --- a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/tasks/configure.yml +++ /dev/null @@ -1,118 +0,0 @@ ---- -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# module: tftpboot_configure/tasks/configure -# description: Configure tftpboot_configure - -- name: Create pxeboot directories - file: - path: "{{ atftpd_path }}/{{ item }}" - state: directory - owner: "{{ atftp_user }}" - group: "{{ atftp_group }}" - with_items: - - images - - pxelinux.cfg - -- name: Create directories for distributions - file: - path: "{{ atftpd_path }}/images/{{ item }}/" - state: directory - owner: "{{ atftp_user }}" - group: "{{ atftp_group }}" - with_items: "{{ tftp_distro }}" - -- name: Create apache directories for preseed, ubuntu image, - file: - path: "{{ apache_path }}/{{ item }}" - state: directory - with_items: "{{ tftp_directories }}" - -- name: Create the preseed files - template: - src: "{{ item.preseed_file }}.j2" - dest: "{{ preseed_path }}/{{ item.preseed_file }}" - with_items: "{{ server_list }}" - -- name: Get ubuntu server image - get_url: - url: "{{ distro_url }}" - dest: "{{ atftpd_path }}/images/{{ distro_name }}" - mode: 0644 - owner: "{{ atftp_user }}" - group: "{{ atftp_group }}" - -- name: mount the ubuntu image - mount: - name: "{{ apache_path }}/ubuntu/" - src: "{{ atftpd_path }}/images/{{ distro_name }}" - fstype: iso9660 - opts: loop - state: mounted - -- name: Pull down boot kernel and initrd - create download directory -{{ tftp_distro }}- - file: - path: "/var/lib/netboot/{{ item }}" - mode: 0644 - state: directory - owner: "{{ atftp_user }}" - group: "{{ atftp_group }}" - with_items: "{{ tftp_distro }}" - -- name: Pull down boot kernel and initrd - download -"{{ tftp_distro }}"- releases -"{{ tftp_files }}"- files and place in /var/lib/netboot/ - get_url: - url: "http://{{ tftp_mirror }}/ubuntu/install/netboot/ubuntu-installer/amd64/{{ item[1] }}" - dest: /var/lib/netboot/{{ item[0] }} - mode: 0644 - owner: "{{ atftp_user }}" - group: "{{ atftp_group }}" - with_nested: - - "{{ tftp_distro }}" - - "{{ tftp_files }}" - -- name: Create hard link to our boot images in the distribution folder - file: - src: "/var/lib/netboot/{{ item[0] }}/{{ item[1] }}" - dest: "{{ atftpd_path }}/images/{{ item[0] }}/{{ item[1] }}" - state: hard - with_nested: - - "{{ tftp_distro }}" - - "{{ tftp_files }}" - -- name: Copy pxe boot files - copy: - src: "{{ item }}" - dest: "{{ atftpd_path }}" - owner: "{{ atftp_user }}" - group: "{{ atftp_group }}" - with_items: - - memdisk - - menu.c32 - - pxelinux.0 - -- name: Create a template for each of our defined servers - template: - src: pxelinux.j2 - dest: "{{ tftp_source }}/01-{{ item.hwaddr | regex_replace(':', '-') }}" - owner: "{{ atftp_user }}" - group: "{{ atftp_group }}" - follow: yes - with_items: "{{ server_list }}" - when: item.distro is defined - -- name: Create our default template for menu - template: - src: default_pxelinux.j2 - dest: "{{ atftpd_path }}/pxelinux.cfg/default" - owner: "{{ atftp_user }}" - group: "{{ atftp_group }}" diff --git a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/tasks/main.yml b/multi-node-aio-xenial-ansible/roles/tftpboot_configure/tasks/main.yml deleted file mode 100644 index 1ac97f9f..00000000 --- a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/tasks/main.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# module: tftpboot_configure/tasks -# description: Install tftpboot_configure onto an Ubuntu 16.xx server - -- include: configure.yml diff --git a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/templates/default_pxelinux.j2 b/multi-node-aio-xenial-ansible/roles/tftpboot_configure/templates/default_pxelinux.j2 deleted file mode 100644 index 48a31426..00000000 --- a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/templates/default_pxelinux.j2 +++ /dev/null @@ -1,19 +0,0 @@ -DEFAULT menu -PROMPT 0 -MENU TITLE PXEBoot -TIMEOUT 3 -TOTALTIMEOUT 6000 -ONTIMEOUT local - -LABEL local - MENU LABEL (local) - MENU DEFAULT - LOCALBOOT -1 - -LABEL xenial - kernel /images/xenial/linux - MENU LABEL xenial - append initrd=/images/xenial/initrd.gz ksdevice=bootif netcfg/choose_interface=auto text auto-install/enable=true priority=critical url=http://{{ webserver_ip_address }}/{{ preseed_apache_url }}/xenial hostname=xenial domain=local.lan suite=xenial - ipappend 2 - -MENU end diff --git a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/templates/pxelinux.j2 b/multi-node-aio-xenial-ansible/roles/tftpboot_configure/templates/pxelinux.j2 deleted file mode 100644 index 8a81b1a2..00000000 --- a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/templates/pxelinux.j2 +++ /dev/null @@ -1,8 +0,0 @@ -default linux -prompt 0 -timeout 1 -label linux - kernel /images/{{ item.distro }}/linux - ipappend 2 - append initrd=/images/{{ item.distro }}/initrd.gz ksdevice=bootif netcfg/choose_interface=auto text auto-install/enable=true priority=critical url=http://{{ webserver_ip_address }}/{{ preseed_apache_url }}/{{ item.preseed_file }} hostname={{ item.name }} domain=local.lan suite={{ item.distro }} biosdevname=0 net.ifnames=0 - diff --git a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/templates/ubuntu-server-16.04-unattended-cinder.seed.j2 b/multi-node-aio-xenial-ansible/roles/tftpboot_configure/templates/ubuntu-server-16.04-unattended-cinder.seed.j2 deleted file mode 100644 index 39aeb83b..00000000 --- a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/templates/ubuntu-server-16.04-unattended-cinder.seed.j2 +++ /dev/null @@ -1,282 +0,0 @@ -# -# Ubuntu Server 16.04 Preseed -# -# Usage: -# -# This Ubuntu Preseed file is a completely unattended install. -# -# References: -# -# https://help.ubuntu.com/16.04/installation-guide/example-preseed.txt -# http://www.claudiokuenzler.com/blog/513/debian-ubuntu-preseed-create-two-volume-groups-same-disk - -############# -# -# Kernel Options -# -############# - -# Use the following option to add additional boot parameters for the -# installed system (if supported by the bootloader installer). -# Note: options passed to the installer will be added automatically. -d-i debian-installer/add-kernel-opts string biosdevname=0 net.ifnames=0 - -############# -# -# Networking -# -############# - -d-i netcfg/choose_interface select {{ vm_net_iface }} -d-i netcfg/dhcp_timeout string 60 -#d-i netcfg/disable_autoconfig boolean true -#d-i netcfg/dhcp_failed note -#d-i netcfg/dhcp_options select Configure network manually - -# Static network configuration. -#d-i netcfg/get_ipaddress string 192.168.0.1 -#d-i netcfg/get_netmask string 255.255.255.0 -#d-i netcfg/get_gateway string 192.168.0.2 -#d-i netcfg/get_nameservers string 8.8.8.8 -#d-i netcfg/confirm_static boolean true - -d-i netcfg/get_hostname string cinder_node -d-i netcfg/get_domain string openstackci.local - -# Disable that annoying WEP key dialog. -d-i netcfg/wireless_wep string - -############# -# -# Pre Install -# -############# - -# Command Line 1: This is necessary otherwise you will be prompted to umount /dev/{{ vm_disk_device }}. See Ubuntu bug #1347726. -d-i preseed/early_command string \ - umount /media || true - -############# -# -# Localization -# -############# - -d-i debian-installer/locale string en -d-i debian-installer/country string US -d-i debian-installer/locale string en_US.UTF-8 -d-i debian-installer/language string en - -############# -# -# Keyboard -# -############# - -# Disable automatic (interactive) keymap detection. -d-i console-setup/ask_detect boolean false -d-i console-setup/layoutcode string us -d-i console-setup/variantcode string -d-i keyboard-configuration/layoutcode string us - -############# -# -# Net Image -# -############# - -# Required at least for 12.10+ -d-i live-installer/net-image string http://{{ tftp_mirror }}/ubuntu/install/filesystem.squashfs - -############# -# -# Mirror -# -############# - -d-i mirror/country string manual -{% if tftp_proxy != 'blank' %} -d-i mirror/http/proxy string {{ tftp_proxy }} -{% endif %} -d-i mirror/http/hostname string {{ tftp_mirror }} -d-i mirror/http/directory string /ubuntu - -############# -# -# Clock and Time Zone -# -############# - -# Controls whether to use NTP to set the clock during the install -d-i clock-setup/ntp boolean true -d-i clock-setup/ntp-server string {{ ntp_server }} - -# You may set this to any valid setting for $TZ; see the contents of -# /usr/share/zoneinfo/ for valid values. -d-i time/zone string US/Central - -# Controls whether or not the hardware clock is set to UTC. -d-i clock-setup/utc boolean true - -############# -# -# Partitioning -# -############# - -# If one of the disks that are going to be automatically partitioned -# contains an old LVM configuration, the user will normally receive a -# warning. This can be preseeded away... -d-i partman-lvm/device_remove_lvm boolean true - -# The same applies to pre-existing software RAID array: -d-i partman-md/device_remove_md boolean true - -# And the same goes for the confirmation to write the lvm partitions. -d-i partman-lvm/confirm boolean true -d-i partman-lvm/confirm_nooverwrite boolean true - -d-i partman-auto/method string lvm -d-i partman-auto/disk string /dev/{{ vm_disk_device }} - -# For LVM partitioning, you can select how much of the volume group to use -# for logical volumes. -d-i partman-auto-lvm/guided_size string max - -# This is used to auto-confirm its OK to use a partition without an FS -d-i partman-basicmethods/method_only boolean false - -d-i partman-auto/choose_recipe select custompartitioning -d-i partman-auto/expert_recipe string \ - custompartitioning :: \ - 512 1 512 ext2 \ - $primary{ } \ - $bootable{ } \ - method{ format } format{ } \ - use_filesystem{ } filesystem{ ext2 } \ - label{ boot } \ - mountpoint{ /boot } \ - . \ - 1024 1 100% ext4 \ - $primary{ } \ - method{ lvm } \ - device{ /dev/{{ vm_disk_device }}2 } \ - vg_name{ lxc } \ - . \ - 8192 1 8192 linux-swap \ - $lvmok{ } in_vg{ lxc } \ - lv_name{ swap00 } \ - method{ swap } format{ } \ - . \ - 51200 1 51200 ext4 \ - $lvmok{ } in_vg{ lxc } \ - lv_name{ root00 } \ - method{ format } format{ } \ - use_filesystem{ } filesystem{ ext4 } \ - label{ root } \ - mountpoint{ / } \ - . \ - 76800 1 76800 ext4 \ - $lvmok{ } in_vg{ lxc } \ - lv_name{ openstack00 } \ - method{ format } format{ } \ - use_filesystem{ } filesystem{ ext4 } \ - label{ openstack00 } \ - mountpoint{ /openstack } \ - . \ - 1024 1 1000000000 ext4 \ - $lvmok{ } in_vg{ lxc } \ - lv_name{ cinder00 } \ - method{ keep } \ - . \ - -# This makes partman automatically partition without confirmation, provided -# that you told it what to do using one of the methods above. -d-i partman-partitioning/confirm_write_new_label boolean true -d-i partman/choose_partition select finish -d-i partman/confirm boolean true -d-i partman/confirm_nooverwrite boolean true - -############# -# -# Packages -# -############# - -# Package selection -tasksel tasksel/first multiselect openssh-server - -# Whether to upgrade packages after debootstrap. -# Allowed values: none, safe-upgrade, full-upgrade -d-i pkgsel/upgrade select none -d-i pkgsel/include string bridge-utils ethtool ifenslave lvm2 openssh-server python2.7 vim vlan python-simplejson -# Policy for applying updates. May be "none" (no automatic updates), -# "unattended-upgrades" (install security updates automatically), or -# "landscape" (manage system with Landscape). -d-i pkgsel/update-policy select none - -# Some versions of the installer can report back on what software you have -# installed, and what software you use. The default is not to report back, -# but sending reports helps the project determine what software is most -# popular and include it on CDs. -popularity-contest popularity-contest/participate boolean false - -############# -# -# Users and Password -# -############# - -# Skip creation of a root account (normal user account will be able to -# use sudo). The default is false; preseed this to true if you want to set -# a root password. -d-i passwd/root-login boolean true - -# Alternatively, to skip creation of a normal user account. -d-i passwd/make-user boolean false - -# The installer will warn about weak passwords. If you are sure you know -# what you're doing and want to override it, uncomment this. -d-i user-setup/allow-password-weak boolean true - -# Root password, either in clear text -d-i passwd/root-password password {{ preseed_password }} -d-i passwd/root-password-again password {{ preseed_password }} - -############# -# -# Bootloader -# -############# - -# This is fairly safe to set, it makes grub install automatically to the MBR -# if no other operating system is detected on the machine. -d-i grub-installer/only_debian boolean true - -############# -# -# Post Install -# -############# - -d-i preseed/late_command string \ - wget --no-proxy http://{{ webserver_ip_address }}/xenial-sources.list -O /target/etc/apt/sources.list; \ - wget --no-proxy http://{{ webserver_ip_address }}/osa-$hostname-bridges.cfg -O /target/etc/network/interfaces.d/osa-$hostname-bridges.cfg; \ - sed -i '/PermitRootLogin / s/ .*/ yes/' /target/etc/ssh/sshd_config; \ - mkdir /target/root/.ssh; \ - chmod 0700 /target/root/.ssh; \ - echo "{{ ssh_key }}" >> /target/root/.ssh/authorized_keys; \ - vgcreate cinder-volumes /dev/mapper/lxc-cinder00; \ - killall.sh || true; \ - netcfg; \ - echo -e '#!/bin/sh\n\nif ! grep -q "^source.*cfg$" /etc/network/interfaces; then echo "source /etc/network/interfaces.d/*.cfg" >> /etc/network/interfaces; fi' > /target/etc/network/if-pre-up.d/multi-nic; \ - chmod +x /target/etc/network/if-pre-up.d/multi-nic - -############# -# -# Finish -# -############# - -# Reboot after the install is finished. -d-i finish-install/reboot_in_progress note diff --git a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/templates/ubuntu-server-16.04-unattended-deploy.seed.j2 b/multi-node-aio-xenial-ansible/roles/tftpboot_configure/templates/ubuntu-server-16.04-unattended-deploy.seed.j2 deleted file mode 100644 index 7af9c049..00000000 --- a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/templates/ubuntu-server-16.04-unattended-deploy.seed.j2 +++ /dev/null @@ -1,276 +0,0 @@ -# -# Ubuntu Server 16.04 Preseed -# -# Usage: -# -# This Ubuntu Preseed file is a completely unattended install. -# -# References: -# -# https://help.ubuntu.com/16.04/installation-guide/example-preseed.txt -# http://www.claudiokuenzler.com/blog/513/debian-ubuntu-preseed-create-two-volume-groups-same-disk - -############# -# -# Kernel Options -# -############# - -# Use the following option to add additional boot parameters for the -# installed system (if supported by the bootloader installer). -# Note: options passed to the installer will be added automatically. -d-i debian-installer/add-kernel-opts string biosdevname=0 net.ifnames=0 - -############# -# -# Networking -# -############# - -d-i netcfg/choose_interface select {{ vm_net_iface }} -d-i netcfg/dhcp_timeout string 60 -#d-i netcfg/disable_autoconfig boolean true -#d-i netcfg/dhcp_failed note -#d-i netcfg/dhcp_options select Configure network manually - -# Static network configuration. -#d-i netcfg/get_ipaddress string 192.168.0.1 -#d-i netcfg/get_netmask string 255.255.255.0 -#d-i netcfg/get_gateway string 192.168.0.2 -#d-i netcfg/get_nameservers string 8.8.8.8 -#d-i netcfg/confirm_static boolean true - -d-i netcfg/get_hostname string deploy_node -d-i netcfg/get_domain string openstackci.local - -# Disable that annoying WEP key dialog. -d-i netcfg/wireless_wep string - -############# -# -# Pre Install -# -############# - -# Command Line 1: This is necessary otherwise you will be prompted to umount /dev/{{ vm_disk_device }}. See Ubuntu bug #1347726. -d-i preseed/early_command string \ - umount /media || true - -############# -# -# Localization -# -############# - -d-i debian-installer/locale string en -d-i debian-installer/country string US -d-i debian-installer/locale string en_US.UTF-8 -d-i debian-installer/language string en - -############# -# -# Keyboard -# -############# - -# Disable automatic (interactive) keymap detection. -d-i console-setup/ask_detect boolean false -d-i console-setup/layoutcode string us -d-i console-setup/variantcode string -d-i keyboard-configuration/layoutcode string us - -############# -# -# Net Image -# -############# - -# Required at least for 12.10+ -d-i live-installer/net-image string http://{{ tftp_mirror }}/ubuntu/install/filesystem.squashfs - -############# -# -# Mirror -# -############# - -d-i mirror/country string manual -{% if tftp_proxy != 'blank' %} -d-i mirror/http/proxy string {{ tftp_proxy }} -{% endif %} -d-i mirror/http/hostname string {{ tftp_mirror }} -d-i mirror/http/directory string /ubuntu - -############# -# -# Clock and Time Zone -# -############# - -# Controls whether to use NTP to set the clock during the install -d-i clock-setup/ntp boolean true -d-i clock-setup/ntp-server string {{ ntp_server }} - -# You may set this to any valid setting for $TZ; see the contents of -# /usr/share/zoneinfo/ for valid values. -d-i time/zone string US/Central - -# Controls whether or not the hardware clock is set to UTC. -d-i clock-setup/utc boolean true - -############# -# -# Partitioning -# -############# - -# If one of the disks that are going to be automatically partitioned -# contains an old LVM configuration, the user will normally receive a -# warning. This can be preseeded away... -d-i partman-lvm/device_remove_lvm boolean true - -# The same applies to pre-existing software RAID array: -d-i partman-md/device_remove_md boolean true - -# And the same goes for the confirmation to write the lvm partitions. -d-i partman-lvm/confirm boolean true -d-i partman-lvm/confirm_nooverwrite boolean true - -d-i partman-auto/method string lvm -d-i partman-auto/disk string /dev/{{ vm_disk_device }} - -# For LVM partitioning, you can select how much of the volume group to use -# for logical volumes. -d-i partman-auto-lvm/guided_size string max - -# This is used to auto-confirm its OK to use a partition without an FS -d-i partman-basicmethods/method_only boolean false - -d-i partman-auto/choose_recipe select custompartitioning -d-i partman-auto/expert_recipe string \ - custompartitioning :: \ - 512 1 512 ext2 \ - $primary{ } \ - $bootable{ } \ - method{ format } format{ } \ - use_filesystem{ } filesystem{ ext2 } \ - label{ boot } \ - mountpoint{ /boot } \ - . \ - 1024 1 100% ext4 \ - $primary{ } \ - method{ lvm } \ - device{ /dev/{{ vm_disk_device }}2 } \ - vg_name{ lxc } \ - . \ - 8192 1 8192 linux-swap \ - $lvmok{ } in_vg{ lxc } \ - lv_name{ swap00 } \ - method{ swap } format{ } \ - . \ - 153600 1 153600 ext4 \ - $lvmok{ } in_vg{ lxc } \ - lv_name{ openstack00 } \ - method{ format } format{ } \ - use_filesystem{ } filesystem{ ext4 } \ - label{ openstack00 } \ - mountpoint{ /openstack } \ - . \ - 1024 1 1000000000 ext4 \ - $lvmok{ } in_vg{ lxc } \ - lv_name{ root00 } \ - method{ format } format{ } \ - use_filesystem{ } filesystem{ ext4 } \ - label{ root } \ - mountpoint{ / } \ - . \ - -# This makes partman automatically partition without confirmation, provided -# that you told it what to do using one of the methods above. -d-i partman-partitioning/confirm_write_new_label boolean true -d-i partman/choose_partition select finish -d-i partman/confirm boolean true -d-i partman/confirm_nooverwrite boolean true - -############# -# -# Packages -# -############# - -# Package selection -tasksel tasksel/first multiselect openssh-server - -# Whether to upgrade packages after debootstrap. -# Allowed values: none, safe-upgrade, full-upgrade -d-i pkgsel/upgrade select none -d-i pkgsel/include string bridge-utils ethtool ifenslave lvm2 openssh-server python2.7 vim vlan python-simplejson -# Policy for applying updates. May be "none" (no automatic updates), -# "unattended-upgrades" (install security updates automatically), or -# "landscape" (manage system with Landscape). -d-i pkgsel/update-policy select none - -# Some versions of the installer can report back on what software you have -# installed, and what software you use. The default is not to report back, -# but sending reports helps the project determine what software is most -# popular and include it on CDs. -popularity-contest popularity-contest/participate boolean false - -############# -# -# Users and Password -# -############# - -# Skip creation of a root account (normal user account will be able to -# use sudo). The default is false; preseed this to true if you want to set -# a root password. -d-i passwd/root-login boolean true - -# Alternatively, to skip creation of a normal user account. -d-i passwd/make-user boolean false - -# The installer will warn about weak passwords. If you are sure you know -# what you're doing and want to override it, uncomment this. -d-i user-setup/allow-password-weak boolean true - -# Root password, either in clear text -d-i passwd/root-password password {{ preseed_password }} -d-i passwd/root-password-again password {{ preseed_password }} - -############# -# -# Bootloader -# -############# - -# This is fairly safe to set, it makes grub install automatically to the MBR -# if no other operating system is detected on the machine. -d-i grub-installer/only_debian boolean true - -############# -# -# Post Install -# -############# - -d-i preseed/late_command string \ - wget --no-proxy http://{{ webserver_ip_address }}/xenial-sources.list -O /target/etc/apt/sources.list; \ - wget --no-proxy http://{{ webserver_ip_address }}/osa-$hostname-bridges.cfg -O /target/etc/network/interfaces.d/osa-$hostname-bridges.cfg; \ - sed -i '/PermitRootLogin / s/ .*/ yes/' /target/etc/ssh/sshd_config; \ - mkdir /target/root/.ssh; \ - chmod 0700 /target/root/.ssh; \ - echo "{{ ssh_key }}" >> /target/root/.ssh/authorized_keys; \ - killall.sh || true; \ - netcfg; \ - echo -e '#!/bin/sh\n\nif ! grep -q "^source.*cfg$" /etc/network/interfaces; then echo "source /etc/network/interfaces.d/*.cfg" >> /etc/network/interfaces; fi' > /target/etc/network/if-pre-up.d/multi-nic; \ - chmod +x /target/etc/network/if-pre-up.d/multi-nic - -############# -# -# Finish -# -############# - -# Reboot after the install is finished. -d-i finish-install/reboot_in_progress note diff --git a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/templates/ubuntu-server-16.04-unattended-infra.seed.j2 b/multi-node-aio-xenial-ansible/roles/tftpboot_configure/templates/ubuntu-server-16.04-unattended-infra.seed.j2 deleted file mode 100644 index e3b79a22..00000000 --- a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/templates/ubuntu-server-16.04-unattended-infra.seed.j2 +++ /dev/null @@ -1,276 +0,0 @@ -# -# Ubuntu Server 16.04 Preseed -# -# Usage: -# -# This Ubuntu Preseed file is a completely unattended install. -# -# References: -# -# https://help.ubuntu.com/16.04/installation-guide/example-preseed.txt -# http://www.claudiokuenzler.com/blog/513/debian-ubuntu-preseed-create-two-volume-groups-same-disk - -############# -# -# Kernel Options -# -############# - -# Use the following option to add additional boot parameters for the -# installed system (if supported by the bootloader installer). -# Note: options passed to the installer will be added automatically. -d-i debian-installer/add-kernel-opts string biosdevname=0 net.ifnames=0 - -############# -# -# Networking -# -############# - -d-i netcfg/choose_interface select {{ vm_net_iface }} -d-i netcfg/dhcp_timeout string 60 -#d-i netcfg/disable_autoconfig boolean true -#d-i netcfg/dhcp_failed note -#d-i netcfg/dhcp_options select Configure network manually - -# Static network configuration. -#d-i netcfg/get_ipaddress string 192.168.0.1 -#d-i netcfg/get_netmask string 255.255.255.0 -#d-i netcfg/get_gateway string 192.168.0.2 -#d-i netcfg/get_nameservers string 8.8.8.8 -#d-i netcfg/confirm_static boolean true - -d-i netcfg/get_hostname string infra_node -d-i netcfg/get_domain string openstackci.local - -# Disable that annoying WEP key dialog. -d-i netcfg/wireless_wep string - -############# -# -# Pre Install -# -############# - -# Command Line 1: This is necessary otherwise you will be prompted to umount /dev/{{ vm_disk_device }}. See Ubuntu bug #1347726. -d-i preseed/early_command string \ - umount /media || true - -############# -# -# Localization -# -############# - -d-i debian-installer/locale string en -d-i debian-installer/country string US -d-i debian-installer/locale string en_US.UTF-8 -d-i debian-installer/language string en - -############# -# -# Keyboard -# -############# - -# Disable automatic (interactive) keymap detection. -d-i console-setup/ask_detect boolean false -d-i console-setup/layoutcode string us -d-i console-setup/variantcode string -d-i keyboard-configuration/layoutcode string us - -############# -# -# Net Image -# -############# - -# Required at least for 12.10+ -d-i live-installer/net-image string http://{{ tftp_mirror }}/ubuntu/install/filesystem.squashfs - -############# -# -# Mirror -# -############# - -d-i mirror/country string manual -{% if tftp_proxy != 'blank' %} -d-i mirror/http/proxy string {{ tftp_proxy }} -{% endif %} -d-i mirror/http/hostname string {{ tftp_mirror }} -d-i mirror/http/directory string /ubuntu - -############# -# -# Clock and Time Zone -# -############# - -# Controls whether to use NTP to set the clock during the install -d-i clock-setup/ntp boolean true -d-i clock-setup/ntp-server string {{ ntp_server }} - -# You may set this to any valid setting for $TZ; see the contents of -# /usr/share/zoneinfo/ for valid values. -d-i time/zone string US/Central - -# Controls whether or not the hardware clock is set to UTC. -d-i clock-setup/utc boolean true - -############# -# -# Partitioning -# -############# - -# If one of the disks that are going to be automatically partitioned -# contains an old LVM configuration, the user will normally receive a -# warning. This can be preseeded away... -d-i partman-lvm/device_remove_lvm boolean true - -# The same applies to pre-existing software RAID array: -d-i partman-md/device_remove_md boolean true - -# And the same goes for the confirmation to write the lvm partitions. -d-i partman-lvm/confirm boolean true -d-i partman-lvm/confirm_nooverwrite boolean true - -d-i partman-auto/method string lvm -d-i partman-auto/disk string /dev/{{ vm_disk_device }} - -# For LVM partitioning, you can select how much of the volume group to use -# for logical volumes. -d-i partman-auto-lvm/guided_size string max - -# This is used to auto-confirm its OK to use a partition without an FS -d-i partman-basicmethods/method_only boolean false - -d-i partman-auto/choose_recipe select custompartitioning -d-i partman-auto/expert_recipe string \ - custompartitioning :: \ - 512 1 512 ext2 \ - $primary{ } \ - $bootable{ } \ - method{ format } format{ } \ - use_filesystem{ } filesystem{ ext2 } \ - label{ boot } \ - mountpoint{ /boot } \ - . \ - 1024 1 100% ext4 \ - $primary{ } \ - method{ lvm } \ - device{ /dev/{{ vm_disk_device }}2 } \ - vg_name{ lxc } \ - . \ - 8192 1 8192 linux-swap \ - $lvmok{ } in_vg{ lxc } \ - lv_name{ swap00 } \ - method{ swap } format{ } \ - . \ - 153600 1 153600 ext4 \ - $lvmok{ } in_vg{ lxc } \ - lv_name{ openstack00 } \ - method{ format } format{ } \ - use_filesystem{ } filesystem{ ext4 } \ - label{ openstack00 } \ - mountpoint{ /openstack } \ - . \ - 1024 1 1000000000 ext4 \ - $lvmok{ } in_vg{ lxc } \ - lv_name{ root00 } \ - method{ format } format{ } \ - use_filesystem{ } filesystem{ ext4 } \ - label{ root } \ - mountpoint{ / } \ - . \ - -# This makes partman automatically partition without confirmation, provided -# that you told it what to do using one of the methods above. -d-i partman-partitioning/confirm_write_new_label boolean true -d-i partman/choose_partition select finish -d-i partman/confirm boolean true -d-i partman/confirm_nooverwrite boolean true - -############# -# -# Packages -# -############# - -# Package selection -tasksel tasksel/first multiselect openssh-server - -# Whether to upgrade packages after debootstrap. -# Allowed values: none, safe-upgrade, full-upgrade -d-i pkgsel/upgrade select none -d-i pkgsel/include string bridge-utils ethtool ifenslave lvm2 openssh-server python2.7 vim vlan python-simplejson -# Policy for applying updates. May be "none" (no automatic updates), -# "unattended-upgrades" (install security updates automatically), or -# "landscape" (manage system with Landscape). -d-i pkgsel/update-policy select none - -# Some versions of the installer can report back on what software you have -# installed, and what software you use. The default is not to report back, -# but sending reports helps the project determine what software is most -# popular and include it on CDs. -popularity-contest popularity-contest/participate boolean false - -############# -# -# Users and Password -# -############# - -# Skip creation of a root account (normal user account will be able to -# use sudo). The default is false; preseed this to true if you want to set -# a root password. -d-i passwd/root-login boolean true - -# Alternatively, to skip creation of a normal user account. -d-i passwd/make-user boolean false - -# The installer will warn about weak passwords. If you are sure you know -# what you're doing and want to override it, uncomment this. -d-i user-setup/allow-password-weak boolean true - -# Root password, either in clear text -d-i passwd/root-password password {{ preseed_password }} -d-i passwd/root-password-again password {{ preseed_password }} - -############# -# -# Bootloader -# -############# - -# This is fairly safe to set, it makes grub install automatically to the MBR -# if no other operating system is detected on the machine. -d-i grub-installer/only_debian boolean true - -############# -# -# Post Install -# -############# - -d-i preseed/late_command string \ - wget --no-proxy http://{{ webserver_ip_address }}/xenial-sources.list -O /target/etc/apt/sources.list; \ - wget --no-proxy http://{{ webserver_ip_address }}/osa-$hostname-bridges.cfg -O /target/etc/network/interfaces.d/osa-$hostname-bridges.cfg; \ - sed -i '/PermitRootLogin / s/ .*/ yes/' /target/etc/ssh/sshd_config; \ - mkdir /target/root/.ssh; \ - chmod 0700 /target/root/.ssh; \ - echo "{{ ssh_key }}" >> /target/root/.ssh/authorized_keys; \ - killall.sh || true; \ - netcfg; \ - echo -e '#!/bin/sh\n\nif ! grep -q "^source.*cfg$" /etc/network/interfaces; then echo "source /etc/network/interfaces.d/*.cfg" >> /etc/network/interfaces; fi' > /target/etc/network/if-pre-up.d/multi-nic; \ - chmod +x /target/etc/network/if-pre-up.d/multi-nic - -############# -# -# Finish -# -############# - -# Reboot after the install is finished. -d-i finish-install/reboot_in_progress note diff --git a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/templates/ubuntu-server-16.04-unattended-logging.seed.j2 b/multi-node-aio-xenial-ansible/roles/tftpboot_configure/templates/ubuntu-server-16.04-unattended-logging.seed.j2 deleted file mode 100644 index df85ea43..00000000 --- a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/templates/ubuntu-server-16.04-unattended-logging.seed.j2 +++ /dev/null @@ -1,276 +0,0 @@ -# -# Ubuntu Server 16.04 Preseed -# -# Usage: -# -# This Ubuntu Preseed file is a completely unattended install. -# -# References: -# -# https://help.ubuntu.com/16.04/installation-guide/example-preseed.txt -# http://www.claudiokuenzler.com/blog/513/debian-ubuntu-preseed-create-two-volume-groups-same-disk - -############# -# -# Kernel Options -# -############# - -# Use the following option to add additional boot parameters for the -# installed system (if supported by the bootloader installer). -# Note: options passed to the installer will be added automatically. -d-i debian-installer/add-kernel-opts string biosdevname=0 net.ifnames=0 - -############# -# -# Networking -# -############# - -d-i netcfg/choose_interface select {{ vm_net_iface }} -d-i netcfg/dhcp_timeout string 60 -#d-i netcfg/disable_autoconfig boolean true -#d-i netcfg/dhcp_failed note -#d-i netcfg/dhcp_options select Configure network manually - -# Static network configuration. -#d-i netcfg/get_ipaddress string 192.168.0.1 -#d-i netcfg/get_netmask string 255.255.255.0 -#d-i netcfg/get_gateway string 192.168.0.2 -#d-i netcfg/get_nameservers string 8.8.8.8 -#d-i netcfg/confirm_static boolean true - -d-i netcfg/get_hostname string logging_node -d-i netcfg/get_domain string openstackci.local - -# Disable that annoying WEP key dialog. -d-i netcfg/wireless_wep string - -############# -# -# Pre Install -# -############# - -# Command Line 1: This is necessary otherwise you will be prompted to umount /dev/{{ vm_disk_device }}. See Ubuntu bug #1347726. -d-i preseed/early_command string \ - umount /media || true - -############# -# -# Localization -# -############# - -d-i debian-installer/locale string en -d-i debian-installer/country string US -d-i debian-installer/locale string en_US.UTF-8 -d-i debian-installer/language string en - -############# -# -# Keyboard -# -############# - -# Disable automatic (interactive) keymap detection. -d-i console-setup/ask_detect boolean false -d-i console-setup/layoutcode string us -d-i console-setup/variantcode string -d-i keyboard-configuration/layoutcode string us - -############# -# -# Net Image -# -############# - -# Required at least for 12.10+ -d-i live-installer/net-image string http://{{ tftp_mirror }}/ubuntu/install/filesystem.squashfs - -############# -# -# Mirror -# -############# - -d-i mirror/country string manual -{% if tftp_proxy != 'blank' %} -d-i mirror/http/proxy string {{ tftp_proxy }} -{% endif %} -d-i mirror/http/hostname string {{ tftp_mirror }} -d-i mirror/http/directory string /ubuntu - -############# -# -# Clock and Time Zone -# -############# - -# Controls whether to use NTP to set the clock during the install -d-i clock-setup/ntp boolean true -d-i clock-setup/ntp-server string {{ ntp_server }} - -# You may set this to any valid setting for $TZ; see the contents of -# /usr/share/zoneinfo/ for valid values. -d-i time/zone string US/Central - -# Controls whether or not the hardware clock is set to UTC. -d-i clock-setup/utc boolean true - -############# -# -# Partitioning -# -############# - -# If one of the disks that are going to be automatically partitioned -# contains an old LVM configuration, the user will normally receive a -# warning. This can be preseeded away... -d-i partman-lvm/device_remove_lvm boolean true - -# The same applies to pre-existing software RAID array: -d-i partman-md/device_remove_md boolean true - -# And the same goes for the confirmation to write the lvm partitions. -d-i partman-lvm/confirm boolean true -d-i partman-lvm/confirm_nooverwrite boolean true - -d-i partman-auto/method string lvm -d-i partman-auto/disk string /dev/{{ vm_disk_device }} - -# For LVM partitioning, you can select how much of the volume group to use -# for logical volumes. -d-i partman-auto-lvm/guided_size string max - -# This is used to auto-confirm its OK to use a partition without an FS -d-i partman-basicmethods/method_only boolean false - -d-i partman-auto/choose_recipe select custompartitioning -d-i partman-auto/expert_recipe string \ - custompartitioning :: \ - 512 1 512 ext2 \ - $primary{ } \ - $bootable{ } \ - method{ format } format{ } \ - use_filesystem{ } filesystem{ ext2 } \ - label{ boot } \ - mountpoint{ /boot } \ - . \ - 1024 1 100% ext4 \ - $primary{ } \ - method{ lvm } \ - device{ /dev/{{ vm_disk_device }}2 } \ - vg_name{ lxc } \ - . \ - 8192 1 8192 linux-swap \ - $lvmok{ } in_vg{ lxc } \ - lv_name{ swap00 } \ - method{ swap } format{ } \ - . \ - 51200 1 51200 ext4 \ - $lvmok{ } in_vg{ lxc } \ - lv_name{ root00 } \ - method{ format } format{ } \ - use_filesystem{ } filesystem{ ext4 } \ - label{ root } \ - mountpoint{ / } \ - . \ - 1024 1 1000000000 ext4 \ - $lvmok{ } in_vg{ lxc } \ - lv_name{ openstack00 } \ - method{ format } format{ } \ - use_filesystem{ } filesystem{ ext4 } \ - label{ openstack00 } \ - mountpoint{ /openstack } \ - . \ - -# This makes partman automatically partition without confirmation, provided -# that you told it what to do using one of the methods above. -d-i partman-partitioning/confirm_write_new_label boolean true -d-i partman/choose_partition select finish -d-i partman/confirm boolean true -d-i partman/confirm_nooverwrite boolean true - -############# -# -# Packages -# -############# - -# Package selection -tasksel tasksel/first multiselect openssh-server - -# Whether to upgrade packages after debootstrap. -# Allowed values: none, safe-upgrade, full-upgrade -d-i pkgsel/upgrade select none -d-i pkgsel/include string bridge-utils ethtool ifenslave lvm2 openssh-server python2.7 vim vlan python-simplejson -# Policy for applying updates. May be "none" (no automatic updates), -# "unattended-upgrades" (install security updates automatically), or -# "landscape" (manage system with Landscape). -d-i pkgsel/update-policy select none - -# Some versions of the installer can report back on what software you have -# installed, and what software you use. The default is not to report back, -# but sending reports helps the project determine what software is most -# popular and include it on CDs. -popularity-contest popularity-contest/participate boolean false - -############# -# -# Users and Password -# -############# - -# Skip creation of a root account (normal user account will be able to -# use sudo). The default is false; preseed this to true if you want to set -# a root password. -d-i passwd/root-login boolean true - -# Alternatively, to skip creation of a normal user account. -d-i passwd/make-user boolean false - -# The installer will warn about weak passwords. If you are sure you know -# what you're doing and want to override it, uncomment this. -d-i user-setup/allow-password-weak boolean true - -# Root password, either in clear text -d-i passwd/root-password password {{ preseed_password }} -d-i passwd/root-password-again password {{ preseed_password }} - -############# -# -# Bootloader -# -############# - -# This is fairly safe to set, it makes grub install automatically to the MBR -# if no other operating system is detected on the machine. -d-i grub-installer/only_debian boolean true - -############# -# -# Post Install -# -############# - -d-i preseed/late_command string \ - wget --no-proxy http://{{ webserver_ip_address }}/xenial-sources.list -O /target/etc/apt/sources.list; \ - wget --no-proxy http://{{ webserver_ip_address }}/osa-$hostname-bridges.cfg -O /target/etc/network/interfaces.d/osa-$hostname-bridges.cfg; \ - sed -i '/PermitRootLogin / s/ .*/ yes/' /target/etc/ssh/sshd_config; \ - mkdir /target/root/.ssh; \ - chmod 0700 /target/root/.ssh; \ - echo "{{ ssh_key }}" >> /target/root/.ssh/authorized_keys; \ - killall.sh || true; \ - netcfg; \ - echo -e '#!/bin/sh\n\nif ! grep -q "^source.*cfg$" /etc/network/interfaces; then echo "source /etc/network/interfaces.d/*.cfg" >> /etc/network/interfaces; fi' > /target/etc/network/if-pre-up.d/multi-nic; \ - chmod +x /target/etc/network/if-pre-up.d/multi-nic - -############# -# -# Finish -# -############# - -# Reboot after the install is finished. -d-i finish-install/reboot_in_progress note diff --git a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/templates/ubuntu-server-16.04-unattended-network.seed.j2 b/multi-node-aio-xenial-ansible/roles/tftpboot_configure/templates/ubuntu-server-16.04-unattended-network.seed.j2 deleted file mode 100644 index 31593d1e..00000000 --- a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/templates/ubuntu-server-16.04-unattended-network.seed.j2 +++ /dev/null @@ -1,276 +0,0 @@ -# -# Ubuntu Server 16.04 Preseed -# -# Usage: -# -# This Ubuntu Preseed file is a completely unattended install. -# -# References: -# -# https://help.ubuntu.com/16.04/installation-guide/example-preseed.txt -# http://www.claudiokuenzler.com/blog/513/debian-ubuntu-preseed-create-two-volume-groups-same-disk - -############# -# -# Kernel Options -# -############# - -# Use the following option to add additional boot parameters for the -# installed system (if supported by the bootloader installer). -# Note: options passed to the installer will be added automatically. -d-i debian-installer/add-kernel-opts string biosdevname=0 net.ifnames=0 - -############# -# -# Networking -# -############# - -d-i netcfg/choose_interface select {{ vm_net_iface }} -d-i netcfg/dhcp_timeout string 60 -#d-i netcfg/disable_autoconfig boolean true -#d-i netcfg/dhcp_failed note -#d-i netcfg/dhcp_options select Configure network manually - -# Static network configuration. -#d-i netcfg/get_ipaddress string 192.168.0.1 -#d-i netcfg/get_netmask string 255.255.255.0 -#d-i netcfg/get_gateway string 192.168.0.2 -#d-i netcfg/get_nameservers string 8.8.8.8 -#d-i netcfg/confirm_static boolean true - -d-i netcfg/get_hostname string network_node -d-i netcfg/get_domain string openstackci.local - -# Disable that annoying WEP key dialog. -d-i netcfg/wireless_wep string - -############# -# -# Pre Install -# -############# - -# Command Line 1: This is necessary otherwise you will be prompted to umount /dev/{{ vm_disk_device }}. See Ubuntu bug #1347726. -d-i preseed/early_command string \ - umount /media || true - -############# -# -# Localization -# -############# - -d-i debian-installer/locale string en -d-i debian-installer/country string US -d-i debian-installer/locale string en_US.UTF-8 -d-i debian-installer/language string en - -############# -# -# Keyboard -# -############# - -# Disable automatic (interactive) keymap detection. -d-i console-setup/ask_detect boolean false -d-i console-setup/layoutcode string us -d-i console-setup/variantcode string -d-i keyboard-configuration/layoutcode string us - -############# -# -# Net Image -# -############# - -# Required at least for 12.10+ -d-i live-installer/net-image string http://{{ tftp_mirror }}/ubuntu/install/filesystem.squashfs - -############# -# -# Mirror -# -############# - -d-i mirror/country string manual -{% if tftp_proxy != 'blank' %} -d-i mirror/http/proxy string {{ tftp_proxy }} -{% endif %} -d-i mirror/http/hostname string {{ tftp_mirror }} -d-i mirror/http/directory string /ubuntu - -############# -# -# Clock and Time Zone -# -############# - -# Controls whether to use NTP to set the clock during the install -d-i clock-setup/ntp boolean true -d-i clock-setup/ntp-server string {{ ntp_server }} - -# You may set this to any valid setting for $TZ; see the contents of -# /usr/share/zoneinfo/ for valid values. -d-i time/zone string US/Central - -# Controls whether or not the hardware clock is set to UTC. -d-i clock-setup/utc boolean true - -############# -# -# Partitioning -# -############# - -# If one of the disks that are going to be automatically partitioned -# contains an old LVM configuration, the user will normally receive a -# warning. This can be preseeded away... -d-i partman-lvm/device_remove_lvm boolean true - -# The same applies to pre-existing software RAID array: -d-i partman-md/device_remove_md boolean true - -# And the same goes for the confirmation to write the lvm partitions. -d-i partman-lvm/confirm boolean true -d-i partman-lvm/confirm_nooverwrite boolean true - -d-i partman-auto/method string lvm -d-i partman-auto/disk string /dev/{{ vm_disk_device }} - -# For LVM partitioning, you can select how much of the volume group to use -# for logical volumes. -d-i partman-auto-lvm/guided_size string max - -# This is used to auto-confirm its OK to use a partition without an FS -d-i partman-basicmethods/method_only boolean false - -d-i partman-auto/choose_recipe select custompartitioning -d-i partman-auto/expert_recipe string \ - custompartitioning :: \ - 512 1 512 ext2 \ - $primary{ } \ - $bootable{ } \ - method{ format } format{ } \ - use_filesystem{ } filesystem{ ext2 } \ - label{ boot } \ - mountpoint{ /boot } \ - . \ - 1024 1 100% ext4 \ - $primary{ } \ - method{ lvm } \ - device{ /dev/{{ vm_disk_device }}2 } \ - vg_name{ lxc } \ - . \ - 8192 1 8192 linux-swap \ - $lvmok{ } in_vg{ lxc } \ - lv_name{ swap00 } \ - method{ swap } format{ } \ - . \ - 153600 1 153600 ext4 \ - $lvmok{ } in_vg{ lxc } \ - lv_name{ openstack00 } \ - method{ format } format{ } \ - use_filesystem{ } filesystem{ ext4 } \ - label{ openstack00 } \ - mountpoint{ /openstack } \ - . \ - 1024 1 1000000000 ext4 \ - $lvmok{ } in_vg{ lxc } \ - lv_name{ root00 } \ - method{ format } format{ } \ - use_filesystem{ } filesystem{ ext4 } \ - label{ root } \ - mountpoint{ / } \ - . \ - -# This makes partman automatically partition without confirmation, provided -# that you told it what to do using one of the methods above. -d-i partman-partitioning/confirm_write_new_label boolean true -d-i partman/choose_partition select finish -d-i partman/confirm boolean true -d-i partman/confirm_nooverwrite boolean true - -############# -# -# Packages -# -############# - -# Package selection -tasksel tasksel/first multiselect openssh-server - -# Whether to upgrade packages after debootstrap. -# Allowed values: none, safe-upgrade, full-upgrade -d-i pkgsel/upgrade select none -d-i pkgsel/include string bridge-utils ethtool ifenslave lvm2 openssh-server python2.7 vim vlan python-simplejson -# Policy for applying updates. May be "none" (no automatic updates), -# "unattended-upgrades" (install security updates automatically), or -# "landscape" (manage system with Landscape). -d-i pkgsel/update-policy select none - -# Some versions of the installer can report back on what software you have -# installed, and what software you use. The default is not to report back, -# but sending reports helps the project determine what software is most -# popular and include it on CDs. -popularity-contest popularity-contest/participate boolean false - -############# -# -# Users and Password -# -############# - -# Skip creation of a root account (normal user account will be able to -# use sudo). The default is false; preseed this to true if you want to set -# a root password. -d-i passwd/root-login boolean true - -# Alternatively, to skip creation of a normal user account. -d-i passwd/make-user boolean false - -# The installer will warn about weak passwords. If you are sure you know -# what you're doing and want to override it, uncomment this. -d-i user-setup/allow-password-weak boolean true - -# Root password, either in clear text -d-i passwd/root-password password {{ preseed_password }} -d-i passwd/root-password-again password {{ preseed_password }} - -############# -# -# Bootloader -# -############# - -# This is fairly safe to set, it makes grub install automatically to the MBR -# if no other operating system is detected on the machine. -d-i grub-installer/only_debian boolean true - -############# -# -# Post Install -# -############# - -d-i preseed/late_command string \ - wget --no-proxy http://{{ webserver_ip_address }}/xenial-sources.list -O /target/etc/apt/sources.list; \ - wget --no-proxy http://{{ webserver_ip_address }}/osa-$hostname-bridges.cfg -O /target/etc/network/interfaces.d/osa-$hostname-bridges.cfg; \ - sed -i '/PermitRootLogin / s/ .*/ yes/' /target/etc/ssh/sshd_config; \ - mkdir /target/root/.ssh; \ - chmod 0700 /target/root/.ssh; \ - echo "{{ ssh_key }}" >> /target/root/.ssh/authorized_keys; \ - killall.sh || true; \ - netcfg; \ - echo -e '#!/bin/sh\n\nif ! grep -q "^source.*cfg$" /etc/network/interfaces; then echo "source /etc/network/interfaces.d/*.cfg" >> /etc/network/interfaces; fi' > /target/etc/network/if-pre-up.d/multi-nic; \ - chmod +x /target/etc/network/if-pre-up.d/multi-nic - -############# -# -# Finish -# -############# - -# Reboot after the install is finished. -d-i finish-install/reboot_in_progress note diff --git a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/templates/ubuntu-server-16.04-unattended-swift.seed.j2 b/multi-node-aio-xenial-ansible/roles/tftpboot_configure/templates/ubuntu-server-16.04-unattended-swift.seed.j2 deleted file mode 100644 index 1dabe98f..00000000 --- a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/templates/ubuntu-server-16.04-unattended-swift.seed.j2 +++ /dev/null @@ -1,300 +0,0 @@ -# -# Ubuntu Server 16.04 Preseed -# -# Usage: -# -# This Ubuntu Preseed file is a completely unattended install. -# -# References: -# -# https://help.ubuntu.com/16.04/installation-guide/example-preseed.txt -# http://www.claudiokuenzler.com/blog/513/debian-ubuntu-preseed-create-two-volume-groups-same-disk - -############# -# -# Kernel Options -# -############# - -# Use the following option to add additional boot parameters for the -# installed system (if supported by the bootloader installer). -# Note: options passed to the installer will be added automatically. -d-i debian-installer/add-kernel-opts string biosdevname=0 net.ifnames=0 - -############# -# -# Networking -# -############# - -d-i netcfg/choose_interface select {{ vm_net_iface }} -d-i netcfg/dhcp_timeout string 60 -#d-i netcfg/disable_autoconfig boolean true -#d-i netcfg/dhcp_failed note -#d-i netcfg/dhcp_options select Configure network manually - -# Static network configuration. -#d-i netcfg/get_ipaddress string 192.168.0.1 -#d-i netcfg/get_netmask string 255.255.255.0 -#d-i netcfg/get_gateway string 192.168.0.2 -#d-i netcfg/get_nameservers string 8.8.8.8 -#d-i netcfg/confirm_static boolean true - -d-i netcfg/get_hostname string swift_node -d-i netcfg/get_domain string openstackci.local - -# Disable that annoying WEP key dialog. -d-i netcfg/wireless_wep string - -############# -# -# Pre Install -# -############# - -# Command Line 1: This is necessary otherwise you will be prompted to umount /dev/{{ vm_disk_device }}. See Ubuntu bug #1347726. -d-i preseed/early_command string \ - umount /media || true - -############# -# -# Localization -# -############# - -d-i debian-installer/locale string en -d-i debian-installer/country string US -d-i debian-installer/locale string en_US.UTF-8 -d-i debian-installer/language string en - -############# -# -# Keyboard -# -############# - -# Disable automatic (interactive) keymap detection. -d-i console-setup/ask_detect boolean false -d-i console-setup/layoutcode string us -d-i console-setup/variantcode string -d-i keyboard-configuration/layoutcode string us - -############# -# -# Net Image -# -############# - -# Required at least for 12.10+ -d-i live-installer/net-image string http://{{ tftp_mirror }}/ubuntu/install/filesystem.squashfs - -############# -# -# Mirror -# -############# - -d-i mirror/country string manual -{% if tftp_proxy != 'blank' %} -d-i mirror/http/proxy string {{ tftp_proxy }} -{% endif %} -d-i mirror/http/hostname string {{ tftp_mirror }} -d-i mirror/http/directory string /ubuntu - -############# -# -# Clock and Time Zone -# -############# - -# Controls whether to use NTP to set the clock during the install -d-i clock-setup/ntp boolean true -d-i clock-setup/ntp-server string {{ ntp_server }} - -# You may set this to any valid setting for $TZ; see the contents of -# /usr/share/zoneinfo/ for valid values. -d-i time/zone string US/Central - -# Controls whether or not the hardware clock is set to UTC. -d-i clock-setup/utc boolean true - -############# -# -# Partitioning -# -############# - -# If one of the disks that are going to be automatically partitioned -# contains an old LVM configuration, the user will normally receive a -# warning. This can be preseeded away... -d-i partman-lvm/device_remove_lvm boolean true - -# The same applies to pre-existing software RAID array: -d-i partman-md/device_remove_md boolean true - -# And the same goes for the confirmation to write the lvm partitions. -d-i partman-lvm/confirm boolean true -d-i partman-lvm/confirm_nooverwrite boolean true - -d-i partman-auto/method string lvm -d-i partman-auto/disk string /dev/{{ vm_disk_device }} - -# For LVM partitioning, you can select how much of the volume group to use -# for logical volumes. -d-i partman-auto-lvm/guided_size string max - -# This is used to auto-confirm its OK to use a partition without an FS -d-i partman-basicmethods/method_only boolean false - -d-i partman-auto/choose_recipe select custompartitioning -d-i partman-auto/expert_recipe string \ - custompartitioning :: \ - 512 1 512 ext2 \ - $primary{ } \ - $bootable{ } \ - method{ format } format{ } \ - use_filesystem{ } filesystem{ ext2 } \ - label{ boot } \ - mountpoint{ /boot } \ - . \ - 1024 1 100% ext4 \ - $primary{ } \ - method{ lvm } \ - device{ /dev/{{ vm_disk_device }}2 } \ - vg_name{ lxc } \ - . \ - 8192 1 8192 linux-swap \ - $lvmok{ } in_vg{ lxc } \ - lv_name{ swap00 } \ - method{ swap } format{ } \ - . \ - 51200 1 51200 ext4 \ - $lvmok{ } in_vg{ lxc } \ - lv_name{ root00 } \ - method{ format } format{ } \ - use_filesystem{ } filesystem{ ext4 } \ - label{ root } \ - mountpoint{ / } \ - . \ - 20480 1 20480 xfs \ - $lvmok{ } in_vg{ lxc } \ - lv_name{ swift01 } \ - method{ format } format{ } \ - use_filesystem{ } filesystem{ xfs } \ - label{ openstack00 } \ - mountpoint{ /srv/disk1 } \ - . \ - 20480 1 20480 xfs \ - $lvmok{ } in_vg{ lxc } \ - lv_name{ swift02 } \ - method{ format } format{ } \ - use_filesystem{ } filesystem{ xfs } \ - label{ openstack00 } \ - mountpoint{ /srv/disk2 } \ - . \ - 20480 1 20480 xfs \ - $lvmok{ } in_vg{ lxc } \ - lv_name{ swift03 } \ - method{ format } format{ } \ - use_filesystem{ } filesystem{ xfs } \ - label{ openstack00 } \ - mountpoint{ /srv/disk3 } \ - . \ - 76800 1 76800 ext4 \ - $lvmok{ } in_vg{ lxc } \ - lv_name{ openstack00 } \ - method{ format } format{ } \ - use_filesystem{ } filesystem{ ext4 } \ - label{ openstack00 } \ - mountpoint{ /openstack } \ - . \ - -# This makes partman automatically partition without confirmation, provided -# that you told it what to do using one of the methods above. -d-i partman-partitioning/confirm_write_new_label boolean true -d-i partman/choose_partition select finish -d-i partman/confirm boolean true -d-i partman/confirm_nooverwrite boolean true - -############# -# -# Packages -# -############# - -# Package selection -tasksel tasksel/first multiselect openssh-server - -# Whether to upgrade packages after debootstrap. -# Allowed values: none, safe-upgrade, full-upgrade -d-i pkgsel/upgrade select none -d-i pkgsel/include string bridge-utils ethtool ifenslave lvm2 openssh-server python2.7 vim vlan python-simplejson xfsprogs -# Policy for applying updates. May be "none" (no automatic updates), -# "unattended-upgrades" (install security updates automatically), or -# "landscape" (manage system with Landscape). -d-i pkgsel/update-policy select none - -# Some versions of the installer can report back on what software you have -# installed, and what software you use. The default is not to report back, -# but sending reports helps the project determine what software is most -# popular and include it on CDs. -popularity-contest popularity-contest/participate boolean false - -############# -# -# Users and Password -# -############# - -# Skip creation of a root account (normal user account will be able to -# use sudo). The default is false; preseed this to true if you want to set -# a root password. -d-i passwd/root-login boolean true - -# Alternatively, to skip creation of a normal user account. -d-i passwd/make-user boolean false - -# The installer will warn about weak passwords. If you are sure you know -# what you're doing and want to override it, uncomment this. -d-i user-setup/allow-password-weak boolean true - -# Root password, either in clear text -d-i passwd/root-password password {{ preseed_password }} -d-i passwd/root-password-again password {{ preseed_password }} - -############# -# -# Bootloader -# -############# - -# This is fairly safe to set, it makes grub install automatically to the MBR -# if no other operating system is detected on the machine. -d-i grub-installer/only_debian boolean true - -############# -# -# Post Install -# -############# - -d-i preseed/late_command string \ - wget --no-proxy http://{{ webserver_ip_address }}/xenial-sources.list -O /target/etc/apt/sources.list; \ - wget --no-proxy http://{{ webserver_ip_address }}/osa-$hostname-bridges.cfg -O /target/etc/network/interfaces.d/osa-$hostname-bridges.cfg; \ - sed -i '/PermitRootLogin / s/ .*/ yes/' /target/etc/ssh/sshd_config; \ - mkdir /target/root/.ssh; \ - chmod 0700 /target/root/.ssh; \ - echo "{{ ssh_key }}" >> /target/root/.ssh/authorized_keys; \ - killall.sh || true; \ - netcfg; \ - echo -e '#!/bin/sh\n\nif ! grep -q "^source.*cfg$" /etc/network/interfaces; then echo "source /etc/network/interfaces.d/*.cfg" >> /etc/network/interfaces; fi' > /target/etc/network/if-pre-up.d/multi-nic; \ - chmod +x /target/etc/network/if-pre-up.d/multi-nic - -############# -# -# Finish -# -############# - -# Reboot after the install is finished. -d-i finish-install/reboot_in_progress note diff --git a/multi-node-aio-xenial-ansible/setup-host.sh b/multi-node-aio-xenial-ansible/setup-host.sh deleted file mode 100755 index 8a17a895..00000000 --- a/multi-node-aio-xenial-ansible/setup-host.sh +++ /dev/null @@ -1,136 +0,0 @@ -#!/usr/bin/env bash -set -eu -# Copyright [2016] [Kevin Carter] -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Load all functions -source functions.rc - -# bring in variable definitions if there is a variables.sh file -[[ -f variables.sh ]] && source variables.sh - -# Make the rekick function part of the main general shell -declare -f rekick_vms | tee /root/.functions.rc -declare -f ssh_agent_reset | tee -a /root/.functions.rc -if ! grep -q 'source /root/.functions.rc' /root/.bashrc; then - echo 'source /root/.functions.rc' | tee -a /root/.bashrc -fi - -# Reset the ssh-agent service to remove potential key issues -ssh_agent_reset - -if [ ! -f "/root/.ssh/id_rsa" ];then - ssh-keygen -t rsa -N '' -f /root/.ssh/id_rsa -fi - -# This gets the root users SSH-public-key -SSHKEY=${SSHKEY:-$(cat /root/.ssh/id_rsa.pub)} -if ! grep -q "${SSHKEY}" /root/.ssh/authorized_keys; then - cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys -fi - -# This will prevent showing dialogs during iptables-persistent installation? -echo iptables-persistent iptables-persistent/autosave_v4 boolean true | sudo debconf-set-selections -echo iptables-persistent iptables-persistent/autosave_v6 boolean true | sudo debconf-set-selections - -# Install basic packages known to be needed -apt-get update && apt-get install -y bridge-utils ifenslave libvirt-bin lvm2 openssh-server python2.7 qemu-kvm ansible virtinst virt-manager \ - vlan software-properties-common python-software-properties python-netaddr ntp qemu-utils lxc1 virtualenv \ - iptables-persistent - -if ! grep "^source.*cfg$" /etc/network/interfaces; then - echo 'source /etc/network/interfaces.d/*.cfg' | tee -a /etc/network/interfaces -fi - -# create kvm bridges -cp -v templates/kvm-bonded-bridges.cfg /etc/network/interfaces.d/kvm-bridges.cfg - -# set network address -sed -i "s|__NETWORK_BASE__|${NETWORK_BASE}|g" /etc/network/interfaces.d/kvm-bridges.cfg - -for i in $(awk '/iface/ {print $2}' /etc/network/interfaces.d/kvm-bridges.cfg); do - ifup $i -done - -# Clean up stale NTP processes. This is because of BUG https://bugs.launchpad.net/ubuntu/+source/ntp/+bug/1125726 -pkill lockfile-create || true - -# Set the forward rule -if ! grep -q '^net.ipv4.ip_forward' /etc/sysctl.conf; then - sysctl -w net.ipv4.ip_forward=1 | tee -a /etc/sysctl.conf -fi - -# Add rules from the INPUT chain -iptables_general_rule_add 'INPUT -i br-dhcp -p udp --dport 67 -j ACCEPT' -iptables_general_rule_add 'INPUT -i br-dhcp -p tcp --dport 67 -j ACCEPT' -iptables_general_rule_add 'INPUT -i br-dhcp -p udp --dport 53 -j ACCEPT' -iptables_general_rule_add 'INPUT -i br-dhcp -p tcp --dport 53 -j ACCEPT' - -# Add rules from the FORWARDING chain -iptables_general_rule_add 'FORWARD -i br-dhcp -j ACCEPT' -iptables_general_rule_add 'FORWARD -o br-dhcp -j ACCEPT' - -# Add rules from the nat POSTROUTING chain -iptables_filter_rule_add nat 'POSTROUTING -s 10.0.0.0/24 ! -d 10.0.0.0/24 -j MASQUERADE' - -# To provide internet connectivity to instances -iptables_filter_rule_add nat "POSTROUTING -o $(ip route get 1 | awk '/dev/ {print $5}') -j MASQUERADE" - -# Add rules from the mangle POSTROUTING chain -iptables_filter_rule_add mangle 'POSTROUTING -s 10.0.0.0/24 -o br-dhcp -p udp -m udp --dport 68 -j CHECKSUM --checksum-fill' - -# To ensure ssh checksum are always correct -iptables_filter_rule_add mangle 'POSTROUTING -p tcp -j CHECKSUM --checksum-fill' - -# save the iptables rules -systemctl enable netfilter-persistent -systemctl start netfilter-persistent -invoke-rc.d netfilter-persistent save - -# Enable partitioning of the "${DATA_DISK_DEVICE}" -PARTITION_HOST=${PARTITION_HOST:-false} -if [[ "${PARTITION_HOST}" = true ]]; then - # Set the data disk device, if unset the largest unpartitioned device will be used to for host VMs - DATA_DISK_DEVICE="${DATA_DISK_DEVICE:-$(lsblk -brndo NAME,TYPE,FSTYPE,RO,SIZE | awk '/d[b-z]+ disk +0/{ if ($4>m){m=$4; d=$1}}; END{print d}')}" - parted --script /dev/${DATA_DISK_DEVICE} mklabel gpt - parted --align optimal --script /dev/${DATA_DISK_DEVICE} mkpart kvm ext4 0% 100% - mkfs.ext4 $FORCE_PARTITION /dev/${DATA_DISK_DEVICE}1 - if ! grep -qw "^/dev/${DATA_DISK_DEVICE}1" /etc/fstab; then - echo "/dev/${DATA_DISK_DEVICE}1 /var/lib/libvirt/images/ ext4 defaults 0 0" >> /etc/fstab - fi - mount -a -fi - -# Set the default OVERRIDE_SOURCES var -OVERRIDE_SOURCES=${OVERRIDE_SOURCES:-true} -if ( "${OVERRIDE_SOURCES}" == true ) -then - cat > /etc/apt/sources.list < /etc/apt/apt.conf.d/00-nokey < /etc/libvirt/qemu/networks/${network}.xml - virsh net-define --file /etc/libvirt/qemu/networks/${network}.xml - virsh net-create --file /etc/libvirt/qemu/networks/${network}.xml - virsh net-autostart ${network} - fi -done diff --git a/multi-node-aio-xenial-ansible/templates/kvm-bonded-bridges.cfg b/multi-node-aio-xenial-ansible/templates/kvm-bonded-bridges.cfg deleted file mode 100644 index 0acff947..00000000 --- a/multi-node-aio-xenial-ansible/templates/kvm-bonded-bridges.cfg +++ /dev/null @@ -1,69 +0,0 @@ -# VLAN TAGS -# 1100 - MANAGEMENT_NET -# 1200 - OVERLAY_NET -# 1300 - STORAGE_NET -# 1400 - FLAT_NET - -#### BRIDGES USED FOR VM INTERFACES #### -# MANAGEMENT Network -auto vm-br-eth1 -iface vm-br-eth1 inet static - bridge_stp off - bridge_waitport 0 - bridge_fd 0 - bridge_ports none - address __NETWORK_BASE__.236.200 - netmask 255.255.252.0 - offload-sg off - -# FLAT Network -auto vm-br-eth2 -iface vm-br-eth2 inet static - bridge_stp off - bridge_waitport 0 - bridge_fd 0 - bridge_ports none - address __NETWORK_BASE__.248.1 - netmask 255.255.252.0 - offload-sg off - -# VLAN Network -auto vm-br-eth3 -iface vm-br-eth3 inet manual - bridge_stp off - bridge_waitport 0 - bridge_fd 0 - bridge_ports none - offload-sg off - -# TUNNEL Network -auto vm-br-eth4 -iface vm-br-eth4 inet manual - bridge_stp off - bridge_waitport 0 - bridge_fd 0 - bridge_ports none - offload-sg off - -# STORAGE Network -auto vm-br-eth5 -iface vm-br-eth5 inet manual - bridge_stp off - bridge_waitport 0 - bridge_fd 0 - bridge_ports none - offload-sg off -#### INTERFACES USED FOR VM BRIDGES #### - - -#### SYSTEM INTEGRATION DEVICES #### -auto br-dhcp -iface br-dhcp inet static - bridge_stp off - bridge_waitport 0 - bridge_fd 0 - bridge_ports none - address 10.0.0.200 - netmask 255.255.255.0 - offload-sg off -#### SYSTEM INTEGRATION DEVICES #### diff --git a/multi-node-aio-xenial-ansible/templates/libvirt-network.xml b/multi-node-aio-xenial-ansible/templates/libvirt-network.xml deleted file mode 100644 index 1c10ff99..00000000 --- a/multi-node-aio-xenial-ansible/templates/libvirt-network.xml +++ /dev/null @@ -1,5 +0,0 @@ - - __NETWORK__ - - - \ No newline at end of file diff --git a/multi-node-aio-xenial-ansible/templates/network-interfaces/vm.openstackci.local-bonded-bridges.cfg b/multi-node-aio-xenial-ansible/templates/network-interfaces/vm.openstackci.local-bonded-bridges.cfg deleted file mode 100644 index 48552564..00000000 --- a/multi-node-aio-xenial-ansible/templates/network-interfaces/vm.openstackci.local-bonded-bridges.cfg +++ /dev/null @@ -1,76 +0,0 @@ -## Physical interface, could be bond. This only needs to be set once for the physical device -# MANAGEMENT Network -auto __ETH_TYPE__1 -iface __ETH_TYPE__1 inet manual - -# FLAT Network -auto __ETH_TYPE__2 -iface __ETH_TYPE__2 inet manual - -# VLAN Network -auto __ETH_TYPE__3 -iface __ETH_TYPE__3 inet manual - -# TUNNEL Network -auto __ETH_TYPE__4 -iface __ETH_TYPE__4 inet manual - -# STORAGE Network -auto __ETH_TYPE__5 -iface __ETH_TYPE__5 inet manual - -auto br-mgmt -iface br-mgmt inet static - bridge_stp off - bridge_waitport 10 - bridge_fd 0 - bridge_ports __ETH_TYPE__1 - address __NETWORK_BASE__.236.__COUNT__ - netmask 255.255.252.0 - offload-sg off - -auto br-flat -iface br-flat inet static - bridge_stp off - bridge_waitport 10 - bridge_fd 0 - bridge_ports __ETH_TYPE__2 - address __NETWORK_BASE__.248.__COUNT__ - netmask 255.255.252.0 - offload-sg off - -auto br-vlan -iface br-vlan inet manual - bridge_stp off - bridge_waitport 10 - bridge_fd 0 - bridge_ports __ETH_TYPE__3 - offload-sg off - -auto br-vxlan -iface br-vxlan inet static - bridge_stp off - bridge_waitport 10 - bridge_fd 0 - bridge_ports __ETH_TYPE__4 - address __NETWORK_BASE__.240.__COUNT__ - netmask 255.255.252.0 - offload-sg off - # To ensure ssh checksum is correct - up /sbin/iptables -A POSTROUTING -t mangle -p tcp --dport 22 -j CHECKSUM --checksum-fill - down /sbin/iptables -D POSTROUTING -t mangle -p tcp --dport 22 -j CHECKSUM --checksum-fill - # To provide internet connectivity to instances - up /sbin/iptables -t nat -A POSTROUTING -o __DEFAULT_NETWORK__ -j MASQUERADE - down /sbin/iptables -t nat -D POSTROUTING -o __DEFAULT_NETWORK__ -j MASQUERADE - # Make sure instances can talk to the metadata server - up /sbin/iptables -t mangle -A POSTROUTING -p tcp --sport 80 -j CHECKSUM --checksum-fill - -auto br-storage -iface br-storage inet static - bridge_stp off - bridge_waitport 10 - bridge_fd 0 - bridge_ports __ETH_TYPE__5 - address __NETWORK_BASE__.244.__COUNT__ - netmask 255.255.252.0 - offload-sg off diff --git a/multi-node-aio-xenial-ansible/templates/openstack_user_config.yml b/multi-node-aio-xenial-ansible/templates/openstack_user_config.yml deleted file mode 100644 index 87d76c61..00000000 --- a/multi-node-aio-xenial-ansible/templates/openstack_user_config.yml +++ /dev/null @@ -1,75 +0,0 @@ ---- -cidr_networks: - container: __NETWORK_BASE__.236.0/22 - tunnel: __NETWORK_BASE__.240.0/22 - storage: __NETWORK_BASE__.244.0/22 - -used_ips: - - "__NETWORK_BASE__.236.0,__NETWORK_BASE__.236.200" - - "__NETWORK_BASE__.240.0,__NETWORK_BASE__.240.200" - - "__NETWORK_BASE__.244.0,__NETWORK_BASE__.244.200" - - "__NETWORK_BASE__.248.0,__NETWORK_BASE__.248.200" - -global_overrides: - internal_lb_vip_address: __NETWORK_BASE__.236.150 - # The external IP is quoted simply to ensure that the .aio file can be used as input - # dynamic inventory testing. - external_lb_vip_address: "__HOSTIP__" - tunnel_bridge: "br-vxlan" - management_bridge: "br-mgmt" - provider_networks: - - network: - container_bridge: "br-mgmt" - container_type: "veth" - container_interface: "eth1" - ip_from_q: "container" - type: "raw" - group_binds: - - all_containers - - hosts - is_container_address: true - is_ssh_address: true - - network: - container_bridge: "br-vxlan" - container_type: "veth" - container_interface: "eth10" - ip_from_q: "tunnel" - type: "vxlan" - range: "1:1000" - net_name: "vxlan" - group_binds: - - neutron_linuxbridge_agent - - network: - container_bridge: "br-flat" - container_type: "veth" - container_interface: "eth12" - type: "flat" - net_name: "flat" - group_binds: - - neutron_linuxbridge_agent - - utility_all - - network: - container_bridge: "br-vlan" - container_type: "veth" - container_interface: "eth11" - type: "vlan" - range: "1:1" - net_name: "vlan" - group_binds: - - neutron_linuxbridge_agent - - network: - container_bridge: "br-storage" - container_type: "veth" - container_interface: "eth2" - ip_from_q: "storage" - type: "raw" - group_binds: - - glance_api - - cinder_api - - cinder_volume - - nova_compute - - swift_proxy - -haproxy_hosts: - loadbalancer1: - ip: __NETWORK_BASE__.236.150 diff --git a/multi-node-aio-xenial-ansible/templates/osa-swift.yml b/multi-node-aio-xenial-ansible/templates/osa-swift.yml deleted file mode 100644 index cb522b94..00000000 --- a/multi-node-aio-xenial-ansible/templates/osa-swift.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -global_overrides: - swift: - part_power: 8 - storage_network: 'br-storage' - replication_network: 'br-storage' - drives: - - name: disk1 - - name: disk2 - - name: disk3 - mount_point: /srv - storage_policies: - - policy: - name: default - index: 0 - default: True diff --git a/multi-node-aio-xenial-ansible/templates/vmnode-config/cinder.openstackci.local.xml b/multi-node-aio-xenial-ansible/templates/vmnode-config/cinder.openstackci.local.xml deleted file mode 100644 index dc3cf631..00000000 --- a/multi-node-aio-xenial-ansible/templates/vmnode-config/cinder.openstackci.local.xml +++ /dev/null @@ -1,131 +0,0 @@ - - __NODE__.openstackci.local - 12 - 4 - 2 - - /machine - - - hvm - - - - - - - - - - - - - - destroy - restart - restart - - - - - - - - - - - -
- - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - - - - - - - - -