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 <<EOL -import json -with open('hosts.json') as f: - x = json.loads(f.read()) -for k, v in x.get("$1").items(): - print('%s:%s' % (k, v)) -EOL -} - -function get_all_hosts { -python <<EOL -import json -with open('hosts.json') as f: - x = json.loads(f.read()) -for i in x.values(): - for k, v in i.items(): - print('%s:%s' % (k, v)) -EOL -} - -function get_all_types { -python <<EOL -import json -with open('hosts.json') as f: - x = json.loads(f.read()) -for i in x.keys(): - print(i) -EOL -} - -function wait_ssh { -echo "Waiting for all nodes to become available. This can take around ${1:-10} min" -for node in $(get_all_hosts); do - echo "Waiting for node: ${node%%":"*} on 10.0.0.${node#*":"}" - until ssh -q -o StrictHostKeyChecking=no -o BatchMode=yes -o ConnectTimeout=10 10.0.0.${node#*':'} exit > /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} <<EOF - container_vars: - cinder_backends: - limit_container_types: cinder_volume - lvm: - volume_group: cinder-volumes - volume_driver: cinder.volume.drivers.lvm.LVMVolumeDriver - volume_backend_name: LVM_iSCSI - iscsi_ip_address: "${NETWORK_BASE}.236.${node#*":"}" -EOF -done -} - -function write_osa_swift_proxy_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} <<EOF - container_vars: - swift_proxy_vars: - limit_container_types: swift_proxy - read_affinity: "r1=100" - write_affinity: "r1" - write_affinity_node_count: "1 * replicas" -EOF -done -} - -function write_osa_swift_storage_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} <<EOF - container_vars: - swift_vars: - limit_container_types: swift - zone: 0 - region: 1 -EOF -done -} - -function osa_user_var_add { - if ! grep -q "^$1" /etc/openstack_deploy/user_variables.yml; then - echo "$2" | tee -a /etc/openstack_deploy/user_variables.yml - else - sed -i "s|$1.*|$2|g" /etc/openstack_deploy/user_variables.yml - fi -} - -function ansible_static_inventory { -CONFD_FILE="$1" -echo "## DO NOT WRITE TO THIS FILE, CHANGES WILL BE LOST!" > ${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 <<EOL -import yaml -with open('haproxy_config.yml') as f: - x = yaml.safe_load(f.read()) - haproxy_services = (x.get('haproxy_default_services') - or x.get('haproxy_service_configs')) - for i in haproxy_services: - y = i['service'].get('haproxy_port') - if isinstance(y, int): - print y -EOL -} - diff --git a/multi-node-aio-xenial-ansible/hosts.json b/multi-node-aio-xenial-ansible/hosts.json deleted file mode 100644 index 7d604a10..00000000 --- a/multi-node-aio-xenial-ansible/hosts.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "infra": { - "infra1": "100", - "infra2": "101", - "infra3": "102" - }, - "logging": { - "logging1": "110" - }, - "nova_compute": { - "compute1": "120", - "compute2": "121" - }, - "cinder": { - "cinder1": "130", - "cinder2": "131" - }, - "swift": { - "swift1": "140", - "swift2": "141", - "swift3": "142" - }, - "deploy": { - "deploy1":"150" - } -} diff --git a/multi-node-aio-xenial-ansible/inventory b/multi-node-aio-xenial-ansible/inventory deleted file mode 100644 index df8b5f69..00000000 --- a/multi-node-aio-xenial-ansible/inventory +++ /dev/null @@ -1,2 +0,0 @@ -[all] -localhost ansible_connection=local diff --git a/multi-node-aio-xenial-ansible/no-cobbler-configure-vms.sh b/multi-node-aio-xenial-ansible/no-cobbler-configure-vms.sh deleted file mode 100755 index f73cc7ba..00000000 --- a/multi-node-aio-xenial-ansible/no-cobbler-configure-vms.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/usr/bin/env bash -set -eu -# -# 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 - -# Wait here for all nodes to be booted and ready with SSH -wait_ssh - -# Export all system keys -mkdir -p /tmp/keys -for i in $(apt-key list | awk '/pub/ {print $2}' | awk -F'/' '{print $2}'); do - apt-key export "$i" > "/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}} -<Directory {{ apache_path }}> - Require all granted - Options +Indexes -</Directory> 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 <<EOF - # Faster likely unsigned repo - deb [arch=amd64] http://mirror.rackspace.com/ubuntu xenial main universe - deb [arch=amd64] http://mirror.rackspace.com/ubuntu xenial-updates main universe - deb [arch=amd64] http://mirror.rackspace.com/ubuntu xenial-backports main universe - deb [arch=amd64] http://mirror.rackspace.com/ubuntu xenial-security main universe - # i386 comes from the global known repo. This is slower and so it is only used for i386 packages - deb [arch=i386] http://archive.ubuntu.com/ubuntu xenial main universe - deb [arch=i386] http://archive.ubuntu.com/ubuntu xenial-updates main universe - deb [arch=i386] http://archive.ubuntu.com/ubuntu xenial-backports main universe - deb [arch=i386] http://archive.ubuntu.com/ubuntu xenial-security main universe -EOF -fi - -# Allow apt repos to be UnAuthenticated -cat > /etc/apt/apt.conf.d/00-nokey <<EOF -APT { Get { AllowUnauthenticated "1"; }; }; -EOF diff --git a/multi-node-aio-xenial-ansible/setup-pxeboot.sh b/multi-node-aio-xenial-ansible/setup-pxeboot.sh deleted file mode 100755 index 926d5594..00000000 --- a/multi-node-aio-xenial-ansible/setup-pxeboot.sh +++ /dev/null @@ -1,39 +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 - -# set up ssh key in case setup-infra is not run -SSHKEY=${SSHKEY:-$(cat /root/.ssh/id_rsa.pub)} - -# Use Ansible to install and configure a DHCP server, TFTP server and Apache -# so we can PXEboot all the VMs -ansible-playbook -v -i inventory create_pxeboot_server.yml --extra-vars \ - "vm_disk_device=${DEVICE_NAME} ssh_key=\"${SSHKEY}\" vm_net_iface=${DEFAULT_NETWORK}" -sed -i 's/^INTERFACES.*/INTERFACES="br-dhcp"/g' /etc/default/isc-dhcp-server - -# Ensure the services are (re)started -systemctl enable isc-dhcp-server -systemctl enable atftpd -systemctl start isc-dhcp-server -systemctl start atftpd - -# Create a xenial sources file for the VMs to download -cp -v templates/xenial-sources.list /var/www/html/xenial-sources.list diff --git a/multi-node-aio-xenial-ansible/setup-virsh-net.sh b/multi-node-aio-xenial-ansible/setup-virsh-net.sh deleted file mode 100755 index 2c5287df..00000000 --- a/multi-node-aio-xenial-ansible/setup-virsh-net.sh +++ /dev/null @@ -1,37 +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 - -# Remove the default libvirt networks -if virsh net-list | grep -qw "default"; then - virsh net-autostart default --disable - virsh net-destroy default -fi - -# Create the libvirt networks used for the Host VMs -for network in br-dhcp vm-br-eth1 vm-br-eth2 vm-br-eth3 vm-br-eth4 vm-br-eth5; do - if ! virsh net-list | grep -qw "${network}"; then - sed "s/__NETWORK__/${network}/g" templates/libvirt-network.xml > /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> - <name>__NETWORK__</name> - <forward mode="bridge"/> - <bridge name="__NETWORK__"/> -</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 @@ -<domain type='kvm'> - <name>__NODE__.openstackci.local</name> - <memory unit='GiB'>12</memory> - <currentMemory unit='GiB'>4</currentMemory> - <vcpu placement='static'>2</vcpu> - <resource> - <partition>/machine</partition> - </resource> - <os> - <type arch='x86_64' machine='pc-i440fx-__CONTAINER_VMS__'>hvm</type> - </os> - <features> - <acpi/> - <apic/> - </features> - <cpu mode='host-model'> - <model fallback='allow'/> - </cpu> - <clock offset='utc'> - <timer name='rtc' tickpolicy='catchup'/> - <timer name='pit' tickpolicy='delay'/> - <timer name='hpet' present='no'/> - </clock> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>restart</on_crash> - <pm> - <suspend-to-mem enabled='no'/> - <suspend-to-disk enabled='no'/> - </pm> - <devices> - <disk type='file' device='disk'> - <driver name='qemu' type='qcow2' cache='none' io='native'/> - <source file='/var/lib/libvirt/images/__NODE__.openstackci.local.img'/> - <target dev='__DEVICE_NAME__' bus='virtio'/> - <boot order='1'/> - <alias name='virtio-disk0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> - </disk> - <controller type='pci' index='0' model='pci-root'> - <alias name='pci.0'/> - </controller> - <controller type='virtio-serial' index='0'> - <alias name='virtio-serial0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> - </controller> - <interface type='bridge'> - <mac address="52:54:00:bd:81:__COUNT__"/> - <source bridge='br-dhcp'/> - <target dev='vnet0'/> - <model type='virtio'/> - <boot order='2'/> - <alias name='net0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:fd:7f:__COUNT__"/> - <source bridge='vm-br-eth1'/> - <target dev='vnet1'/> - <model type='virtio'/> - <boot order='3'/> - <alias name='net1'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:f5:44:__COUNT__"/> - <source bridge='vm-br-eth2'/> - <target dev='vnet2'/> - <model type='virtio'/> - <boot order='4'/> - <alias name='net2'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:1f:96:__COUNT__"/> - <source bridge='vm-br-eth3'/> - <target dev='vnet3'/> - <model type='virtio'/> - <boot order='5'/> - <alias name='net3'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:50:03:__COUNT__"/> - <source bridge='vm-br-eth4'/> - <target dev='vnet4'/> - <model type='virtio'/> - <boot order='6'/> - <alias name='net4'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:2d:12:__COUNT__"/> - <source bridge='vm-br-eth5'/> - <target dev='vnet5'/> - <model type='virtio'/> - <boot order='7'/> - <alias name='net5'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x0'/> - </interface> - <serial type='pty'> - <source path='/dev/pts/4'/> - <target port='0'/> - <alias name='serial0'/> - </serial> - <console type='pty' tty='/dev/pts/4'> - <source path='/dev/pts/4'/> - <target type='serial' port='0'/> - <alias name='serial0'/> - </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'> - <listen type='address' address='127.0.0.1'/> - </graphics> - <video> - <model type='vmvga' vram='9216' heads='1'/> - <alias name='video0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </video> - <memballoon model='virtio'> - <alias name='balloon0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> - </memballoon> - <rng model='virtio'> - <backend model='random'>/dev/random</backend> - <alias name='rng0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/> - </rng> - </devices> -</domain> diff --git a/multi-node-aio-xenial-ansible/templates/vmnode-config/deploy.openstackci.local.xml b/multi-node-aio-xenial-ansible/templates/vmnode-config/deploy.openstackci.local.xml deleted file mode 100644 index 4a1ef1b7..00000000 --- a/multi-node-aio-xenial-ansible/templates/vmnode-config/deploy.openstackci.local.xml +++ /dev/null @@ -1,131 +0,0 @@ -<domain type='kvm'> - <name>__NODE__.openstackci.local</name> - <memory unit='GiB'>4</memory> - <currentMemory unit='GiB'>4</currentMemory> - <vcpu placement='static'>4</vcpu> - <resource> - <partition>/machine</partition> - </resource> - <os> - <type arch='x86_64' machine='pc-i440fx-trusty'>hvm</type> - </os> - <features> - <acpi/> - <apic/> - </features> - <cpu mode='host-model'> - <model fallback='allow'/> - </cpu> - <clock offset='utc'> - <timer name='rtc' tickpolicy='catchup'/> - <timer name='pit' tickpolicy='delay'/> - <timer name='hpet' present='no'/> - </clock> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>restart</on_crash> - <pm> - <suspend-to-mem enabled='no'/> - <suspend-to-disk enabled='no'/> - </pm> - <devices> - <disk type='file' device='disk'> - <driver name='qemu' type='qcow2' cache='none' io='native'/> - <source file='/var/lib/libvirt/images/__NODE__.openstackci.local.img'/> - <target dev='__DEVICE_NAME__' bus='virtio'/> - <boot order='1'/> - <alias name='virtio-disk0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> - </disk> - <controller type='pci' index='0' model='pci-root'> - <alias name='pci.0'/> - </controller> - <controller type='virtio-serial' index='0'> - <alias name='virtio-serial0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> - </controller> - <interface type='bridge'> - <mac address="52:54:00:bd:81:__COUNT__"/> - <source bridge='br-dhcp'/> - <target dev='vnet0'/> - <model type='virtio'/> - <boot order='2'/> - <alias name='net0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:fd:7f:__COUNT__"/> - <source bridge='vm-br-eth1'/> - <target dev='vnet1'/> - <model type='virtio'/> - <boot order='3'/> - <alias name='net1'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:f5:44:__COUNT__"/> - <source bridge='vm-br-eth2'/> - <target dev='vnet2'/> - <model type='virtio'/> - <boot order='4'/> - <alias name='net2'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:1f:96:__COUNT__"/> - <source bridge='vm-br-eth3'/> - <target dev='vnet3'/> - <model type='virtio'/> - <boot order='5'/> - <alias name='net3'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:50:03:__COUNT__"/> - <source bridge='vm-br-eth4'/> - <target dev='vnet4'/> - <model type='virtio'/> - <boot order='6'/> - <alias name='net4'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:2d:12:__COUNT__"/> - <source bridge='vm-br-eth5'/> - <target dev='vnet5'/> - <model type='virtio'/> - <boot order='7'/> - <alias name='net5'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x0'/> - </interface> - <serial type='pty'> - <source path='/dev/pts/4'/> - <target port='0'/> - <alias name='serial0'/> - </serial> - <console type='pty' tty='/dev/pts/4'> - <source path='/dev/pts/4'/> - <target type='serial' port='0'/> - <alias name='serial0'/> - </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'> - <listen type='address' address='127.0.0.1'/> - </graphics> - <video> - <model type='vmvga' vram='1024' heads='1'/> - <alias name='video0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </video> - <memballoon model='virtio'> - <alias name='balloon0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> - </memballoon> - <rng model='virtio'> - <backend model='random'>/dev/random</backend> - <alias name='rng0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/> - </rng> - </devices> -</domain> diff --git a/multi-node-aio-xenial-ansible/templates/vmnode-config/infra.openstackci.local.xml b/multi-node-aio-xenial-ansible/templates/vmnode-config/infra.openstackci.local.xml deleted file mode 100644 index 23d4b0bf..00000000 --- a/multi-node-aio-xenial-ansible/templates/vmnode-config/infra.openstackci.local.xml +++ /dev/null @@ -1,131 +0,0 @@ -<domain type='kvm'> - <name>__NODE__.openstackci.local</name> - <memory unit='GiB'>12</memory> - <currentMemory unit='GiB'>12</currentMemory> - <vcpu placement='static'>10</vcpu> - <resource> - <partition>/machine</partition> - </resource> - <os> - <type arch='x86_64' machine='pc-i440fx-__CONTAINER_VMS__'>hvm</type> - </os> - <features> - <acpi/> - <apic/> - </features> - <cpu mode='host-model'> - <model fallback='allow'/> - </cpu> - <clock offset='utc'> - <timer name='rtc' tickpolicy='catchup'/> - <timer name='pit' tickpolicy='delay'/> - <timer name='hpet' present='no'/> - </clock> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>restart</on_crash> - <pm> - <suspend-to-mem enabled='no'/> - <suspend-to-disk enabled='no'/> - </pm> - <devices> - <disk type='file' device='disk'> - <driver name='qemu' type='qcow2' cache='none' io='native'/> - <source file='/var/lib/libvirt/images/__NODE__.openstackci.local.img'/> - <target dev='__DEVICE_NAME__' bus='virtio'/> - <boot order='1'/> - <alias name='virtio-disk0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> - </disk> - <controller type='pci' index='0' model='pci-root'> - <alias name='pci.0'/> - </controller> - <controller type='virtio-serial' index='0'> - <alias name='virtio-serial0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> - </controller> - <interface type='bridge'> - <mac address="52:54:00:bd:81:__COUNT__"/> - <source bridge='br-dhcp'/> - <target dev='vnet0'/> - <model type='virtio'/> - <boot order='2'/> - <alias name='net0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:fd:7f:__COUNT__"/> - <source bridge='vm-br-eth1'/> - <target dev='vnet1'/> - <model type='virtio'/> - <boot order='3'/> - <alias name='net1'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:f5:44:__COUNT__"/> - <source bridge='vm-br-eth2'/> - <target dev='vnet2'/> - <model type='virtio'/> - <boot order='4'/> - <alias name='net2'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:1f:96:__COUNT__"/> - <source bridge='vm-br-eth3'/> - <target dev='vnet3'/> - <model type='virtio'/> - <boot order='5'/> - <alias name='net3'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:50:03:__COUNT__"/> - <source bridge='vm-br-eth4'/> - <target dev='vnet4'/> - <model type='virtio'/> - <boot order='6'/> - <alias name='net4'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:2d:12:__COUNT__"/> - <source bridge='vm-br-eth5'/> - <target dev='vnet5'/> - <model type='virtio'/> - <boot order='7'/> - <alias name='net5'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x0'/> - </interface> - <serial type='pty'> - <source path='/dev/pts/4'/> - <target port='0'/> - <alias name='serial0'/> - </serial> - <console type='pty' tty='/dev/pts/4'> - <source path='/dev/pts/4'/> - <target type='serial' port='0'/> - <alias name='serial0'/> - </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'> - <listen type='address' address='127.0.0.1'/> - </graphics> - <video> - <model type='vmvga' vram='9216' heads='1'/> - <alias name='video0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </video> - <memballoon model='virtio'> - <alias name='balloon0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> - </memballoon> - <rng model='virtio'> - <backend model='random'>/dev/random</backend> - <alias name='rng0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/> - </rng> - </devices> -</domain> diff --git a/multi-node-aio-xenial-ansible/templates/vmnode-config/logging.openstackci.local.xml b/multi-node-aio-xenial-ansible/templates/vmnode-config/logging.openstackci.local.xml deleted file mode 100644 index 7eacf301..00000000 --- a/multi-node-aio-xenial-ansible/templates/vmnode-config/logging.openstackci.local.xml +++ /dev/null @@ -1,131 +0,0 @@ -<domain type='kvm'> - <name>__NODE__.openstackci.local</name> - <memory unit='GiB'>2</memory> - <currentMemory unit='GiB'>2</currentMemory> - <vcpu placement='static'>2</vcpu> - <resource> - <partition>/machine</partition> - </resource> - <os> - <type arch='x86_64' machine='pc-i440fx-__CONTAINER_VMS__'>hvm</type> - </os> - <features> - <acpi/> - <apic/> - </features> - <cpu mode='host-model'> - <model fallback='allow'/> - </cpu> - <clock offset='utc'> - <timer name='rtc' tickpolicy='catchup'/> - <timer name='pit' tickpolicy='delay'/> - <timer name='hpet' present='no'/> - </clock> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>restart</on_crash> - <pm> - <suspend-to-mem enabled='no'/> - <suspend-to-disk enabled='no'/> - </pm> - <devices> - <disk type='file' device='disk'> - <driver name='qemu' type='qcow2' cache='none' io='native'/> - <source file='/var/lib/libvirt/images/__NODE__.openstackci.local.img'/> - <target dev='__DEVICE_NAME__' bus='virtio'/> - <boot order='1'/> - <alias name='virtio-disk0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> - </disk> - <controller type='pci' index='0' model='pci-root'> - <alias name='pci.0'/> - </controller> - <controller type='virtio-serial' index='0'> - <alias name='virtio-serial0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> - </controller> - <interface type='bridge'> - <mac address="52:54:00:bd:81:__COUNT__"/> - <source bridge='br-dhcp'/> - <target dev='vnet0'/> - <model type='virtio'/> - <boot order='2'/> - <alias name='net0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:fd:7f:__COUNT__"/> - <source bridge='vm-br-eth1'/> - <target dev='vnet1'/> - <model type='virtio'/> - <boot order='3'/> - <alias name='net1'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:f5:44:__COUNT__"/> - <source bridge='vm-br-eth2'/> - <target dev='vnet2'/> - <model type='virtio'/> - <boot order='4'/> - <alias name='net2'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:1f:96:__COUNT__"/> - <source bridge='vm-br-eth3'/> - <target dev='vnet3'/> - <model type='virtio'/> - <boot order='5'/> - <alias name='net3'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:50:03:__COUNT__"/> - <source bridge='vm-br-eth4'/> - <target dev='vnet4'/> - <model type='virtio'/> - <boot order='6'/> - <alias name='net4'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:2d:12:__COUNT__"/> - <source bridge='vm-br-eth5'/> - <target dev='vnet5'/> - <model type='virtio'/> - <boot order='7'/> - <alias name='net5'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x0'/> - </interface> - <serial type='pty'> - <source path='/dev/pts/4'/> - <target port='0'/> - <alias name='serial0'/> - </serial> - <console type='pty' tty='/dev/pts/4'> - <source path='/dev/pts/4'/> - <target type='serial' port='0'/> - <alias name='serial0'/> - </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'> - <listen type='address' address='127.0.0.1'/> - </graphics> - <video> - <model type='vmvga' vram='9216' heads='1'/> - <alias name='video0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </video> - <memballoon model='virtio'> - <alias name='balloon0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> - </memballoon> - <rng model='virtio'> - <backend model='random'>/dev/random</backend> - <alias name='rng0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/> - </rng> - </devices> -</domain> diff --git a/multi-node-aio-xenial-ansible/templates/vmnode-config/network.openstackci.local.xml b/multi-node-aio-xenial-ansible/templates/vmnode-config/network.openstackci.local.xml deleted file mode 100644 index 9d59a617..00000000 --- a/multi-node-aio-xenial-ansible/templates/vmnode-config/network.openstackci.local.xml +++ /dev/null @@ -1,131 +0,0 @@ -<domain type='kvm'> - <name>__NODE__.openstackci.local</name> - <memory unit='GiB'>12</memory> - <currentMemory unit='GiB'>6</currentMemory> - <vcpu placement='static'>4</vcpu> - <resource> - <partition>/machine</partition> - </resource> - <os> - <type arch='x86_64' machine='pc-i440fx-__CONTAINER_VMS__'>hvm</type> - </os> - <features> - <acpi/> - <apic/> - </features> - <cpu mode='host-model'> - <model fallback='allow'/> - </cpu> - <clock offset='utc'> - <timer name='rtc' tickpolicy='catchup'/> - <timer name='pit' tickpolicy='delay'/> - <timer name='hpet' present='no'/> - </clock> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>restart</on_crash> - <pm> - <suspend-to-mem enabled='no'/> - <suspend-to-disk enabled='no'/> - </pm> - <devices> - <disk type='file' device='disk'> - <driver name='qemu' type='qcow2' cache='none' io='native'/> - <source file='/var/lib/libvirt/images/__NODE__.openstackci.local.img'/> - <target dev='__DEVICE_NAME__' bus='virtio'/> - <boot order='1'/> - <alias name='virtio-disk0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> - </disk> - <controller type='pci' index='0' model='pci-root'> - <alias name='pci.0'/> - </controller> - <controller type='virtio-serial' index='0'> - <alias name='virtio-serial0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> - </controller> - <interface type='bridge'> - <mac address="52:54:00:bd:81:__COUNT__"/> - <source bridge='br-dhcp'/> - <target dev='vnet0'/> - <model type='virtio'/> - <boot order='2'/> - <alias name='net0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:fd:7f:__COUNT__"/> - <source bridge='vm-br-eth1'/> - <target dev='vnet1'/> - <model type='virtio'/> - <boot order='3'/> - <alias name='net1'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:f5:44:__COUNT__"/> - <source bridge='vm-br-eth2'/> - <target dev='vnet2'/> - <model type='virtio'/> - <boot order='4'/> - <alias name='net2'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:1f:96:__COUNT__"/> - <source bridge='vm-br-eth3'/> - <target dev='vnet3'/> - <model type='virtio'/> - <boot order='5'/> - <alias name='net3'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:50:03:__COUNT__"/> - <source bridge='vm-br-eth4'/> - <target dev='vnet4'/> - <model type='virtio'/> - <boot order='6'/> - <alias name='net4'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:2d:12:__COUNT__"/> - <source bridge='vm-br-eth5'/> - <target dev='vnet5'/> - <model type='virtio'/> - <boot order='7'/> - <alias name='net5'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x0'/> - </interface> - <serial type='pty'> - <source path='/dev/pts/4'/> - <target port='0'/> - <alias name='serial0'/> - </serial> - <console type='pty' tty='/dev/pts/4'> - <source path='/dev/pts/4'/> - <target type='serial' port='0'/> - <alias name='serial0'/> - </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'> - <listen type='address' address='127.0.0.1'/> - </graphics> - <video> - <model type='vmvga' vram='9216' heads='1'/> - <alias name='video0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </video> - <memballoon model='virtio'> - <alias name='balloon0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> - </memballoon> - <rng model='virtio'> - <backend model='random'>/dev/random</backend> - <alias name='rng0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/> - </rng> - </devices> -</domain> diff --git a/multi-node-aio-xenial-ansible/templates/vmnode-config/nova_compute.openstackci.local.xml b/multi-node-aio-xenial-ansible/templates/vmnode-config/nova_compute.openstackci.local.xml deleted file mode 100644 index ce03136f..00000000 --- a/multi-node-aio-xenial-ansible/templates/vmnode-config/nova_compute.openstackci.local.xml +++ /dev/null @@ -1,131 +0,0 @@ -<domain type='kvm'> - <name>__NODE__.openstackci.local</name> - <memory unit='GiB'>24</memory> - <currentMemory unit='GiB'>8</currentMemory> - <vcpu placement='static'>8</vcpu> - <resource> - <partition>/machine</partition> - </resource> - <os> - <type arch='x86_64' machine='pc-i440fx-__CONTAINER_VMS__'>hvm</type> - </os> - <features> - <acpi/> - <apic/> - </features> - <cpu mode='host-model'> - <model fallback='allow'/> - </cpu> - <clock offset='utc'> - <timer name='rtc' tickpolicy='catchup'/> - <timer name='pit' tickpolicy='delay'/> - <timer name='hpet' present='no'/> - </clock> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>restart</on_crash> - <pm> - <suspend-to-mem enabled='no'/> - <suspend-to-disk enabled='no'/> - </pm> - <devices> - <disk type='file' device='disk'> - <driver name='qemu' type='qcow2' cache='none' io='native'/> - <source file='/var/lib/libvirt/images/__NODE__.openstackci.local.img'/> - <target dev='__DEVICE_NAME__' bus='virtio'/> - <boot order='1'/> - <alias name='virtio-disk0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> - </disk> - <controller type='pci' index='0' model='pci-root'> - <alias name='pci.0'/> - </controller> - <controller type='virtio-serial' index='0'> - <alias name='virtio-serial0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> - </controller> - <interface type='bridge'> - <mac address="52:54:00:bd:81:__COUNT__"/> - <source bridge='br-dhcp'/> - <target dev='vnet0'/> - <model type='virtio'/> - <boot order='2'/> - <alias name='net0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:fd:7f:__COUNT__"/> - <source bridge='vm-br-eth1'/> - <target dev='vnet1'/> - <model type='virtio'/> - <boot order='3'/> - <alias name='net1'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:f5:44:__COUNT__"/> - <source bridge='vm-br-eth2'/> - <target dev='vnet2'/> - <model type='virtio'/> - <boot order='4'/> - <alias name='net2'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:1f:96:__COUNT__"/> - <source bridge='vm-br-eth3'/> - <target dev='vnet3'/> - <model type='virtio'/> - <boot order='5'/> - <alias name='net3'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:50:03:__COUNT__"/> - <source bridge='vm-br-eth4'/> - <target dev='vnet4'/> - <model type='virtio'/> - <boot order='6'/> - <alias name='net4'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:2d:12:__COUNT__"/> - <source bridge='vm-br-eth5'/> - <target dev='vnet5'/> - <model type='virtio'/> - <boot order='7'/> - <alias name='net5'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x0'/> - </interface> - <serial type='pty'> - <source path='/dev/pts/4'/> - <target port='0'/> - <alias name='serial0'/> - </serial> - <console type='pty' tty='/dev/pts/4'> - <source path='/dev/pts/4'/> - <target type='serial' port='0'/> - <alias name='serial0'/> - </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'> - <listen type='address' address='127.0.0.1'/> - </graphics> - <video> - <model type='vmvga' vram='9216' heads='1'/> - <alias name='video0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </video> - <memballoon model='virtio'> - <alias name='balloon0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> - </memballoon> - <rng model='virtio'> - <backend model='random'>/dev/random</backend> - <alias name='rng0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/> - </rng> - </devices> -</domain> diff --git a/multi-node-aio-xenial-ansible/templates/vmnode-config/swift.openstackci.local.xml b/multi-node-aio-xenial-ansible/templates/vmnode-config/swift.openstackci.local.xml deleted file mode 100644 index 25fd679a..00000000 --- a/multi-node-aio-xenial-ansible/templates/vmnode-config/swift.openstackci.local.xml +++ /dev/null @@ -1,131 +0,0 @@ -<domain type='kvm'> - <name>__NODE__.openstackci.local</name> - <memory unit='GiB'>4</memory> - <currentMemory unit='GiB'>4</currentMemory> - <vcpu placement='static'>4</vcpu> - <resource> - <partition>/machine</partition> - </resource> - <os> - <type arch='x86_64' machine='pc-i440fx-__CONTAINER_VMS__'>hvm</type> - </os> - <features> - <acpi/> - <apic/> - </features> - <cpu mode='host-model'> - <model fallback='allow'/> - </cpu> - <clock offset='utc'> - <timer name='rtc' tickpolicy='catchup'/> - <timer name='pit' tickpolicy='delay'/> - <timer name='hpet' present='no'/> - </clock> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>restart</on_crash> - <pm> - <suspend-to-mem enabled='no'/> - <suspend-to-disk enabled='no'/> - </pm> - <devices> - <disk type='file' device='disk'> - <driver name='qemu' type='qcow2' cache='none' io='native'/> - <source file='/var/lib/libvirt/images/__NODE__.openstackci.local.img'/> - <target dev='__DEVICE_NAME__' bus='virtio'/> - <boot order='1'/> - <alias name='virtio-disk0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> - </disk> - <controller type='pci' index='0' model='pci-root'> - <alias name='pci.0'/> - </controller> - <controller type='virtio-serial' index='0'> - <alias name='virtio-serial0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> - </controller> - <interface type='bridge'> - <mac address="52:54:00:bd:81:__COUNT__"/> - <source bridge='br-dhcp'/> - <target dev='vnet0'/> - <model type='virtio'/> - <boot order='2'/> - <alias name='net0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:fd:7f:__COUNT__"/> - <source bridge='vm-br-eth1'/> - <target dev='vnet1'/> - <model type='virtio'/> - <boot order='3'/> - <alias name='net1'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:f5:44:__COUNT__"/> - <source bridge='vm-br-eth2'/> - <target dev='vnet2'/> - <model type='virtio'/> - <boot order='4'/> - <alias name='net2'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:1f:96:__COUNT__"/> - <source bridge='vm-br-eth3'/> - <target dev='vnet3'/> - <model type='virtio'/> - <boot order='5'/> - <alias name='net3'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:50:03:__COUNT__"/> - <source bridge='vm-br-eth4'/> - <target dev='vnet4'/> - <model type='virtio'/> - <boot order='6'/> - <alias name='net4'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:2d:12:__COUNT__"/> - <source bridge='vm-br-eth5'/> - <target dev='vnet5'/> - <model type='virtio'/> - <boot order='7'/> - <alias name='net5'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x0'/> - </interface> - <serial type='pty'> - <source path='/dev/pts/4'/> - <target port='0'/> - <alias name='serial0'/> - </serial> - <console type='pty' tty='/dev/pts/4'> - <source path='/dev/pts/4'/> - <target type='serial' port='0'/> - <alias name='serial0'/> - </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'> - <listen type='address' address='127.0.0.1'/> - </graphics> - <video> - <model type='vmvga' vram='9216' heads='1'/> - <alias name='video0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </video> - <memballoon model='virtio'> - <alias name='balloon0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> - </memballoon> - <rng model='virtio'> - <backend model='random'>/dev/random</backend> - <alias name='rng0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/> - </rng> - </devices> -</domain> diff --git a/multi-node-aio-xenial-ansible/templates/xenial-sources.list b/multi-node-aio-xenial-ansible/templates/xenial-sources.list deleted file mode 100644 index 5c46164c..00000000 --- a/multi-node-aio-xenial-ansible/templates/xenial-sources.list +++ /dev/null @@ -1,20 +0,0 @@ -deb http://archive.ubuntu.com/ubuntu xenial main restricted -deb-src http://archive.ubuntu.com/ubuntu xenial main restricted -deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted -deb-src http://archive.ubuntu.com/ubuntu xenial-updates main restricted -deb http://archive.ubuntu.com/ubuntu xenial universe -deb-src http://archive.ubuntu.com/ubuntu xenial universe -deb http://archive.ubuntu.com/ubuntu xenial-updates universe -deb-src http://archive.ubuntu.com/ubuntu xenial-updates universe -deb http://archive.ubuntu.com/ubuntu xenial multiverse -deb-src http://archive.ubuntu.com/ubuntu xenial multiverse -deb http://archive.ubuntu.com/ubuntu xenial-updates multiverse -deb-src http://archive.ubuntu.com/ubuntu xenial-updates multiverse -deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse -deb-src http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse -deb http://security.ubuntu.com/ubuntu xenial-security main restricted -deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted -deb http://security.ubuntu.com/ubuntu xenial-security universe -deb-src http://security.ubuntu.com/ubuntu xenial-security universe -deb http://security.ubuntu.com/ubuntu xenial-security multiverse -deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse \ No newline at end of file diff --git a/multi-node-aio-xenial-ansible/variables.sh b/multi-node-aio-xenial-ansible/variables.sh deleted file mode 100755 index c3373a18..00000000 --- a/multi-node-aio-xenial-ansible/variables.sh +++ /dev/null @@ -1,74 +0,0 @@ -# Variables used by multi-node-aio -# Network subnet used for all the virtual machines -NETWORK_BASE="${NETWORK_BASE:-10.29}" -# DNS used throughout the deploy -DNS_NAMESERVER=$(cat /etc/resolv.conf | grep -m 1 "nameserver" | sed "s/nameserver //") -#DNS_NAMESERVER="${DNS_NAMESERVER:-8.8.8.8}" - -# By default AIO deploy overrides apt-sources, if things like a local mirror are already -# set up then this script will override these. This option allows for the override to be -# disabled. -OVERRIDE_SOURCES="${OVERRIDE_SOURCES:-false}" - -# What branch of Openstack-Ansible are we deploying from -OSA_BRANCH="${OSA_BRANCH:-stable/newton}" - -# What is the default disk device name -DEVICE_NAME="${DEVICE_NAME:-vda}" - -# What default network device should we use -DEFAULT_NETWORK="${DEFAULT_NETWORK:-eth0}" - -# What is the default virtual machine disk size in GB -VM_DISK_SIZE="${VM_DISK_SIZE:-252}" - -# Do we want to do all the required host setup -SETUP_HOST="${SETUP_HOST:-true}" - -# What fisk shall we use for the default data -DATA_DISK_DEVICE="${DATA_DISK_DEVICE:-sdb}" - -# Do we want to do disk partitioning or is there a partition ready to use -PARTITION_HOST="${PARTITION_HOST:-true}" - -# Force partition - If the above variable is set to -F then we will use the force -# option of MKFS so there is no confirm -FORCE_PARTITION="-F" - -# Do we want to set up networking on the host for Virsh -SETUP_VIRSH_NET="${SETUP_VIRSH_NET:-true}" - -# When the virtual machines are re-kicked do we format them -VM_IMAGE_CREATE="${VM_IMAGE_CREATE:-true}" - -# Should we run the deploy Openstack-Ansible script at the end of the build script -DEPLOY_OSA="${DEPLOY_OSA:-true}" - -# Should we pre-configure the environment before we deploy OpenStack-Ansible -PRE_CONFIG_OSA="${PRE_CONFIG_OSA:-true}" - -# Should we run the final deploy of OpenStack-Ansible -RUN_OSA="${RUN_OSA:-true}" - -# Should we use PXEboot -SETUP_PXEBOOT="${SETUP_PXEBOOT:-true}" - -# Should we create the virtual machines -CREATE_VMS="${CREATE_VMS:-true}" - -# Should we configure the virtual machines -CONFIGURE_VMS="${CONFIGURE_VMS:-true}" - -# Container vms - override the container virtual machines with xenial -CONTAINER_VMS="${CONTAINER_VMS:-xenial}" - -# Ethernet type, this needs to be ens for Xenial and is for -# templates/network-interfaces/vm.openstackci.local-bonded-bridges.cfg file -ETH_TYPE="${ETH_TYPE:-eth}" - -# Default service ports -OSA_PORTS="${OSA_PORTS:-6080 6082 443 80}" - -# Config the baremetal host, treat the baremetal host as a switch -# put all deploy job into deploy node. -CONFIG_PREROUTING="${CONFIG_PREROUTING:-true}" diff --git a/multi-node-aio/LICENSE.txt b/multi-node-aio/LICENSE.txt deleted file mode 100644 index 8863b74f..00000000 --- a/multi-node-aio/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/README.rst b/multi-node-aio/README.rst index 6fa32f18..be90edae 100644 --- a/multi-node-aio/README.rst +++ b/multi-node-aio/README.rst @@ -12,7 +12,7 @@ Full OpenStack deployment using a single OnMetal host from the Rackspace Public Cloud. This is a multi-node installation using VMs that have been PXE booted which was done to provide an environment that is almost exactly what is in production. This script will build, kick -and deploy OpenStack using KVM, Cobbler, OpenStack-Ansible within 13 Nodes +and deploy OpenStack using KVM, OpenStack-Ansible within 12 Nodes and 1 load balancer all using a Hyper Converged environment. @@ -20,17 +20,16 @@ Process ------- Create at least one physical host that has public network access and is running the -Ubuntu 14.04 LTS (Trusty Tahr) Operating system. This script assumes that you have -an unpartitioned device with at least 1TB of storage. If you're using the Rackspace +Ubuntu 14/6.04 LTS Operating system. System assumes that you have an unpartitioned +device with at least 1TB of storage, however you can customize the size of each VM +volume by setting the option ``${VM_DISK_SIZE}``. If you're using the Rackspace OnMetal servers the drive partitioning will be done for you by detecting the largest unpartitioned device. If you're doing the deployment on something other than a Rackspace -OnMetal server you may need to modify the ``setup-host.sh`` script to do the needful in -your environment. If you know the device name you want to format you can also set the -``${DATA_DISK_DEVICE}`` variable accordingly. - -Physical disk partitioning can be skipped by setting ``PARTITION_HOST=false``. If you set -this, make sure you have enough space available to run all of the infrastructure VMs within -``/var/lib/libvirt/images``. +OnMetal server you may need to set the ``${DATA_DISK_DEVICE}`` variable accordingly. +the playbooks will look for a volume group named "vg01", if this volume group exists +no partitioning or setup on the data disk will take place. To effectively use this +process for testing it's recommended that the host machine have at least 32GiB of +RAM. =========== ======== ============ Physical Host Specs known to work well @@ -85,56 +84,42 @@ Console Access :alt: Screen shot of virt-manager console :align: center -The root password for all VMs is "**cobbler**". This password is being set within the pre-seed files under the +The root password for all VMs is "**secrete**". This password is being set within the pre-seed files under the "Users and Password" section. If you want to change this password please edit the pre-seed files. -Notes ------ - -The cobbler and pre-seed setup has been implemented using some of the awesome work originally created by James Thorne. - * cobbler installation post - https://thornelabs.net/2015/11/26/install-and-configure-cobbler-on-ubuntu-1404.html - * pre-seeds -- https://github.com/jameswthorne/preseeds - - -Options -------- - -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}"`` +``build.sh`` Options +-------------------- Set to instruct the preseed what the default network is expected to be: ``DEFAULT_NETWORK="${DEFAULT_NETWORK:-eth0}"`` -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}')}"`` - Set the VM disk size in gigabytes: ``VM_DISK_SIZE="${VM_DISK_SIZE:-252}"`` -Set the OSA branch for this script to deploy: - ``OSA_BRANCH=${OSA_BRANCH:-master}`` -Enable partitioning of the "${DATA_DISK_DEVICE}": - ``PARTITION_HOST=${PARTITION_HOST:-true}`` +Instruct the system do all of the required host setup: + ``SETUP_HOST=${SETUP_HOST:-true}`` + +Instruct the system do all of the required PXE setup: + ``SETUP_PXEBOOT=${SETUP_PXEBOOT:-true}`` + +Instruct the system do all of the required DHCPD setup: + ``SETUP_DHCPD=${SETUP_DHCPD:-true}`` -Instruct the system to deploy OpenStack Ansible: - ``DEPLOY_OSA=${DEPLOY_OSA:-true}`` Instruct the system to Kick all of the VMs: ``DEPLOY_VMS=${DEPLOY_VMS:-true}`` -Instruct the system to run VM disk image create: - ``VM_IMAGE_CREATE=${VM_IMAGE_CREATE:-true}`` +Instruct the VM to use the selected image, eg. ubuntu-16.04-amd64: + ``DEFAULT_IMAGE=${DEFAULT_IMAGE:-ubuntu-16.04-amd64}`` -Instruct the system do all of the require host setup: - ``SETUP_HOST=${SETUP_HOST:-true}`` -Instruct the system do all of the cobbler setup: - ``SETUP_COBBLER=${SETUP_COBBLER:-true}`` +Set the OSA branch for this script to deploy: + ``OSA_BRANCH=${OSA_BRANCH:-master}`` -Instruct the system do all of the virsh network setup: - ``SETUP_VIRSH_NET=${SETUP_VIRSH_NET:-true}`` +Instruct the system to deploy OpenStack Ansible: + ``DEPLOY_OSA=${DEPLOY_OSA:-true}`` Instruct the system to pre-config the envs for running OSA playbooks: ``PRE_CONFIG_OSA=${PRE_CONFIG_OSA:-true}`` @@ -142,57 +127,48 @@ Instruct the system to pre-config the envs for running OSA playbooks: Instruct the system to run the OSA playbooks, if you want to deploy other OSA powered cloud, you can set it to false: ``RUN_OSA=${RUN_OSA:-true}`` -Instruct the VM to use the selected image, eg. ubuntu xenial: - ``DEFAULT_IMAGE=${DEFAULT_IMAGE:-16.04}`` -Install the specified kernel, eg 3.13.0-34 if you want to deploy Juno release. - ``DEFAULT_KERNEL=${DEFAULT_KERNEL:-3.13.0-34}`` +Re-kicking VM(s) +---------------- -Configure the prerouting iptable rules after the OSA deployment - ``CONFIG_PREROUTING="${CONFIG_PREROUTING:-true}`` +Re-kicking a VM is as simple as stopping a VM, delete the logical volume, create a new logical volume, start the VM. +The VM will come back online, pxe boot, and install the base OS. -Re-kicking the VMs ------------------- +.. code-block:: bash -The build process will add a function to the system to provide you a quick means to re-kick a VM host. The function added -is ``rekick_vms``. This function can be used to re-kick a specific host. To use this function use the short hostname along -with the function. EXAMPLE: ``rekick_vms infra1``. This command will destroy the root disk for the VM and reboot it causing -it to be re-PXE booted. Once the re-deployment has completed (<=10 min) the node will have a vanilla OS. - -If you want to re-kick all known hosts you can execute the ``deploy-vms.sh`` script which will do everything needed to -boot all new VMs paving over the existing ones. + virsh destroy "${VM_NAME}" + lvremove "/dev/mapper/vg01--${VM_NAME}" + lvcreate -L 60G vg01 -n "${VM_NAME}" + virsh start "${VM_NAME}" -Adding nodes to the deployment ------------------------------- +To rekick all VMs, the following command can be used on the host machine to cycle through all found VMs and re-provision them. -To add nodes to the deployment simply add the node entries to the hosts.json file. The file divides nodes by type and you -can add more nodes to any of the available types without any modifications made to the templates or build script. The first -100 IP address of all used CIDRs have been reserved in the ``openstack_user_config.yml`` and can be used when adding -additional hosts to the environment. +.. code-block:: bash + + for VM_NAME in $(virsh list --all | awk '/running/ || /shut/ {print $2}'); do + virsh destroy "${VM_NAME}" + lvremove "/dev/mapper/vg01--${VM_NAME}" + lvcreate -L 60G vg01 -n "${VM_NAME}" + virsh start "${VM_NAME}" + done Rerunning the build script -------------------------- The build script can be rerun at any time. If you have a successful run before and simply want to re-kick everything I -recommend nuking the running VMs and then executing the build script instructing it to NOT partition the host. This can -be easily done using the following snippet. - -.. code-block:: bash - - for i in $(virsh list --all --name); do virsh destroy $i; virsh undefine $i; rm /var/lib/libvirt/images/$i.img; done - rm ~/.ssh/known_hosts; PARTITION_HOST=false ./build.sh +recommend nuking VMs and then executing the build script. Deploying OpenStack into the environment ---------------------------------------- -While the build script will deploy OpenStack, you can choose to run this manually. To run a basic deploy using a given branch you can use the following snippet. +While the build script will deploy OpenStack, you can choose to run this manually. To run a basic deploy using a given branch you can use the following snippet. Set the ansible option ``osa_branch`` or export the environment variable ``OSA_BRANCH`` when using the build.sh script. .. code-block:: bash - OSA_BRANCH=master ./deploy-osa.sh + ansible-playbook -i playbooks/inventory playbooks/deploy-osa.yml -vv -e 'osa_branch=master' Snapshotting an environment before major testing diff --git a/multi-node-aio/ansible-env.rc b/multi-node-aio/ansible-env.rc new file mode 100644 index 00000000..830f43f7 --- /dev/null +++ b/multi-node-aio/ansible-env.rc @@ -0,0 +1,19 @@ +export ANSIBLE_GATHERING="${ANSIBLE_GATHERING:-smart}" +export ANSIBLE_GATHER_SUBSET="${ANSIBLE_GATHER_SUBSET:-network,hardware,virtual}" + +export ANSIBLE_CACHE_PLUGIN="${ANSIBLE_CACHE_PLUGIN:-jsonfile}" +export ANSIBLE_CACHE_PLUGIN_CONNECTION="${ANSIBLE_CACHE_PLUGIN_CONNECTION:-/tmp/mnaio_facts}" +export ANSIBLE_CACHE_PLUGIN_TIMEOUT="${ANSIBLE_CACHE_PLUGIN_TIMEOUT:-86400}" + +export ANSIBLE_HOST_KEY_CHECKING=False +export ANSIBLE_SSH_CONTROL_PATH=/tmp/%%h-%%r +export ANSIBLE_SSH_ARGS="-o ControlMaster=no \ + -o UserKnownHostsFile=/dev/null \ + -o StrictHostKeyChecking=no \ + -o ServerAliveInterval=64 \ + -o ServerAliveCountMax=1024 \ + -o Compression=no \ + -o TCPKeepAlive=yes \ + -o VerifyHostKeyDNS=no \ + -o ForwardX11=no \ + -o ForwardAgent=yes" diff --git a/multi-node-aio/bootstrap.sh b/multi-node-aio/bootstrap.sh new file mode 100755 index 00000000..27e4d0cb --- /dev/null +++ b/multi-node-aio/bootstrap.sh @@ -0,0 +1,86 @@ +#!/usr/bin/env bash +# Copyright 2015, Rackspace US, Inc. +# +# 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. + +set -o pipefail +set -euov + +BINDEP_FILE=${BINDEP_FILE:-bindep.txt} + +source /etc/os-release || source /usr/lib/os-release + +case "${ID,,}" in + *suse*) + # Need to pull libffi and python-pyOpenSSL early + # because we install ndg-httpsclient from pip on Leap 42.1 + [[ "${VERSION}" == "42.1" ]] && extra_suse_deps="libffi-devel python-pyOpenSSL" + sudo zypper -n in python-devel lsb-release ${extra_suse_deps:-} + ;; + amzn|centos|rhel) + sudo yum install -y python-devel redhat-lsb-core + ;; + ubuntu|debian) + sudo apt-get update && sudo apt-get install -y python-dev lsb-release + ;; + *) + echo "Unsupported distribution: ${ID,,}" + exit 1 +esac + +# Install pip +if ! which pip &>/dev/null; then + curl --silent --show-error --retry 5 \ + https://bootstrap.pypa.io/get-pip.py | sudo python2.7 +fi + +# Install bindep and tox +sudo pip install 'bindep>=2.4.0' tox + +# CentOS 7 requires two additional packages: +# redhat-lsb-core - for bindep profile support +# epel-release - required to install python-ndg_httpsclient/python2-pyasn1 +if [[ ${ID,,} == "centos" ]]; then + sudo yum -y install redhat-lsb-core epel-release yum-utils + # epel-release could be installed but not enabled (which is very common + # in openstack-ci) so enable it here if needed + sudo yum-config-manager --enable epel || true +# openSUSE 42.1 does not have python-ndg-httpsclient +elif [[ ${ID,,} == *suse* ]] && [[ ${VERSION} == "42.1" ]]; then + sudo pip install ndg-httpsclient +fi + +# Get a list of packages to install with bindep. If packages need to be +# installed, bindep exits with an exit code of 1. +BINDEP_PKGS=$(bindep -b -f ${BINDEP_FILE} test || true) +echo "Packages to install: ${BINDEP_PKGS}" + +# Install OS packages using bindep +if [[ ${#BINDEP_PKGS} > 0 ]]; then + case "${ID,,}" in + *suse*) + sudo zypper -n in $BINDEP_PKGS + ;; + centos) + sudo yum install -y $BINDEP_PKGS + ;; + ubuntu|debian) + sudo apt-get update + DEBIAN_FRONTEND=noninteractive \ + sudo apt-get -q --option "Dpkg::Options::=--force-confold" \ + --assume-yes install $BINDEP_PKGS + ;; + esac +fi + +sudo pip install ansible diff --git a/multi-node-aio/build.sh b/multi-node-aio/build.sh index 2a1532a1..c160891e 100755 --- a/multi-node-aio/build.sh +++ b/multi-node-aio/build.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash -set -eu # Copyright [2016] [Kevin Carter] # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,28 +13,23 @@ set -eu # See the License for the specific language governing permissions and # limitations under the License. -# Load all functions -source functions.rc +set -euvo -# bring in variable definitions if there is a variables.sh file -[[ -f variables.sh ]] && source variables.sh +source bootstrap.sh -# Instruct the system do all of the require host setup -SETUP_HOST=${SETUP_HOST:-true} -[[ "${SETUP_HOST}" = true ]] && source setup-host.sh +source ansible-env.rc -# Instruct the system do all of the cobbler setup -SETUP_COBBLER=${SETUP_COBBLER:-true} -[[ "${SETUP_COBBLER}" = true ]] && source setup-cobbler.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 Kick all of the VMs -DEPLOY_VMS=${DEPLOY_VMS:-true} -[[ "${DEPLOY_VMS}" = true ]] && source deploy-vms.sh - -# Instruct the system to deploy OpenStack Ansible -DEPLOY_OSA=${DEPLOY_OSA:-true} -[[ "${DEPLOY_OSA}" = true ]] && source config-deploy-node.sh +ansible-playbook -i playbooks/inventory \ + -e setup_host=${SETUP_HOST:-"true"} \ + -e setup_pxeboot=${SETUP_PXEBOOT:-"true"} \ + -e setup_dhcpd=${SETUP_DHCPD:-"true"} \ + -e deploy_vms=${DEPLOY_VMS:-"true"} \ + -e deploy_osa=${DEPLOY_OSA:-"true"} \ + -e osa_branch=${OSA_BRANCH:-"master"} \ + -e default_network=${DEFAULT_NETWORK:-"eth0"} \ + -e default_image=${DEFAULT_IMAGE:-"ubuntu-16.04-amd64"} \ + -e vm_disk_size=${VM_DISK_SIZE:-61440} \ + -e http_proxy=${http_proxy:-''} \ + -e run_osa=${RUN_OSA:-"true"} \ + -e pre_config_osa=${PRE_CONFIG_OSA:-"true"} \ + playbooks/site.yml diff --git a/multi-node-aio/config-deploy-node.sh b/multi-node-aio/config-deploy-node.sh deleted file mode 100755 index 986ded3d..00000000 --- a/multi-node-aio/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 diff --git a/multi-node-aio/deploy-osa.sh b/multi-node-aio/deploy-osa.sh deleted file mode 100755 index d19f1923..00000000 --- a/multi-node-aio/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:-172.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/deploy-vms.sh b/multi-node-aio/deploy-vms.sh deleted file mode 100755 index ebec2045..00000000 --- a/multi-node-aio/deploy-vms.sh +++ /dev/null @@ -1,105 +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}" - -# 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 - 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/__NETWORK_BASE__/${NETWORK_BASE}/g" "templates/network-interfaces/vm.openstackci.local-bonded-bridges.cfg" > "/var/www/html/osa-${node%%":"*}.openstackci.local-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 - -# Wait here for all nodes to be booted and ready with SSH -wait_ssh - -# Export all system keys -mkdir -p /tmp/keys -for i in $(apt-key list | awk '/pub/ {print $2}' | awk -F'/' '{print $2}'); do - apt-key export "$i" > "/tmp/keys/$i" -done - -# Get the ubuntu release version from VMs. -RELEASE_VERSION=`ssh -q -o StrictHostKeyChecking=no 10.0.0.100 "lsb_release -sr"` - -# Ensure that all running VMs have an updated apt-cache with keys -for node in $(get_all_hosts); do - ssh -q -n -f -o StrictHostKeyChecking=no 10.0.0.${node#*":"} "mkdir -p /tmp/keys" - for i in /etc/apt/apt.conf.d/00-nokey /etc/apt/sources.list /tmp/sources.list /etc/apt/sources.list.d/* /tmp/keys/*; do - if [[ -f "$i" ]]; then - scp "$i" "10.0.0.${node#*":"}:$i" - fi - done - if [[ "14.04" != "${RELEASE_VERSION:0:5}" ]]; then - ssh -q -n -f -o StrictHostKeyChecking=no 10.0.0.${node#*":"} "mv /tmp/sources.list /etc/apt/sources.list" - fi - ssh -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/functions.rc b/multi-node-aio/functions.rc deleted file mode 100755 index 45d8325a..00000000 --- a/multi-node-aio/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 <<EOL -import json -with open('hosts.json') as f: - x = json.loads(f.read()) -for k, v in x.get("$1").items(): - print('%s:%s' % (k, v)) -EOL -} - -function get_all_hosts { -python <<EOL -import json -with open('hosts.json') as f: - x = json.loads(f.read()) -for i in x.values(): - for k, v in i.items(): - print('%s:%s' % (k, v)) -EOL -} - -function get_all_types { -python <<EOL -import json -with open('hosts.json') as f: - x = json.loads(f.read()) -for i in x.keys(): - print(i) -EOL -} - -function wait_ssh { -echo "Waiting for all nodes to become available. This can take around ${1:-10} min" -for node in $(get_all_hosts); do - echo "Waiting for node: ${node%%":"*} on 10.0.0.${node#*":"}" - until ssh -q -o StrictHostKeyChecking=no -o BatchMode=yes -o ConnectTimeout=10 10.0.0.${node#*':'} exit > /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} <<EOF - container_vars: - cinder_backends: - limit_container_types: cinder_volume - lvm: - volume_group: cinder-volumes - volume_driver: cinder.volume.drivers.lvm.LVMVolumeDriver - volume_backend_name: LVM_iSCSI - iscsi_ip_address: "${NETWORK_BASE}.236.${node#*":"}" -EOF -done -} - -function write_osa_swift_proxy_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} <<EOF - container_vars: - swift_proxy_vars: - limit_container_types: swift_proxy - read_affinity: "r1=100" - write_affinity: "r1" - write_affinity_node_count: "1 * replicas" -EOF -done -} - -function write_osa_swift_storage_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} <<EOF - container_vars: - swift_vars: - limit_container_types: swift - zone: 0 - region: 1 -EOF -done -} - -function osa_user_var_add { - if ! grep -q "^$1" /etc/openstack_deploy/user_variables.yml; then - echo "$2" | tee -a /etc/openstack_deploy/user_variables.yml - else - sed -i "s|$1.*|$2|g" /etc/openstack_deploy/user_variables.yml - fi -} - -function ansible_static_inventory { -CONFD_FILE="$1" -echo "## DO NOT WRITE TO THIS FILE, CHANGES WILL BE LOST!" > ${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 <<EOL -import yaml -with open('haproxy_config.yml') as f: - x = yaml.safe_load(f.read()) - haproxy_services = (x.get('haproxy_default_services') - or x.get('haproxy_service_configs')) - for i in haproxy_services: - y = i['service'].get('haproxy_port') - if isinstance(y, int): - print y -EOL -} - diff --git a/multi-node-aio/hosts.json b/multi-node-aio/hosts.json deleted file mode 100644 index 7d604a10..00000000 --- a/multi-node-aio/hosts.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "infra": { - "infra1": "100", - "infra2": "101", - "infra3": "102" - }, - "logging": { - "logging1": "110" - }, - "nova_compute": { - "compute1": "120", - "compute2": "121" - }, - "cinder": { - "cinder1": "130", - "cinder2": "131" - }, - "swift": { - "swift1": "140", - "swift2": "141", - "swift3": "142" - }, - "deploy": { - "deploy1":"150" - } -} diff --git a/multi-node-aio/openstack-service-setup.sh b/multi-node-aio/openstack-service-setup.sh deleted file mode 100644 index cdb70de7..00000000 --- a/multi-node-aio/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:-172.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/playbooks/deploy-dhcp.yml b/multi-node-aio/playbooks/deploy-dhcp.yml new file mode 100644 index 00000000..cb83cd8c --- /dev/null +++ b/multi-node-aio/playbooks/deploy-dhcp.yml @@ -0,0 +1,71 @@ +--- +# 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: Gather facts + hosts: dhcp_hosts + gather_facts: "{{ gather_facts | default(true) }}" + pre_tasks: + - name: Gather variables for each operating system + include_vars: "{{ item }}" + with_first_found: + - "{{ playbook_dir }}/vars/{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml" + - "{{ playbook_dir }}/vars/{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml" + - "{{ playbook_dir }}/vars/{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml" + - "{{ playbook_dir }}/vars/{{ ansible_distribution | lower }}.yml" + - "{{ playbook_dir }}/vars/{{ ansible_os_family | lower }}.yml" + tags: + - always + + - name: Install all required packages for dhcpd_install + package: + pkg: "{{ item }}" + state: "latest" + update_cache: yes + cache_valid_time: 600 + with_items: "{{ mnaio_dhcp_distro_packages }}" + + - name: Enable services + service: + name: "{{ item }}" + enabled: yes + with_items: "{{ mnaio_dhcp_distro_packages }}" + + tasks: + - name: Create a template in /etc/dhcp/dhcpd.conf + template: + src: dhcp/dhcpd.conf.j2 + dest: /etc/dhcp/dhcpd.conf + mode: 0644 + owner: root + group: root + notify: restart dhcpd + + - name: Create a template in /etc/dhcp/dhcpd.conf + template: + src: dhcp/isc-dhcp-server + dest: /etc/default/isc-dhcp-server + mode: 0644 + owner: root + group: root + notify: restart dhcpd + + handlers: + - name: restart dhcpd + service: + name: "{{ item }}" + state: restarted + with_items: "{{ mnaio_dhcp_distro_packages }}" + vars_files: + - vars/main.yml + tags: + - deploy-dhcpd diff --git a/multi-node-aio/playbooks/deploy-osa.yml b/multi-node-aio/playbooks/deploy-osa.yml new file mode 100644 index 00000000..11e58dde --- /dev/null +++ b/multi-node-aio/playbooks/deploy-osa.yml @@ -0,0 +1,227 @@ +--- +# Copyright 2017, Rackspace US, Inc. +# +# 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 witing, 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: Wait for deploy host + hosts: openstack_hosts + gather_facts: false + pre_tasks: + - name: Wait for container connectivity + wait_for_connection: + connect_timeout: 5 + sleep: 10 + timeout: 1200 + tasks: + - name: copy host keys + copy: + src: "{{ item.src }}" + dest: "{{ item.dest }}" + mode: "0600" + with_items: + - src: /root/.ssh/id_rsa + dest: /root/.ssh/id_rsa + - src: /root/.ssh/id_rsa.pub + dest: /root/.ssh/id_rsa.pub + + - name: un-mount deleteme mount + mount: + name: "/deleteme" + state: unmounted + + - name: remote deleteme mount + mount: + name: "/deleteme" + state: absent + + - name: Remove deleteme dir + file: + path: "/deleteme" + state: absent + + - name: Remove deleteme lv + lvol: + vg: vg00 + lv: deleteme00 + force: true + state: absent + +- name: Setup cinder host volume + hosts: cinder_hosts + gather_facts: false + tasks: + - name: Create cinder-volumes lv + lvol: + vg: vg00 + lv: cinder-volumes00 + size: 100%FREE + shrink: false + + - name: Create data cinder-volumes group + lvg: + vg: cinder-volumes + pvs: "/dev/vg00/cinder-volumes00" + + +- name: Setup cinder host volume + hosts: swift_hosts + gather_facts: false + tasks: + - name: Remove deleteme lv + lvol: + vg: vg00 + lv: "{{ item }}" + size: 4G + with_items: + - disk1 + - disk2 + - disk3 + + - name: Format swift drives + filesystem: + fstype: xfs + dev: "/dev/vg00/{{ item }}" + with_items: + - disk1 + - disk2 + - disk3 + + - name: Create drive directories + file: + path: "/srv/{{ item }}" + state: directory + owner: "root" + group: "root" + mode: "0755" + with_items: + - disk1 + - disk2 + - disk3 + + - name: Mount swift drives + mount: + name: "/srv/{{ item }}" + src: "/dev/mapper/vg00-{{ item }}" + fstype: xfs + state: mounted + with_items: + - disk1 + - disk2 + - disk3 + +- name: Setup deploy host + hosts: deploy_hosts + gather_facts: "{{ gather_facts | default(true) }}" + pre_tasks: + - name: Gather variables for each operating system + include_vars: "{{ item }}" + with_first_found: + - "{{ playbook_dir }}/vars/{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml" + - "{{ playbook_dir }}/vars/{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml" + - "{{ playbook_dir }}/vars/{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml" + - "{{ playbook_dir }}/vars/{{ ansible_distribution | lower }}.yml" + - "{{ playbook_dir }}/vars/{{ ansible_os_family | lower }}.yml" + tags: + - always + + tasks: + # Example read-write git checkout from github + - name: Get OSA + git: + repo: https://git.openstack.org/openstack/openstack-ansible + dest: /opt/openstack-ansible + version: "{{ osa_branch | default('master') }}" + when: + - pre_config_osa | default(true) | bool + + - name: Create Basic configs + shell: cp -R etc/openstack_deploy/* /etc/openstack_deploy + args: + chdir: /opt/openstack-ansible + when: + - pre_config_osa | default(true) | bool + + - name: Create base directories + file: + path: "{{ item }}" + state: directory + owner: "root" + group: "root" + mode: "0755" + with_items: + - /etc/openstack_deploy + - /etc/openstack_deploy/conf.d + - /etc/openstack_deploy/env.d + when: + - pre_config_osa | default(true) | bool + + - name: Drop osa config + template: + src: "osa/openstack_user_config.yml" + dest: /etc/openstack_deploy/openstack_user_config.yml + mode: "0644" + owner: root + group: root + when: + - pre_config_osa | default(true) | bool + + - name: Drop osa user variables + template: + src: "osa/user_mnaio_variables.yml" + dest: /etc/openstack_deploy/user_mnaio_variables.yml + mode: "0644" + owner: root + group: root + when: + - pre_config_osa | default(true) | bool + + - name: Bootstrap ansible + command: bash ./scripts/bootstrap-ansible.sh + args: + chdir: /opt/openstack-ansible + when: + - pre_config_osa | default(true) | bool + + - name: Get pip2 and pw gen deps + command: python2 /opt/get-pip.py pycrypto pyyaml + args: + chdir: /opt/openstack-ansible + when: + - pre_config_osa | default(true) | bool + + - name: Create passwords + command: python2 ./scripts/pw-token-gen.py --file /etc/openstack_deploy/user_secrets.yml + args: + chdir: /opt/openstack-ansible + when: + - pre_config_osa | default(true) | bool + + - name: Run OSA + command: "{{ item }}" + args: + chdir: /opt/openstack-ansible/playbooks + with_items: + - tmux new-session -d -s build-osa + - tmux select-pane -t 0 + - tmux send-keys "ulimit -n 10240" C-m + - tmux send-keys "openstack-ansible setup-everything.yml" C-m + when: + - run_osa | default(true) | bool + + - name: Finished notice + debug: + msg: | + OSA deploy running. To check on the state of this deployment, login + to the deploy1 VM and attach to the "build-osa" tmux session. + when: + - run_osa | default(true) | bool diff --git a/multi-node-aio/playbooks/deploy-pxe.yml b/multi-node-aio/playbooks/deploy-pxe.yml new file mode 100644 index 00000000..9220b9e9 --- /dev/null +++ b/multi-node-aio/playbooks/deploy-pxe.yml @@ -0,0 +1,296 @@ +--- +# Copyright 2017, Rackspace US, Inc. +# +# 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 witing, 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: Gather facts + hosts: pxe_hosts + gather_facts: "{{ gather_facts | default(true) }}" + pre_tasks: + - name: Gather variables for each operating system + include_vars: "{{ item }}" + with_first_found: + - "{{ playbook_dir }}/vars/{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml" + - "{{ playbook_dir }}/vars/{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml" + - "{{ playbook_dir }}/vars/{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml" + - "{{ playbook_dir }}/vars/{{ ansible_distribution | lower }}.yml" + - "{{ playbook_dir }}/vars/{{ ansible_os_family | lower }}.yml" + tags: + - always + + - name: Install host distro packages + package: + pkg: "{{ item }}" + state: "latest" + update_cache: yes + cache_valid_time: 600 + with_items: "{{ mnaio_pxe_distro_packages }}" + + - name: Create base directories + file: + path: "{{ item }}" + state: directory + owner: "root" + group: "root" + mode: "0755" + with_items: + - /var/www/pxe + - /var/www/pxe/images + - /var/www/pxe/iso + - /var/www/pxe/networking + - /var/www/pxe/scripts + - /var/www/pxe/templates + - /var/lib/tftpboot + - /var/lib/tftpboot/boot-screens + - /var/lib/tftpboot/preseed + - /var/lib/tftpboot/pxelinux.cfg + + - name: Get root public key + command: cat /root/.ssh/id_rsa.pub + register: public_key_get + changed_when: false + + - name: Set key facts + set_fact: + tftp_ssh_key: "{{ public_key_get.stdout }}" + + tasks: + - name: Drop NGINX config + copy: + src: "pxe/sites-enabled.default" + dest: /etc/nginx/sites-enabled/default + mode: "0644" + owner: root + group: root + notify: + - restart nginx + + - name: Drop tftp-hpa configs + copy: + src: "pxe/tftp/tftp-hpa" + dest: /etc/default/tftpd-hpa + mode: "0644" + owner: root + group: root + notify: + - restart tftp-hpa + + - name: Drop inetd configs + copy: + src: "pxe/tftp/inetd.conf" + dest: /etc/default/tftpd-hpa + mode: "0644" + owner: root + group: root + notify: + - restart tftp-hpa + + - name: Download image iso(s) + get_url: + url: "{{ item.value.image_iso_url }}" + dest: "/var/www/pxe/iso/{{ item.value.image_name }}" + with_dict: "{{ images }}" + + - name: Remove image directory if it exists + file: + path: "/var/www/pxe/images/{{ item.value.image_short_name }}" + state: absent + with_dict: "{{ images }}" + + - name: Create image directory if it exists + file: + path: "/var/www/pxe/images/{{ item.value.image_short_name }}" + state: directory + owner: "root" + group: "root" + mode: "0755" + with_dict: "{{ images }}" + + - name: Extract ISO(s) contents + command: "7z x /var/www/pxe/iso/{{ item.value.image_name }}" + args: + chdir: "/var/www/pxe/images/{{ item.value.image_short_name }}" + with_dict: "{{ images }}" + + - name: Download pxelinux + get_url: + url: "{{ pxelinux_url }}" + dest: "/var/www/pxe/{{ pxelinux_name }}" + tmp_dest: /tmp/ + + - name: Remove image directory if it exists + file: + path: "/var/www/pxe/{{ pxelinux_short_name }}" + state: absent + + - name: Extract pxelinux contents + command: "tar -xf /var/www/pxe/{{ pxelinux_name }}" + args: + chdir: "/var/www/pxe" + + - name: Drop pxelinux.cfg default menu + copy: + src: "pxe/tftp/pxelinux.cfg.default" + dest: "{{ item }}" + mode: "0644" + owner: root + group: root + with_items: + - /var/lib/tftpboot/pxelinux.cfg/default + - /var/lib/tftpboot/boot-screens/syslinux.cfg + + # These links are using the shell command because the file module does not create hard links + - name: Create hard links + shell: | + ln -f /var/www/pxe/{{ pxelinux_short_name }}/bios/com32/elflink/ldlinux/ldlinux.c32 /var/lib/tftpboot/ldlinux.c32 + ln -f /var/www/pxe/{{ pxelinux_short_name }}/bios/core/pxelinux.0 /var/lib/tftpboot/pxelinux.0 + ln -f /var/www/pxe/{{ pxelinux_short_name }}/bios/com32/lib/libcom32.c32 /var/lib/tftpboot/boot-screens/libcom32.c32 + ln -f /var/www/pxe/{{ pxelinux_short_name }}/bios/com32/libutil/libutil.c32 /var/lib/tftpboot/boot-screens/libutil.c32 + ln -f /var/www/pxe/{{ pxelinux_short_name }}/bios/com32/menu/vesamenu.c32 /var/lib/tftpboot/boot-screens/vesamenu.c32 + + - name: Drop boot-screens default menu + template: + src: "pxe/tftp/menu.cfg.j2" + dest: /var/lib/tftpboot/boot-screens/menu.cfg + mode: "0644" + owner: root + group: root + tags: + - boot-menu + + - name: Drop tftp-hpa configs + template: + src: "pxe/tftp/tftp-hpa" + dest: /etc/default/tftpd-hpa + mode: "0644" + owner: root + group: root + notify: + - restart tftp-hpa + + - name: network scripts for pxe + template: + src: "pxe/{{ ansible_os_family | lower }}/{{ item.src }}" + dest: /var/www/pxe/{{ item.dir }}/{{ item.dest }} + mode: "0644" + owner: root + group: root + with_items: + - src: basic-interface.cfg + dest: basic-interface.cfg + dir: networking + - src: mnaio-bridges.cfg.j2 + dest: mnaio-bridges.cfg + dir: networking + - src: mnaio-post-install-script.sh.j2 + dest: mnaio-post-install-script.sh + dir: scripts + - src: vm-post-install-script.sh.j2 + dest: vm-post-install-script.sh + dir: scripts + + - name: network scripts for servers + template: + src: "pxe/{{ ansible_os_family | lower }}/vm-bridges.cfg.j2" + dest: /var/www/pxe/networking/{{ item.server_hostname }}-bridges.cfg + mode: "0644" + owner: root + group: root + with_items: "{{ servers }}" + + - name: tftp configs for servers + template: + src: "pxe/tftp/pxelinux.cfg.macaddr.j2" + dest: "/var/lib/tftpboot/pxelinux.cfg/01-{{ item.server_mac_address | replace(':', '-') }}" + mode: "0644" + owner: root + group: root + with_items: "{{ servers }}" + + - name: Preseeds for pxe mnaio + template: + src: "pxe/{{ ansible_os_family | lower }}/mnaio.preseed.j2" + dest: /var/lib/tftpboot/preseed/mnaio.preseed + mode: "0644" + owner: root + group: root + with_dict: "{{ images }}" + + - name: Preseeds for pxe vm + template: + src: "pxe/{{ ansible_os_family | lower }}/vm.preseed.j2" + dest: /var/lib/tftpboot/preseed/vm.preseed + mode: "0644" + owner: root + group: root + with_dict: "{{ images }}" + + - name: Create netboot bind mount path + file: + path: "/var/lib/tftpboot/{{ item.value.image_short_name }}" + state: directory + owner: "root" + group: "root" + mode: "0755" + with_dict: "{{ images }}" + + - name: Unbind mount netboot images + mount: + name: "/var/lib/tftpboot/{{ item.value.image_short_name }}" + src: "/var/www/pxe/images/{{ item.value.image_netboot }}" + opts: bind + fstype: none + state: unmounted + register: fstab + with_dict: "{{ images }}" + + - name: Ensure permissions are correct + shell: | + # Fix perms if needed + find /var/lib/tftpboot -type d -exec chmod 0755 {} \; + find /var/lib/tftpboot -type f -exec chmod 0644 {} \; + find /var/www/pxe -type d -exec chmod 0755 {} \; + + - name: Bind mount netboot images + mount: + name: "/var/lib/tftpboot/{{ item.value.image_short_name }}" + src: "/var/www/pxe/images/{{ item.value.image_netboot }}" + opts: bind + fstype: none + state: mounted + register: fstab + with_dict: "{{ images }}" + + handlers: + - name: restart nginx + service: + name: "nginx" + state: restarted + enabled: yes + + - name: restart tftp-hpa + service: + name: "tftpd-hpa" + state: restarted + enabled: yes + + - name: restart inetd + service: + name: "inetutils-inetd" + state: restarted + enabled: yes + + vars_files: + - vars/main.yml + tags: + - deploy-pxe diff --git a/multi-node-aio/playbooks/deploy-vms.yml b/multi-node-aio/playbooks/deploy-vms.yml new file mode 100644 index 00000000..a52df53e --- /dev/null +++ b/multi-node-aio/playbooks/deploy-vms.yml @@ -0,0 +1,66 @@ +--- +# Copyright 2017, Rackspace US, Inc. +# +# 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 witing, 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: Gather facts + hosts: vm_hosts + gather_facts: "{{ gather_facts | default(true) }}" + pre_tasks: + - name: Gather variables for each operating system + include_vars: "{{ item }}" + with_first_found: + - "{{ playbook_dir }}/vars/{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml" + - "{{ playbook_dir }}/vars/{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml" + - "{{ playbook_dir }}/vars/{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml" + - "{{ playbook_dir }}/vars/{{ ansible_distribution | lower }}.yml" + - "{{ playbook_dir }}/vars/{{ ansible_os_family | lower }}.yml" + tags: + - always + + tasks: + - name: Create VM LV + lvol: + vg: vg01 + lv: "{{ item.server_hostname }}" + size: "{{ default_vm_storage }}" + with_items: "{{ servers }}" + + - name: Create the VM template + template: + src: kvm/kvm-vm.xml + dest: "/etc/libvirt/qemu/{{ item.server_hostname }}.xml" + mode: 0644 + owner: root + group: root + with_items: "{{ servers }}" + + - name: Define the VM + command: "virsh define /etc/libvirt/qemu/{{ item.server_hostname }}.xml" + failed_when: false + with_items: "{{ servers }}" + + - name: Create the VM + command: "virsh create /etc/libvirt/qemu/{{ item.server_hostname }}.xml" + failed_when: false + with_items: "{{ servers }}" + + - name: Start the VM + command: "virsh start {{ item.server_hostname }}" + failed_when: false + with_items: "{{ servers }}" + + vars_files: + - vars/main.yml + tags: + - setup-host diff --git a/multi-node-aio-xenial-ansible/roles/dhcpd_install/templates/dhcpd.conf.j2 b/multi-node-aio/playbooks/dhcp/dhcpd.conf.j2 similarity index 81% rename from multi-node-aio-xenial-ansible/roles/dhcpd_install/templates/dhcpd.conf.j2 rename to multi-node-aio/playbooks/dhcp/dhcpd.conf.j2 index a8fccd42..970a1332 100644 --- a/multi-node-aio-xenial-ansible/roles/dhcpd_install/templates/dhcpd.conf.j2 +++ b/multi-node-aio/playbooks/dhcp/dhcpd.conf.j2 @@ -1,6 +1,3 @@ -#jinja2: lstrip_blocks: True -### MANAGED BY {{ role_path|basename }} ANSIBLE ROLE ### - ddns-update-style none; allow booting; @@ -39,15 +36,15 @@ shared-network all-networks { {% endfor %} - {% if server_list.0.name != "blank" %} group { - {% for host in server_list %} - host {{ host.name }} { - hardware ethernet {{ host.hwaddr }}; - fixed-address {{ host.ip }}; - option host-name "{{ host.name }}"; + {% for item in servers %} + host {{ item.server_hostname }} { + hardware ethernet {{ item.server_mac_address }}; + fixed-address {{ item.server_vm_fixed_addr }}; + option host-name "{{ item.server_hostname }}"; } {% endfor %} + } - {% endif %} + } diff --git a/multi-node-aio/playbooks/dhcp/isc-dhcp-server b/multi-node-aio/playbooks/dhcp/isc-dhcp-server new file mode 100644 index 00000000..2cff3f8d --- /dev/null +++ b/multi-node-aio/playbooks/dhcp/isc-dhcp-server @@ -0,0 +1 @@ +INTERFACES="vm-br-dhcp" \ No newline at end of file diff --git a/multi-node-aio/playbooks/inventory b/multi-node-aio/playbooks/inventory new file mode 100644 index 00000000..3c55c86b --- /dev/null +++ b/multi-node-aio/playbooks/inventory @@ -0,0 +1,51 @@ +[all] +localhost ansible_connection=local +mnaio1 ansible_host=10.0.2.1 + +infra1 ansible_host=10.0.236.100 +infra2 ansible_host=10.0.236.101 +infra3 ansible_host=10.0.236.102 +log1 ansible_host=10.0.236.103 +compute1 ansible_host=10.0.236.105 +compute2 ansible_host=10.0.236.106 +cinder1 ansible_host=10.0.236.107 +cinder2 ansible_host=10.0.236.108 +swift1 ansible_host=10.0.236.109 +swift2 ansible_host=10.0.236.110 +swift3 ansible_host=10.0.236.111 +deploy1 ansible_host=10.0.236.112 + +[pxe_hosts] +mnaio1 + +[dhcp_hosts] +mnaio1 + +[vm_hosts] +mnaio1 + +[deploy_hosts] +deploy1 + +[swift_hosts] +swift1 +swift2 +swift3 + +[cinder_hosts] +cinder1 +cinder2 + +[openstack_hosts] +infra1 +infra2 +infra3 +log1 +compute1 +compute2 +cinder2 +cinder1 +swift1 +swift2 +swift3 +deploy1 diff --git a/multi-node-aio/playbooks/kvm/kvm-vm.xml b/multi-node-aio/playbooks/kvm/kvm-vm.xml new file mode 100644 index 00000000..84ac53fa --- /dev/null +++ b/multi-node-aio/playbooks/kvm/kvm-vm.xml @@ -0,0 +1,99 @@ +<domain type='kvm'> + <name>{{ item.server_hostname }}</name> + <memory unit='MiB'>{{ item.server_vm_ram }}</memory> + <currentMemory unit='MiB'>{{ item.server_vm_ram }}</currentMemory> + <vcpu placement='static' current='1'>{{ item.server_vm_vcpus }}</vcpu> + <resource> + <partition>/machine</partition> + </resource> + <os> + <type arch='x86_64' machine='pc-i440fx-{{ ansible_distribution_release | lower }}'>hvm</type> + <bootmenu enable='yes'/> + </os> + <features> + <acpi/> + <apic/> + </features> + <cpu mode='host-model'> + <model fallback='allow'/> + <topology sockets='1' cores='{{ item.server_vm_vcpus }}' threads='1'/> + </cpu> + <clock offset='utc'> + <timer name='rtc' tickpolicy='catchup'/> + <timer name='pit' tickpolicy='delay'/> + <timer name='hpet' present='no'/> + </clock> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <pm> + <suspend-to-mem enabled='no'/> + <suspend-to-disk enabled='no'/> + </pm> + <devices> + <emulator>/usr/bin/kvm-spice</emulator> + <disk type='block' device='disk'> + <driver name='qemu' type='raw' cache='none' io='native'/> + <source dev='/dev/vg01/{{ item.server_hostname }}'/> + <target dev='vda' bus='virtio'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/> + <boot order='1'/> + </disk> + <controller type='pci' index='0' model='pci-root'> + <alias name='pci.0'/> + </controller> + <controller type='virtio-serial' index='0'> + <alias name='virtio-serial0'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/> + </controller> + +{% for _key, _value in item.server_networks.items()|sort(attribute='1.iface') %} + <interface type='network'> +{% if _key == item.server_vm_primary_network %} + <mac address='{{ item.server_mac_address }}'/> + <boot order='2'/> +{% endif %} + <source network='{{ _value.vm_int_iface }}'/> + <model type='virtio'/> + </interface> +{% endfor %} + + <serial type='pty'> + <source path='/dev/pts/4'/> + <target port='0'/> + <alias name='serial0'/> + </serial> + + <console type='pty' tty='/dev/pts/4'> + <source path='/dev/pts/4'/> + <target type='serial' port='0'/> + <alias name='serial0'/> + </console> + + <input type='mouse' bus='ps2'/> + + <input type='keyboard' bus='ps2'/> + + <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'> + <listen type='address' address='127.0.0.1'/> + </graphics> + + <video> + <model type='vmvga' vram='9216' heads='1'/> + <alias name='video0'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/> + </video> + + <memballoon model='virtio'> + <alias name='balloon0'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/> + </memballoon> + + <rng model='virtio'> + <backend model='random'>/dev/random</backend> + <alias name='rng0'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x0'/> + </rng> + + </devices> +</domain> \ No newline at end of file diff --git a/multi-node-aio/playbooks/kvm/libvirt-network-template.xml b/multi-node-aio/playbooks/kvm/libvirt-network-template.xml new file mode 100644 index 00000000..3076e77f --- /dev/null +++ b/multi-node-aio/playbooks/kvm/libvirt-network-template.xml @@ -0,0 +1,5 @@ +<network> + <name>{{ item.value.iface }}</name> + <forward mode="bridge"/> + <bridge name="{{ item.value.iface }}"/> +</network> diff --git a/multi-node-aio/playbooks/osa/openstack_user_config.yml b/multi-node-aio/playbooks/osa/openstack_user_config.yml new file mode 100644 index 00000000..f14eb977 --- /dev/null +++ b/multi-node-aio/playbooks/osa/openstack_user_config.yml @@ -0,0 +1,206 @@ +--- +cidr_networks: + container: 10.0.236.0/22 + tunnel: 10.0.240.0/22 + storage: 10.0.244.0/22 + flat: 10.0.248.0/22 + +used_ips: + - "10.0.236.0,10.0.236.200" + - "10.0.240.0,10.0.240.200" + - "10.0.244.0,10.0.244.200" + - "10.0.248.0,10.0.248.200" + +global_overrides: + internal_lb_vip_address: "10.0.236.112" + external_lb_vip_address: "10.0.2.150" + 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 + 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 + +### +### Anchors +### +infra_block: &infra_block + infra1: + ip: 10.0.236.100 + + infra2: + ip: 10.0.236.101 + + infra3: + ip: 10.0.236.102 + +compute_block: &compute_block + compute1: + ip: 10.0.236.105 + + compute2: + ip: 10.0.236.106 + +cinder_block: &cinder_block + cinder1: + ip: 10.0.236.107 + container_vars: + cinder_backends: + limit_container_types: cinder_volume + lvm: + volume_group: cinder-volumes + volume_driver: cinder.volume.drivers.lvm.LVMVolumeDriver + volume_backend_name: LVM_iSCSI + iscsi_ip_address: "10.0.244.107" + + cinder2: + ip: 10.0.236.108 + container_vars: + cinder_backends: + limit_container_types: cinder_volume + lvm: + volume_group: cinder-volumes + volume_driver: cinder.volume.drivers.lvm.LVMVolumeDriver + volume_backend_name: LVM_iSCSI + iscsi_ip_address: "10.0.244.108" + +swift_block: &swift_block + swift1: + ip: 10.0.236.109 + + swift1: + ip: 10.0.236.110 + + swift1: + ip: 10.0.236.111 + +### +### Infrastructure +### + +# galera, memcache, rabbitmq, utility +shared-infra_hosts: *infra_block + +# repository (apt cache, python packages, etc) +repo-infra_hosts: *infra_block + +# rsyslog server +log_hosts: + log1: + ip: 10.0.236.103 + +# load balancer +haproxy_hosts: + deploy1: + ip: 10.0.236.112 + +### +### OpenStack +### + +# keystone +identity_hosts: *infra_block + +# cinder api services +storage-infra_hosts: *infra_block + +# glance +image_hosts: *infra_block + +# nova api, conductor, etc services +compute-infra_hosts: *infra_block + +# heat +orchestration_hosts: *infra_block + +# horizon +dashboard_hosts: *infra_block + +# neutron server, agents (L3, etc) +network_hosts: *infra_block + +# ceilometer (telemetry data collection) +metering-infra_hosts: *infra_block + +# aodh (telemetry alarm service) +metering-alarm_hosts: *infra_block + +# gnocchi (telemetry metrics storage) +metrics_hosts: *infra_block + +# ceilometer compute agent (telemetry data collection) +metering-compute_hosts: *compute_block + +# nova hypervisors +compute_hosts: *compute_block + +# cinder storage host (LVM-backed) +storage_hosts: *cinder_block + +# swift storage hosts +swift_hosts: *swift_block + +# swift infra hosts +swift-proxy_hosts: *infra_block \ No newline at end of file diff --git a/multi-node-aio/playbooks/osa/user_mnaio_variables.yml b/multi-node-aio/playbooks/osa/user_mnaio_variables.yml new file mode 100644 index 00000000..95bf20e4 --- /dev/null +++ b/multi-node-aio/playbooks/osa/user_mnaio_variables.yml @@ -0,0 +1,30 @@ +--- + +lxc_container_backing_store: dir + +# Tempest is being configured to use a known network +tempest_public_subnet_cidr: 10.0.248.0/26 + +# This makes running neutron in a distributed system easier and a lot less noisy +neutron_l2_population: True + +# This makes the glance image store use swift instead of the file backend +glance_default_store: swift + +{% if http_proxy is defined and http_proxy %} +proxy_env_url: "{{ http_proxy }}" +{% raw %} +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 %}" +global_environment_variables: + HTTP_PROXY: "{{ proxy_env_url }}" + HTTPS_PROXY: "{{ proxy_env_url }}" + NO_PROXY: "{{ no_proxy_env }}" + http_proxy: "{{ proxy_env_url }}" + https_proxy: "{{ proxy_env_url }}" + no_proxy: "{{ no_proxy_env }}" +{% endraw %} + +glance_glance_api_conf_overrides: + glance_store: + http_proxy_information: "http:http://, https:http://" +{% endif %} diff --git a/multi-node-aio/playbooks/pxe/debian/basic-interface.cfg b/multi-node-aio/playbooks/pxe/debian/basic-interface.cfg new file mode 100644 index 00000000..02e7e50b --- /dev/null +++ b/multi-node-aio/playbooks/pxe/debian/basic-interface.cfg @@ -0,0 +1,7 @@ +# This file describes the network interfaces available on your system +# and how to activate them. For more information, see interfaces(5). +# The loopback network interface +auto lo +iface lo inet loopback + +source /etc/network/interfaces.d/*.cfg \ No newline at end of file diff --git a/multi-node-aio/playbooks/pxe/debian/mnaio-bridges.cfg.j2 b/multi-node-aio/playbooks/pxe/debian/mnaio-bridges.cfg.j2 new file mode 100644 index 00000000..ac359843 --- /dev/null +++ b/multi-node-aio/playbooks/pxe/debian/mnaio-bridges.cfg.j2 @@ -0,0 +1,19 @@ +# Physical interface, could be bond. This only needs to be set once +{% for key, value in mnaio_host_networks.items() %} +{% if value.iface_port != 'none' %} +auto {{ value.iface_port }} +iface {{ value.iface_port }} inet manual +{% endif %} + +auto {{ value.iface }} +iface {{ value.iface }} inet {{ value.inet_type }} + bridge_stp off + bridge_waitport {{ value.iface_port == 'none' | ternary('0', '10') }} + bridge_fd 0 + bridge_ports {{ value.iface_port }} + offload-sg off +{% if value.address is defined %} + address {{ value.address }} +{% endif %} + +{% endfor %} diff --git a/multi-node-aio/playbooks/pxe/debian/mnaio-post-install-script.sh.j2 b/multi-node-aio/playbooks/pxe/debian/mnaio-post-install-script.sh.j2 new file mode 100644 index 00000000..420d6c05 --- /dev/null +++ b/multi-node-aio/playbooks/pxe/debian/mnaio-post-install-script.sh.j2 @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +apt-get remove --purge snap* lxc* lxd* || true + +sed -i 's/\(GRUB_CMDLINE_LINUX_DEFAULT=\).*/\1\"\"/g' /target/etc/default/grub +update-grub + +sed -i '/PermitRootLogin / s/ .*/ yes/' /etc/ssh/sshd_config + +mkdir -p /root/.ssh +chmod 0700 /root/.ssh +echo "{{ tftp_ssh_key }}" >> /root/.ssh/authorized_keys + +wget {{ tftp_server }}/networking/mnaio-bridges.cfg -O /etc/network/interfaces.d/mnaio-bridges.cfg +wget {{ tftp_server }}/networking/basic-interface.cfg -O /etc/network/interfaces diff --git a/multi-node-aio/playbooks/pxe/debian/mnaio.preseed.j2 b/multi-node-aio/playbooks/pxe/debian/mnaio.preseed.j2 new file mode 100644 index 00000000..13cc6586 --- /dev/null +++ b/multi-node-aio/playbooks/pxe/debian/mnaio.preseed.j2 @@ -0,0 +1,256 @@ +# Ubuntu Server Preseed +# 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 eth0 +d-i netcfg/dhcp_timeout string 60 +d-i netcfg/get_hostname string host1 +d-i netcfg/get_domain string host1.openstack.local + +## USE THIS FOR STATIC NETWORKING +# 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 10.0.0.100 +# d-i netcfg/get_netmask string 255.255.255.0 +# d-i netcfg/get_gateway string 10.0.0.200 +# d-i netcfg/get_nameservers string 8.8.8.8 +# d-i netcfg/confirm_static boolean true +## USE THIS FOR STATIC NETWORKING + +# 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/vda. See Ubuntu bug #1347726. +d-i preseed/early_command string \ + umount /media || true + +# Net Image + +# Required at least for 12.10+ +d-i live-installer/net-image string {{ tftp_server }}/images/{{ item.value.image_short_name }}/install/filesystem.squashfs + +# 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 + +# Mirror + +d-i mirror/country string manual +d-i mirror/http/proxy string +d-i mirror/http/hostname string archive.ubuntu.com +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.ubuntu.com + +# 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 +d-i partman-lvm/device_remove_lvm_span boolean true +d-i partman-auto/purge_lvm_from_device 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-md/confirm boolean true +d-i partman-md/confirm_nooverwrite boolean true + +d-i partman-basicfilesystems/choose_label string gpt +d-i partman-basicfilesystems/default_label string gpt +d-i partman-partitioning/choose_label string gpt +d-i partman-partitioning/default_label string gpt +d-i partman/choose_label string gpt +d-i partman/default_label string gpt + +d-i partman-auto/method string raid +d-i partman-auto/disk string /dev/[sv]da /dev/[sv]db + +# 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 +d-i partman-auto-lvm/new_vg_name string vg00 + +d-i partman-auto/choose_recipe select custompartitioning + +d-i partman-auto/expert_recipe string \ + custompartitioning :: \ + 1 1 1 free \ + $gptonly{ } \ + $primary{ } \ + $bios_boot{ } \ + method{ biosgrub } \ + . \ + 256 1 512 raid \ + $gptonly{ } \ + $lvmignore{ } \ + $primary{ } \ + $bootable{ } \ + method{ raid } \ + raidid{ 1 } \ + . \ + 204800 1 -1 raid \ + $gptonly{ } \ + $lvmignore{ } \ + method{ raid } \ + raidid{ 2 } \ + . \ + 1024 512 400% linux-swap \ + $defaultignore{ } \ + $lvmok{ } \ + method{ swap } \ + format{ } \ + . \ + 16384 5000 100% ext4 \ + $defaultignore{ } \ + $lvmok{ } \ + method{ format } \ + format{ } \ + use_filesystem{ } \ + filesystem{ ext4 } \ + mountpoint{ / } \ + . \ + 81920 1000 100% ext4 \ + $defaultignore{ } \ + $lvmok{ } \ + lv_name{ openstack00 } \ + method{ format } \ + format{ } \ + use_filesystem{ } \ + filesystem{ ext4 } \ + label{ openstack } \ + mountpoint{ /openstack } \ + . \ + 81920 1000 100% btrfs \ + $defaultignore{ } \ + $lvmok{ } \ + lv_name{ machines00 } \ + method{ format } \ + format{ } \ + use_filesystem{ } \ + filesystem{ btrfs } \ + label{ machines } \ + mountpoint{ /var/lib/machines } \ + . \ + +d-i partman-auto-raid/recipe string \ + 0 2 0 ext2 /boot raidid=1 \ + /dev/[sv]da1#/dev/[sv]db1 \ + . \ + 0 2 0 lvm - raidid=2 \ + /dev/[sv]da5#/dev/[sv]db5 \ + . \ + +# 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 full-upgrade +d-i pkgsel/include string bridge-utils \ + dstat \ + ethtool \ + git \ + htop \ + ifenslave \ + libvirt-bin \ + lvm2 \ + openssh-server \ + parted \ + python3-all \ + python-all \ + qemu-kvm \ + systemd-container \ + tmux \ + vim \ + virt-manager \ + virtinst \ + vlan + +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 secrete +d-i passwd/root-password-again password secrete + +# 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 \ + in-target bash -c "wget {{ tftp_server }}/scripts/mnaio-post-install-script.sh -O /opt/mnaio-post-install-script.sh"; \ + in-target bash -c 'chmod +x /opt/mnaio-post-install-script.sh'; \ + in-target bash -c '/opt/mnaio-post-install-script.sh' +# Finish + +# Reboot after the install is finished. +d-i finish-install/reboot_in_progress note diff --git a/multi-node-aio/playbooks/pxe/debian/vm-bridges.cfg.j2 b/multi-node-aio/playbooks/pxe/debian/vm-bridges.cfg.j2 new file mode 100644 index 00000000..0fb421e5 --- /dev/null +++ b/multi-node-aio/playbooks/pxe/debian/vm-bridges.cfg.j2 @@ -0,0 +1,18 @@ +# Physical interface, could be bond. This only needs to be set once + +{% for key, value in item.server_networks.items()|sort(attribute='1.iface') %} +auto {{ value.iface }} +iface {{ value.iface }} inet manual + +auto br-{{ key }} +iface br-{{ key }} inet {{ value.inet_type }} + bridge_stp off + bridge_waitport 10 + bridge_fd 0 + bridge_ports {{ value.iface }} + offload-sg off +{% if value.address is defined %} + address {{ value.address }} +{% endif %} + +{% endfor %} diff --git a/multi-node-aio/playbooks/pxe/debian/vm-post-install-script.sh.j2 b/multi-node-aio/playbooks/pxe/debian/vm-post-install-script.sh.j2 new file mode 100644 index 00000000..62f97706 --- /dev/null +++ b/multi-node-aio/playbooks/pxe/debian/vm-post-install-script.sh.j2 @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +apt-get remove --purge snap* lxc* lxd* || true + +sed -i 's/\(GRUB_CMDLINE_LINUX_DEFAULT=\).*/\1\"\"/g' /target/etc/default/grub +update-grub + +sed -i '/PermitRootLogin / s/ .*/ yes/' /etc/ssh/sshd_config + +mkdir -p /root/.ssh +chmod 0700 /root/.ssh +echo "{{ tftp_ssh_key }}" >> /root/.ssh/authorized_keys + +wget {{ tftp_server }}/networking/$(cat /etc/hostname)-bridges.cfg -O /etc/network/interfaces.d/vm-bridges.cfg +wget {{ tftp_server }}/networking/basic-interface.cfg -O /etc/network/interfaces + +cat > /etc/network/if-up.d/post-up-rules <<EOF +#!/usr/bin/env bash + +function iptables_filter_rule_add { +if ! iptables -w -t $1 -C $2;then + /sbin/iptables -w -t $1 -I $2 +fi +} + +# To ensure ssh checksum is correct +iptables_filter_rule_add "mangle" "POSTROUTING -p tcp --dport 22 -j CHECKSUM --checksum-fill" + +# To provide internet connectivity to instances +iptables_filter_rule_add "nat" "POSTROUTING -o \$(ip route get 1 | awk '{print $5}') -j MASQUERADE" + +# Make sure instances can talk to the metadata server +iptables_filter_rule_add "mangle" "POSTROUTING -p tcp --sport 80 -j CHECKSUM --checksum-fill" +EOF +chmod + /etc/network/if-up.d/post-up-rules diff --git a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/templates/ubuntu-server-16.04-unattended-nova_compute.seed.j2 b/multi-node-aio/playbooks/pxe/debian/vm.preseed.j2 similarity index 59% rename from multi-node-aio-xenial-ansible/roles/tftpboot_configure/templates/ubuntu-server-16.04-unattended-nova_compute.seed.j2 rename to multi-node-aio/playbooks/pxe/debian/vm.preseed.j2 index 29c0b2ab..90513104 100644 --- a/multi-node-aio-xenial-ansible/roles/tftpboot_configure/templates/ubuntu-server-16.04-unattended-nova_compute.seed.j2 +++ b/multi-node-aio/playbooks/pxe/debian/vm.preseed.j2 @@ -1,77 +1,52 @@ -# -# 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 - -############# -# +# Ubuntu Server Preseed # 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/choose_interface select eth0 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 +d-i netcfg/get_hostname string common1 +d-i netcfg/get_domain string common1.openstackci.local -# 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 +## USE THIS FOR STATIC NETWORKING +# d-i netcfg/disable_autoconfig boolean true +# d-i netcfg/dhcp_failed note +# d-i netcfg/dhcp_options select Configure network manually -d-i netcfg/get_hostname string nova_node -d-i netcfg/get_domain string openstackci.local +# # Static network configuration. +# d-i netcfg/get_ipaddress string 10.0.0.100 +# d-i netcfg/get_netmask string 255.255.255.0 +# d-i netcfg/get_gateway string 10.0.0.200 +# d-i netcfg/get_nameservers string 8.8.8.8 +# d-i netcfg/confirm_static boolean true +## USE THIS FOR STATIC NETWORKING # 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. +# Command Line 1: This is necessary otherwise you will be prompted to umount /dev/vda. See Ubuntu bug #1347726. d-i preseed/early_command string \ umount /media || true -############# -# +# Net Image + +# Required at least for 12.10+ +d-i live-installer/net-image string {{ tftp_server }}/images/{{ item.value.image_short_name }}/install/filesystem.squashfs + # 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 @@ -79,55 +54,34 @@ 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 +d-i mirror/http/proxy string {{ default_ubuntu_mirror_proxy }} +d-i mirror/http/hostname string {{ default_ubuntu_mirror_hostname }} +d-i mirror/http/directory string {{ default_ubuntu_mirror_directory }} -############# -# # 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 }} +d-i clock-setup/ntp-server string ntp.ubuntu.com -# You may set this to any valid setting for $TZ; see the contents of +# 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 +d-i partman-lvm/device_remove_lvm_span boolean true +d-i partman-auto/purge_lvm_from_device boolean true # The same applies to pre-existing software RAID array: d-i partman-md/device_remove_md boolean true @@ -137,14 +91,12 @@ 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 }} +d-i partman-auto/disk string /dev/vda # 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-lvm/new_vg_name string vg00 d-i partman-auto/choose_recipe select custompartitioning d-i partman-auto/expert_recipe string \ @@ -160,37 +112,45 @@ d-i partman-auto/expert_recipe string \ 1024 1 100% ext4 \ $primary{ } \ method{ lvm } \ - device{ /dev/{{ vm_disk_device }}2 } \ - vg_name{ lxc } \ + device{ /dev/vda2 } \ + vg_name{ vg00 } \ . \ - 8192 1 8192 linux-swap \ - $lvmok{ } in_vg{ lxc } \ + 1024 1 4096 linux-swap \ + $lvmok{ } in_vg{ vg00 } \ lv_name{ swap00 } \ method{ swap } format{ } \ . \ - 51200 1 51200 ext4 \ - $lvmok{ } in_vg{ lxc } \ + 8192 1 16384 ext4 \ + $lvmok{ } in_vg{ vg00 } \ lv_name{ root00 } \ method{ format } format{ } \ use_filesystem{ } filesystem{ ext4 } \ label{ root } \ mountpoint{ / } \ . \ - 76800 1 76800 ext4 \ - $lvmok{ } in_vg{ lxc } \ + 16384 1 16384 ext4 \ + $lvmok{ } in_vg{ vg00 } \ lv_name{ openstack00 } \ method{ format } format{ } \ use_filesystem{ } filesystem{ ext4 } \ - label{ openstack00 } \ + label{ openstack } \ mountpoint{ /openstack } \ . \ - 1024 1 1000000000 ext4 \ - $lvmok{ } in_vg{ lxc } \ - lv_name{ nova00 } \ + 8192 1 16384 btrfs \ + $lvmok{ } in_vg{ vg00 } \ + lv_name{ machines00 } \ + method{ format } format{ } \ + use_filesystem{ } filesystem{ btrfs } \ + label{ machines } \ + mountpoint{ /var/lib/machines } \ + . \ + 1024 1 1024000 ext4 \ + $lvmok{ } in_vg{ vg00 } \ + lv_name{ deleteme00 } \ method{ format } format{ } \ use_filesystem{ } filesystem{ ext4 } \ - label{ nova } \ - mountpoint{ /var/lib/nova } \ + label{ deleteme } \ + mountpoint{ /deleteme } \ . \ # This makes partman automatically partition without confirmation, provided @@ -200,11 +160,7 @@ 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 @@ -212,10 +168,22 @@ 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/include string bridge-utils \ + dstat \ + ethtool \ + git \ + htop \ + ifenslave \ + lvm2 \ + openssh-server \ + parted \ + python-all \ + qemu-guest-agent \ + tmux \ + vim \ + vlan \ + xfsprogs + d-i pkgsel/update-policy select none # Some versions of the installer can report back on what software you have @@ -224,11 +192,7 @@ d-i pkgsel/update-policy select none # 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 @@ -243,42 +207,22 @@ d-i passwd/make-user boolean false 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 }} +d-i passwd/root-password password secrete +d-i passwd/root-password-again password secrete -############# -# # 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 - -############# -# + in-target bash -c "wget {{ tftp_server }}/scripts/vm-post-install-script.sh -O /opt/vm-post-install-script.sh"; \ + in-target bash -c 'chmod +x /opt/vm-post-install-script.sh'; \ + in-target bash -c '/opt/vm-post-install-script.sh' # Finish -# -############# # Reboot after the install is finished. d-i finish-install/reboot_in_progress note diff --git a/multi-node-aio/playbooks/pxe/sites-enabled.default b/multi-node-aio/playbooks/pxe/sites-enabled.default new file mode 100644 index 00000000..0ae18590 --- /dev/null +++ b/multi-node-aio/playbooks/pxe/sites-enabled.default @@ -0,0 +1,8 @@ +server { + listen 80 default_server; + listen [::]:80 default_server; + root /var/www/pxe; + location / { + autoindex on; + } +} \ No newline at end of file diff --git a/multi-node-aio/playbooks/pxe/tftp/inetd.conf b/multi-node-aio/playbooks/pxe/tftp/inetd.conf new file mode 100644 index 00000000..934eedc0 --- /dev/null +++ b/multi-node-aio/playbooks/pxe/tftp/inetd.conf @@ -0,0 +1 @@ +tftp dgram udp wait root /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /var/lib/tftpboot diff --git a/multi-node-aio/playbooks/pxe/tftp/menu.cfg.j2 b/multi-node-aio/playbooks/pxe/tftp/menu.cfg.j2 new file mode 100644 index 00000000..c19531ab --- /dev/null +++ b/multi-node-aio/playbooks/pxe/tftp/menu.cfg.j2 @@ -0,0 +1,24 @@ +menu hshift 13 +menu width 49 +menu margin 8 +menu tabmsg + +menu title Boot Menu +label local + menu label ^Boot local hard drive + LOCALBOOT 0 + +{% for key, value in images.items() %} +{% for _key, _value in value.image_preseeds.items() %} +label {{ key }}-{{ _key }} + menu label ^{{ key }}-{{ _key }} automated install + kernel {{ value.image_kernel }} +{% if value.image_type == 'debian' %} + append {{ value.image_kernel_options }} initrd={{ value.image_initrd }} preseed/url={{ _value.url }} preseed/interactive=false netcfg/choose_interface={{ default_interface }} +{% endif %} + +{% endfor %} + +{% endfor %} + +menu end diff --git a/multi-node-aio/playbooks/pxe/tftp/pxelinux.cfg.default b/multi-node-aio/playbooks/pxe/tftp/pxelinux.cfg.default new file mode 100644 index 00000000..db9ea4e2 --- /dev/null +++ b/multi-node-aio/playbooks/pxe/tftp/pxelinux.cfg.default @@ -0,0 +1,5 @@ +path boot-screens +include boot-screens/menu.cfg +default boot-screens/vesamenu.c32 +prompt 0 +timeout 100 \ No newline at end of file diff --git a/multi-node-aio/playbooks/pxe/tftp/pxelinux.cfg.macaddr.j2 b/multi-node-aio/playbooks/pxe/tftp/pxelinux.cfg.macaddr.j2 new file mode 100644 index 00000000..9e102c9a --- /dev/null +++ b/multi-node-aio/playbooks/pxe/tftp/pxelinux.cfg.macaddr.j2 @@ -0,0 +1,9 @@ +{% set image_properties = images[item.server_image] %} +default linux +prompt 0 +timeout 1 +label linux + kernel {{ image_properties['image_kernel'] }} +{% if image_properties['image_type'] == 'debian' %} + append hostname={{ item.server_hostname }} {{ image_properties['image_kernel_options'] }} initrd={{ image_properties['image_initrd'] }} preseed/url={{ image_properties['image_preseeds'][item.server_preseed_ks]['url'] }} preseed/interactive=false netcfg/choose_interface={{ item.server_default_interface }} {{ item.server_extra_options | default('') }} +{% endif %} diff --git a/multi-node-aio/playbooks/pxe/tftp/tftp-hpa b/multi-node-aio/playbooks/pxe/tftp/tftp-hpa new file mode 100644 index 00000000..e1768bde --- /dev/null +++ b/multi-node-aio/playbooks/pxe/tftp/tftp-hpa @@ -0,0 +1,6 @@ +TFTP_USERNAME="tftp" +TFTP_DIRECTORY="/var/lib/tftpboot" +TFTP_ADDRESS=":{{ tftp_port }}" +TFTP_OPTIONS="--secure" +RUN_DAEMON="yes" +OPTIONS="-l -s /var/lib/tftpboot" \ No newline at end of file diff --git a/multi-node-aio/playbooks/setup-host.yml b/multi-node-aio/playbooks/setup-host.yml new file mode 100644 index 00000000..2d712210 --- /dev/null +++ b/multi-node-aio/playbooks/setup-host.yml @@ -0,0 +1,213 @@ +--- +# Copyright 2017, Rackspace US, Inc. +# +# 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 witing, 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: Gather facts + hosts: localhost + gather_facts: "{{ gather_facts | default(true) }}" + pre_tasks: + - name: Gather variables for each operating system + include_vars: "{{ item }}" + with_first_found: + - "{{ playbook_dir }}/vars/{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml" + - "{{ playbook_dir }}/vars/{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml" + - "{{ playbook_dir }}/vars/{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml" + - "{{ playbook_dir }}/vars/{{ ansible_distribution | lower }}.yml" + - "{{ playbook_dir }}/vars/{{ ansible_os_family | lower }}.yml" + tags: + - always + + - name: Install host distro packages + package: + pkg: "{{ item }}" + state: "latest" + update_cache: yes + cache_valid_time: 600 + with_items: "{{ mnaio_host_distro_packages }}" + + tasks: + - name: Ensure root has a .ssh directory + file: + path: /root/.ssh + state: directory + owner: root + group: root + mode: 0700 + + - name: Create ssh key pair for root + user: + name: root + generate_ssh_key: yes + ssh_key_bits: 2048 + ssh_key_file: /root/.ssh/id_rsa + + - name: Get root public key + command: cat /root/.ssh/id_rsa.pub + register: public_key_get + changed_when: false + + - name: Set key facts + set_fact: + root_public_key: "{{ public_key_get.stdout }}" + + - name: Ensure root can ssh to localhost + authorized_key: + user: "root" + key: "{{ root_public_key }}" + + - name: Add sysctl options + sysctl: + name: net.ipv4.ip_forward + value: 1 + sysctl_set: yes + state: present + reload: yes + sysctl_file: /etc/sysctl.conf + + - name: Get gateway interface + shell: "/sbin/ip r g 1 | awk '{print $5}'" + register: gw_iface + + - set_fact: + masquerade_interface: "{{ gw_iface.stdout.strip() }}" + + - name: Add IPtables rules + iptables: + table: "{{ item.table | default(omit) }}" + chain: "{{ item.chain | default(omit) }}" + in_interface: "{{ item.in_interface | default(omit) }}" + out_interface: "{{ item.out_interface | default(omit) }}" + source: "{{ item.source | default(omit) }}" + destination: "{{ item.destination | default(omit) }}" + protocol: "{{ item.protocol | default(omit) }}" + match: "{{ item.match | default(omit) }}" + destination_port: "{{ item.destination_port | default(omit) }}" + jump: "{{ item.jump | default(omit) }}" + to_ports: "{{ item.to_ports | default(omit) }}" + with_items: "{{ mnaio_host_iptables_rules }}" + + # These rules are added manually due to bugs in the iptables module. + - name: Add IPtables rules + shell: | + if ! iptables -w -t {{ item.table }} -C {{ item.rule }};then + iptables -w -t {{ item.table }} -I {{ item.rule }} + fi + with_items: + - table: 'nat' + rule: 'POSTROUTING -s 10.0.2.0/22 ! -d 10.0.2.0/22 -j MASQUERADE' + - table: 'mangle' + rule: 'POSTROUTING -s 10.0.2.0/22 -o vm-br-dhcp -p udp -m udp --dport 68 -j CHECKSUM --checksum-fill' + - table: 'mangle' + rule: 'POSTROUTING -s 10.0.2.0/22 -o vm-br-dhcp -p udp -m udp --dport 68 -j CHECKSUM --checksum-fill' + + - name: Start netfilter persistent + service: + name: "{{ mnaio_host_iptables_service }}" + state: started + enabled: yes + when: + - ansible_distribution | lower == 'ubuntu' + + - name: Drop host network interfaces + template: + src: "pxe/{{ ansible_os_family | lower }}/mnaio-bridges.cfg.j2" + dest: /etc/network/interfaces.d/mnaio-bridges.cfg + mode: "0644" + owner: root + group: root + register: mnaio_bridges + + - name: Ensure extra interfaces are sourced + lineinfile: + line: "source /etc/network/interfaces.d/*.cfg" + dest: "/etc/network/interfaces" + + - name: Set the host intefaces up + command: "/sbin/ifup {{ item.value.iface }}" + with_dict: "{{ mnaio_host_networks }}" + when: mnaio_bridges | changed + + - name: Disable virsh default network + shell: | + if virsh net-list | grep -qw "default"; then + virsh net-autostart default --disable + virsh net-destroy default + fi + + - name: Drop virsh network configs + template: + src: "kvm/libvirt-network-template.xml" + dest: "/etc/libvirt/qemu/networks/{{ item.value.iface }}.xml" + mode: "0644" + owner: root + group: root + with_dict: "{{ mnaio_host_networks }}" + + - name: Enable new virsh network(s) + shell: | + if ! virsh net-list | grep -qw "{{ item.value.iface }}"; then + virsh net-define --file /etc/libvirt/qemu/networks/{{ item.value.iface }}.xml + virsh net-create --file /etc/libvirt/qemu/networks/{{ item.value.iface }}.xml + virsh net-autostart {{ item.value.iface }} || ture + fi + with_dict: "{{ mnaio_host_networks }}" + + - name: Locate data volume + command: "vgdisplay vg01" + failed_when: false + register: data_volume + + - name: Locate data disk + shell: > + lsblk -brndo NAME,TYPE,FSTYPE,RO,SIZE | awk '/d[b-z]+ disk +0/{ if ($4>m){m=$4; d=$1}}; END{print d}' + register: lsblk + when: + - data_volume.rc != 0 + - mnaio_data_disk is undefined + + - name: Create data disk label + command: "parted --script /dev/{{ mnaio_data_disk | default(lsblk.stdout) }} mklabel gpt" + when: + - data_volume.rc != 0 + + - name: Create data disk partition + command: "parted --align optimal --script /dev/{{ mnaio_data_disk | default(lsblk.stdout) }} mkpart data1 ext4 0% 100%" + when: + - data_volume.rc != 0 + + - name: Create data volume group + lvg: + vg: vg01 + pvs: "/dev/{{ mnaio_data_disk | default(lsblk.stdout) }}1" + when: + - data_volume.rc != 0 + + - name: Locate virsh data volume + command: "virsh pool-info vg01" + failed_when: false + register: virsh_data_volume + + - name: Create virsh data volume + shell: | + virsh pool-create-as vg01 logical + virsh pool-dumpxml vg01 > /etc/libvirt/storage/vg01.xml + virsh pool-define /etc/libvirt/storage/vg01.xml + virsh pool-autostart vg01 || true + when: + - virsh_data_volume.rc != 0 + + vars_files: + - vars/main.yml + tags: + - setup-host diff --git a/multi-node-aio/playbooks/site.yml b/multi-node-aio/playbooks/site.yml new file mode 100644 index 00000000..f3afc04a --- /dev/null +++ b/multi-node-aio/playbooks/site.yml @@ -0,0 +1,34 @@ +--- +# Copyright 2017, Rackspace US, Inc. +# +# 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 witing, 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. + +- include: setup-host.yml + when: + - setup_host | default(true) | bool + +- include: deploy-pxe.yml + when: + - setup_pxeboot | default(true) | bool + +- include: deploy-dhcp.yml + when: + - setup_dhcpd | default(true) | bool + +- include: deploy-vms.yml + when: + - deploy_vms | default(true) | bool + +- include: deploy-osa.yml + when: + - deploy_osa | default(true) | bool \ No newline at end of file diff --git a/multi-node-aio/playbooks/vars/main.yml b/multi-node-aio/playbooks/vars/main.yml new file mode 100644 index 00000000..22236449 --- /dev/null +++ b/multi-node-aio/playbooks/vars/main.yml @@ -0,0 +1,632 @@ +--- +############### DEFAULTS ############### +default_interface: "{{ default_network | default('eth0') }}" +default_vm_image: "{{ default_image | default('ubuntu-16.04-amd64') }}" +default_vm_storage: "{{ vm_disk_size | default(61440) }}" + +default_ubuntu_mirror_proxy: '' +default_ubuntu_mirror_hostname: archive.ubuntu.com +default_ubuntu_mirror_directory: /ubuntu + +############### DEFAULTS ############### + + +############### MNAIO ############### +# mnaio_data_disk: 'sdc' # str - not required, set this to define a given data disk if no data disk +# is defined the largest unpartitioned disk will be used. + +mnaio_host_networks: + dhcp: + iface: 'vm-br-dhcp' # str - required, interface name + inet_type: 'static' # str - required, iface type [static, dhcp, manual] + address: '10.0.2.1/22' # str - not required, must be in CIDR format + iface_port: none # str - required, physical port used within a host bridge + mgmt: + iface: 'vm-br-eth1' + inet_type: 'static' + address: '10.0.236.1/22' + iface_port: none + flat: + iface: 'vm-br-eth2' + inet_type: 'static' + address: '10.0.248.1/22' + iface_port: none + vlan: + iface: 'vm-br-eth3' + inet_type: 'manual' + iface_port: none + vxlan: + iface: 'vm-br-eth4' + inet_type: 'manual' + address: '10.0.240.1/22' + iface_port: none + storage: + iface: 'vm-br-eth5' + inet_type: 'manual' + address: '10.0.244.1/22' + iface_port: none + +mnaio_host_iptables_rules: + - table: filter + chain: INPUT + protocol: tcp + match: tcp + destination_port: 67 + jump: ACCEPT + - table: filter + chain: INPUT + protocol: udp + match: udp + destination_port: 67 + jump: ACCEPT + - table: filter + chain: INPUT + protocol: udp + match: udp + destination_port: 53 + jump: ACCEPT + - table: filter + chain: INPUT + protocol: udp + match: udp + destination_port: 53 + jump: ACCEPT + - table: filter + chain: FORWARD + in_interface: vm-br-dhcp + jump: ACCEPT + - table: filter + chain: FORWARD + out_interface: vm-br-dhcp + jump: ACCEPT + - table: nat + chain: POSTROUTING + out_interface: "{{ masquerade_interface | default(default_interface) }}" + jump: MASQUERADE +############### MNAIO ############### + + +############### PXE ############### +tftp_port: 69 +tftp_boot_dir: "/var/lib/tftpboot" +tftp_server: "{{ ansible_host }}" # IP address, or domain name of the TFTP server +# tftp_ssh_key: '' # user defined ssh key, used to access the host + +# Default ISO images +images: + ubuntu-16.04-amd64: + image_type: debian + image_iso_url: "http://releases.ubuntu.com/16.04.2/ubuntu-16.04.2-server-amd64.iso" + image_name: "ubuntu-16.04.2-server-amd64.iso" + image_short_name: "ubuntu-16.04.2-server-amd64" + image_default_boot: "ubuntu-16.04.2-server-amd64/amd64/boot-screens/menu.cfg" + image_kernel_options: "biosdevname=0 net.ifnames=0 auto=true priority=critical vga=789" + image_kernel: "ubuntu-16.04.2-server-amd64/amd64/linux" + image_initrd: "ubuntu-16.04.2-server-amd64/amd64/initrd.gz" + image_netboot: "ubuntu-16.04.2-server-amd64/install/netboot/ubuntu-installer" + image_preseeds: + mnaio: + url: "tftp://{{ tftp_server }}/preseed/mnaio.preseed" + template_name: "mnaio.preseed" + vm: + url: "tftp://{{ tftp_server }}/preseed/vm.preseed" + template_name: "vm.preseed" + ubuntu-14.04-amd64: + image_type: debian + image_iso_url: "http://releases.ubuntu.com/14.04.5/ubuntu-14.04.5-server-amd64.iso" + image_name: "ubuntu-14.04.5-server-amd64.iso" + image_short_name: "ubuntu-14.04.5-server-amd64" + image_default_boot: "ubuntu-14.04.5-server-amd64/amd64/boot-screens/menu.cfg" + image_kernel_options: "biosdevname=0 net.ifnames=0 auto=true priority=critical vga=789" + image_kernel: "ubuntu-14.04.5-server-amd64/amd64/linux" + image_initrd: "ubuntu-14.04.5-server-amd64/amd64/initrd.gz" + image_netboot: "ubuntu-14.04.5-server-amd64/install/netboot/ubuntu-installer" + image_preseeds: + mnaio: + url: "tftp://{{ tftp_server }}/preseed/mnaio.preseed" + template_name: "mnaio.preseed" + vm: + url: "tftp://{{ tftp_server }}/preseed/vm.preseed" + template_name: "vm.preseed" + +pxelinux_url: "https://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.03.tar.gz" +pxelinux_name: "syslinux-6.03.tar.gz" +pxelinux_short_name: "syslinux-6.03" +############### PXE ############### + + +############### SERVERS ############### +# List of servers to create specific mac address bound boot entries. +servers: + - server_hostname: 'infra1' # str - required, hostname of server + server_vm_ram: 4096 # int - not required, used to specify ram when provisioning a VM + server_vm_vcpus: 4 # int - not required, used to specify vcpus when provisioning a VM + server_vm_fixed_addr: '10.0.2.100' # str - not required, used to specify fixed address when using internal DHCPD + server_vm_primary_network: 'dhcp' # str - not required, primary network used to kick the VM + server_image: "{{ default_vm_image }}" # str - required, image name + server_default_interface: 'eth0' # str - required, default interface + server_mac_address: '52:54:00:bd:80:00' # str - required, mac address of default interface + server_preseed_ks: 'vm' # str - required, name of preseed/kickstart file + server_extra_options: '' # str - not required, added kernel options + server_networks: # dict - required, hash of networks, can be empty, key is used to name the networks. + dhcp: + iface: 'eth0' # str - required, interface name + inet_type: 'dhcp' # str - required, iface type [static, dhcp, manual] + vm_int_iface: vm-br-dhcp # str - not Required, used to specify an integration networks interface when provisioning a VM + mgmt: + iface: 'eth1' # str - required, interface name + inet_type: 'static' # str - required, iface type [static, dhcp, manual] + address: '10.0.236.100/22' # str - not required, must be in CIDR format + vm_int_iface: vm-br-eth1 # str - not Required, used to specify an integration networks interface when provisioning a VM + flat: + iface: 'eth2' # str - required, interface name + inet_type: 'static' # str - required, iface type [static, dhcp, manual] + address: '10.0.248.100/22' # str - not required, must be in CIDR format + vm_int_iface: vm-br-eth2 # str - not Required, used to specify an integration networks interface when provisioning a VM + vlan: + iface: 'eth3' # str - required, interface name + inet_type: 'manual' # str - required, iface type [static, dhcp, manual] + vm_int_iface: vm-br-eth3 # str - not Required, used to specify an integration networks interface when provisioning a VM + vxlan: + iface: 'eth4' # str - required, interface name + inet_type: 'manual' # str - required, iface type [static, dhcp, manual] + address: '10.0.240.100/22' # str - not required, must be in CIDR format + vm_int_iface: vm-br-eth4 # str - not Required, used to specify an integration networks interface when provisioning a VM + storage: + iface: 'eth5' # str - required, interface name + inet_type: 'manual' # str - required, iface type [static, dhcp, manual] + address: '10.0.244.100/22' # str - not required, must be in CIDR format + vm_int_iface: vm-br-eth5 # str - not Required, used to specify an integration networks interface when provisioning a VM + - server_hostname: 'infra2' + server_vm_ram: 4096 + server_vm_vcpus: 4 + server_vm_fixed_addr: '10.0.2.101' + server_vm_primary_network: 'dhcp' + server_image: "{{ default_vm_image }}" + server_default_interface: 'eth0' + server_mac_address: '52:54:00:bd:80:01' + server_preseed_ks: 'vm' + server_extra_options: '' + server_networks: + dhcp: + iface: 'eth0' + inet_type: 'dhcp' + vm_int_iface: vm-br-dhcp + mgmt: + iface: 'eth1' + inet_type: 'static' + address: '10.0.236.101/22' + vm_int_iface: vm-br-eth1 + flat: + iface: 'eth2' + inet_type: 'static' + address: '10.0.248.101/22' + vm_int_iface: vm-br-eth2 + vlan: + iface: 'eth3' + inet_type: 'manual' + vm_int_iface: vm-br-eth3 + vxlan: + iface: 'eth4' + inet_type: 'manual' + address: '10.0.240.101/22' + vm_int_iface: vm-br-eth4 + storage: + iface: 'eth5' + inet_type: 'manual' + address: '10.0.244.101/22' + vm_int_iface: vm-br-eth5 + - server_hostname: 'infra3' + server_vm_ram: 4096 + server_vm_vcpus: 4 + server_vm_fixed_addr: '10.0.2.102' + server_vm_primary_network: 'dhcp' + server_image: "{{ default_vm_image }}" + server_default_interface: 'eth0' + server_mac_address: '52:54:00:bd:80:02' + server_preseed_ks: 'vm' + server_extra_options: '' + server_networks: + dhcp: + iface: 'eth0' + inet_type: 'dhcp' + vm_int_iface: vm-br-dhcp + mgmt: + iface: 'eth1' + inet_type: 'static' + address: '10.0.236.102/22' + vm_int_iface: vm-br-eth1 + flat: + iface: 'eth2' + inet_type: 'static' + address: '10.0.248.102/22' + vm_int_iface: vm-br-eth2 + vlan: + iface: 'eth3' + inet_type: 'manual' + vm_int_iface: vm-br-eth3 + vxlan: + iface: 'eth4' + inet_type: 'manual' + address: '10.0.240.102/22' + vm_int_iface: vm-br-eth4 + storage: + iface: 'eth5' + inet_type: 'manual' + address: '10.0.244.102/22' + vm_int_iface: vm-br-eth5 + - server_hostname: 'logging1' + server_vm_ram: 2048 + server_vm_vcpus: 1 + server_vm_fixed_addr: '10.0.2.110' + server_vm_primary_network: 'dhcp' + server_image: "{{ default_vm_image }}" + server_default_interface: 'eth0' + server_mac_address: '52:54:00:bd:80:03' + server_preseed_ks: 'vm' + server_extra_options: '' + server_networks: + dhcp: + iface: 'eth0' + inet_type: 'dhcp' + vm_int_iface: vm-br-dhcp + mgmt: + iface: 'eth1' + inet_type: 'static' + address: '10.0.236.103/22' + vm_int_iface: vm-br-eth1 + flat: + iface: 'eth2' + inet_type: 'static' + address: '10.0.248.103/22' + vm_int_iface: vm-br-eth2 + vlan: + iface: 'eth3' + inet_type: 'manual' + vm_int_iface: vm-br-eth3 + vxlan: + iface: 'eth4' + inet_type: 'manual' + address: '10.0.240.103/22' + vm_int_iface: vm-br-eth4 + storage: + iface: 'eth5' + inet_type: 'manual' + address: '10.0.244.103/22' + vm_int_iface: vm-br-eth5 + - server_hostname: 'compute1' + server_vm_ram: 2048 + server_vm_vcpus: 4 + server_vm_fixed_addr: '10.0.2.120' + server_vm_primary_network: 'dhcp' + server_image: "{{ default_vm_image }}" + server_default_interface: 'eth0' + server_mac_address: '52:54:00:bd:80:05' + server_preseed_ks: 'vm' + server_extra_options: '' + server_networks: + dhcp: + iface: 'eth0' + inet_type: 'dhcp' + vm_int_iface: vm-br-dhcp + mgmt: + iface: 'eth1' + inet_type: 'static' + address: '10.0.236.105/22' + vm_int_iface: vm-br-eth1 + flat: + iface: 'eth2' + inet_type: 'static' + address: '10.0.248.105/22' + vm_int_iface: vm-br-eth2 + vlan: + iface: 'eth3' + inet_type: 'manual' + vm_int_iface: vm-br-eth3 + vxlan: + iface: 'eth4' + inet_type: 'manual' + address: '10.0.240.105/22' + vm_int_iface: vm-br-eth4 + storage: + iface: 'eth5' + inet_type: 'manual' + address: '10.0.244.105/22' + vm_int_iface: vm-br-eth5 + - server_hostname: 'compute2' + server_vm_ram: 2048 + server_vm_vcpus: 4 + server_vm_fixed_addr: '10.0.2.121' + server_vm_primary_network: 'dhcp' + server_image: "{{ default_vm_image }}" + server_default_interface: 'eth0' + server_mac_address: '52:54:00:bd:80:06' + server_preseed_ks: 'vm' + server_extra_options: '' + server_networks: + dhcp: + iface: 'eth0' + inet_type: 'dhcp' + vm_int_iface: vm-br-dhcp + mgmt: + iface: 'eth1' + inet_type: 'static' + address: '10.0.236.106/22' + vm_int_iface: vm-br-eth1 + flat: + iface: 'eth2' + inet_type: 'static' + address: '10.0.248.106/22' + vm_int_iface: vm-br-eth2 + vlan: + iface: 'eth3' + inet_type: 'manual' + vm_int_iface: vm-br-eth3 + vxlan: + iface: 'eth4' + inet_type: 'manual' + address: '10.0.240.106/22' + vm_int_iface: vm-br-eth4 + storage: + iface: 'eth5' + inet_type: 'manual' + address: '10.0.244.106/22' + vm_int_iface: vm-br-eth5 + - server_hostname: 'cinder1' + server_vm_ram: 2048 + server_vm_vcpus: 1 + server_vm_fixed_addr: '10.0.2.130' + server_vm_primary_network: 'dhcp' + server_image: "{{ default_vm_image }}" + server_default_interface: 'eth0' + server_mac_address: '52:54:00:bd:80:07' + server_preseed_ks: 'vm' + server_extra_options: '' + server_networks: + dhcp: + iface: 'eth0' + inet_type: 'dhcp' + vm_int_iface: vm-br-dhcp + mgmt: + iface: 'eth1' + inet_type: 'static' + address: '10.0.236.107/22' + vm_int_iface: vm-br-eth1 + flat: + iface: 'eth2' + inet_type: 'static' + address: '10.0.248.107/22' + vm_int_iface: vm-br-eth2 + vlan: + iface: 'eth3' + inet_type: 'manual' + vm_int_iface: vm-br-eth3 + vxlan: + iface: 'eth4' + inet_type: 'manual' + address: '10.0.240.107/22' + vm_int_iface: vm-br-eth4 + storage: + iface: 'eth5' + inet_type: 'manual' + address: '10.0.244.107/22' + vm_int_iface: vm-br-eth5 + - server_hostname: 'cinder2' + server_vm_ram: 2048 + server_vm_vcpus: 1 + server_vm_fixed_addr: '10.0.2.131' + server_vm_primary_network: 'dhcp' + server_image: "{{ default_vm_image }}" + server_default_interface: 'eth0' + server_mac_address: '52:54:00:bd:80:08' + server_preseed_ks: 'vm' + server_extra_options: '' + server_networks: + dhcp: + iface: 'eth0' + inet_type: 'dhcp' + vm_int_iface: vm-br-dhcp + mgmt: + iface: 'eth1' + inet_type: 'static' + address: '10.0.236.108/22' + vm_int_iface: vm-br-eth1 + flat: + iface: 'eth2' + inet_type: 'static' + address: '10.0.248.108/22' + vm_int_iface: vm-br-eth2 + vlan: + iface: 'eth3' + inet_type: 'manual' + vm_int_iface: vm-br-eth3 + vxlan: + iface: 'eth4' + inet_type: 'manual' + address: '10.0.240.108/22' + vm_int_iface: vm-br-eth4 + storage: + iface: 'eth5' + inet_type: 'manual' + address: '10.0.244.108/22' + vm_int_iface: vm-br-eth5 + - server_hostname: 'swift1' + server_vm_ram: 2048 + server_vm_vcpus: 1 + server_vm_fixed_addr: '10.0.2.140' + server_vm_primary_network: 'dhcp' + server_image: "{{ default_vm_image }}" + server_default_interface: 'eth0' + server_mac_address: '52:54:00:bd:80:09' + server_preseed_ks: 'vm' + server_extra_options: '' + server_networks: + dhcp: + iface: 'eth0' + inet_type: 'dhcp' + vm_int_iface: vm-br-dhcp + mgmt: + iface: 'eth1' + inet_type: 'static' + address: '10.0.236.109/22' + vm_int_iface: vm-br-eth1 + flat: + iface: 'eth2' + inet_type: 'static' + address: '10.0.248.109/22' + vm_int_iface: vm-br-eth2 + vlan: + iface: 'eth3' + inet_type: 'manual' + vm_int_iface: vm-br-eth3 + vxlan: + iface: 'eth4' + inet_type: 'manual' + address: '10.0.240.109/22' + vm_int_iface: vm-br-eth4 + storage: + iface: 'eth5' + inet_type: 'manual' + address: '10.0.244.109/22' + vm_int_iface: vm-br-eth5 + - server_hostname: 'swift2' + server_vm_ram: 2048 + server_vm_vcpus: 1 + server_vm_fixed_addr: '10.0.2.140' + server_vm_primary_network: 'dhcp' + server_image: "{{ default_vm_image }}" + server_default_interface: 'eth0' + server_mac_address: '52:54:00:bd:80:10' + server_preseed_ks: 'vm' + server_extra_options: '' + server_networks: + dhcp: + iface: 'eth0' + inet_type: 'dhcp' + vm_int_iface: vm-br-dhcp + mgmt: + iface: 'eth1' + inet_type: 'static' + address: '10.0.236.110/22' + vm_int_iface: vm-br-eth1 + flat: + iface: 'eth2' + inet_type: 'static' + address: '10.0.248.110/22' + vm_int_iface: vm-br-eth2 + vlan: + iface: 'eth3' + inet_type: 'manual' + vm_int_iface: vm-br-eth3 + vxlan: + iface: 'eth4' + inet_type: 'manual' + address: '10.0.240.110/22' + vm_int_iface: vm-br-eth4 + storage: + iface: 'eth5' + inet_type: 'manual' + address: '10.0.244.110/22' + vm_int_iface: vm-br-eth5 + - server_hostname: 'swift3' + server_vm_ram: 2048 + server_vm_vcpus: 1 + server_vm_fixed_addr: '10.0.2.141' + server_vm_primary_network: 'dhcp' + server_image: "{{ default_vm_image }}" + server_default_interface: 'eth0' + server_mac_address: '52:54:00:bd:80:11' + server_preseed_ks: 'vm' + server_extra_options: '' + server_networks: + dhcp: + iface: 'eth0' + inet_type: 'dhcp' + vm_int_iface: vm-br-dhcp + mgmt: + iface: 'eth1' + inet_type: 'static' + address: '10.0.236.111/22' + vm_int_iface: vm-br-eth1 + flat: + iface: 'eth2' + inet_type: 'static' + address: '10.0.248.111/22' + vm_int_iface: vm-br-eth2 + vlan: + iface: 'eth3' + inet_type: 'manual' + vm_int_iface: vm-br-eth3 + vxlan: + iface: 'eth4' + inet_type: 'manual' + address: '10.0.240.111/22' + vm_int_iface: vm-br-eth4 + storage: + iface: 'eth5' + inet_type: 'manual' + address: '10.0.244.111/22' + vm_int_iface: vm-br-eth5 + - server_hostname: 'deploy1' + server_vm_ram: 2048 + server_vm_vcpus: 2 + server_vm_fixed_addr: '10.0.2.150' + server_vm_primary_network: 'dhcp' + server_image: "{{ default_vm_image }}" + server_default_interface: 'eth0' + server_mac_address: '52:54:00:bd:80:12' + server_preseed_ks: 'vm' + server_extra_options: '' + server_networks: + dhcp: + iface: 'eth0' + inet_type: 'dhcp' + vm_int_iface: vm-br-dhcp + mgmt: + iface: 'eth1' + inet_type: 'static' + address: '10.0.236.112/22' + vm_int_iface: vm-br-eth1 + flat: + iface: 'eth2' + inet_type: 'static' + address: '10.0.248.112/22' + vm_int_iface: vm-br-eth2 + vlan: + iface: 'eth3' + inet_type: 'manual' + vm_int_iface: vm-br-eth3 + vxlan: + iface: 'eth4' + inet_type: 'manual' + address: '10.0.240.112/22' + vm_int_iface: vm-br-eth4 + storage: + iface: 'eth5' + inet_type: 'manual' + address: '10.0.244.112/22' + vm_int_iface: vm-br-eth5 +############### SERVERS ############### + + +############### DHCP ############### +dhcp_default_lease_time: 21600 # Default lease time +dhcp_max_lease_time: 43200 # Max lease time +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: "{{ tftp_server }}" # The server hosting the TFTP server - The default is used if this is not defined + dhcp_default_domain_name: openstackci.local +############### DHCP ############### + + +############### KVM ############### +############### KVM ############### diff --git a/multi-node-aio/playbooks/vars/ubuntu.yml b/multi-node-aio/playbooks/vars/ubuntu.yml new file mode 100644 index 00000000..22547660 --- /dev/null +++ b/multi-node-aio/playbooks/vars/ubuntu.yml @@ -0,0 +1,43 @@ +--- +# Copyright 2017, Rackspace US, Inc. +# +# 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 witing, 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. + +mnaio_host_distro_packages: + - bridge-utils + - ifenslave + - iptables-persistent + - libvirt-bin + - lvm2 + - ntp + - openssh-server + - python2.7 + - python-software-properties + - python-netaddr + - qemu-kvm + - qemu-utils + - software-properties-common + - virtinst + - virt-manager + - vlan + +mnaio_pxe_distro_packages: + - tftpd-hpa + - inetutils-inetd + - nginx + - p7zip-full + +mnaio_dhcp_distro_packages: + - isc-dhcp-server + +mnaio_host_iptables_service: "{{ (ansible_distribution | lower + '-' + ansible_distribution_version | lower == 'ubuntu-14.04') | ternary('iptables-persistent', 'netfilter-persistent') }}" diff --git a/multi-node-aio/run_tests.sh b/multi-node-aio/run_tests.sh new file mode 100755 index 00000000..cdae6a93 --- /dev/null +++ b/multi-node-aio/run_tests.sh @@ -0,0 +1,62 @@ +#!/usr/bin/env bash +# Copyright 2015, Rackspace US, Inc. +# +# 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. +# +# Note: +# This file is maintained in the openstack-ansible-tests repository. +# https://git.openstack.org/cgit/openstack/openstack-ansible-tests/tree/run_tests.sh +# If you need to modify this file, update the one in the openstack-ansible-tests +# repository and then update this file as well. The purpose of this file is to +# prepare the host and then execute all the tox tests. +# + +## Shell Opts ---------------------------------------------------------------- +set -xeu + +## Vars ---------------------------------------------------------------------- + +export WORKING_DIR=${WORKING_DIR:-$(pwd)} + +## Main ---------------------------------------------------------------------- + +source /etc/os-release || source /usr/lib/os-release + +install_pkg_deps() { + pkg_deps="git" + + case ${ID,,} in + *suse*) pkg_mgr_cmd="zypper -n in" ;; + centos|rhel) pkg_mgr_cmd="yum install -y" ;; + fedora) pkg_mgr_cmd="dnf -y install" ;; + ubuntu|debian) pkg_mgr_cmd="apt-get install -y" ;; + *) echo "unsupported distribution: ${ID,,}"; exit 1 ;; + esac + + eval sudo $pkg_mgr_cmd $pkg_deps +} + +git_clone_repo() { + if [[ ! -d "${WORKING_DIR}/tests/common" ]]; then + git clone \ + https://git.openstack.org/openstack/openstack-ansible-tests \ + ${WORKING_DIR}/tests/common + fi +} + +install_pkg_deps + +git_clone_repo + +# start executing the main test script +source /opt/openstack-ansible-tests/run_tests_common.sh diff --git a/multi-node-aio/setup-cobbler.sh b/multi-node-aio/setup-cobbler.sh deleted file mode 100755 index e26bd0a3..00000000 --- a/multi-node-aio/setup-cobbler.sh +++ /dev/null @@ -1,185 +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 - -# The default image for VMs, change it to 16.04 if you want to use xenial as operation system. -DEFAULT_IMAGE="${DEFAULT_IMAGE:-"$(lsb_release -sd | awk '{print $2}')"}" - -# The default kernel for Image, leave it empty will install the lastest kernel. -DEFAULT_KERNEL="${DEFAULT_KERNEL:-linux-image-extra-4.4.0-67-generic}" - -# Install cobbler -wget -qO - http://download.opensuse.org/repositories/home:/libertas-ict:/cobbler26/xUbuntu_14.04/Release.key | apt-key add - -add-apt-repository "deb http://download.opensuse.org/repositories/home:/libertas-ict:/cobbler26/xUbuntu_14.04/ ./" -apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y --force-yes install cobbler dhcp3-server debmirror isc-dhcp-server ipcalc tftpd tftp fence-agents iptables-persistent - -# Basic cobbler setup -sed -i 's/^manage_dhcp\:.*/manage_dhcp\: 1/g' /etc/cobbler/settings -sed -i 's/^restart_dhcp\:.*/restart_dhcp\: 1/g' /etc/cobbler/settings -sed -i 's/^next_server\:.*/next_server\: 10.0.0.200/g' /etc/cobbler/settings -sed -i 's/^server\:.*/server\: 10.0.0.200/g' /etc/cobbler/settings -sed -i 's/^http_port\:.*/http_port\: 5150/g' /etc/cobbler/settings -sed -i 's/^INTERFACES.*/INTERFACES="br-dhcp"/g' /etc/default/isc-dhcp-server - -# Move Cobbler Apache config to the right place -cp -v /etc/apache2/conf.d/cobbler.conf /etc/apache2/conf-available/ -cp -v /etc/apache2/conf.d/cobbler_web.conf /etc/apache2/conf-available/ - -# Fix Apache conf to match 2.4 configuration -sed -i "/Order allow,deny/d" /etc/apache2/conf-available/cobbler*.conf -sed -i "s/Allow from all/Require all granted/g" /etc/apache2/conf-available/cobbler*.conf -sed -i "s/^Listen 80/Listen 5150/g" /etc/apache2/ports.conf -sed -i "s/\:80/\:5150/g" /etc/apache2/sites-available/000-default.conf - -# Enable the above config -a2enconf cobbler cobbler_web - -# Enable Proxy modules -a2enmod proxy -a2enmod proxy_http - -# Fix TFTP server arguments in cobbler template to enable it to work on Ubuntu -sed -i "s/server_args .*/server_args = -s \$args/" /etc/cobbler/tftpd.template - -mkdir_check "/tftpboot" - -chown www-data /var/lib/cobbler/webui_sessions - -# when templated replace \$ with $ -# Copy dhcp template and replace with DNS var -cp -v templates/dhcp.template /etc/cobbler/dhcp.template -sed -i "s|__DNS_NAMESERVER__|${DNS_NAMESERVER}|g" /etc/cobbler/dhcp.template - -# Create a sources.list file -if [[ $DEFAULT_IMAGE == "14.04."* ]]; then - cp -v templates/trusty-sources.list /var/www/html/trusty-sources.list -else - cp -v templates/xenial-sources.list /var/www/html/xenial-sources.list -fi - -# 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}" - -# This is set to instruct the preseed what the default network is expected to be -DEFAULT_NETWORK="${DEFAULT_NETWORK:-eth0}" - -# Set SSH key to root user's public key -SSHKEY="${SSHKEY:-$(cat /root/.ssh/id_rsa.pub)}" - -# Template the seed files -for seed_file in $(ls -1 templates/pre-seeds); do - cp -v "templates/pre-seeds/${seed_file}" "/var/lib/cobbler/kickstarts/${seed_file#*'/'}" - sed -i "s|__DEVICE_NAME__|${DEVICE_NAME}|g" "/var/lib/cobbler/kickstarts/${seed_file#*'/'}" - sed -i "s|__SSHKEY__|${SSHKEY}|g" "/var/lib/cobbler/kickstarts/${seed_file#*'/'}" - sed -i "s|__DEFAULT_NETWORK__|${DEFAULT_NETWORK}|g" "/var/lib/cobbler/kickstarts/${seed_file#*'/'}" - sed -i "s|__DEFAULT_KERNEL__|${DEFAULT_KERNEL}|g" "/var/lib/cobbler/kickstarts/${seed_file#*'/'}" -done - -# Restart services again and configure autostart -service cobblerd restart -service apache2 restart -service xinetd restart -update-rc.d cobblerd defaults - -# Update Cobbler Signatures -cobbler signature update - -# Get ubuntu server image md5 hash file -wget -qO /tmp/MD5SUMS http://releases.ubuntu.com/"${DEFAULT_IMAGE:0:5}"/MD5SUMS - -# Get ubuntu server image, if the server image exists, compare the md5, rm and download new image if the hash is not -# the same. -mkdir_check "/var/cache/iso" -pushd /var/cache/iso - if [ -f "/var/cache/iso/ubuntu-"${DEFAULT_IMAGE}"-server-amd64.iso" ]; then - md5=`md5sum ubuntu-"${DEFAULT_IMAGE}"-server-amd64.iso | awk '{ print $1 }'` - if ! grep -q ${md5} /tmp/MD5SUMS ; then - rm /var/cache/iso/ubuntu-"${DEFAULT_IMAGE}"-server-amd64.iso - wget http://releases.ubuntu.com/"${DEFAULT_IMAGE:0:5}"/ubuntu-"${DEFAULT_IMAGE}"-server-amd64.iso - fi - else - wget http://releases.ubuntu.com/"${DEFAULT_IMAGE:0:5}"/ubuntu-"${DEFAULT_IMAGE}"-server-amd64.iso - fi -popd - -# import cobbler image -if ! cobbler distro list | grep -qw "ubuntu-"${DEFAULT_IMAGE}"-server-x86_64"; then - mkdir_check "/mnt/iso" - mount -o loop /var/cache/iso/ubuntu-"${DEFAULT_IMAGE}"-server-amd64.iso /mnt/iso - cobbler import --name=ubuntu-"${DEFAULT_IMAGE}"-server-amd64 --path=/mnt/iso - umount /mnt/iso -fi - -# Create cobbler profile -for seed_file in /var/lib/cobbler/kickstarts/ubuntu*"${DEFAULT_IMAGE:0:5}"*.seed; do - if ! cobbler profile list | grep -qw "${seed_file##*'/'}"; then - cobbler profile add \ - --name "${seed_file##*'/'}" \ - --distro ubuntu-"${DEFAULT_IMAGE}"-server-x86_64 \ - --kickstart "${seed_file}" - fi -done - -# sync cobbler -cobbler sync - -# Get Loaders -cobbler get-loaders - - -# Create cobbler systems -for node_type in $(get_all_types); do - for node in $(get_host_type ${node_type}); do - if cobbler system list | grep -qw "${node%%':'*}"; then - echo "removing node ${node%%':'*} from the cobbler system" - cobbler system remove --name "${node%%':'*}" - fi - echo "adding node ${node%%':'*} from the cobbler system" - cobbler system add \ - --name="${node%%':'*}" \ - --profile="ubuntu-server-"${DEFAULT_IMAGE:0:5}"-unattended-cobbler-${node_type}.seed" \ - --hostname="${node%%":"*}.openstackci.local" \ - --kopts="interface=${DEFAULT_NETWORK} net.ifnames=0 biosdevname=0" \ - --interface="${DEFAULT_NETWORK}" \ - --mac="52:54:00:bd:81:${node:(-2)}" \ - --ip-address="10.0.0.${node#*":"}" \ - --subnet=255.255.255.0 \ - --gateway=10.0.0.200 \ - --name-servers="${DNS_NAMESERVER}" \ - --static=1 - done -done - -# sync cobbler -cobbler sync - -# Restart XinetD -service xinetd stop -service xinetd start - -# Remove the expired key and opensuse repo, no need after the cobbler being set up. -aptkey_mesg=$(apt-key list) -if [[ $(contains "$aptkey_mesg" "expired") -gt 0 ]]; then - expired_key=$(echo "$aptkey_mesg" | awk /expired/'{print $ sub(".*\/", "")}') - apt-key del $expired_key - add-apt-repository --remove "deb http://download.opensuse.org/repositories/home:/libertas-ict:/cobbler26/xUbuntu_14.04/ ./" -fi diff --git a/multi-node-aio/setup-host.sh b/multi-node-aio/setup-host.sh deleted file mode 100755 index 8e328c91..00000000 --- a/multi-node-aio/setup-host.sh +++ /dev/null @@ -1,140 +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=$(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 - -# 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 vim virtinst virt-manager vlan - -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' - -# 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 /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 <<EOF - # Faster likely unsigned repo - deb [arch=amd64] http://mirror.rackspace.com/ubuntu trusty main universe - deb [arch=amd64] http://mirror.rackspace.com/ubuntu trusty-updates main universe - deb [arch=amd64] http://mirror.rackspace.com/ubuntu trusty-backports main universe - deb [arch=amd64] http://mirror.rackspace.com/ubuntu trusty-security main universe - - # i386 comes from the global known repo. This is slower and so it is only used for i386 packages - deb [arch=i386] http://archive.ubuntu.com/ubuntu trusty main universe - deb [arch=i386] http://archive.ubuntu.com/ubuntu trusty-updates main universe - deb [arch=i386] http://archive.ubuntu.com/ubuntu trusty-backports main universe - deb [arch=i386] http://archive.ubuntu.com/ubuntu trusty-security main universe -EOF - - cat > /tmp/sources.list <<EOF - # Faster likely unsigned repo - deb [arch=amd64] http://mirror.rackspace.com/ubuntu xenial main universe - deb [arch=amd64] http://mirror.rackspace.com/ubuntu xenial-updates main universe - deb [arch=amd64] http://mirror.rackspace.com/ubuntu xenial-backports main universe - deb [arch=amd64] http://mirror.rackspace.com/ubuntu xenial-security main universe - - # i386 comes from the global known repo. This is slower and so it is only used for i386 packages - deb [arch=i386] http://archive.ubuntu.com/ubuntu xenial main universe - deb [arch=i386] http://archive.ubuntu.com/ubuntu xenial-updates main universe - deb [arch=i386] http://archive.ubuntu.com/ubuntu xenial-backports main universe - deb [arch=i386] http://archive.ubuntu.com/ubuntu xenial-security main universe -EOF -fi - -# Allow apt repos to be UnAuthenticated -cat > /etc/apt/apt.conf.d/00-nokey <<EOF -APT { Get { AllowUnauthenticated "1"; }; }; -EOF diff --git a/multi-node-aio/setup-virsh-net.sh b/multi-node-aio/setup-virsh-net.sh deleted file mode 100755 index 2c5287df..00000000 --- a/multi-node-aio/setup-virsh-net.sh +++ /dev/null @@ -1,37 +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 - -# Remove the default libvirt networks -if virsh net-list | grep -qw "default"; then - virsh net-autostart default --disable - virsh net-destroy default -fi - -# Create the libvirt networks used for the Host VMs -for network in br-dhcp vm-br-eth1 vm-br-eth2 vm-br-eth3 vm-br-eth4 vm-br-eth5; do - if ! virsh net-list | grep -qw "${network}"; then - sed "s/__NETWORK__/${network}/g" templates/libvirt-network.xml > /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/templates/dhcp.template b/multi-node-aio/templates/dhcp.template deleted file mode 100644 index 1864134e..00000000 --- a/multi-node-aio/templates/dhcp.template +++ /dev/null @@ -1,85 +0,0 @@ -# ****************************************************************** -# Cobbler managed dhcpd.conf file -# -# generated from cobbler dhcp.conf template ($date) -# Do NOT make changes to /etc/dhcpd.conf. Instead, make your changes -# in /etc/cobbler/dhcp.template, as /etc/dhcpd.conf will be -# overwritten. -# -# ****************************************************************** - -ddns-update-style interim; - -allow booting; -allow bootp; - -ignore client-updates; -set vendorclass = option vendor-class-identifier; - -option pxe-system-type code 93 = unsigned integer 16; - -subnet 10.0.0.0 netmask 255.255.255.0 { - option routers 10.0.0.200; - option domain-name-servers __DNS_NAMESERVER__; - option subnet-mask 255.255.255.0; - range dynamic-bootp 10.0.0.1 10.0.0.50; - default-lease-time 21600; - max-lease-time 43200; - next-server $next_server; - class "pxeclients" { - match if substring (option vendor-class-identifier, 0, 9) = "PXEClient"; - if option pxe-system-type = 00:02 { - filename "ia64/elilo.efi"; - } else if option pxe-system-type = 00:06 { - filename "grub/grub-x86.efi"; - } else if option pxe-system-type = 00:07 { - filename "grub/grub-x86_64.efi"; - } else { - filename "pxelinux.0"; - } - } - -} - -#for dhcp_tag in $dhcp_tags.keys(): - ## group could be subnet if your dhcp tags line up with your subnets - ## or really any valid dhcpd.conf construct ... if you only use the - ## default dhcp tag in cobbler, the group block can be deleted for a - ## flat configuration -# group for Cobbler DHCP tag: $dhcp_tag -group { - #for mac in $dhcp_tags[$dhcp_tag].keys(): - #set iface = $dhcp_tags[$dhcp_tag][$mac] - host $iface.name { - hardware ethernet $mac; - #if $iface.ip_address: - fixed-address $iface.ip_address; - #end if - #if $iface.hostname: - option host-name "$iface.hostname"; - #end if - #if $iface.netmask: - option subnet-mask $iface.netmask; - #end if - #if $iface.gateway: - option routers $iface.gateway; - #end if - #if $iface.enable_gpxe: - if exists user-class and option user-class = "gPXE" { - filename "http://$cobbler_server/cblr/svc/op/gpxe/system/$iface.owner"; - } else if exists user-class and option user-class = "iPXE" { - filename "http://$cobbler_server/cblr/svc/op/gpxe/system/$iface.owner"; - } else { - filename "undionly.kpxe"; - } - #else - filename "$iface.filename"; - #end if - ## Cobbler defaults to $next_server, but some users - ## may like to use $iface.system.server for proxied setups - next-server $next_server; - ## next-server $iface.next_server; - } - #end for -} -#end for diff --git a/multi-node-aio/templates/kvm-bonded-bridges.cfg b/multi-node-aio/templates/kvm-bonded-bridges.cfg deleted file mode 100644 index 0acff947..00000000 --- a/multi-node-aio/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/templates/libvirt-network.xml b/multi-node-aio/templates/libvirt-network.xml deleted file mode 100644 index 1c10ff99..00000000 --- a/multi-node-aio/templates/libvirt-network.xml +++ /dev/null @@ -1,5 +0,0 @@ -<network> - <name>__NETWORK__</name> - <forward mode="bridge"/> - <bridge name="__NETWORK__"/> -</network> \ No newline at end of file diff --git a/multi-node-aio/templates/network-interfaces/vm.openstackci.local-bonded-bridges.cfg b/multi-node-aio/templates/network-interfaces/vm.openstackci.local-bonded-bridges.cfg deleted file mode 100644 index 278617fb..00000000 --- a/multi-node-aio/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 eth1 -iface eth1 inet manual - -# FLAT Network -auto eth2 -iface eth2 inet manual - -# VLAN Network -auto eth3 -iface eth3 inet manual - -# TUNNEL Network -auto eth4 -iface eth4 inet manual - -# STORAGE Network -auto eth5 -iface eth5 inet manual - -auto br-mgmt -iface br-mgmt inet static - bridge_stp off - bridge_waitport 10 - bridge_fd 0 - bridge_ports eth1 - 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 eth2 - 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 eth3 - offload-sg off - -auto br-vxlan -iface br-vxlan inet static - bridge_stp off - bridge_waitport 10 - bridge_fd 0 - bridge_ports eth4 - 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 eth0 -j MASQUERADE - down /sbin/iptables -t nat -D POSTROUTING -o eth0 -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 eth5 - address __NETWORK_BASE__.244.__COUNT__ - netmask 255.255.252.0 - offload-sg off diff --git a/multi-node-aio/templates/openstack_user_config.yml b/multi-node-aio/templates/openstack_user_config.yml deleted file mode 100644 index 87d76c61..00000000 --- a/multi-node-aio/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/templates/osa-swift.yml b/multi-node-aio/templates/osa-swift.yml deleted file mode 100644 index cb522b94..00000000 --- a/multi-node-aio/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/templates/pre-seeds/ubuntu-server-14.04-unattended-cobbler-cinder.seed b/multi-node-aio/templates/pre-seeds/ubuntu-server-14.04-unattended-cobbler-cinder.seed deleted file mode 100644 index 47eac3fa..00000000 --- a/multi-node-aio/templates/pre-seeds/ubuntu-server-14.04-unattended-cobbler-cinder.seed +++ /dev/null @@ -1,296 +0,0 @@ -# -# Ubuntu Server 14.04 Preseed -# -# Usage: -# -# This Ubuntu Preseed file is meant to be used with Cobbler. It has been -# tested only on Cobbler 2.4.1. It is a completely unattended install. -# -# References: -# -# https://help.ubuntu.com/14.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 $kernel_options_post - -### Base system installation -d-i base-installer/kernel/image string __DEFAULT_KERNEL__ - -############# -# -# Networking -# -############# - -#if "__DEFAULT_NETWORK__" in $interfaces - #set idata = $interfaces["__DEFAULT_NETWORK__"] - #set static = $idata['static'] - #set ip_address = $idata.get("ip_address", "127.0.0.1") - #set netmask = $idata.get("netmask", "255.0.0.0") - #set gateway = $getVar('gateway','127.0.0.1') -#end if - -d-i netcfg/choose_interface select __DEFAULT_NETWORK__ -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 - -#if $static -# Static network configuration. -d-i netcfg/get_ipaddress string $idata.get("ip_address", "127.0.0.1") -d-i netcfg/get_netmask string $idata.get("netmask", "255.0.0.0") -d-i netcfg/get_gateway string $gateway -d-i netcfg/get_nameservers string $name_servers[0] -d-i netcfg/confirm_static boolean true -#end if - -d-i netcfg/get_hostname string $system_name -d-i netcfg/get_domain string $hostname - -# 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/__DEVICE_NAME__. See Ubuntu bug #1347726. -d-i preseed/early_command string \ - umount /media || true - -############# -# -# Net Image -# -############# - -# Required at least for 12.10+ -d-i live-installer/net-image string http://$http_server/cobbler/links/$distro_name/install/filesystem.squashfs - -############# -# -# 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 - -############# -# -# Mirror -# -############# - -d-i mirror/country string manual -d-i mirror/http/proxy string -d-i mirror/http/hostname string $http_server -d-i mirror/http/directory string $install_source_directory - -############# -# -# 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.ubuntu.com - -# 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/__DEVICE_NAME__ - -# 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/__DEVICE_NAME__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 -# 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 cobbler -d-i passwd/root-password-again password cobbler - -############# -# -# 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 http://$http_server/trusty-sources.list -O /target/etc/apt/sources.list; \ - wget http://$http_server/osa-$hostname-bridges.cfg -O /target/etc/network/interfaces.d/osa-$hostname-bridges.cfg; \ - wget http://$http_server/cblr/svc/op/nopxe/system/$system_name -O /dev/null; \ - sed -i '/PermitRootLogin / s/ .*/ yes/' /target/etc/ssh/sshd_config; \ - mkdir /target/root/.ssh; \ - chmod 0700 /target/root/.ssh; \ - echo "__SSHKEY__" >> /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 \ No newline at end of file diff --git a/multi-node-aio/templates/pre-seeds/ubuntu-server-14.04-unattended-cobbler-deploy.seed b/multi-node-aio/templates/pre-seeds/ubuntu-server-14.04-unattended-cobbler-deploy.seed deleted file mode 100644 index 47eac3fa..00000000 --- a/multi-node-aio/templates/pre-seeds/ubuntu-server-14.04-unattended-cobbler-deploy.seed +++ /dev/null @@ -1,296 +0,0 @@ -# -# Ubuntu Server 14.04 Preseed -# -# Usage: -# -# This Ubuntu Preseed file is meant to be used with Cobbler. It has been -# tested only on Cobbler 2.4.1. It is a completely unattended install. -# -# References: -# -# https://help.ubuntu.com/14.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 $kernel_options_post - -### Base system installation -d-i base-installer/kernel/image string __DEFAULT_KERNEL__ - -############# -# -# Networking -# -############# - -#if "__DEFAULT_NETWORK__" in $interfaces - #set idata = $interfaces["__DEFAULT_NETWORK__"] - #set static = $idata['static'] - #set ip_address = $idata.get("ip_address", "127.0.0.1") - #set netmask = $idata.get("netmask", "255.0.0.0") - #set gateway = $getVar('gateway','127.0.0.1') -#end if - -d-i netcfg/choose_interface select __DEFAULT_NETWORK__ -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 - -#if $static -# Static network configuration. -d-i netcfg/get_ipaddress string $idata.get("ip_address", "127.0.0.1") -d-i netcfg/get_netmask string $idata.get("netmask", "255.0.0.0") -d-i netcfg/get_gateway string $gateway -d-i netcfg/get_nameservers string $name_servers[0] -d-i netcfg/confirm_static boolean true -#end if - -d-i netcfg/get_hostname string $system_name -d-i netcfg/get_domain string $hostname - -# 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/__DEVICE_NAME__. See Ubuntu bug #1347726. -d-i preseed/early_command string \ - umount /media || true - -############# -# -# Net Image -# -############# - -# Required at least for 12.10+ -d-i live-installer/net-image string http://$http_server/cobbler/links/$distro_name/install/filesystem.squashfs - -############# -# -# 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 - -############# -# -# Mirror -# -############# - -d-i mirror/country string manual -d-i mirror/http/proxy string -d-i mirror/http/hostname string $http_server -d-i mirror/http/directory string $install_source_directory - -############# -# -# 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.ubuntu.com - -# 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/__DEVICE_NAME__ - -# 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/__DEVICE_NAME__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 -# 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 cobbler -d-i passwd/root-password-again password cobbler - -############# -# -# 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 http://$http_server/trusty-sources.list -O /target/etc/apt/sources.list; \ - wget http://$http_server/osa-$hostname-bridges.cfg -O /target/etc/network/interfaces.d/osa-$hostname-bridges.cfg; \ - wget http://$http_server/cblr/svc/op/nopxe/system/$system_name -O /dev/null; \ - sed -i '/PermitRootLogin / s/ .*/ yes/' /target/etc/ssh/sshd_config; \ - mkdir /target/root/.ssh; \ - chmod 0700 /target/root/.ssh; \ - echo "__SSHKEY__" >> /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 \ No newline at end of file diff --git a/multi-node-aio/templates/pre-seeds/ubuntu-server-14.04-unattended-cobbler-infra.seed b/multi-node-aio/templates/pre-seeds/ubuntu-server-14.04-unattended-cobbler-infra.seed deleted file mode 100644 index d06e4251..00000000 --- a/multi-node-aio/templates/pre-seeds/ubuntu-server-14.04-unattended-cobbler-infra.seed +++ /dev/null @@ -1,290 +0,0 @@ -# -# Ubuntu Server 14.04 Preseed -# -# Usage: -# -# This Ubuntu Preseed file is meant to be used with Cobbler. It has been -# tested only on Cobbler 2.4.1. It is a completely unattended install. -# -# References: -# -# https://help.ubuntu.com/14.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 $kernel_options_post - -### Base system installation -d-i base-installer/kernel/image string __DEFAULT_KERNEL__ - -############# -# -# Networking -# -############# - -#if "__DEFAULT_NETWORK__" in $interfaces - #set idata = $interfaces["__DEFAULT_NETWORK__"] - #set static = $idata['static'] - #set ip_address = $idata.get("ip_address", "127.0.0.1") - #set netmask = $idata.get("netmask", "255.0.0.0") - #set gateway = $getVar('gateway','127.0.0.1') -#end if - -d-i netcfg/choose_interface select __DEFAULT_NETWORK__ -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 - -#if $static -# Static network configuration. -d-i netcfg/get_ipaddress string $idata.get("ip_address", "127.0.0.1") -d-i netcfg/get_netmask string $idata.get("netmask", "255.0.0.0") -d-i netcfg/get_gateway string $gateway -d-i netcfg/get_nameservers string $name_servers[0] -d-i netcfg/confirm_static boolean true -#end if - -d-i netcfg/get_hostname string $system_name -d-i netcfg/get_domain string $hostname - -# 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/__DEVICE_NAME__. See Ubuntu bug #1347726. -d-i preseed/early_command string \ - umount /media || true - -############# -# -# Net Image -# -############# - -# Required at least for 12.10+ -d-i live-installer/net-image string http://$http_server/cobbler/links/$distro_name/install/filesystem.squashfs - -############# -# -# 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 - -############# -# -# Mirror -# -############# - -d-i mirror/country string manual -d-i mirror/http/proxy string -d-i mirror/http/hostname string $http_server -d-i mirror/http/directory string $install_source_directory - -############# -# -# 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.ubuntu.com - -# 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/__DEVICE_NAME__ - -# 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 - -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/__DEVICE_NAME__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 -# 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 cobbler -d-i passwd/root-password-again password cobbler - -############# -# -# 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 -# -############# - -# Command Line 1: Allow root to SSH. -# Command Line 2: Cobbler overwrites sources.list with its own repos. Put the default Ubuntu sources.list back. -# Command Line 3: Cobbler API call to turn off netboot. -d-i preseed/late_command string \ - wget http://$http_server/trusty-sources.list -O /target/etc/apt/sources.list; \ - wget http://$http_server/osa-$hostname-bridges.cfg -O /target/etc/network/interfaces.d/osa-$hostname-bridges.cfg; \ - wget http://$http_server/cblr/svc/op/nopxe/system/$system_name -O /dev/null; \ - sed -i '/PermitRootLogin / s/ .*/ yes/' /target/etc/ssh/sshd_config; \ - mkdir /target/root/.ssh; \ - chmod 0700 /target/root/.ssh; \ - echo "__SSHKEY__" >> /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/templates/pre-seeds/ubuntu-server-14.04-unattended-cobbler-logging.seed b/multi-node-aio/templates/pre-seeds/ubuntu-server-14.04-unattended-cobbler-logging.seed deleted file mode 100644 index 858f6e24..00000000 --- a/multi-node-aio/templates/pre-seeds/ubuntu-server-14.04-unattended-cobbler-logging.seed +++ /dev/null @@ -1,291 +0,0 @@ -# -# Ubuntu Server 14.04 Preseed -# -# Usage: -# -# This Ubuntu Preseed file is meant to be used with Cobbler. It has been -# tested only on Cobbler 2.4.1. It is a completely unattended install. -# -# References: -# -# https://help.ubuntu.com/14.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 $kernel_options_post - -### Base system installation -d-i base-installer/kernel/image string __DEFAULT_KERNEL__ - -############# -# -# Networking -# -############# - -#if "__DEFAULT_NETWORK__" in $interfaces - #set idata = $interfaces["__DEFAULT_NETWORK__"] - #set static = $idata['static'] - #set ip_address = $idata.get("ip_address", "127.0.0.1") - #set netmask = $idata.get("netmask", "255.0.0.0") - #set gateway = $getVar('gateway','127.0.0.1') -#end if - -d-i netcfg/choose_interface select __DEFAULT_NETWORK__ -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 - -#if $static -# Static network configuration. -d-i netcfg/get_ipaddress string $idata.get("ip_address", "127.0.0.1") -d-i netcfg/get_netmask string $idata.get("netmask", "255.0.0.0") -d-i netcfg/get_gateway string $gateway -d-i netcfg/get_nameservers string $name_servers[0] -d-i netcfg/confirm_static boolean true -#end if - -d-i netcfg/get_hostname string $system_name -d-i netcfg/get_domain string $hostname - -# 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/__DEVICE_NAME__. See Ubuntu bug #1347726. -d-i preseed/early_command string \ - umount /media || true - -############# -# -# Net Image -# -############# - -# Required at least for 12.10+ -d-i live-installer/net-image string http://$http_server/cobbler/links/$distro_name/install/filesystem.squashfs - -############# -# -# 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 - -############# -# -# Mirror -# -############# - -d-i mirror/country string manual -d-i mirror/http/proxy string -d-i mirror/http/hostname string $http_server -d-i mirror/http/directory string $install_source_directory - -############# -# -# 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.ubuntu.com - -# 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/__DEVICE_NAME__ - -# 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 - -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/__DEVICE_NAME__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 -# 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 cobbler -d-i passwd/root-password-again password cobbler - -############# -# -# 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 -# -############# - -# Command Line 1: Allow root to SSH. -# Command Line 2: Cobbler overwrites sources.list with its own repos. Put the default Ubuntu sources.list back. -# Command Line 3: Cobbler API call to turn off netboot. -d-i preseed/late_command string \ - wget http://$http_server/trusty-sources.list -O /target/etc/apt/sources.list; \ - wget http://$http_server/osa-$hostname-bridges.cfg -O /target/etc/network/interfaces.d/osa-$hostname-bridges.cfg; \ - wget http://$http_server/cblr/svc/op/nopxe/system/$system_name -O /dev/null; \ - sed -i '/PermitRootLogin / s/ .*/ yes/' /target/etc/ssh/sshd_config; \ - mkdir /target/root/.ssh; \ - chmod 0700 /target/root/.ssh; \ - echo "__SSHKEY__" >> /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/templates/pre-seeds/ubuntu-server-14.04-unattended-cobbler-network.seed b/multi-node-aio/templates/pre-seeds/ubuntu-server-14.04-unattended-cobbler-network.seed deleted file mode 100644 index d06e4251..00000000 --- a/multi-node-aio/templates/pre-seeds/ubuntu-server-14.04-unattended-cobbler-network.seed +++ /dev/null @@ -1,290 +0,0 @@ -# -# Ubuntu Server 14.04 Preseed -# -# Usage: -# -# This Ubuntu Preseed file is meant to be used with Cobbler. It has been -# tested only on Cobbler 2.4.1. It is a completely unattended install. -# -# References: -# -# https://help.ubuntu.com/14.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 $kernel_options_post - -### Base system installation -d-i base-installer/kernel/image string __DEFAULT_KERNEL__ - -############# -# -# Networking -# -############# - -#if "__DEFAULT_NETWORK__" in $interfaces - #set idata = $interfaces["__DEFAULT_NETWORK__"] - #set static = $idata['static'] - #set ip_address = $idata.get("ip_address", "127.0.0.1") - #set netmask = $idata.get("netmask", "255.0.0.0") - #set gateway = $getVar('gateway','127.0.0.1') -#end if - -d-i netcfg/choose_interface select __DEFAULT_NETWORK__ -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 - -#if $static -# Static network configuration. -d-i netcfg/get_ipaddress string $idata.get("ip_address", "127.0.0.1") -d-i netcfg/get_netmask string $idata.get("netmask", "255.0.0.0") -d-i netcfg/get_gateway string $gateway -d-i netcfg/get_nameservers string $name_servers[0] -d-i netcfg/confirm_static boolean true -#end if - -d-i netcfg/get_hostname string $system_name -d-i netcfg/get_domain string $hostname - -# 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/__DEVICE_NAME__. See Ubuntu bug #1347726. -d-i preseed/early_command string \ - umount /media || true - -############# -# -# Net Image -# -############# - -# Required at least for 12.10+ -d-i live-installer/net-image string http://$http_server/cobbler/links/$distro_name/install/filesystem.squashfs - -############# -# -# 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 - -############# -# -# Mirror -# -############# - -d-i mirror/country string manual -d-i mirror/http/proxy string -d-i mirror/http/hostname string $http_server -d-i mirror/http/directory string $install_source_directory - -############# -# -# 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.ubuntu.com - -# 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/__DEVICE_NAME__ - -# 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 - -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/__DEVICE_NAME__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 -# 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 cobbler -d-i passwd/root-password-again password cobbler - -############# -# -# 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 -# -############# - -# Command Line 1: Allow root to SSH. -# Command Line 2: Cobbler overwrites sources.list with its own repos. Put the default Ubuntu sources.list back. -# Command Line 3: Cobbler API call to turn off netboot. -d-i preseed/late_command string \ - wget http://$http_server/trusty-sources.list -O /target/etc/apt/sources.list; \ - wget http://$http_server/osa-$hostname-bridges.cfg -O /target/etc/network/interfaces.d/osa-$hostname-bridges.cfg; \ - wget http://$http_server/cblr/svc/op/nopxe/system/$system_name -O /dev/null; \ - sed -i '/PermitRootLogin / s/ .*/ yes/' /target/etc/ssh/sshd_config; \ - mkdir /target/root/.ssh; \ - chmod 0700 /target/root/.ssh; \ - echo "__SSHKEY__" >> /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/templates/pre-seeds/ubuntu-server-14.04-unattended-cobbler-nova_compute.seed b/multi-node-aio/templates/pre-seeds/ubuntu-server-14.04-unattended-cobbler-nova_compute.seed deleted file mode 100644 index b9ce8a87..00000000 --- a/multi-node-aio/templates/pre-seeds/ubuntu-server-14.04-unattended-cobbler-nova_compute.seed +++ /dev/null @@ -1,298 +0,0 @@ -# -# Ubuntu Server 14.04 Preseed -# -# Usage: -# -# This Ubuntu Preseed file is meant to be used with Cobbler. It has been -# tested only on Cobbler 2.4.1. It is a completely unattended install. -# -# References: -# -# https://help.ubuntu.com/14.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 $kernel_options_post - -### Base system installation -d-i base-installer/kernel/image string __DEFAULT_KERNEL__ - -############# -# -# Networking -# -############# - -#if "__DEFAULT_NETWORK__" in $interfaces - #set idata = $interfaces["__DEFAULT_NETWORK__"] - #set static = $idata['static'] - #set ip_address = $idata.get("ip_address", "127.0.0.1") - #set netmask = $idata.get("netmask", "255.0.0.0") - #set gateway = $getVar('gateway','127.0.0.1') -#end if - -d-i netcfg/choose_interface select __DEFAULT_NETWORK__ -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 - -#if $static -# Static network configuration. -d-i netcfg/get_ipaddress string $idata.get("ip_address", "127.0.0.1") -d-i netcfg/get_netmask string $idata.get("netmask", "255.0.0.0") -d-i netcfg/get_gateway string $gateway -d-i netcfg/get_nameservers string $name_servers[0] -d-i netcfg/confirm_static boolean true -#end if - -d-i netcfg/get_hostname string $system_name -d-i netcfg/get_domain string $hostname - -# 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/__DEVICE_NAME__. See Ubuntu bug #1347726. -d-i preseed/early_command string \ - umount /media || true - -############# -# -# Net Image -# -############# - -# Required at least for 12.10+ -d-i live-installer/net-image string http://$http_server/cobbler/links/$distro_name/install/filesystem.squashfs - -############# -# -# 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 - -############# -# -# Mirror -# -############# - -d-i mirror/country string manual -d-i mirror/http/proxy string -d-i mirror/http/hostname string $http_server -d-i mirror/http/directory string $install_source_directory - -############# -# -# 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.ubuntu.com - -# 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/__DEVICE_NAME__ - -# 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 - -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/__DEVICE_NAME__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{ nova00 } \ - method{ format } format{ } \ - use_filesystem{ } filesystem{ ext4 } \ - label{ nova } \ - mountpoint{ /var/lib/nova } \ - . \ - -# 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 -# 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 cobbler -d-i passwd/root-password-again password cobbler - -############# -# -# 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 -# -############# - -# Command Line 1: Allow root to SSH. -# Command Line 2: Cobbler overwrites sources.list with its own repos. Put the default Ubuntu sources.list back. -# Command Line 3: Cobbler API call to turn off netboot. -d-i preseed/late_command string \ - wget http://$http_server/trusty-sources.list -O /target/etc/apt/sources.list; \ - wget http://$http_server/osa-$hostname-bridges.cfg -O /target/etc/network/interfaces.d/osa-$hostname-bridges.cfg; \ - wget http://$http_server/cblr/svc/op/nopxe/system/$system_name -O /dev/null; \ - sed -i '/PermitRootLogin / s/ .*/ yes/' /target/etc/ssh/sshd_config; \ - mkdir /target/root/.ssh; \ - chmod 0700 /target/root/.ssh; \ - echo "__SSHKEY__" >> /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/templates/pre-seeds/ubuntu-server-14.04-unattended-cobbler-swift.seed b/multi-node-aio/templates/pre-seeds/ubuntu-server-14.04-unattended-cobbler-swift.seed deleted file mode 100644 index 54f786dd..00000000 --- a/multi-node-aio/templates/pre-seeds/ubuntu-server-14.04-unattended-cobbler-swift.seed +++ /dev/null @@ -1,315 +0,0 @@ -# -# Ubuntu Server 14.04 Preseed -# -# Usage: -# -# This Ubuntu Preseed file is meant to be used with Cobbler. It has been -# tested only on Cobbler 2.4.1. It is a completely unattended install. -# -# References: -# -# https://help.ubuntu.com/14.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 $kernel_options_post - -### Base system installation -d-i base-installer/kernel/image string __DEFAULT_KERNEL__ - -############# -# -# Networking -# -############# - -#if "__DEFAULT_NETWORK__" in $interfaces - #set idata = $interfaces["__DEFAULT_NETWORK__"] - #set static = $idata['static'] - #set ip_address = $idata.get("ip_address", "127.0.0.1") - #set netmask = $idata.get("netmask", "255.0.0.0") - #set gateway = $getVar('gateway','127.0.0.1') -#end if - -d-i netcfg/choose_interface select __DEFAULT_NETWORK__ -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 - -#if $static -# Static network configuration. -d-i netcfg/get_ipaddress string $idata.get("ip_address", "127.0.0.1") -d-i netcfg/get_netmask string $idata.get("netmask", "255.0.0.0") -d-i netcfg/get_gateway string $gateway -d-i netcfg/get_nameservers string $name_servers[0] -d-i netcfg/confirm_static boolean true -#end if - -d-i netcfg/get_hostname string $system_name -d-i netcfg/get_domain string $hostname - -# 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/__DEVICE_NAME__. See Ubuntu bug #1347726. -d-i preseed/early_command string \ - umount /media || true - -############# -# -# Net Image -# -############# - -# Required at least for 12.10+ -d-i live-installer/net-image string http://$http_server/cobbler/links/$distro_name/install/filesystem.squashfs - -############# -# -# 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 - -############# -# -# Mirror -# -############# - -d-i mirror/country string manual -d-i mirror/http/proxy string -d-i mirror/http/hostname string $http_server -d-i mirror/http/directory string $install_source_directory - -############# -# -# 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.ubuntu.com - -# 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/__DEVICE_NAME__ - -# 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 - -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/__DEVICE_NAME__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 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 cobbler -d-i passwd/root-password-again password cobbler - -############# -# -# 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 -# -############# - -# Command Line 1: Allow root to SSH. -# Command Line 2: Cobbler overwrites sources.list with its own repos. Put the default Ubuntu sources.list back. -# Command Line 3: Cobbler API call to turn off netboot. -d-i preseed/late_command string \ - wget http://$http_server/trusty-sources.list -O /target/etc/apt/sources.list; \ - wget http://$http_server/osa-$hostname-bridges.cfg -O /target/etc/network/interfaces.d/osa-$hostname-bridges.cfg; \ - wget http://$http_server/cblr/svc/op/nopxe/system/$system_name -O /dev/null; \ - sed -i '/PermitRootLogin / s/ .*/ yes/' /target/etc/ssh/sshd_config; \ - mkdir /target/root/.ssh; \ - chmod 0700 /target/root/.ssh; \ - echo "__SSHKEY__" >> /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/templates/pre-seeds/ubuntu-server-16.04-unattended-cobbler-cinder.seed b/multi-node-aio/templates/pre-seeds/ubuntu-server-16.04-unattended-cobbler-cinder.seed deleted file mode 100644 index d72ddde4..00000000 --- a/multi-node-aio/templates/pre-seeds/ubuntu-server-16.04-unattended-cobbler-cinder.seed +++ /dev/null @@ -1,293 +0,0 @@ -# -# Ubuntu Server 16.04 Preseed -# -# Usage: -# -# This Ubuntu Preseed file is meant to be used with Cobbler. It has been -# tested only on Cobbler 2.4.1. It 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 $kernel_options_post -d-i debian-installer/add-kernel-opts string biosdevname=0 net.ifnames=0 -############# -# -# Networking -# -############# - -#if "__DEFAULT_NETWORK__" in $interfaces - #set idata = $interfaces["__DEFAULT_NETWORK__"] - #set static = $idata['static'] - #set ip_address = $idata.get("ip_address", "127.0.0.1") - #set netmask = $idata.get("netmask", "255.0.0.0") - #set gateway = $getVar('gateway','127.0.0.1') -#end if - -d-i netcfg/choose_interface select __DEFAULT_NETWORK__ -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 - -#if $static -# Static network configuration. -d-i netcfg/get_ipaddress string $idata.get("ip_address", "127.0.0.1") -d-i netcfg/get_netmask string $idata.get("netmask", "255.0.0.0") -d-i netcfg/get_gateway string $gateway -d-i netcfg/get_nameservers string $name_servers[0] -d-i netcfg/confirm_static boolean true -#end if - -d-i netcfg/get_hostname string $system_name -d-i netcfg/get_domain string $hostname - -# 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/__DEVICE_NAME__. See Ubuntu bug #1347726. -d-i preseed/early_command string \ - umount /media || true - -############# -# -# Net Image -# -############# - -# Required at least for 12.10+ -d-i live-installer/net-image string http://$http_server/cobbler/links/$distro_name/install/filesystem.squashfs - -############# -# -# 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 - -############# -# -# Mirror -# -############# - -d-i mirror/country string manual -d-i mirror/http/proxy string -d-i mirror/http/hostname string $http_server -d-i mirror/http/directory string $install_source_directory - -############# -# -# 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.ubuntu.com - -# 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/__DEVICE_NAME__ - -# 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/__DEVICE_NAME__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 python vim vlan -# 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 cobbler -d-i passwd/root-password-again password cobbler - -############# -# -# 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 http://$http_server/xenial-sources.list -O /target/etc/apt/sources.list; \ - wget http://$http_server/osa-$hostname-bridges.cfg -O /target/etc/network/interfaces.d/osa-$hostname-bridges.cfg; \ - wget http://$http_server/cblr/svc/op/nopxe/system/$system_name -O /dev/null; \ - sed -i '/PermitRootLogin / s/ .*/ yes/' /target/etc/ssh/sshd_config; \ - mkdir /target/root/.ssh; \ - chmod 0700 /target/root/.ssh; \ - echo "__SSHKEY__" >> /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 \ No newline at end of file diff --git a/multi-node-aio/templates/pre-seeds/ubuntu-server-16.04-unattended-cobbler-deploy.seed b/multi-node-aio/templates/pre-seeds/ubuntu-server-16.04-unattended-cobbler-deploy.seed deleted file mode 100644 index d72ddde4..00000000 --- a/multi-node-aio/templates/pre-seeds/ubuntu-server-16.04-unattended-cobbler-deploy.seed +++ /dev/null @@ -1,293 +0,0 @@ -# -# Ubuntu Server 16.04 Preseed -# -# Usage: -# -# This Ubuntu Preseed file is meant to be used with Cobbler. It has been -# tested only on Cobbler 2.4.1. It 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 $kernel_options_post -d-i debian-installer/add-kernel-opts string biosdevname=0 net.ifnames=0 -############# -# -# Networking -# -############# - -#if "__DEFAULT_NETWORK__" in $interfaces - #set idata = $interfaces["__DEFAULT_NETWORK__"] - #set static = $idata['static'] - #set ip_address = $idata.get("ip_address", "127.0.0.1") - #set netmask = $idata.get("netmask", "255.0.0.0") - #set gateway = $getVar('gateway','127.0.0.1') -#end if - -d-i netcfg/choose_interface select __DEFAULT_NETWORK__ -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 - -#if $static -# Static network configuration. -d-i netcfg/get_ipaddress string $idata.get("ip_address", "127.0.0.1") -d-i netcfg/get_netmask string $idata.get("netmask", "255.0.0.0") -d-i netcfg/get_gateway string $gateway -d-i netcfg/get_nameservers string $name_servers[0] -d-i netcfg/confirm_static boolean true -#end if - -d-i netcfg/get_hostname string $system_name -d-i netcfg/get_domain string $hostname - -# 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/__DEVICE_NAME__. See Ubuntu bug #1347726. -d-i preseed/early_command string \ - umount /media || true - -############# -# -# Net Image -# -############# - -# Required at least for 12.10+ -d-i live-installer/net-image string http://$http_server/cobbler/links/$distro_name/install/filesystem.squashfs - -############# -# -# 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 - -############# -# -# Mirror -# -############# - -d-i mirror/country string manual -d-i mirror/http/proxy string -d-i mirror/http/hostname string $http_server -d-i mirror/http/directory string $install_source_directory - -############# -# -# 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.ubuntu.com - -# 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/__DEVICE_NAME__ - -# 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/__DEVICE_NAME__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 python vim vlan -# 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 cobbler -d-i passwd/root-password-again password cobbler - -############# -# -# 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 http://$http_server/xenial-sources.list -O /target/etc/apt/sources.list; \ - wget http://$http_server/osa-$hostname-bridges.cfg -O /target/etc/network/interfaces.d/osa-$hostname-bridges.cfg; \ - wget http://$http_server/cblr/svc/op/nopxe/system/$system_name -O /dev/null; \ - sed -i '/PermitRootLogin / s/ .*/ yes/' /target/etc/ssh/sshd_config; \ - mkdir /target/root/.ssh; \ - chmod 0700 /target/root/.ssh; \ - echo "__SSHKEY__" >> /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 \ No newline at end of file diff --git a/multi-node-aio/templates/pre-seeds/ubuntu-server-16.04-unattended-cobbler-infra.seed b/multi-node-aio/templates/pre-seeds/ubuntu-server-16.04-unattended-cobbler-infra.seed deleted file mode 100644 index d8e38703..00000000 --- a/multi-node-aio/templates/pre-seeds/ubuntu-server-16.04-unattended-cobbler-infra.seed +++ /dev/null @@ -1,287 +0,0 @@ -# -# Ubuntu Server 16.04 Preseed -# -# Usage: -# -# This Ubuntu Preseed file is meant to be used with Cobbler. It has been -# tested only on Cobbler 2.4.1. It 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 $kernel_options_post -d-i debian-installer/add-kernel-opts string biosdevname=0 net.ifnames=0 -############# -# -# Networking -# -############# - -#if "__DEFAULT_NETWORK__" in $interfaces - #set idata = $interfaces["__DEFAULT_NETWORK__"] - #set static = $idata['static'] - #set ip_address = $idata.get("ip_address", "127.0.0.1") - #set netmask = $idata.get("netmask", "255.0.0.0") - #set gateway = $getVar('gateway','127.0.0.1') -#end if - -d-i netcfg/choose_interface select __DEFAULT_NETWORK__ -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 - -#if $static -# Static network configuration. -d-i netcfg/get_ipaddress string $idata.get("ip_address", "127.0.0.1") -d-i netcfg/get_netmask string $idata.get("netmask", "255.0.0.0") -d-i netcfg/get_gateway string $gateway -d-i netcfg/get_nameservers string $name_servers[0] -d-i netcfg/confirm_static boolean true -#end if - -d-i netcfg/get_hostname string $system_name -d-i netcfg/get_domain string $hostname - -# 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/__DEVICE_NAME__. See Ubuntu bug #1347726. -d-i preseed/early_command string \ - umount /media || true - -############# -# -# Net Image -# -############# - -# Required at least for 12.10+ -d-i live-installer/net-image string http://$http_server/cobbler/links/$distro_name/install/filesystem.squashfs - -############# -# -# 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 - -############# -# -# Mirror -# -############# - -d-i mirror/country string manual -d-i mirror/http/proxy string -d-i mirror/http/hostname string $http_server -d-i mirror/http/directory string $install_source_directory - -############# -# -# 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.ubuntu.com - -# 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/__DEVICE_NAME__ - -# 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 - -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/__DEVICE_NAME__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 python vim vlan -# 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 cobbler -d-i passwd/root-password-again password cobbler - -############# -# -# 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 -# -############# - -# Command Line 1: Allow root to SSH. -# Command Line 2: Cobbler overwrites sources.list with its own repos. Put the default Ubuntu sources.list back. -# Command Line 3: Cobbler API call to turn off netboot. -d-i preseed/late_command string \ - wget http://$http_server/xenial-sources.list -O /target/etc/apt/sources.list; \ - wget http://$http_server/osa-$hostname-bridges.cfg -O /target/etc/network/interfaces.d/osa-$hostname-bridges.cfg; \ - wget http://$http_server/cblr/svc/op/nopxe/system/$system_name -O /dev/null; \ - sed -i '/PermitRootLogin / s/ .*/ yes/' /target/etc/ssh/sshd_config; \ - mkdir /target/root/.ssh; \ - chmod 0700 /target/root/.ssh; \ - echo "__SSHKEY__" >> /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 \ No newline at end of file diff --git a/multi-node-aio/templates/pre-seeds/ubuntu-server-16.04-unattended-cobbler-logging.seed b/multi-node-aio/templates/pre-seeds/ubuntu-server-16.04-unattended-cobbler-logging.seed deleted file mode 100644 index dd34c8d3..00000000 --- a/multi-node-aio/templates/pre-seeds/ubuntu-server-16.04-unattended-cobbler-logging.seed +++ /dev/null @@ -1,288 +0,0 @@ -# -# Ubuntu Server 16.04 Preseed -# -# Usage: -# -# This Ubuntu Preseed file is meant to be used with Cobbler. It has been -# tested only on Cobbler 2.4.1. It 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 $kernel_options_post -d-i debian-installer/add-kernel-opts string biosdevname=0 net.ifnames=0 -############# -# -# Networking -# -############# - -#if "__DEFAULT_NETWORK__" in $interfaces - #set idata = $interfaces["__DEFAULT_NETWORK__"] - #set static = $idata['static'] - #set ip_address = $idata.get("ip_address", "127.0.0.1") - #set netmask = $idata.get("netmask", "255.0.0.0") - #set gateway = $getVar('gateway','127.0.0.1') -#end if - -d-i netcfg/choose_interface select __DEFAULT_NETWORK__ -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 - -#if $static -# Static network configuration. -d-i netcfg/get_ipaddress string $idata.get("ip_address", "127.0.0.1") -d-i netcfg/get_netmask string $idata.get("netmask", "255.0.0.0") -d-i netcfg/get_gateway string $gateway -d-i netcfg/get_nameservers string $name_servers[0] -d-i netcfg/confirm_static boolean true -#end if - -d-i netcfg/get_hostname string $system_name -d-i netcfg/get_domain string $hostname - -# 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/__DEVICE_NAME__. See Ubuntu bug #1347726. -d-i preseed/early_command string \ - umount /media || true - -############# -# -# Net Image -# -############# - -# Required at least for 12.10+ -d-i live-installer/net-image string http://$http_server/cobbler/links/$distro_name/install/filesystem.squashfs - -############# -# -# 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 - -############# -# -# Mirror -# -############# - -d-i mirror/country string manual -d-i mirror/http/proxy string -d-i mirror/http/hostname string $http_server -d-i mirror/http/directory string $install_source_directory - -############# -# -# 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.ubuntu.com - -# 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/__DEVICE_NAME__ - -# 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 - -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/__DEVICE_NAME__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 python vim vlan -# 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 cobbler -d-i passwd/root-password-again password cobbler - -############# -# -# 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 -# -############# - -# Command Line 1: Allow root to SSH. -# Command Line 2: Cobbler overwrites sources.list with its own repos. Put the default Ubuntu sources.list back. -# Command Line 3: Cobbler API call to turn off netboot. -d-i preseed/late_command string \ - wget http://$http_server/xenial-sources.list -O /target/etc/apt/sources.list; \ - wget http://$http_server/osa-$hostname-bridges.cfg -O /target/etc/network/interfaces.d/osa-$hostname-bridges.cfg; \ - wget http://$http_server/cblr/svc/op/nopxe/system/$system_name -O /dev/null; \ - sed -i '/PermitRootLogin / s/ .*/ yes/' /target/etc/ssh/sshd_config; \ - mkdir /target/root/.ssh; \ - chmod 0700 /target/root/.ssh; \ - echo "__SSHKEY__" >> /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 \ No newline at end of file diff --git a/multi-node-aio/templates/pre-seeds/ubuntu-server-16.04-unattended-cobbler-network.seed b/multi-node-aio/templates/pre-seeds/ubuntu-server-16.04-unattended-cobbler-network.seed deleted file mode 100644 index d8e38703..00000000 --- a/multi-node-aio/templates/pre-seeds/ubuntu-server-16.04-unattended-cobbler-network.seed +++ /dev/null @@ -1,287 +0,0 @@ -# -# Ubuntu Server 16.04 Preseed -# -# Usage: -# -# This Ubuntu Preseed file is meant to be used with Cobbler. It has been -# tested only on Cobbler 2.4.1. It 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 $kernel_options_post -d-i debian-installer/add-kernel-opts string biosdevname=0 net.ifnames=0 -############# -# -# Networking -# -############# - -#if "__DEFAULT_NETWORK__" in $interfaces - #set idata = $interfaces["__DEFAULT_NETWORK__"] - #set static = $idata['static'] - #set ip_address = $idata.get("ip_address", "127.0.0.1") - #set netmask = $idata.get("netmask", "255.0.0.0") - #set gateway = $getVar('gateway','127.0.0.1') -#end if - -d-i netcfg/choose_interface select __DEFAULT_NETWORK__ -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 - -#if $static -# Static network configuration. -d-i netcfg/get_ipaddress string $idata.get("ip_address", "127.0.0.1") -d-i netcfg/get_netmask string $idata.get("netmask", "255.0.0.0") -d-i netcfg/get_gateway string $gateway -d-i netcfg/get_nameservers string $name_servers[0] -d-i netcfg/confirm_static boolean true -#end if - -d-i netcfg/get_hostname string $system_name -d-i netcfg/get_domain string $hostname - -# 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/__DEVICE_NAME__. See Ubuntu bug #1347726. -d-i preseed/early_command string \ - umount /media || true - -############# -# -# Net Image -# -############# - -# Required at least for 12.10+ -d-i live-installer/net-image string http://$http_server/cobbler/links/$distro_name/install/filesystem.squashfs - -############# -# -# 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 - -############# -# -# Mirror -# -############# - -d-i mirror/country string manual -d-i mirror/http/proxy string -d-i mirror/http/hostname string $http_server -d-i mirror/http/directory string $install_source_directory - -############# -# -# 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.ubuntu.com - -# 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/__DEVICE_NAME__ - -# 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 - -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/__DEVICE_NAME__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 python vim vlan -# 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 cobbler -d-i passwd/root-password-again password cobbler - -############# -# -# 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 -# -############# - -# Command Line 1: Allow root to SSH. -# Command Line 2: Cobbler overwrites sources.list with its own repos. Put the default Ubuntu sources.list back. -# Command Line 3: Cobbler API call to turn off netboot. -d-i preseed/late_command string \ - wget http://$http_server/xenial-sources.list -O /target/etc/apt/sources.list; \ - wget http://$http_server/osa-$hostname-bridges.cfg -O /target/etc/network/interfaces.d/osa-$hostname-bridges.cfg; \ - wget http://$http_server/cblr/svc/op/nopxe/system/$system_name -O /dev/null; \ - sed -i '/PermitRootLogin / s/ .*/ yes/' /target/etc/ssh/sshd_config; \ - mkdir /target/root/.ssh; \ - chmod 0700 /target/root/.ssh; \ - echo "__SSHKEY__" >> /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 \ No newline at end of file diff --git a/multi-node-aio/templates/pre-seeds/ubuntu-server-16.04-unattended-cobbler-nova_compute.seed b/multi-node-aio/templates/pre-seeds/ubuntu-server-16.04-unattended-cobbler-nova_compute.seed deleted file mode 100644 index b05b47a9..00000000 --- a/multi-node-aio/templates/pre-seeds/ubuntu-server-16.04-unattended-cobbler-nova_compute.seed +++ /dev/null @@ -1,295 +0,0 @@ -# -# Ubuntu Server 16.04 Preseed -# -# Usage: -# -# This Ubuntu Preseed file is meant to be used with Cobbler. It has been -# tested only on Cobbler 2.4.1. It 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 $kernel_options_post -d-i debian-installer/add-kernel-opts string biosdevname=0 net.ifnames=0 -############# -# -# Networking -# -############# - -#if "__DEFAULT_NETWORK__" in $interfaces - #set idata = $interfaces["__DEFAULT_NETWORK__"] - #set static = $idata['static'] - #set ip_address = $idata.get("ip_address", "127.0.0.1") - #set netmask = $idata.get("netmask", "255.0.0.0") - #set gateway = $getVar('gateway','127.0.0.1') -#end if - -d-i netcfg/choose_interface select __DEFAULT_NETWORK__ -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 - -#if $static -# Static network configuration. -d-i netcfg/get_ipaddress string $idata.get("ip_address", "127.0.0.1") -d-i netcfg/get_netmask string $idata.get("netmask", "255.0.0.0") -d-i netcfg/get_gateway string $gateway -d-i netcfg/get_nameservers string $name_servers[0] -d-i netcfg/confirm_static boolean true -#end if - -d-i netcfg/get_hostname string $system_name -d-i netcfg/get_domain string $hostname - -# 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/__DEVICE_NAME__. See Ubuntu bug #1347726. -d-i preseed/early_command string \ - umount /media || true - -############# -# -# Net Image -# -############# - -# Required at least for 12.10+ -d-i live-installer/net-image string http://$http_server/cobbler/links/$distro_name/install/filesystem.squashfs - -############# -# -# 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 - -############# -# -# Mirror -# -############# - -d-i mirror/country string manual -d-i mirror/http/proxy string -d-i mirror/http/hostname string $http_server -d-i mirror/http/directory string $install_source_directory - -############# -# -# 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.ubuntu.com - -# 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/__DEVICE_NAME__ - -# 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 - -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/__DEVICE_NAME__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{ nova00 } \ - method{ format } format{ } \ - use_filesystem{ } filesystem{ ext4 } \ - label{ nova } \ - mountpoint{ /var/lib/nova } \ - . \ - -# 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 python vim vlan -# 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 cobbler -d-i passwd/root-password-again password cobbler - -############# -# -# 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 -# -############# - -# Command Line 1: Allow root to SSH. -# Command Line 2: Cobbler overwrites sources.list with its own repos. Put the default Ubuntu sources.list back. -# Command Line 3: Cobbler API call to turn off netboot. -d-i preseed/late_command string \ - wget http://$http_server/xenial-sources.list -O /target/etc/apt/sources.list; \ - wget http://$http_server/osa-$hostname-bridges.cfg -O /target/etc/network/interfaces.d/osa-$hostname-bridges.cfg; \ - wget http://$http_server/cblr/svc/op/nopxe/system/$system_name -O /dev/null; \ - sed -i '/PermitRootLogin / s/ .*/ yes/' /target/etc/ssh/sshd_config; \ - mkdir /target/root/.ssh; \ - chmod 0700 /target/root/.ssh; \ - echo "__SSHKEY__" >> /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 \ No newline at end of file diff --git a/multi-node-aio/templates/pre-seeds/ubuntu-server-16.04-unattended-cobbler-swift.seed b/multi-node-aio/templates/pre-seeds/ubuntu-server-16.04-unattended-cobbler-swift.seed deleted file mode 100644 index 0828ae03..00000000 --- a/multi-node-aio/templates/pre-seeds/ubuntu-server-16.04-unattended-cobbler-swift.seed +++ /dev/null @@ -1,312 +0,0 @@ -# -# Ubuntu Server 16.04 Preseed -# -# Usage: -# -# This Ubuntu Preseed file is meant to be used with Cobbler. It has been -# tested only on Cobbler 2.4.1. It 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 $kernel_options_post -d-i debian-installer/add-kernel-opts string biosdevname=0 net.ifnames=0 -############# -# -# Networking -# -############# - -#if "__DEFAULT_NETWORK__" in $interfaces - #set idata = $interfaces["__DEFAULT_NETWORK__"] - #set static = $idata['static'] - #set ip_address = $idata.get("ip_address", "127.0.0.1") - #set netmask = $idata.get("netmask", "255.0.0.0") - #set gateway = $getVar('gateway','127.0.0.1') -#end if - -d-i netcfg/choose_interface select __DEFAULT_NETWORK__ -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 - -#if $static -# Static network configuration. -d-i netcfg/get_ipaddress string $idata.get("ip_address", "127.0.0.1") -d-i netcfg/get_netmask string $idata.get("netmask", "255.0.0.0") -d-i netcfg/get_gateway string $gateway -d-i netcfg/get_nameservers string $name_servers[0] -d-i netcfg/confirm_static boolean true -#end if - -d-i netcfg/get_hostname string $system_name -d-i netcfg/get_domain string $hostname - -# 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/__DEVICE_NAME__. See Ubuntu bug #1347726. -d-i preseed/early_command string \ - umount /media || true - -############# -# -# Net Image -# -############# - -# Required at least for 12.10+ -d-i live-installer/net-image string http://$http_server/cobbler/links/$distro_name/install/filesystem.squashfs - -############# -# -# 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 - -############# -# -# Mirror -# -############# - -d-i mirror/country string manual -d-i mirror/http/proxy string -d-i mirror/http/hostname string $http_server -d-i mirror/http/directory string $install_source_directory - -############# -# -# 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.ubuntu.com - -# 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/__DEVICE_NAME__ - -# 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 - -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/__DEVICE_NAME__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 python vim vlan 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 cobbler -d-i passwd/root-password-again password cobbler - -############# -# -# 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 -# -############# - -# Command Line 1: Allow root to SSH. -# Command Line 2: Cobbler overwrites sources.list with its own repos. Put the default Ubuntu sources.list back. -# Command Line 3: Cobbler API call to turn off netboot. -d-i preseed/late_command string \ - wget http://$http_server/xenial-sources.list -O /target/etc/apt/sources.list; \ - wget http://$http_server/osa-$hostname-bridges.cfg -O /target/etc/network/interfaces.d/osa-$hostname-bridges.cfg; \ - wget http://$http_server/cblr/svc/op/nopxe/system/$system_name -O /dev/null; \ - sed -i '/PermitRootLogin / s/ .*/ yes/' /target/etc/ssh/sshd_config; \ - mkdir /target/root/.ssh; \ - chmod 0700 /target/root/.ssh; \ - echo "__SSHKEY__" >> /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 \ No newline at end of file diff --git a/multi-node-aio/templates/trusty-sources.list b/multi-node-aio/templates/trusty-sources.list deleted file mode 100644 index 7f1fdea4..00000000 --- a/multi-node-aio/templates/trusty-sources.list +++ /dev/null @@ -1,20 +0,0 @@ -deb http://archive.ubuntu.com/ubuntu trusty main restricted -deb-src http://archive.ubuntu.com/ubuntu trusty main restricted -deb http://archive.ubuntu.com/ubuntu trusty-updates main restricted -deb-src http://archive.ubuntu.com/ubuntu trusty-updates main restricted -deb http://archive.ubuntu.com/ubuntu trusty universe -deb-src http://archive.ubuntu.com/ubuntu trusty universe -deb http://archive.ubuntu.com/ubuntu trusty-updates universe -deb-src http://archive.ubuntu.com/ubuntu trusty-updates universe -deb http://archive.ubuntu.com/ubuntu trusty multiverse -deb-src http://archive.ubuntu.com/ubuntu trusty multiverse -deb http://archive.ubuntu.com/ubuntu trusty-updates multiverse -deb-src http://archive.ubuntu.com/ubuntu trusty-updates multiverse -deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse -deb-src http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse -deb http://security.ubuntu.com/ubuntu trusty-security main restricted -deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted -deb http://security.ubuntu.com/ubuntu trusty-security universe -deb-src http://security.ubuntu.com/ubuntu trusty-security universe -deb http://security.ubuntu.com/ubuntu trusty-security multiverse -deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse \ No newline at end of file diff --git a/multi-node-aio/templates/vmnode-config/cinder.openstackci.local.xml b/multi-node-aio/templates/vmnode-config/cinder.openstackci.local.xml deleted file mode 100644 index 7f706ad7..00000000 --- a/multi-node-aio/templates/vmnode-config/cinder.openstackci.local.xml +++ /dev/null @@ -1,131 +0,0 @@ -<domain type='kvm'> - <name>__NODE__.openstackci.local</name> - <memory unit='GiB'>12</memory> - <currentMemory unit='GiB'>4</currentMemory> - <vcpu placement='static'>2</vcpu> - <resource> - <partition>/machine</partition> - </resource> - <os> - <type arch='x86_64' machine='pc-i440fx-trusty'>hvm</type> - </os> - <features> - <acpi/> - <apic/> - </features> - <cpu mode='host-model'> - <model fallback='allow'/> - </cpu> - <clock offset='utc'> - <timer name='rtc' tickpolicy='catchup'/> - <timer name='pit' tickpolicy='delay'/> - <timer name='hpet' present='no'/> - </clock> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>restart</on_crash> - <pm> - <suspend-to-mem enabled='no'/> - <suspend-to-disk enabled='no'/> - </pm> - <devices> - <disk type='file' device='disk'> - <driver name='qemu' type='qcow2' cache='none' io='native'/> - <source file='/var/lib/libvirt/images/__NODE__.openstackci.local.img'/> - <target dev='__DEVICE_NAME__' bus='virtio'/> - <boot order='1'/> - <alias name='virtio-disk0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> - </disk> - <controller type='pci' index='0' model='pci-root'> - <alias name='pci.0'/> - </controller> - <controller type='virtio-serial' index='0'> - <alias name='virtio-serial0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> - </controller> - <interface type='bridge'> - <mac address="52:54:00:bd:81:__COUNT__"/> - <source bridge='br-dhcp'/> - <target dev='vnet0'/> - <model type='virtio'/> - <boot order='2'/> - <alias name='net0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:fd:7f:__COUNT__"/> - <source bridge='vm-br-eth1'/> - <target dev='vnet1'/> - <model type='virtio'/> - <boot order='3'/> - <alias name='net1'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:f5:44:__COUNT__"/> - <source bridge='vm-br-eth2'/> - <target dev='vnet2'/> - <model type='virtio'/> - <boot order='4'/> - <alias name='net2'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:1f:96:__COUNT__"/> - <source bridge='vm-br-eth3'/> - <target dev='vnet3'/> - <model type='virtio'/> - <boot order='5'/> - <alias name='net3'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:50:03:__COUNT__"/> - <source bridge='vm-br-eth4'/> - <target dev='vnet4'/> - <model type='virtio'/> - <boot order='6'/> - <alias name='net4'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:2d:12:__COUNT__"/> - <source bridge='vm-br-eth5'/> - <target dev='vnet5'/> - <model type='virtio'/> - <boot order='7'/> - <alias name='net5'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x0'/> - </interface> - <serial type='pty'> - <source path='/dev/pts/4'/> - <target port='0'/> - <alias name='serial0'/> - </serial> - <console type='pty' tty='/dev/pts/4'> - <source path='/dev/pts/4'/> - <target type='serial' port='0'/> - <alias name='serial0'/> - </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'> - <listen type='address' address='127.0.0.1'/> - </graphics> - <video> - <model type='vmvga' vram='9216' heads='1'/> - <alias name='video0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </video> - <memballoon model='virtio'> - <alias name='balloon0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> - </memballoon> - <rng model='virtio'> - <backend model='random'>/dev/random</backend> - <alias name='rng0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/> - </rng> - </devices> -</domain> diff --git a/multi-node-aio/templates/vmnode-config/deploy.openstackci.local.xml b/multi-node-aio/templates/vmnode-config/deploy.openstackci.local.xml deleted file mode 100644 index 4a1ef1b7..00000000 --- a/multi-node-aio/templates/vmnode-config/deploy.openstackci.local.xml +++ /dev/null @@ -1,131 +0,0 @@ -<domain type='kvm'> - <name>__NODE__.openstackci.local</name> - <memory unit='GiB'>4</memory> - <currentMemory unit='GiB'>4</currentMemory> - <vcpu placement='static'>4</vcpu> - <resource> - <partition>/machine</partition> - </resource> - <os> - <type arch='x86_64' machine='pc-i440fx-trusty'>hvm</type> - </os> - <features> - <acpi/> - <apic/> - </features> - <cpu mode='host-model'> - <model fallback='allow'/> - </cpu> - <clock offset='utc'> - <timer name='rtc' tickpolicy='catchup'/> - <timer name='pit' tickpolicy='delay'/> - <timer name='hpet' present='no'/> - </clock> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>restart</on_crash> - <pm> - <suspend-to-mem enabled='no'/> - <suspend-to-disk enabled='no'/> - </pm> - <devices> - <disk type='file' device='disk'> - <driver name='qemu' type='qcow2' cache='none' io='native'/> - <source file='/var/lib/libvirt/images/__NODE__.openstackci.local.img'/> - <target dev='__DEVICE_NAME__' bus='virtio'/> - <boot order='1'/> - <alias name='virtio-disk0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> - </disk> - <controller type='pci' index='0' model='pci-root'> - <alias name='pci.0'/> - </controller> - <controller type='virtio-serial' index='0'> - <alias name='virtio-serial0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> - </controller> - <interface type='bridge'> - <mac address="52:54:00:bd:81:__COUNT__"/> - <source bridge='br-dhcp'/> - <target dev='vnet0'/> - <model type='virtio'/> - <boot order='2'/> - <alias name='net0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:fd:7f:__COUNT__"/> - <source bridge='vm-br-eth1'/> - <target dev='vnet1'/> - <model type='virtio'/> - <boot order='3'/> - <alias name='net1'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:f5:44:__COUNT__"/> - <source bridge='vm-br-eth2'/> - <target dev='vnet2'/> - <model type='virtio'/> - <boot order='4'/> - <alias name='net2'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:1f:96:__COUNT__"/> - <source bridge='vm-br-eth3'/> - <target dev='vnet3'/> - <model type='virtio'/> - <boot order='5'/> - <alias name='net3'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:50:03:__COUNT__"/> - <source bridge='vm-br-eth4'/> - <target dev='vnet4'/> - <model type='virtio'/> - <boot order='6'/> - <alias name='net4'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:2d:12:__COUNT__"/> - <source bridge='vm-br-eth5'/> - <target dev='vnet5'/> - <model type='virtio'/> - <boot order='7'/> - <alias name='net5'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x0'/> - </interface> - <serial type='pty'> - <source path='/dev/pts/4'/> - <target port='0'/> - <alias name='serial0'/> - </serial> - <console type='pty' tty='/dev/pts/4'> - <source path='/dev/pts/4'/> - <target type='serial' port='0'/> - <alias name='serial0'/> - </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'> - <listen type='address' address='127.0.0.1'/> - </graphics> - <video> - <model type='vmvga' vram='1024' heads='1'/> - <alias name='video0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </video> - <memballoon model='virtio'> - <alias name='balloon0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> - </memballoon> - <rng model='virtio'> - <backend model='random'>/dev/random</backend> - <alias name='rng0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/> - </rng> - </devices> -</domain> diff --git a/multi-node-aio/templates/vmnode-config/infra.openstackci.local.xml b/multi-node-aio/templates/vmnode-config/infra.openstackci.local.xml deleted file mode 100644 index 68bda593..00000000 --- a/multi-node-aio/templates/vmnode-config/infra.openstackci.local.xml +++ /dev/null @@ -1,131 +0,0 @@ -<domain type='kvm'> - <name>__NODE__.openstackci.local</name> - <memory unit='GiB'>12</memory> - <currentMemory unit='GiB'>12</currentMemory> - <vcpu placement='static'>10</vcpu> - <resource> - <partition>/machine</partition> - </resource> - <os> - <type arch='x86_64' machine='pc-i440fx-trusty'>hvm</type> - </os> - <features> - <acpi/> - <apic/> - </features> - <cpu mode='host-model'> - <model fallback='allow'/> - </cpu> - <clock offset='utc'> - <timer name='rtc' tickpolicy='catchup'/> - <timer name='pit' tickpolicy='delay'/> - <timer name='hpet' present='no'/> - </clock> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>restart</on_crash> - <pm> - <suspend-to-mem enabled='no'/> - <suspend-to-disk enabled='no'/> - </pm> - <devices> - <disk type='file' device='disk'> - <driver name='qemu' type='qcow2' cache='none' io='native'/> - <source file='/var/lib/libvirt/images/__NODE__.openstackci.local.img'/> - <target dev='__DEVICE_NAME__' bus='virtio'/> - <boot order='1'/> - <alias name='virtio-disk0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> - </disk> - <controller type='pci' index='0' model='pci-root'> - <alias name='pci.0'/> - </controller> - <controller type='virtio-serial' index='0'> - <alias name='virtio-serial0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> - </controller> - <interface type='bridge'> - <mac address="52:54:00:bd:81:__COUNT__"/> - <source bridge='br-dhcp'/> - <target dev='vnet0'/> - <model type='virtio'/> - <boot order='2'/> - <alias name='net0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:fd:7f:__COUNT__"/> - <source bridge='vm-br-eth1'/> - <target dev='vnet1'/> - <model type='virtio'/> - <boot order='3'/> - <alias name='net1'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:f5:44:__COUNT__"/> - <source bridge='vm-br-eth2'/> - <target dev='vnet2'/> - <model type='virtio'/> - <boot order='4'/> - <alias name='net2'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:1f:96:__COUNT__"/> - <source bridge='vm-br-eth3'/> - <target dev='vnet3'/> - <model type='virtio'/> - <boot order='5'/> - <alias name='net3'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:50:03:__COUNT__"/> - <source bridge='vm-br-eth4'/> - <target dev='vnet4'/> - <model type='virtio'/> - <boot order='6'/> - <alias name='net4'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:2d:12:__COUNT__"/> - <source bridge='vm-br-eth5'/> - <target dev='vnet5'/> - <model type='virtio'/> - <boot order='7'/> - <alias name='net5'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x0'/> - </interface> - <serial type='pty'> - <source path='/dev/pts/4'/> - <target port='0'/> - <alias name='serial0'/> - </serial> - <console type='pty' tty='/dev/pts/4'> - <source path='/dev/pts/4'/> - <target type='serial' port='0'/> - <alias name='serial0'/> - </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'> - <listen type='address' address='127.0.0.1'/> - </graphics> - <video> - <model type='vmvga' vram='9216' heads='1'/> - <alias name='video0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </video> - <memballoon model='virtio'> - <alias name='balloon0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> - </memballoon> - <rng model='virtio'> - <backend model='random'>/dev/random</backend> - <alias name='rng0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/> - </rng> - </devices> -</domain> \ No newline at end of file diff --git a/multi-node-aio/templates/vmnode-config/logging.openstackci.local.xml b/multi-node-aio/templates/vmnode-config/logging.openstackci.local.xml deleted file mode 100644 index 8d4e4a7c..00000000 --- a/multi-node-aio/templates/vmnode-config/logging.openstackci.local.xml +++ /dev/null @@ -1,131 +0,0 @@ -<domain type='kvm'> - <name>__NODE__.openstackci.local</name> - <memory unit='GiB'>2</memory> - <currentMemory unit='GiB'>2</currentMemory> - <vcpu placement='static'>2</vcpu> - <resource> - <partition>/machine</partition> - </resource> - <os> - <type arch='x86_64' machine='pc-i440fx-trusty'>hvm</type> - </os> - <features> - <acpi/> - <apic/> - </features> - <cpu mode='host-model'> - <model fallback='allow'/> - </cpu> - <clock offset='utc'> - <timer name='rtc' tickpolicy='catchup'/> - <timer name='pit' tickpolicy='delay'/> - <timer name='hpet' present='no'/> - </clock> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>restart</on_crash> - <pm> - <suspend-to-mem enabled='no'/> - <suspend-to-disk enabled='no'/> - </pm> - <devices> - <disk type='file' device='disk'> - <driver name='qemu' type='qcow2' cache='none' io='native'/> - <source file='/var/lib/libvirt/images/__NODE__.openstackci.local.img'/> - <target dev='__DEVICE_NAME__' bus='virtio'/> - <boot order='1'/> - <alias name='virtio-disk0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> - </disk> - <controller type='pci' index='0' model='pci-root'> - <alias name='pci.0'/> - </controller> - <controller type='virtio-serial' index='0'> - <alias name='virtio-serial0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> - </controller> - <interface type='bridge'> - <mac address="52:54:00:bd:81:__COUNT__"/> - <source bridge='br-dhcp'/> - <target dev='vnet0'/> - <model type='virtio'/> - <boot order='2'/> - <alias name='net0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:fd:7f:__COUNT__"/> - <source bridge='vm-br-eth1'/> - <target dev='vnet1'/> - <model type='virtio'/> - <boot order='3'/> - <alias name='net1'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:f5:44:__COUNT__"/> - <source bridge='vm-br-eth2'/> - <target dev='vnet2'/> - <model type='virtio'/> - <boot order='4'/> - <alias name='net2'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:1f:96:__COUNT__"/> - <source bridge='vm-br-eth3'/> - <target dev='vnet3'/> - <model type='virtio'/> - <boot order='5'/> - <alias name='net3'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:50:03:__COUNT__"/> - <source bridge='vm-br-eth4'/> - <target dev='vnet4'/> - <model type='virtio'/> - <boot order='6'/> - <alias name='net4'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:2d:12:__COUNT__"/> - <source bridge='vm-br-eth5'/> - <target dev='vnet5'/> - <model type='virtio'/> - <boot order='7'/> - <alias name='net5'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x0'/> - </interface> - <serial type='pty'> - <source path='/dev/pts/4'/> - <target port='0'/> - <alias name='serial0'/> - </serial> - <console type='pty' tty='/dev/pts/4'> - <source path='/dev/pts/4'/> - <target type='serial' port='0'/> - <alias name='serial0'/> - </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'> - <listen type='address' address='127.0.0.1'/> - </graphics> - <video> - <model type='vmvga' vram='9216' heads='1'/> - <alias name='video0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </video> - <memballoon model='virtio'> - <alias name='balloon0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> - </memballoon> - <rng model='virtio'> - <backend model='random'>/dev/random</backend> - <alias name='rng0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/> - </rng> - </devices> -</domain> diff --git a/multi-node-aio/templates/vmnode-config/network.openstackci.local.xml b/multi-node-aio/templates/vmnode-config/network.openstackci.local.xml deleted file mode 100644 index c4adc426..00000000 --- a/multi-node-aio/templates/vmnode-config/network.openstackci.local.xml +++ /dev/null @@ -1,131 +0,0 @@ -<domain type='kvm'> - <name>__NODE__.openstackci.local</name> - <memory unit='GiB'>12</memory> - <currentMemory unit='GiB'>6</currentMemory> - <vcpu placement='static'>4</vcpu> - <resource> - <partition>/machine</partition> - </resource> - <os> - <type arch='x86_64' machine='pc-i440fx-trusty'>hvm</type> - </os> - <features> - <acpi/> - <apic/> - </features> - <cpu mode='host-model'> - <model fallback='allow'/> - </cpu> - <clock offset='utc'> - <timer name='rtc' tickpolicy='catchup'/> - <timer name='pit' tickpolicy='delay'/> - <timer name='hpet' present='no'/> - </clock> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>restart</on_crash> - <pm> - <suspend-to-mem enabled='no'/> - <suspend-to-disk enabled='no'/> - </pm> - <devices> - <disk type='file' device='disk'> - <driver name='qemu' type='qcow2' cache='none' io='native'/> - <source file='/var/lib/libvirt/images/__NODE__.openstackci.local.img'/> - <target dev='__DEVICE_NAME__' bus='virtio'/> - <boot order='1'/> - <alias name='virtio-disk0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> - </disk> - <controller type='pci' index='0' model='pci-root'> - <alias name='pci.0'/> - </controller> - <controller type='virtio-serial' index='0'> - <alias name='virtio-serial0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> - </controller> - <interface type='bridge'> - <mac address="52:54:00:bd:81:__COUNT__"/> - <source bridge='br-dhcp'/> - <target dev='vnet0'/> - <model type='virtio'/> - <boot order='2'/> - <alias name='net0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:fd:7f:__COUNT__"/> - <source bridge='vm-br-eth1'/> - <target dev='vnet1'/> - <model type='virtio'/> - <boot order='3'/> - <alias name='net1'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:f5:44:__COUNT__"/> - <source bridge='vm-br-eth2'/> - <target dev='vnet2'/> - <model type='virtio'/> - <boot order='4'/> - <alias name='net2'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:1f:96:__COUNT__"/> - <source bridge='vm-br-eth3'/> - <target dev='vnet3'/> - <model type='virtio'/> - <boot order='5'/> - <alias name='net3'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:50:03:__COUNT__"/> - <source bridge='vm-br-eth4'/> - <target dev='vnet4'/> - <model type='virtio'/> - <boot order='6'/> - <alias name='net4'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:2d:12:__COUNT__"/> - <source bridge='vm-br-eth5'/> - <target dev='vnet5'/> - <model type='virtio'/> - <boot order='7'/> - <alias name='net5'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x0'/> - </interface> - <serial type='pty'> - <source path='/dev/pts/4'/> - <target port='0'/> - <alias name='serial0'/> - </serial> - <console type='pty' tty='/dev/pts/4'> - <source path='/dev/pts/4'/> - <target type='serial' port='0'/> - <alias name='serial0'/> - </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'> - <listen type='address' address='127.0.0.1'/> - </graphics> - <video> - <model type='vmvga' vram='9216' heads='1'/> - <alias name='video0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </video> - <memballoon model='virtio'> - <alias name='balloon0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> - </memballoon> - <rng model='virtio'> - <backend model='random'>/dev/random</backend> - <alias name='rng0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/> - </rng> - </devices> -</domain> diff --git a/multi-node-aio/templates/vmnode-config/nova_compute.openstackci.local.xml b/multi-node-aio/templates/vmnode-config/nova_compute.openstackci.local.xml deleted file mode 100644 index 462dd2ab..00000000 --- a/multi-node-aio/templates/vmnode-config/nova_compute.openstackci.local.xml +++ /dev/null @@ -1,131 +0,0 @@ -<domain type='kvm'> - <name>__NODE__.openstackci.local</name> - <memory unit='GiB'>24</memory> - <currentMemory unit='GiB'>8</currentMemory> - <vcpu placement='static'>8</vcpu> - <resource> - <partition>/machine</partition> - </resource> - <os> - <type arch='x86_64' machine='pc-i440fx-trusty'>hvm</type> - </os> - <features> - <acpi/> - <apic/> - </features> - <cpu mode='host-model'> - <model fallback='allow'/> - </cpu> - <clock offset='utc'> - <timer name='rtc' tickpolicy='catchup'/> - <timer name='pit' tickpolicy='delay'/> - <timer name='hpet' present='no'/> - </clock> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>restart</on_crash> - <pm> - <suspend-to-mem enabled='no'/> - <suspend-to-disk enabled='no'/> - </pm> - <devices> - <disk type='file' device='disk'> - <driver name='qemu' type='qcow2' cache='none' io='native'/> - <source file='/var/lib/libvirt/images/__NODE__.openstackci.local.img'/> - <target dev='__DEVICE_NAME__' bus='virtio'/> - <boot order='1'/> - <alias name='virtio-disk0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> - </disk> - <controller type='pci' index='0' model='pci-root'> - <alias name='pci.0'/> - </controller> - <controller type='virtio-serial' index='0'> - <alias name='virtio-serial0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> - </controller> - <interface type='bridge'> - <mac address="52:54:00:bd:81:__COUNT__"/> - <source bridge='br-dhcp'/> - <target dev='vnet0'/> - <model type='virtio'/> - <boot order='2'/> - <alias name='net0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:fd:7f:__COUNT__"/> - <source bridge='vm-br-eth1'/> - <target dev='vnet1'/> - <model type='virtio'/> - <boot order='3'/> - <alias name='net1'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:f5:44:__COUNT__"/> - <source bridge='vm-br-eth2'/> - <target dev='vnet2'/> - <model type='virtio'/> - <boot order='4'/> - <alias name='net2'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:1f:96:__COUNT__"/> - <source bridge='vm-br-eth3'/> - <target dev='vnet3'/> - <model type='virtio'/> - <boot order='5'/> - <alias name='net3'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:50:03:__COUNT__"/> - <source bridge='vm-br-eth4'/> - <target dev='vnet4'/> - <model type='virtio'/> - <boot order='6'/> - <alias name='net4'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:2d:12:__COUNT__"/> - <source bridge='vm-br-eth5'/> - <target dev='vnet5'/> - <model type='virtio'/> - <boot order='7'/> - <alias name='net5'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x0'/> - </interface> - <serial type='pty'> - <source path='/dev/pts/4'/> - <target port='0'/> - <alias name='serial0'/> - </serial> - <console type='pty' tty='/dev/pts/4'> - <source path='/dev/pts/4'/> - <target type='serial' port='0'/> - <alias name='serial0'/> - </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'> - <listen type='address' address='127.0.0.1'/> - </graphics> - <video> - <model type='vmvga' vram='9216' heads='1'/> - <alias name='video0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </video> - <memballoon model='virtio'> - <alias name='balloon0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> - </memballoon> - <rng model='virtio'> - <backend model='random'>/dev/random</backend> - <alias name='rng0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/> - </rng> - </devices> -</domain> diff --git a/multi-node-aio/templates/vmnode-config/swift.openstackci.local.xml b/multi-node-aio/templates/vmnode-config/swift.openstackci.local.xml deleted file mode 100644 index 7afd6e30..00000000 --- a/multi-node-aio/templates/vmnode-config/swift.openstackci.local.xml +++ /dev/null @@ -1,131 +0,0 @@ -<domain type='kvm'> - <name>__NODE__.openstackci.local</name> - <memory unit='GiB'>4</memory> - <currentMemory unit='GiB'>4</currentMemory> - <vcpu placement='static'>4</vcpu> - <resource> - <partition>/machine</partition> - </resource> - <os> - <type arch='x86_64' machine='pc-i440fx-trusty'>hvm</type> - </os> - <features> - <acpi/> - <apic/> - </features> - <cpu mode='host-model'> - <model fallback='allow'/> - </cpu> - <clock offset='utc'> - <timer name='rtc' tickpolicy='catchup'/> - <timer name='pit' tickpolicy='delay'/> - <timer name='hpet' present='no'/> - </clock> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>restart</on_crash> - <pm> - <suspend-to-mem enabled='no'/> - <suspend-to-disk enabled='no'/> - </pm> - <devices> - <disk type='file' device='disk'> - <driver name='qemu' type='qcow2' cache='none' io='native'/> - <source file='/var/lib/libvirt/images/__NODE__.openstackci.local.img'/> - <target dev='__DEVICE_NAME__' bus='virtio'/> - <boot order='1'/> - <alias name='virtio-disk0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> - </disk> - <controller type='pci' index='0' model='pci-root'> - <alias name='pci.0'/> - </controller> - <controller type='virtio-serial' index='0'> - <alias name='virtio-serial0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> - </controller> - <interface type='bridge'> - <mac address="52:54:00:bd:81:__COUNT__"/> - <source bridge='br-dhcp'/> - <target dev='vnet0'/> - <model type='virtio'/> - <boot order='2'/> - <alias name='net0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:fd:7f:__COUNT__"/> - <source bridge='vm-br-eth1'/> - <target dev='vnet1'/> - <model type='virtio'/> - <boot order='3'/> - <alias name='net1'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:f5:44:__COUNT__"/> - <source bridge='vm-br-eth2'/> - <target dev='vnet2'/> - <model type='virtio'/> - <boot order='4'/> - <alias name='net2'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:1f:96:__COUNT__"/> - <source bridge='vm-br-eth3'/> - <target dev='vnet3'/> - <model type='virtio'/> - <boot order='5'/> - <alias name='net3'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:50:03:__COUNT__"/> - <source bridge='vm-br-eth4'/> - <target dev='vnet4'/> - <model type='virtio'/> - <boot order='6'/> - <alias name='net4'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/> - </interface> - <interface type='bridge'> - <mac address="52:54:00:2d:12:__COUNT__"/> - <source bridge='vm-br-eth5'/> - <target dev='vnet5'/> - <model type='virtio'/> - <boot order='7'/> - <alias name='net5'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x0'/> - </interface> - <serial type='pty'> - <source path='/dev/pts/4'/> - <target port='0'/> - <alias name='serial0'/> - </serial> - <console type='pty' tty='/dev/pts/4'> - <source path='/dev/pts/4'/> - <target type='serial' port='0'/> - <alias name='serial0'/> - </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'> - <listen type='address' address='127.0.0.1'/> - </graphics> - <video> - <model type='vmvga' vram='9216' heads='1'/> - <alias name='video0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </video> - <memballoon model='virtio'> - <alias name='balloon0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> - </memballoon> - <rng model='virtio'> - <backend model='random'>/dev/random</backend> - <alias name='rng0'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/> - </rng> - </devices> -</domain> diff --git a/multi-node-aio/templates/xenial-sources.list b/multi-node-aio/templates/xenial-sources.list deleted file mode 100644 index 5c46164c..00000000 --- a/multi-node-aio/templates/xenial-sources.list +++ /dev/null @@ -1,20 +0,0 @@ -deb http://archive.ubuntu.com/ubuntu xenial main restricted -deb-src http://archive.ubuntu.com/ubuntu xenial main restricted -deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted -deb-src http://archive.ubuntu.com/ubuntu xenial-updates main restricted -deb http://archive.ubuntu.com/ubuntu xenial universe -deb-src http://archive.ubuntu.com/ubuntu xenial universe -deb http://archive.ubuntu.com/ubuntu xenial-updates universe -deb-src http://archive.ubuntu.com/ubuntu xenial-updates universe -deb http://archive.ubuntu.com/ubuntu xenial multiverse -deb-src http://archive.ubuntu.com/ubuntu xenial multiverse -deb http://archive.ubuntu.com/ubuntu xenial-updates multiverse -deb-src http://archive.ubuntu.com/ubuntu xenial-updates multiverse -deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse -deb-src http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse -deb http://security.ubuntu.com/ubuntu xenial-security main restricted -deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted -deb http://security.ubuntu.com/ubuntu xenial-security universe -deb-src http://security.ubuntu.com/ubuntu xenial-security universe -deb http://security.ubuntu.com/ubuntu xenial-security multiverse -deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse \ No newline at end of file diff --git a/multi-node-aio/tools/downgrade-all-VMs.sh b/multi-node-aio/tools/downgrade-all-VMs.sh deleted file mode 100644 index 07920a71..00000000 --- a/multi-node-aio/tools/downgrade-all-VMs.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -#eg. KERNEL_VERSION="3.13.0-98" -KERNEL_VERSION=${KERNEL_VERSION:-false} - -if [[ "${KERNEL_VERSION}" = false ]]; then - echo "Please setup the KERNEL_VERSION before running this script" - exit 1 -fi - -pushd .. -source functions.rc -for node in $(get_all_hosts); do - ssh -q -t -o StrictHostKeyChecking=no 10.0.0.${node#*":"} KERNEL_VERSION="${KERNEL_VERSION}" 'bash -s' < tools/ubuntu-downgrade.sh -done diff --git a/multi-node-aio/tools/ubuntu-kernel-downgrade.sh b/multi-node-aio/tools/ubuntu-kernel-downgrade.sh deleted file mode 100755 index 95f12875..00000000 --- a/multi-node-aio/tools/ubuntu-kernel-downgrade.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -#eg. KERNEL_VERSION="3.13.0-98" -KERNEL_VERSION=${KERNEL_VERSION:-false} - -if [[ "${KERNEL_VERSION}" = false ]]; then - echo "Please setup the KERNEL_VERSION before running this script" - exit 1 -fi - -sudo apt-get update -sudo aptitude install -y linux-image-${KERNEL_VERSION}-generic \ - linux-headers-${KERNEL_VERSION} linux-image-extra-${KERNEL_VERSION}-generic - -sudo sed -i "s/GRUB_DEFAULT=.*/GRUB_DEFAULT=\"Advanced options for Ubuntu>Ubuntu, with Linux ${KERNEL_VERSION}-generic\"/" /etc/default/grub -sudo update-grub -sudo reboot diff --git a/multi-node-aio/variables.sh b/multi-node-aio/variables.sh deleted file mode 100755 index 98d9c052..00000000 --- a/multi-node-aio/variables.sh +++ /dev/null @@ -1,50 +0,0 @@ -# Variables used by multi-node-aio -# Network subnet used for all the virtual machines -NETWORK_BASE="${NETWORK_BASE:-172.29}" -# DNS used throughout the deploy -#DNS_NAMESERVER=$(cat /etc/resolv.conf | grep -m 1 "nameserver" | sed "s/nameserver //") -DNS_NAMESERVER="${DNS_NAMESERVER:-8.8.8.8}" - -# By default AIO deploy overrides apt-sources, if things like a local mirror are already -# set up then this script will override these. This option allows for the override to be -# disabled. -OVERRIDE_SOURCES="${OVERRIDE_SOURCES:-true}" - -# What branch of Openstack-Ansible are we deploying from -OSA_BRANCH="${OSA_BRANCH:-master}" - -# What is the default disk device name -DEVICE_NAME="${DEVICE_NAME:-vda}" - -# What default network device should we use for Cobbler -DEFAULT_NETWORK="${DEFAULT_NETWORK:-eth0}" - -# What is the default virtual machine disk size in GB -VM_DISK_SIZE="${VM_DISK_SIZE:-252}" - -# Do we want to do all the required host setup -SETUP_HOST="${SETUP_HOST:-true}" - -# Do we want to do disk partitioning or is there a partition ready to use -PARTITION_HOST="${PARTITION_HOST:-true}" - -# Do we want to set up networking on the host for Virsh -SETUP_VIRSH_NET="${SETUP_VIRSH_NET:-true}" - -# When the virtual machines are re-kicked do we format them -VM_IMAGE_CREATE="${VM_IMAGE_CREATE:-true}" - -# Should we run the deploy Openstack-Ansible script at the end of the build script -DEPLOY_OSA="${DEPLOY_OSA:-true}" - -# Should we pre-configure the environment before we deploy OpenStack-Ansible -PRE_CONFIG_OSA="${PRE_CONFIG_OSA:-true}" - -# Should we run the final deploy of OpenStack-Ansible -RUN_OSA="${RUN_OSA:-true}" - -# Default service ports -OSA_PORTS="${OSA_PORTS:-6080 6082 443 80}" - -# Should we configure prerouting of service ports after deployment -CONFIG_PREROUTING="${CONFIG_PREROUTING:-true}" \ No newline at end of file