Ported the osa-multi-node-aio

This change imports the code from [ https://github.com/cloudnull/osa-multi-node-aio ]
so that others in the OSA community can benifit from and contribute to
the project.

Change-Id: Id9a2d928f7e8bbd185725349e8ce51344f19daa4
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2016-08-01 14:01:28 -05:00
parent 840528242a
commit a7180a096c
No known key found for this signature in database
GPG Key ID: 69FEFFC5E2D9273F
31 changed files with 4036 additions and 0 deletions

229
multi-node-aio/LICENSE.txt Normal file
View File

@ -0,0 +1,229 @@
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

205
multi-node-aio/README.rst Normal file
View File

@ -0,0 +1,205 @@
OpenStack-Ansible Multi-Node AIO
################################
:date: 2016-03-09
:tags: rackspace, openstack, ansible
:category: \*openstack, \*nix
About this repository
---------------------
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 1 load balancer all using a Hyper Converged environment.
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
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``.
=========== ======== ============
Physical Host Specs known to work well
--------------------------------------
CPU CORES MEMORY DISK SPACE
=========== ======== ============
20 124GB 1.3TB
=========== ======== ============
These specs are covered by the Rackspace OnMetal-IO v1/2 Servers.
When your ready, run the build script by executing ``bash ./build.sh``. The build script
current executes a deployment of OpenStack Ansible using the master branch. If you want to
do something other than deploy master you can set the ``${OSA_BRANCH}`` variable to any
branch, tag, or SHA.
Post Deployment
---------------
Once deployed you can use virt-manager to manage the KVM instances on the host, similar to a DRAC or ILO.
LINUX:
If you're running a linux system as your workstation simply install virt-manager
from your package manager and connect to the host via QEMU/KVM:SSH
OSX:
If you're running a MAC you can get virt-manager via X11 forwarding to the host
or install it via BREW. http://stackoverflow.com/questions/3921814/is-there-a-virt-manager-alternative-for-mac-os-x
WINDOWS:
If you're running Windows, you can install virt-viewer from the KVM Download site.
https://virt-manager.org/download/
Deployment screenshot
^^^^^^^^^^^^^^^^^^^^^
.. image:: screenshots/virt-manager-screenshot.jpeg
:scale: 50 %
:alt: Screen shot of virt-manager and deployment in action
:align: center
Deployments can be accessed and monitored via virt-manager
Console Access
^^^^^^^^^^^^^^
.. image:: screenshots/console-screenshot.jpeg
:scale: 50 %
: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
"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-rpc
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}"``
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 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 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}``
Instruct the system do all of the virsh network setup:
``SETUP_VIRSH_NET=${SETUP_VIRSH_NET:-true}``
Re-kicking the VMs
------------------
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.
Adding nodes to the deployment
------------------------------
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.
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
PARTITION_HOST=false ./build.sh
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.
.. code-block:: bash
OSA_BRANCH=master ./deploy-osa.sh
Snapshotting an environment before major testing
------------------------------------------------
Running a snapshot on all of the vms before doing major testing is wise as it'll give you a restore point without having to re-kick
the cloud. You can do this using some basic ``virsh`` commands and a little bash.
.. code-block:: bash
for instance in $(virsh list --all --name); do
virsh snapshot-create-as --atomic --name $instance-kilo-snap --description "saved kilo state before liberty upgrade" $instance
done
Once the previous command is complete you'll have a collection of snapshots within all of your infrastructure hosts. These snapshots
can be used to restore state to a previous point if needed. To restore the infrastructure hosts to a previous point,
using your snapshots, you can execute a simple ``virsh`` command or the following bash loop to restore everything to a known point.
.. code-block:: bash
for instance in $(virsh list --all --name); do
virsh snapshot-revert --snapshotname $instance-kilo-snap --running $instance
done

38
multi-node-aio/build.sh Executable file
View File

@ -0,0 +1,38 @@
#!/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
# Instruct the system do all of the require host setup
SETUP_HOST=${SETUP_HOST:-true}
[[ "${SETUP_HOST}" = true ]] && source setup-host.sh
# 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 deploy-osa.sh

117
multi-node-aio/deploy-osa.sh Executable file
View File

@ -0,0 +1,117 @@
#!/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.
# Load all functions
source functions.rc
# 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://github.com/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 "s/__HOSTIP__/${HOSTIP}/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 network
# 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 =========== ###
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: 172.29.248.0/22'
# 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'
popd
# Set the number of forks for the ansible client calls
export ANSIBLE_FORKS=${ANSIBLE_FORKS:-15}
pushd /opt/openstack-ansible/playbooks
# Running the HAP play is done because it "may" be needed. Note: In Master its not.
openstack-ansible haproxy-install.yml
# Setup everything else
openstack-ansible setup-everything.yml
# This is optional and only being done to give the cloud networks and an image.
# The tempest install will work out of the box because the deployment is setup
# already with all of the correct networks, devices, and other bits. If you want
# to test with tempest the OSA script will work out the box. Post deployment you
# can test with the following: `cd /opt/openstack-ansible; ./scripts/run-tempest.sh`
openstack-ansible os-tempest-install.yml
popd

54
multi-node-aio/deploy-vms.sh Executable file
View File

