Refactor to fuel plugin structure

This commit is contained in:
John Hua 2015-08-13 14:06:30 +08:00
parent 406b86a2b5
commit 8fe052a0eb
24 changed files with 476 additions and 957 deletions

4
.gitignore vendored
View File

@ -2,8 +2,4 @@
.build
*.pyc
*.rpm
localrc
newrelease.yaml
models/
*.sublime-workspace
*.iso

View File

@ -4,25 +4,26 @@ xenserver-fuel-plugin
Prerequisites
-------------
apt-get install createrepo rpm dpkg-dev python-pip sshpass -y || yum install createrepo rpm rpm-build dpkg-devel python-pip sshpass -y
pip install fuel-plugin-builder
[user@local tmp]# apt-get install createrepo rpm dpkg-dev python-pip sshpass -y || yum install createrepo rpm rpm-build dpkg-devel python-pip sshpass -y
Environment Setup
-----------------
git clone https://github.com/citrix-openstack/xenserver-fuel-plugin.git
cd xenserver-fuel-plugin
cp localrc.sample localrc && vi localrc #configure your local environment
[user@local tmp]# git clone https://github.com/citrix-openstack/fuel-plugins.git
[user@local tmp]# sudo pip install fuel-plugins/fuel_plugin_builder/
[user@local tmp]# git clone https://github.com/citrix-openstack/xenserver-fuel-plugin.git
Deployment
----------
./deploy.sh release
./deploy.sh plugin
./deploy.sh #both
./prepare_cluster.sh "eth0" "eth1" 2048 40
./setup_HIMN.sh
[user@local tmp]# fpb --check xenserver-fuel-plugin && \
fpb --build xenserver-fuel-plugin
Web UI
----------
open http://HOST_OF_FUEL_MASTER:8000/
Installation
------------
[user@local tmp]# scp xenserver-fuel-plugin*.noarch.rpm root@<Fuel_Master_IP>:/tmp
[root@fuel tmp]# fuel plugins --install xenserver-fuel-plugin*.noarch.rpm

View File

