Restructure file hierarchy

* Move plugin directory inside
* Split newrelease.yaml
+ Add deploy.sh for deploying fixture and plugin
+ Add dump.sh for dumping data from nailgun
+ Add xs_release.yaml for network/wizzard/setting configuration
This commit is contained in:
John Hua 2015-07-16 13:21:21 +08:00
parent a36677c55b
commit fa4115f921
15 changed files with 306 additions and 240 deletions

3
.gitignore vendored
View File

@ -3,4 +3,7 @@
*.pyc
*.rpm
localrc
newrelease.yaml
models/

View File

@ -1169,232 +1169,3 @@
datacenter: ""
datastore: ""
modes: ['ha_compact']
- pk: 10
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."
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
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: "xen"
weight: 5
bind: "settings:common.libvirt_type.value"
values:
- data: "xen"
label: "XenServer"
description: "dialog.create_cluster_wizard.compute.kvm_description"
bind:
- "wizard:Network.manager": "nova-network"
- "wizard:Storage.ceph": "disable"
- data: "kvm"
label: "dialog.create_cluster_wizard.compute.kvm"
description: "dialog.create_cluster_wizard.compute.kvm_description"
restrictions:
- condition: "'XenServer' in settings:name"
message: "only"
bind:
- "wizard:Storage.ceph": "disable"
- "wizard:Network.manager": "neutron-vlan"
- data: "qemu"
label: "dialog.create_cluster_wizard.compute.qemu"
description: "dialog.create_cluster_wizard.compute.qemu_description"
restrictions:
- condition: "'XenServer' in settings:name"
action: disable
bind:
- "wizard:Storage.ceph": "disable"
- "wizard:Network.manager": "neutron-vlan"
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: "'XenServer' in settings:name"
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: "'XenServer' in settings:name"
message: "only"
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: "'XenServer' in settings:name"
message: "only"
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"
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
- 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
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: "'XenServer' in settings:name"
message: "only"
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: "'XenServer' in settings:name"
message: "only"
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: "'XenServer' in settings:name"
message: "only"
Ready: {}

View File

@ -4,9 +4,17 @@ import os
import yaml
settings = yaml.load(open('/etc/nailgun/settings.yaml'))
os.environ["PGPASSWORD"] = settings['DATABASE']['passwd']
cmd = ('psql -h {host} -p {port} -U {user} -w -d {name} '
'-c "delete from releases where name like \'%Xen%\';" '
).format(**settings['DATABASE'])
db_settings = settings['DATABASE']
os.environ["PGPASSWORD"] = db_settings['passwd']
def execute_sql(sql):
paras = dict(db_settings.items() + {'sql':sql}.items())
print paras
cmd = ('psql -h {host} -p {port} -U {user} -w -d {name} '
'-c "{sql}" '
).format(**paras)
os.system(cmd)
if __name__ == '__main__':
execute_sql('delete from releases where name like \'%Xen%\';')
os.system(cmd)

View File

@ -4,12 +4,14 @@ scp cleardb.py root@$FUELMASTER:$PLUGIN_PATH
ssh root@$FUELMASTER dockerctl copy cleardb.py nailgun:/tmp/cleardb.py
ssh root@$FUELMASTER dockerctl shell nailgun /tmp/cleardb.py
cat base_release.yaml xs_release.yaml > newrelease.yaml
scp newrelease.yaml root@$FUELMASTER:$PLUGIN_PATH
ssh root@$FUELMASTER dockerctl copy newrelease.yaml nailgun:/tmp/newrelease.yaml
ssh root@$FUELMASTER dockerctl shell nailgun manage.py loaddata /tmp/newrelease.yaml
rm newrelease.yaml
fpb --check ./
fpb --build .
fpb --check xenserver-fuel-plugin
fpb --build xenserver-fuel-plugin
scp xenserver-fuel-plugin-$BUILD_VERSION.noarch.rpm root@$FUELMASTER:$PLUGIN_PATH

View File

@ -1,4 +0,0 @@
#!/bin/bash
dockerctl copy newrelease.yaml nailgun:/tmp/newrelease.yaml
dockerctl shell nailgun manage.py loaddata /tmp/newrelease.yaml

16
dump.sh Executable file
View File

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

@ -0,0 +1 @@
#!/bin/bash

269
xs_release.yaml Normal file
View File

@ -0,0 +1,269 @@
- pk: 10
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.0.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.1.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
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: "xen"
weight: 5
bind: "settings:common.libvirt_type.value"
values:
- data: "xen"
label: "XenServer"
description: "dialog.create_cluster_wizard.compute.kvm_description"
bind:
- "wizard:Network.manager": "nova-network"
- "wizard:Storage.ceph": "disable"
Network:
manager:
type: "radio"
value: "nova-network"
values:
- 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"
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
- 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: "settings:common.libvirt_type.value == 'xen'"
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
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
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: "settings:common.libvirt_type.value == 'xen'"
action: disable
Ready: {}