@ -0,0 +1,54 @@
#!/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
# 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 "s/__COUNT__/${node#*":"}/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
# Ensure that all running VMs have an updated apt-cache
for node in $(get_all_hosts); do
ssh -q -n -f -o StrictHostKeyChecking=no 10.0.0.${node#*":"} "apt-get clean && apt-get update"
done

197
multi-node-aio/functions.rc Executable file
View File

@ -0,0 +1,197 @@
#!/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: 172.29.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: 172.29.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: "172.29.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: 172.29.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: 172.29.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
}

27
multi-node-aio/hosts.json Normal file
View File

@ -0,0 +1,27 @@
{
"cinder": {
"cinder1": "140",
"cinder2": "141"
},
"infra": {
"infra1": "100",
"infra2": "101",
"infra3": "102"
},
"logging": {
"logging1": "110"
},
"network": {
"network1": "120",
"network2": "121"
},
"nova_compute": {
"compute1": "130",
"compute2": "131"
},
"swift": {
"swift1": "150",
"swift2": "151",
"swift3": "152"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 KiB

146
multi-node-aio/setup-cobbler.sh Executable file
View File

@ -0,0 +1,146 @@
#!/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
# 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 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 $
cp -v templates/dhcp.template /etc/cobbler/dhcp.template
# Create a trusty sources file
cp -v templates/trusty-sources.list /var/www/html/trusty-sources.list
# 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}"
# 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#*'/'}"
done
# Restart services again and configure autostart
service cobblerd restart
service apache2 restart
service xinetd stop
service xinetd start
update-rc.d cobblerd defaults
# Get ubuntu server image
mkdir_check "/var/cache/iso"
pushd /var/cache/iso
if [ -f "/var/cache/iso/ubuntu-14.04.4-server-amd64.iso" ]; then
rm /var/cache/iso/ubuntu-14.04.4-server-amd64.iso
fi
wget http://releases.ubuntu.com/trusty/ubuntu-14.04.4-server-amd64.iso
popd
# import cobbler image
if ! cobbler distro list | grep -qw "ubuntu-14.04.4-server-x86_64"; then
mkdir_check "/mnt/iso"
mount -o loop /var/cache/iso/ubuntu-14.04.4-server-amd64.iso /mnt/iso
cobbler import --name=ubuntu-14.04.4-server-amd64 --path=/mnt/iso
umount /mnt/iso
fi
# Create cobbler profile
for seed_file in /var/lib/cobbler/kickstarts/ubuntu*14.04*.seed; do
if ! cobbler profile list | grep -qw "${seed_file##*'/'}"; then
cobbler profile add \
--name "${seed_file##*'/'}" \
--distro ubuntu-14.04.4-server-x86_64 \
--kickstart "${seed_file}"
fi
done
# sync cobbler
cobbler sync
# Get Loaders
cobbler get-loaders
# Update Cobbler Signatures
cobbler signature update
# 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-14.04-unattended-cobbler-${node_type}.seed" \
--hostname="${node%%":"*}.openstackci.local" \
--kopts="interface=${DEFAULT_NETWORK}" \
--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=8.8.8.8 8.8.4.4 \
--static=1
done
done
# Restart XinetD
service xinetd stop
service xinetd start

95
multi-node-aio/setup-host.sh Executable file
View File

@ -0,0 +1,95 @@
#!/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
# 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
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:-true}
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

View File

@ -0,0 +1,34 @@
#!/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
# 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

View File

@ -0,0 +1,85 @@
# ******************************************************************
# 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 8.8.8.8;
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

View File

@ -0,0 +1,69 @@
# 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 172.29.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 172.29.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 ####

View File

@ -0,0 +1,5 @@
<network>
<name>__NETWORK__</name>
<forward mode="bridge"/>
<bridge name="__NETWORK__"/>
</network>

View File

@ -0,0 +1,76 @@
## 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 172.29.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 172.29.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 172.29.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 172.29.244.__COUNT__
netmask 255.255.252.0
offload-sg off

View File

@ -0,0 +1,75 @@
---
cidr_networks:
container: 172.29.236.0/22
tunnel: 172.29.240.0/22
storage: 172.29.244.0/22
used_ips:
- "172.29.236.0,172.29.236.200"
- "172.29.240.0,172.29.240.200"
- "172.29.244.0,172.29.244.200"
- "172.29.248.0,172.29.248.200"
global_overrides:
internal_lb_vip_address: 172.29.236.200
# 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: 172.29.236.200

View File

@ -0,0 +1,16 @@
---
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

View File

@ -0,0 +1,293 @@
#
# 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
#############
#
# 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.
finish-install finish-install/reboot_in_progress note

View File

@ -0,0 +1,287 @@
#
# 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
#############
#
# 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.
finish-install finish-install/reboot_in_progress note

View File

@ -0,0 +1,288 @@
#
# 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
#############
#
# 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.
finish-install finish-install/reboot_in_progress note

View File

@ -0,0 +1,287 @@
#
# 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
#############
#
# 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.
finish-install finish-install/reboot_in_progress note

View File

@ -0,0 +1,295 @@
#
# 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
#############
#
# 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.
finish-install finish-install/reboot_in_progress note

View File

@ -0,0 +1,312 @@
#
# 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
#############
#
# 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.
finish-install finish-install/reboot_in_progress note

View File

@ -0,0 +1,20 @@
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

View File

@ -0,0 +1,131 @@
<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>

View File

@ -0,0 +1,131 @@
<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>

View File

@ -0,0 +1,131 @@
<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>

View File

@ -0,0 +1,131 @@
<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>

View File

@ -0,0 +1,131 @@
<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>

View File

@ -0,0 +1,131 @@
<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>