@ -1,97 +0,0 @@
set -eux
cd ..
PWD=`pwd`
mkdir -p nova-suppack && cd nova-suppack
GITREPO=${1:-"https://git.openstack.org/openstack/nova"}
DDK_ROOT_URL=${2:-"http://copper.eng.hq.xensource.com/builds/ddk-xs6_2.tgz"}
GITBRANCH=${3:-"2014.1.1"}
# Update system and install dependencies
export DEBIAN_FRONTEND=noninteractive
#sudo apt-get update
#sudo apt-get -qy upgrade
#sudo apt-get install -qy git rpm
# Check out rpm packaging
[ -e xenserver-nova-suppack-builder ] || git clone https://github.com/citrix-openstack/xenserver-nova-suppack-builder
# Create rpm file
## Check out Nova
if ! [ -e nova ]; then
git clone "$GITREPO" nova
cd nova
git fetch origin "$GITBRANCH"
git checkout FETCH_HEAD
cd ..
fi
cd nova
NOVA_VER=$(
{
grep -e "^PLUGIN_VERSION" plugins/xenserver/xenapi/etc/xapi.d/plugins/nova_plugin_version;
echo "print PLUGIN_VERSION"
} | python
)
cd ..
cp -r xenserver-nova-suppack-builder/plugins/* nova/plugins/
cd nova/plugins/xenserver/xenapi/contrib
#./inject-key.sh ~/domzero_public_key
./build-rpm.sh
cd
RPMFILE=$(find -name "*.noarch.rpm" -print)
# Create Supplemental pack
rm -rf suppack
mkdir suppack
DDKROOT=$(mktemp -d)
wget -qO - "$DDK_ROOT_URL" | sudo tar -xzf - -C "$DDKROOT"
sudo mkdir $DDKROOT/mnt/host
sudo mount --bind $(pwd) $DDKROOT/mnt/host
sudo tee $DDKROOT/buildscript.py << EOF
from xcp.supplementalpack import *
from optparse import OptionParser
parser = OptionParser()
parser.add_option('--pdn', dest="product_name")
parser.add_option('--pdv', dest="product_version")
parser.add_option('--bld', dest="build")
parser.add_option('--out', dest="outdir")
(options, args) = parser.parse_args()
xs = Requires(originator='xs', name='main', test='ge',
product='XenServer', version='5.6.100',
build='39265p')
setup(originator='xs', name='novaplugins', product='XenServer',
version=options.product_version, build=options.build, vendor='Citrix Systems, Inc.',
description="OpenStack Nova Plugins", packages=args, requires=[xs],
outdir=options.outdir, output=['iso'])
EOF
sudo chroot $DDKROOT python buildscript.py \
--pdn=nova-plugins \
--pdv="$NOVA_VER" \
--bld=0 \
--out=/mnt/host/suppack \
/mnt/host/$RPMFILE
# Cleanup
sudo umount $DDKROOT/mnt/host
sudo rm -rf "$DDKROOT"
cp $PWD/nova-suppack/suppack/novaplugins.iso \
$PWD/xenserver-fuel-plugin/xenserver-fuel-plugin/deployment_scripts/

View File

@ -1,65 +0,0 @@
source localrc
ACTION=${1:-"all"}
[ -e "$VIRENV_PATH/bin/activate" ] || virtualenv "$VIRENV_PATH"
source $VIRENV_PATH/bin/activate
function deploy_release {
sshpass -p $XEN_PASSWORD scp cleardb.py root@$FUELMASTER:/tmp
sshpass -p $XEN_PASSWORD ssh $XEN_ROOT@$FUELMASTER \
'
dockerctl copy "/tmp/cleardb.py" nailgun:/tmp/cleardb.py
dockerctl shell nailgun /tmp/cleardb.py
rm "/tmp/cleardb.py"
'
cat base_release.yaml > newrelease.yaml
echo '- pk: 9' >> newrelease.yaml
echo ' extend: *base_release' >> newrelease.yaml
cat xs_release.yaml >> newrelease.yaml
sshpass -p $XEN_PASSWORD scp newrelease.yaml root@$FUELMASTER:/tmp
sshpass -p $XEN_PASSWORD ssh $XEN_ROOT@$FUELMASTER \
'
dockerctl copy "/tmp/newrelease.yaml" nailgun:/tmp/newrelease.yaml
dockerctl shell nailgun manage.py loaddata /tmp/newrelease.yaml
fuel rel --sync-deployment-tasks --dir /etc/puppet/
rm "/tmp/newrelease.yaml"
'
rm newrelease.yaml
}
function deploy_plugin {
if ! [ -e xenserver-fuel-plugin/deployment_scripts/novaplugins.iso ]; then
if [ -e ../nova-suppack/suppack/novaplugins.iso ]; then
cp ../nova-suppack/suppack/novaplugins.iso \
xenserver-fuel-plugin/deployment_scripts/
else
sudo ./build-nova-suppack.sh
fi
fi
fpb --check xenserver-fuel-plugin
fpb --build xenserver-fuel-plugin
sshpass -p $XEN_PASSWORD scp xenserver-fuel-plugin/xenserver-fuel-plugin-0.0-$VERSION-1.noarch.rpm root@$FUELMASTER:/tmp
#sshpass -p $XEN_PASSWORD ssh $XEN_ROOT@$FUELMASTER fuel plugins --remove xenserver-fuel-plugin==$VERSION
if sshpass -p $XEN_PASSWORD ssh $XEN_ROOT@$FUELMASTER fuel plugins --list | grep xenserver-fuel-plugin; then
#sshpass -p $XEN_PASSWORD ssh $XEN_ROOT@$FUELMASTER fuel plugins --update "/tmp/xenserver-fuel-plugin-0.0-$VERSION-1.noarch.rpm"
sshpass -p $XEN_PASSWORD ssh $XEN_ROOT@$FUELMASTER fuel plugins --remove "xenserver-fuel-plugin==$VERSION"
sshpass -p $XEN_PASSWORD ssh $XEN_ROOT@$FUELMASTER fuel plugins --install "/tmp/xenserver-fuel-plugin-0.0-$VERSION-1.noarch.rpm"
else
sshpass -p $XEN_PASSWORD ssh $XEN_ROOT@$FUELMASTER fuel plugins --install "/tmp/xenserver-fuel-plugin-0.0-$VERSION-1.noarch.rpm"
fi
sshpass -p $XEN_PASSWORD ssh $XEN_ROOT@$FUELMASTER rm "/tmp/xenserver-fuel-plugin-0.0-$VERSION-1.noarch.rpm"
}
case $ACTION in
"release") deploy_release ;;
"plugin") deploy_plugin ;;
"all")
deploy_release
deploy_plugin
;;
esac

Binary file not shown.

16
dump.sh
View File

@ -1,16 +0,0 @@
source localrc
ALL_MODELS="action_log capacity_log attributes cluster cluster_changes release "
ALL_MODELS+="node node_roles role node_attributes node_bond_interface node_group "
ALL_MODELS+="network_group networking_config nova_network_config notification task "
ALL_MODELS+="master_node_settings"
MODELS="$@"
MODELS=${MODELS:-$ALL_MODELS}
mkdir -p models
for model in $MODELS
do
(set -x ; ssh root@$FUELMASTER dockerctl shell nailgun manage.py dumpdata $model \
> models/$model.json)
done

View File

@ -1,41 +0,0 @@
#
# The spec is generated automatically by Fuel Plugin Builder tool
# https://github.com/stackforge/fuel-plugins
#
# RPM spec file for package ${ name }
#
# Copyright (c) ${ year }, ${ license }, ${ vendor }
#
Name: ${ name }
Version: ${ version }
Url: ${ homepage }
Summary: ${ summary }
License: ${ license }
Source0: ${ name }.fp
Vendor: ${ vendor }
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Group: Development/Libraries
Release: 1
BuildArch: noarch
%%description
${ description }
%%prep
rm -rf %{name}-%{version}
mkdir %{name}-%{version}
tar -vxf %{SOURCE0} -C %{name}-%{version}
%%install
cd %{name}-%{version}
mkdir -p %{buildroot}/var/www/nailgun/plugins/
cp -r ${ name } %{buildroot}/var/www/nailgun/plugins/
date >> /tmp/post-xenserver-fuel-plugin-installed.log
%%clean
rm -rf %{buildroot}
%%files
/var/www/nailgun/plugins/${ name }

View File

@ -1,23 +0,0 @@
set -x
ACTION=${1:-"install"}
cd ..
source localrc
[ -e "$VIRENV_PATH/bin/activate" ] || virtualenv "$VIRENV_PATH"
source $VIRENV_PATH/bin/activate
[ -e "$FPB_PATH" ] || git clone "https://github.com/stackforge/fuel-plugins.git" "$FPB_PATH"
if [[ $ACTION == "overwrite" ]] ; then
cp plugin_rpm.spec.mako "$FPB_PATH/fuel_plugin_builder/fuel_plugin_builder/templates/v2/build/plugin_rpm.spec.mako"
fi
if [[ -z `pip show fuel-plugin-builder` ]] ; then
cp plugin_rpm.spec.mako "$FPB_PATH/fuel_plugin_builder/fuel_plugin_builder/templates/v2/build/plugin_rpm.spec.mako"
sudo pip install -e "$FPB_PATH/fuel_plugin_builder"
fi
echo `which fpb`

View File

@ -1,81 +0,0 @@
#!/usr/bin/env python
import httplib
import traceback
import sys
import os
import XenAPI
import time
def import_raw_vdi(host, session, filename):
if not os.path.exists(filename):
return ['%s not found' % filename]
import_task = None
try:
pool = session.xenapi.pool.get_all()[0]
default_sr = session.xenapi.pool.get_default_SR(pool)
sr = session.xenapi.SR.get_record(default_sr)
vdi_spec = {
'name_label': os.path.basename(filename),
'name_description': 'Nova API plugin ISO',
'SR': default_sr,
'virtual_size': str(os.stat(filename).st_size),
'type': 'user',
'sharable': False,
'read_only': False,
'other_config': dict(),
}
vdi = session.xenapi.VDI.create(vdi_spec)
task_name = 'import ' + session.xenapi.VDI.get_uuid(vdi)
import_task = session.xenapi.task.create(task_name, '')
put_url = '/import_raw_vdi?session_id=%s&vdi=%s&task_id=%s' % \
(session._session, vdi, import_task)
with open(filename, 'rb') as f:
content = f.read()
conn = httplib.HTTPSConnection(host)
conn.request('PUT', put_url, content)
response = conn.getresponse()
import_status = session.xenapi.task.get_status(import_task)
timeout = 30
while import_status == 'pending':
print import_status, timeout
"""TODO: loop 'pending', suspiciously a bug of XenServer that
could be fixed by installing SP1"""
time.sleep(1)
import_status = session.xenapi.task.get_status(import_task)
timeout -= 1
if timeout < 0:
session.xenapi.task.cancel(import_task)
break
if import_status != 'success':
error_info = session.xenapi.task.get_error_info(import_task)
return error_info
except Exception, e:
traceback.print_exc()
return e
finally:
if import_task is not None:
session.xenapi.task.destroy(import_task)
if __name__ == '__main__':
(host, username, password, filename,) = sys.argv[1:]
session = XenAPI.Session('https://' + host) #'10.219.10.22'
session.xenapi.login_with_password(username, password)
error_info = import_raw_vdi(host, session, filename)
if error_info is not None:
print ' '.join(error_info)
else:
print 'success'
session.xenapi.logout()

View File

@ -1,22 +0,0 @@
VERSION="0.0.3"
ENV_NAME="test_env"
FUELMASTER="HOST_OF_FUEL_MASTER"
FUELMASTER_ROOT="root"
FUELMASTER_PASSWORD="r00tme"
VIRENV_PATH="../MOS"
FPB_PATH="../fuel-plugins"
XEN_ROOT="root"
XEN_PASSWORD="XEN_PASSWORD"
CONTROLLER_NODES="XENSERVER_HOST_1/NODE_NAME_1"
COMPUTE_NODES="XENSERVER_HOST_1/NODE_NAME_2,\
XENSERVER_HOST_2/NODE_NAME_3,\
XENSERVER_HOST_3/NODE_NAME_4"
STORAGE_NODES="XENSERVER_HOST_4/NODE_NAME_5"
NODE_ETH0="NODE_ETH0"
NODE_ETH1="NODE_ETH1"
NODE_MEMORY="2048"
NODE_DISKSIZE="40"

View File

@ -3,7 +3,7 @@ name: xenserver-fuel-plugin
# Human-readable name for your plugin
title: Xenserver Plugin
# Plugin version
version: '0.0.3'
version: '0.0.4'
# Description
description: Enable Mirantis OpenStack to integrate with Xenserver
# Required fuel version

View File

@ -1169,3 +1169,464 @@
datacenter: ""
datastore: ""
modes: ['ha_compact']
- pk: 9
extend: *base_release
fields:
name: "Juno+Citrix XenServer on Ubuntu 14.04.1"
version: "2014.2.2-6.1"
can_update_from_versions: []
operating_system: "Ubuntu"
description: "This option will install the OpenStack Juno packages using Ubuntu as a base operating system. With high availability features built in, you are getting a robust, enterprise-grade OpenStack deployment."
roles:
- controller
- compute
- cinder
roles_metadata:
controller:
name: "Controller"
description: "The Controller initiates orchestration activities and provides an external API. Other components like Glance (image storage), Keystone (identity management), Horizon (OpenStack dashboard) and Nova-Scheduler are installed on the controller as well."
conflicts:
- compute
update_required:
- compute
- cinder
has_primary: true
limits:
min: 1
overrides:
- condition: "cluster:mode == 'multinode'"
max: 1
message: "Multi-node environment can not have more than one Controller node."
- condition: "cluster:mode == 'ha_compact'"
recommended: 3
message: "At least 3 Controller nodes are recommended for HA deployment."
compute:
name: "Compute"
description: "A Compute node creates, manages and terminates virtual machine instances."
limits:
recommended: 1
fault_tolerance: "2%"
cinder:
# NOTE: naming, see https://bugs.launchpad.net/fuel/+bug/1383224
name: "Storage - Cinder"
description: "Cinder provides scheduling of block storage resources, typically delivered over iSCSI and other compatible backend storage systems. Block storage can be used for database storage, expandable file systems, or providing a server with access to raw block level devices."
limits:
recommended: 1
restrictions:
- condition: "settings:storage.volumes_lvm.value == false"
message: "Cinder LVM should be enabled in settings"
# NOTE: https://bugs.launchpad.net/fuel/+bug/1372914 - Prohibit possibility of adding cinder nodes to an environment with Ceph RBD
- condition: "settings:storage.volumes_ceph.value == true"
message: "Ceph RBD cannot be used with Cinder"
networks_metadata:
nova_network:
networks:
- name: "public"
cidr: "10.219.237.0/24"
gateway: "10.219.237.1"
ip_range: ["10.219.237.10", "10.219.237.100"]
vlan_start: null
use_gateway: true
notation: "ip_ranges"
render_type: null
render_addr_mask: "public"
map_priority: 1
configurable: true
vips: ["haproxy", "vrouter"]
- name: "management"
cidr: "192.168.73.0/24"
vlan_start: 24
use_gateway: false
notation: "cidr"
render_type: "cidr"
render_addr_mask: "internal"
map_priority: 2
configurable: true
vips: ["haproxy", "vrouter"]
- name: "storage"
cidr: "192.168.133.0/24"
vlan_start: 20
use_gateway: false
notation: "cidr"
render_type: "cidr"
render_addr_mask: "storage"
map_priority: 2
configurable: true
- name: "fixed"
vlan_start: null
use_gateway: false
notation: null
render_type: null
render_addr_mask: null
map_priority: 2
ext_net_data: ["fixed_networks_vlan_start", "fixed_networks_amount"]
configurable: false
config:
net_manager: "FlatDHCPManager"
fixed_networks_cidr: "10.0.0.0/16"
fixed_networks_vlan_start: 23
fixed_network_size: 256
fixed_networks_amount: 1
floating_ranges: [["10.219.237.150", "10.219.237.200"]]
attributes_metadata:
editable:
kernel_params:
kernel:
value: "console=ttyS0,9600 console=tty0 net.ifnames=0 biosdevname=0 rootdelay=90 nomodeset"
repo_setup:
metadata:
label: "Repositories"
weight: 50
always_editable: true
repos:
type: "custom_repo_configuration"
extra_priority: null
description: |
Please note: the first repository will be considered the operating system mirror that will be used during node provisioning.
To create a local repository mirror on the Fuel master node, please follow the instructions provided by running "fuel-createmirror --help" on the Fuel master node.
Please make sure your Fuel master node has Internet access to the repository before attempting to create a mirror.
For more details, please refer to the documentation (https://docs.mirantis.com/openstack/fuel/fuel-6.1/operations.html#external-ubuntu-ops).
value:
- type: "deb"
name: "ubuntu"
uri: "http://archive.ubuntu.com/ubuntu/"
suite: "trusty"
section: "main universe multiverse"
priority: null
- type: "deb"
name: "ubuntu-updates"
uri: "http://archive.ubuntu.com/ubuntu/"
suite: "trusty-updates"
section: "main universe multiverse"
priority: null
- type: "deb"
name: "ubuntu-security"
uri: "http://archive.ubuntu.com/ubuntu/"
suite: "trusty-security"
section: "main universe multiverse"
priority: null
- type: "deb"
name: "mos"
uri: "http://{settings.MASTER_IP}:8080/{cluster.release.version}/ubuntu/x86_64"
suite: "mos6.1"
section: "main restricted"
priority: 1050
- type: "deb"
name: "mos-updates"
uri: "http://mirror.fuel-infra.org/mos/ubuntu/"
suite: "mos6.1-updates"
section: "main restricted"
priority: 1050
- type: "deb"
name: "mos-security"
uri: "http://mirror.fuel-infra.org/mos/ubuntu/"
suite: "mos6.1-security"
section: "main restricted"
priority: 1050
- type: "deb"
name: "mos-holdback"
uri: "http://mirror.fuel-infra.org/mos/ubuntu/"
suite: "mos6.1-holdback"
section: "main restricted"
priority: 1100
- type: "deb"
name: "Auxiliary"
uri: "http://{settings.MASTER_IP}:8080/{cluster.release.version}/ubuntu/auxiliary"
suite: "auxiliary"
section: "main restricted"
priority: 1150
additional_components:
metadata:
label: "Additional Components"
weight: 20
sahara:
value: false
label: "Install Sahara"
description: "If selected, Sahara component will be installed"
weight: 10
type: "checkbox"
restrictions:
- condition: "true"
action: disable
murano:
value: false
label: "Install Murano"
description: "If selected, Murano component will be installed"
weight: 20
type: "checkbox"
restrictions:
- condition: "true"
action: disable
heat:
value: true
label: ""
description: ""
weight: 30
type: "hidden"
ceilometer:
value: false
label: "Install Ceilometer"
description: "If selected, Ceilometer component will be installed"
weight: 40
type: "checkbox"
restrictions:
- condition: "true"
action: disable
mongo:
value: false
label: "Use external Mongo DB"
description: "If selected, You can use external Mongo DB as ceilometer backend"
weight: 40
type: "checkbox"
restrictions:
- condition: "true"
action: disable
common:
metadata:
label: "Common"
weight: 30
debug:
value: false
label: "OpenStack debug logging"
description: "Debug logging mode provides more information, but requires more disk space."
weight: 20
type: "checkbox"
puppet_debug:
value: true
label: "Puppet debug logging"
description: "Debug puppet logging mode provides more information, but requires more disk space."
weight: 20
type: "checkbox"
nova_quota:
value: false
label: "Nova quotas"
description: "Quotas are used to limit CPU and memory usage for tenants. Enabling quotas will increase load on the Nova database."
weight: 25
type: "checkbox"
auto_assign_floating_ip:
value: false
label: "Auto assign floating IP"
description: "If selected, OpenStack will automatically assign a floating IP to a new instance"
weight: 40
type: "checkbox"
restrictions:
- condition: "cluster:net_provider == 'neutron'"
action: "hide"
use_vcenter:
value: false
weight: 30
type: "hidden"
libvirt_type:
value: "qemu"
values:
- data: "kvm"
label: "KVM"
description: "Choose this type of hypervisor if you run OpenStack on hardware"
restrictions:
- condition: "true"
action: disable
- data: "qemu"
label: "QEMU"
description: "Choose this type of hypervisor if you run OpenStack on virtual hosts."
restrictions:
- condition: "true"
action: disable
label: "Hypervisor type"
weight: 30
type: "radio"
resume_guests_state_on_host_boot:
value: true
label: "Resume guests state on host boot"
description: "Whether to resume previous guests state when the host reboots. If enabled, this option causes guests assigned to the host to resume their previous state. If the guest was running a restart will be attempted when nova-compute starts. If the guest was not running previously, a restart will not be attempted."
weight: 60
type: "checkbox"
use_cow_images:
value: true
label: "Use qcow format for images"
description: "For most cases you will want qcow format. If it's disabled, raw image format will be used to run VMs. OpenStack with raw format currently does not support snapshotting."
weight: 50
type: "checkbox"
auth_key:
value: ""
label: "Public Key"
description: "Public key(s) to include in authorized_keys on deployed nodes"
weight: 70
type: "textarea"
external_ntp:
metadata:
label: "Host OS NTP Servers"
weight: 100
ntp_list:
value: "0.pool.ntp.org,1.pool.ntp.org,2.pool.ntp.org,3.pool.ntp.org"
label: "NTP server list"
description: "List of upstream NTP servers, separated by comma"
weight: 10
type: "text"
regex:
source: '^\s*(?:(?:\w+(?:-+\w+)*\.)+[a-z]+|\d{1,3}(?:\.\d{1,3}){3})\s*(?:,\s*(?:(?:\w+(?:-+\w+)*\.)+[a-z]+|\d{1,3}(\.\d{1,3}){3})\s*)*$'
error: "Invalid NTP server list"
generated:
repo_setup:
installer_kernel:
remote_relative: "dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/linux"
local: "/var/www/nailgun/ubuntu/x86_64/images/linux"
installer_initrd:
remote_relative: "dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/initrd.gz"
local: "/var/www/nailgun/ubuntu/x86_64/images/initrd.gz"
cobbler:
profile:
generator_arg: "ubuntu_1404_x86_64"
provision:
codename: "trusty"
image_data:
/:
uri: "http://{settings.MASTER_IP}:8080/targetimages/env_{cluster.id}_ubuntu_1404_amd64.img.gz"
format: "ext4"
container: "gzip"
/boot:
uri: "http://{settings.MASTER_IP}:8080/targetimages/env_{cluster.id}_ubuntu_1404_amd64-boot.img.gz"
format: "ext2"
container: "gzip"
wizard_metadata:
Mode:
metadata:
restrictions:
- condition: "true"
action: "hide"
mode:
type: "radio"
bind: "cluster:mode"
values:
- data: "ha_compact"
label: "cluster.mode.ha_compact"
Compute:
hypervisor:
type: "radio"
value: "qemu"
weight: 5
bind: "settings:common.libvirt_type.value"
values:
- data: "kvm"
label: "dialog.create_cluster_wizard.compute.kvm"
description: "dialog.create_cluster_wizard.compute.kvm_description"
bind:
- "wizard:Storage.ceph": "disable"
- "wizard:Network.manager": "neutron-vlan"
restrictions:
- condition: "true"
action: disable
- data: "qemu"
label: "dialog.create_cluster_wizard.compute.qemu"
description: "dialog.create_cluster_wizard.compute.qemu_description"
bind:
- "wizard:Storage.ceph": "disable"
- "wizard:Network.manager": "nova-network"
restrictions:
- condition: "true"
action: disable
- condition: "true"
message: "You have chosen XenServer for your cluster environment, therefore the hypervisor type has to be qemu initially."
vcenter:
type: "checkbox"
weight: 10
label: "dialog.create_cluster_wizard.compute.vcenter"
description: "dialog.create_cluster_wizard.compute.vcenter_description"
bind:
- "wizard:Storage.ceph": "disable"
- "wizard:Network.manager": "nova-network"
- "settings:common.use_vcenter.value"
restrictions:
- condition: "true"
action: disable
Network:
manager:
type: "radio"
value: "nova-network"
values:
- data: "neutron-vlan"
label: "dialog.create_cluster_wizard.network.neutr_vlan"
description: "dialog.create_cluster_wizard.network.neutr_vlan_description"
restrictions:
- condition: "true"
action: disable
- condition: "true"
message: "You have chosen XenServer for your cluster environment, therefore the network type has to be nova-network."
bind:
- "cluster:net_provider": "neutron"
- "cluster:net_segment_type": "vlan"
- data: "neutron-gre"
label: "dialog.create_cluster_wizard.network.neutr_gre"
description: "dialog.create_cluster_wizard.network.neutr_gre_description"
restrictions:
- condition: "true"
action: disable
bind:
- "cluster:net_provider": "neutron"
- "cluster:net_segment_type": "gre"
- data: "nova-network"
label: "dialog.create_cluster_wizard.network.nova_network"
description: "dialog.create_cluster_wizard.network.nova_network_description"
bind:
- "cluster:net_provider": "nova_network"
restrictions:
- condition: "true"
action: disable
Storage:
ceph:
type: "radio"
values:
- data: "disable"
label: "dialog.create_cluster_wizard.storage.ceph_disable"
bind:
- "settings:storage.volumes_lvm.value": true
- "settings:storage.volumes_ceph.value": false
- "settings:storage.objects_ceph.value": false
- "settings:storage.ephemeral_ceph.value": false
- "settings:storage.images_ceph.value": false
restrictions:
- condition: "true"
action: disable
- condition: "true"
message: "You have chosen XenServer for your cluster environment, therefore the storage backends have to use default providers."
- data: "enable"
label: "dialog.create_cluster_wizard.storage.ceph_enable"
bind:
- "settings:storage.volumes_ceph.value": true
- "settings:storage.objects_ceph.value": true
- "settings:storage.ephemeral_ceph.value": true
- "settings:storage.images_ceph.value": true
- "settings:storage.volumes_lvm.value": false
restrictions:
- condition: "true"
action: disable
AdditionalServices:
sahara:
type: "checkbox"
label: "dialog.create_cluster_wizard.additional.install_sahara"
description: "dialog.create_cluster_wizard.additional.install_sahara_description"
bind: "settings:additional_components.sahara.value"
weight: 10
restrictions:
- condition: "true"
action: disable
- condition: "true"
message: "You have chosen XenServer for your cluster environment, therefore Sahara, Murano, Ceilometer need to be disabled."
murano:
type: "checkbox"
label: "dialog.create_cluster_wizard.additional.install_murano"
description: "dialog.create_cluster_wizard.additional.install_murano_description"
bind: "settings:additional_components.murano.value"
weight: 20
restrictions:
- condition: "true"
action: disable
ceilometer:
type: "checkbox"
label: "dialog.create_cluster_wizard.additional.install_ceilometer"
description: "dialog.create_cluster_wizard.additional.install_ceilometer_description"
bind: "settings:additional_components.ceilometer.value"
weight: 30
restrictions:
- condition: "true"
action: disable
Ready: {}

View File

@ -1,83 +0,0 @@
source localrc
ALL_NODES="$CONTROLLER_NODES,$COMPUTE_NODES,$STORAGE_NODES"
echo "Creating VMs"
for HOST_NODE in ${ALL_NODES//,/ }
do
IFS=/ read -a _HOST_NODE <<< $HOST_NODE
HOST=${_HOST_NODE[0]}
NODE=${_HOST_NODE[1]}
sshpass -p $XEN_PASSWORD ssh $XEN_ROOT@$HOST \
'set +x
guest_name="'$NODE'"
eth0="'$NODE_ETH0'"
eth1="'$NODE_ETH1'"
memory="'$NODE_MEMORY'"
disksize="'$NODE_DISKSIZE'"
tname="Other install media"
vm_uuid=$(xe vm-install template="$tname" new-name-label="$guest_name")
localsr=$(xe pool-list params=default-SR minimal=true)
extra_vdi=$(xe vdi-create \
name-label=xvdb \
virtual-size="${disksize}GiB" \
sr-uuid=$localsr type=user)
vbd_uuid=$(xe vbd-create vm-uuid=$vm_uuid vdi-uuid=$extra_vdi device=0)
xe vm-cd-add vm=$vm_uuid device=1 cd-name="xs-tools.iso"
xe vm-memory-limits-set \
static-min=${memory}MiB \
static-max=${memory}MiB \
dynamic-min=${memory}MiB \
dynamic-max=${memory}MiB \
uuid=$vm_uuid
eth0_uuid=$(xe vif-create network-uuid=$(xe network-list name-label="$eth0" --minimal) vm-uuid=$vm_uuid device=0)
eth1_uuid=$(xe vif-create network-uuid=$(xe network-list name-label="$eth1" --minimal) vm-uuid=$vm_uuid device=1)
eth0_mac=$(xe vif-param-get uuid=$eth0_uuid param-name=MAC)
xe vm-param-set uuid=$vm_uuid HVM-boot-params:order=ndc
echo "Creating "'$NODE'" ($eth0_mac) on "'$HOST'""
'
done
./setup_HIMN.sh
echo "Booting VMs"
for HOST_NODE in ${ALL_NODES//,/ }
do
IFS=/ read -a _HOST_NODE <<< $HOST_NODE
HOST=${_HOST_NODE[0]}
NODE=${_HOST_NODE[1]}
sshpass -p $XEN_PASSWORD ssh $XEN_ROOT@$HOST \
'
guest_name="'$NODE'"
vm_uuid=$(xe vm-list name-label="$guest_name" power-state="halted" --minimal)
xe vm-start vm=$vm_uuid
echo "'$NODE' booted"
'
done
if false; then
sleep 60
echo "Creating Cluster"
sshpass -p $FUELMASTER_PASSWORD ssh $FUELMASTER_ROOT@$FUELMASTER \
'
guest_name="'$NODE'"
rel_id=$(fuel release | grep "XenServer" | cut -d " " -f1)
fuel env create --name "'$ENV_NAME'" --rel $rel
env_id=$(fuel env | grep "'$ENV_NAME'" | cut -d " " -f1)
nodes=($(fuel node | grep True | cut -d " " -f1))
fuel --env $env_id node set --node ${nodes[0]} --role controller
fuel --env $env_id node set --node ${nodes[1]},${nodes[2]},${nodes[3]} --role compute
fuel --env $env_id node set --node ${nodes[4]} --role compute,cinder
'
fi

View File

@ -1,27 +0,0 @@
source localrc
echo "Setting up HIMN"
for HOST_NODE in ${COMPUTE_NODES//,/ }
do
IFS=/ read -a _HOST_NODE <<< $HOST_NODE
HOST=${_HOST_NODE[0]}
NODE=${_HOST_NODE[1]}
sshpass -p $XEN_PASSWORD ssh $XEN_ROOT@$HOST \
'set +x
vm_name="'$NODE'"
vm_uuid=$(xe vm-list name-label="$vm_name" --minimal)
if [ -n "$vm_uuid" ]; then
device_number=2
net_uuid=$(xe network-list bridge=xenapi minimal=true)
vif_uuid=$(xe vif-list network-uuid="$net_uuid" vm-uuid="$vm_uuid" --minimal)
if [ -z "$vif_uuid" ]; then
eth2_uuid=$(xe vif-create network-uuid="$net_uuid" vm-uuid="$vm_uuid" device="$device_number")
echo "$vm_name : HIMN created"
fi
else
echo "$vm_name does not exist"
fi
set +x'
done

View File

@ -1,25 +0,0 @@
source localrc
for HOST_NODE in ${COMPUTE_NODES//,/ }
do
IFS=/ read -a _HOST_NODE <<< $HOST_NODE
HOST=${_HOST_NODE[0]}
NODE=${_HOST_NODE[1]}
eth2=$(sshpass -p $XEN_PASSWORD ssh $XEN_ROOT@$HOST \
'xe vm-list name-label="'$NODE'" params=networks --minimal | grep -o -P "(?<=0\/ip\:\s)(\d+\.\d+\.\d+\.\d+)"')
echo $HOST $NODE $eth2
sshpass -p $XEN_PASSWORD ssh $XEN_ROOT@$HOST \
'
set +x
route -n | grep -F 169.254.0
'
sshpass -p $FUELMASTER_PASSWORD ssh $FUELMASTER_ROOT@$FUELMASTER \
'
set +x
ssh '$eth2' iptables -S | grep eth2
'
done

View File

@ -1,459 +0,0 @@
fields:
name: "Juno+Citrix XenServer on Ubuntu 14.04.1"
version: "2014.2.2-6.1"
can_update_from_versions: []
operating_system: "Ubuntu"
description: "This option will install the OpenStack Juno packages using Ubuntu as a base operating system. With high availability features built in, you are getting a robust, enterprise-grade OpenStack deployment."
roles:
- controller
- compute
- cinder
roles_metadata:
controller:
name: "Controller"
description: "The Controller initiates orchestration activities and provides an external API. Other components like Glance (image storage), Keystone (identity management), Horizon (OpenStack dashboard) and Nova-Scheduler are installed on the controller as well."
conflicts:
- compute
update_required:
- compute
- cinder
has_primary: true
limits:
min: 1
overrides:
- condition: "cluster:mode == 'multinode'"
max: 1
message: "Multi-node environment can not have more than one Controller node."
- condition: "cluster:mode == 'ha_compact'"
recommended: 3
message: "At least 3 Controller nodes are recommended for HA deployment."
compute:
name: "Compute"
description: "A Compute node creates, manages and terminates virtual machine instances."
limits:
recommended: 1
fault_tolerance: "2%"
cinder:
# NOTE: naming, see https://bugs.launchpad.net/fuel/+bug/1383224
name: "Storage - Cinder"
description: "Cinder provides scheduling of block storage resources, typically delivered over iSCSI and other compatible backend storage systems. Block storage can be used for database storage, expandable file systems, or providing a server with access to raw block level devices."
limits:
recommended: 1
restrictions:
- condition: "settings:storage.volumes_lvm.value == false"
message: "Cinder LVM should be enabled in settings"
# NOTE: https://bugs.launchpad.net/fuel/+bug/1372914 - Prohibit possibility of adding cinder nodes to an environment with Ceph RBD
- condition: "settings:storage.volumes_ceph.value == true"
message: "Ceph RBD cannot be used with Cinder"
networks_metadata:
nova_network:
networks:
- name: "public"
cidr: "10.219.237.0/24"
gateway: "10.219.237.1"
ip_range: ["10.219.237.10", "10.219.237.100"]
vlan_start: null
use_gateway: true
notation: "ip_ranges"
render_type: null
render_addr_mask: "public"
map_priority: 1
configurable: true
vips: ["haproxy", "vrouter"]
- name: "management"
cidr: "192.168.73.0/24"
vlan_start: 24
use_gateway: false
notation: "cidr"
render_type: "cidr"
render_addr_mask: "internal"
map_priority: 2
configurable: true
vips: ["haproxy", "vrouter"]
- name: "storage"
cidr: "192.168.133.0/24"
vlan_start: 20
use_gateway: false
notation: "cidr"
render_type: "cidr"
render_addr_mask: "storage"
map_priority: 2
configurable: true
- name: "fixed"
vlan_start: null
use_gateway: false
notation: null
render_type: null
render_addr_mask: null
map_priority: 2
ext_net_data: ["fixed_networks_vlan_start", "fixed_networks_amount"]
configurable: false
config:
net_manager: "FlatDHCPManager"
fixed_networks_cidr: "10.0.0.0/16"
fixed_networks_vlan_start: 23
fixed_network_size: 256
fixed_networks_amount: 1
floating_ranges: [["10.219.237.150", "10.219.237.200"]]
attributes_metadata:
editable:
kernel_params:
kernel:
value: "console=ttyS0,9600 console=tty0 net.ifnames=0 biosdevname=0 rootdelay=90 nomodeset"
repo_setup:
metadata:
label: "Repositories"
weight: 50
always_editable: true
repos:
type: "custom_repo_configuration"
extra_priority: null
description: |
Please note: the first repository will be considered the operating system mirror that will be used during node provisioning.
To create a local repository mirror on the Fuel master node, please follow the instructions provided by running "fuel-createmirror --help" on the Fuel master node.
Please make sure your Fuel master node has Internet access to the repository before attempting to create a mirror.
For more details, please refer to the documentation (https://docs.mirantis.com/openstack/fuel/fuel-6.1/operations.html#external-ubuntu-ops).
value:
- type: "deb"
name: "ubuntu"
uri: "http://archive.ubuntu.com/ubuntu/"
suite: "trusty"
section: "main universe multiverse"
priority: null
- type: "deb"
name: "ubuntu-updates"
uri: "http://archive.ubuntu.com/ubuntu/"
suite: "trusty-updates"
section: "main universe multiverse"
priority: null
- type: "deb"
name: "ubuntu-security"
uri: "http://archive.ubuntu.com/ubuntu/"
suite: "trusty-security"
section: "main universe multiverse"
priority: null
- type: "deb"
name: "mos"
uri: "http://{settings.MASTER_IP}:8080/{cluster.release.version}/ubuntu/x86_64"
suite: "mos6.1"
section: "main restricted"
priority: 1050
- type: "deb"
name: "mos-updates"
uri: "http://mirror.fuel-infra.org/mos/ubuntu/"
suite: "mos6.1-updates"
section: "main restricted"
priority: 1050
- type: "deb"
name: "mos-security"
uri: "http://mirror.fuel-infra.org/mos/ubuntu/"
suite: "mos6.1-security"
section: "main restricted"
priority: 1050
- type: "deb"
name: "mos-holdback"
uri: "http://mirror.fuel-infra.org/mos/ubuntu/"
suite: "mos6.1-holdback"
section: "main restricted"
priority: 1100
- type: "deb"
name: "Auxiliary"
uri: "http://{settings.MASTER_IP}:8080/{cluster.release.version}/ubuntu/auxiliary"
suite: "auxiliary"
section: "main restricted"
priority: 1150
additional_components:
metadata:
label: "Additional Components"
weight: 20
sahara:
value: false
label: "Install Sahara"
description: "If selected, Sahara component will be installed"
weight: 10
type: "checkbox"
restrictions:
- condition: "true"
action: disable
murano:
value: false
label: "Install Murano"
description: "If selected, Murano component will be installed"
weight: 20
type: "checkbox"
restrictions:
- condition: "true"
action: disable
heat:
value: true
label: ""
description: ""
weight: 30
type: "hidden"
ceilometer:
value: false
label: "Install Ceilometer"
description: "If selected, Ceilometer component will be installed"
weight: 40
type: "checkbox"
restrictions:
- condition: "true"
action: disable
mongo:
value: false
label: "Use external Mongo DB"
description: "If selected, You can use external Mongo DB as ceilometer backend"
weight: 40
type: "checkbox"
restrictions:
- condition: "true"
action: disable
common:
metadata:
label: "Common"
weight: 30
debug:
value: false
label: "OpenStack debug logging"
description: "Debug logging mode provides more information, but requires more disk space."
weight: 20
type: "checkbox"
puppet_debug:
value: true
label: "Puppet debug logging"
description: "Debug puppet logging mode provides more information, but requires more disk space."
weight: 20
type: "checkbox"
nova_quota:
value: false
label: "Nova quotas"
description: "Quotas are used to limit CPU and memory usage for tenants. Enabling quotas will increase load on the Nova database."
weight: 25
type: "checkbox"
auto_assign_floating_ip:
value: false
label: "Auto assign floating IP"
description: "If selected, OpenStack will automatically assign a floating IP to a new instance"
weight: 40
type: "checkbox"
restrictions:
- condition: "cluster:net_provider == 'neutron'"
action: "hide"
use_vcenter:
value: false
weight: 30
type: "hidden"
libvirt_type:
value: "qemu"
values:
- data: "kvm"
label: "KVM"
description: "Choose this type of hypervisor if you run OpenStack on hardware"
restrictions:
- condition: "true"
action: disable
- data: "qemu"
label: "QEMU"
description: "Choose this type of hypervisor if you run OpenStack on virtual hosts."
restrictions:
- condition: "true"
action: disable
label: "Hypervisor type"
weight: 30
type: "radio"
resume_guests_state_on_host_boot:
value: true
label: "Resume guests state on host boot"
description: "Whether to resume previous guests state when the host reboots. If enabled, this option causes guests assigned to the host to resume their previous state. If the guest was running a restart will be attempted when nova-compute starts. If the guest was not running previously, a restart will not be attempted."
weight: 60
type: "checkbox"
use_cow_images:
value: true
label: "Use qcow format for images"
description: "For most cases you will want qcow format. If it's disabled, raw image format will be used to run VMs. OpenStack with raw format currently does not support snapshotting."
weight: 50
type: "checkbox"
auth_key:
value: ""
label: "Public Key"
description: "Public key(s) to include in authorized_keys on deployed nodes"
weight: 70
type: "textarea"
external_ntp:
metadata:
label: "Host OS NTP Servers"
weight: 100
ntp_list:
value: "0.pool.ntp.org,1.pool.ntp.org,2.pool.ntp.org,3.pool.ntp.org"
label: "NTP server list"
description: "List of upstream NTP servers, separated by comma"
weight: 10
type: "text"
regex:
source: '^\s*(?:(?:\w+(?:-+\w+)*\.)+[a-z]+|\d{1,3}(?:\.\d{1,3}){3})\s*(?:,\s*(?:(?:\w+(?:-+\w+)*\.)+[a-z]+|\d{1,3}(\.\d{1,3}){3})\s*)*$'
error: "Invalid NTP server list"
generated:
repo_setup:
installer_kernel:
remote_relative: "dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/linux"
local: "/var/www/nailgun/ubuntu/x86_64/images/linux"
installer_initrd:
remote_relative: "dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/initrd.gz"
local: "/var/www/nailgun/ubuntu/x86_64/images/initrd.gz"
cobbler:
profile:
generator_arg: "ubuntu_1404_x86_64"
provision:
codename: "trusty"
image_data:
/:
uri: "http://{settings.MASTER_IP}:8080/targetimages/env_{cluster.id}_ubuntu_1404_amd64.img.gz"
format: "ext4"
container: "gzip"
/boot:
uri: "http://{settings.MASTER_IP}:8080/targetimages/env_{cluster.id}_ubuntu_1404_amd64-boot.img.gz"
format: "ext2"
container: "gzip"
wizard_metadata:
Mode:
metadata:
restrictions:
- condition: "true"
action: "hide"
mode:
type: "radio"
bind: "cluster:mode"
values:
- data: "ha_compact"
label: "cluster.mode.ha_compact"
Compute:
hypervisor:
type: "radio"
value: "qemu"
weight: 5
bind: "settings:common.libvirt_type.value"
values:
- data: "kvm"
label: "dialog.create_cluster_wizard.compute.kvm"
description: "dialog.create_cluster_wizard.compute.kvm_description"
bind:
- "wizard:Storage.ceph": "disable"
- "wizard:Network.manager": "neutron-vlan"
restrictions:
- condition: "true"
action: disable
- data: "qemu"
label: "dialog.create_cluster_wizard.compute.qemu"
description: "dialog.create_cluster_wizard.compute.qemu_description"
bind:
- "wizard:Storage.ceph": "disable"
- "wizard:Network.manager": "nova-network"
restrictions:
- condition: "true"
action: disable
- condition: "true"
message: "You have chosen XenServer for your cluster environment, therefore the hypervisor type has to be qemu initially."
vcenter:
type: "checkbox"
weight: 10
label: "dialog.create_cluster_wizard.compute.vcenter"
description: "dialog.create_cluster_wizard.compute.vcenter_description"
bind:
- "wizard:Storage.ceph": "disable"
- "wizard:Network.manager": "nova-network"
- "settings:common.use_vcenter.value"
restrictions:
- condition: "true"
action: disable
Network:
manager:
type: "radio"
value: "nova-network"
values:
- data: "neutron-vlan"
label: "dialog.create_cluster_wizard.network.neutr_vlan"
description: "dialog.create_cluster_wizard.network.neutr_vlan_description"
restrictions:
- condition: "true"
action: disable
- condition: "true"
message: "You have chosen XenServer for your cluster environment, therefore the network type has to be nova-network."
bind:
- "cluster:net_provider": "neutron"
- "cluster:net_segment_type": "vlan"
- data: "neutron-gre"
label: "dialog.create_cluster_wizard.network.neutr_gre"
description: "dialog.create_cluster_wizard.network.neutr_gre_description"
restrictions:
- condition: "true"
action: disable
bind:
- "cluster:net_provider": "neutron"
- "cluster:net_segment_type": "gre"
- data: "nova-network"
label: "dialog.create_cluster_wizard.network.nova_network"
description: "dialog.create_cluster_wizard.network.nova_network_description"
bind:
- "cluster:net_provider": "nova_network"
restrictions:
- condition: "true"
action: disable
Storage:
ceph:
type: "radio"
values:
- data: "disable"
label: "dialog.create_cluster_wizard.storage.ceph_disable"
bind:
- "settings:storage.volumes_lvm.value": true
- "settings:storage.volumes_ceph.value": false
- "settings:storage.objects_ceph.value": false
- "settings:storage.ephemeral_ceph.value": false
- "settings:storage.images_ceph.value": false
restrictions:
- condition: "true"
action: disable
- condition: "true"
message: "You have chosen XenServer for your cluster environment, therefore the storage backends have to use default providers."
- data: "enable"
label: "dialog.create_cluster_wizard.storage.ceph_enable"
bind:
- "settings:storage.volumes_ceph.value": true
- "settings:storage.objects_ceph.value": true
- "settings:storage.ephemeral_ceph.value": true
- "settings:storage.images_ceph.value": true
- "settings:storage.volumes_lvm.value": false
restrictions:
- condition: "true"
action: disable
AdditionalServices:
sahara:
type: "checkbox"
label: "dialog.create_cluster_wizard.additional.install_sahara"
description: "dialog.create_cluster_wizard.additional.install_sahara_description"
bind: "settings:additional_components.sahara.value"
weight: 10
restrictions:
- condition: "true"
action: disable
- condition: "true"
message: "You have chosen XenServer for your cluster environment, therefore Sahara, Murano, Ceilometer need to be disabled."
murano:
type: "checkbox"
label: "dialog.create_cluster_wizard.additional.install_murano"
description: "dialog.create_cluster_wizard.additional.install_murano_description"
bind: "settings:additional_components.murano.value"
weight: 20
restrictions:
- condition: "true"
action: disable
ceilometer:
type: "checkbox"
label: "dialog.create_cluster_wizard.additional.install_ceilometer"
description: "dialog.create_cluster_wizard.additional.install_ceilometer_description"
bind: "settings:additional_components.ceilometer.value"
weight: 30
restrictions:
- condition: "true"
action: disable
Ready: {}