summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
Diffstat (limited to 'ci')
-rwxr-xr-xci/daily.sh36
-rwxr-xr-xci/merge.sh11
-rw-r--r--ci/storperf-master.yaml117
-rwxr-xr-xci/verify.sh9
4 files changed, 171 insertions, 2 deletions
diff --git a/ci/daily.sh b/ci/daily.sh
index 06bd986..0cc5977 100755
--- a/ci/daily.sh
+++ b/ci/daily.sh
@@ -1,2 +1,36 @@
-#!/bin/bash
+#!/bin/bash -x
+##############################################################################
+# Copyright (c) 2015 EMC and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+if [ -f ~/jenkins-os.rc ]
+then
+ . ~/jenkins-os.rc
+fi
+
+if [ -z $WORKSPACE ]
+then
+ WORKSPACE=`pwd`
+fi
+
+function stage_base_os_in_glance {
+
+ export OS_IMAGE_API_VERSION=1
+
+ glance image-list | grep "$1"
+ if [ $? -eq 1 ]
+ then
+ curl -s -o $WORKSPACE/$1.qcow2 https://cloud-images.ubuntu.com/releases/15.10/release/ubuntu-15.10-server-cloudimg-amd64-disk1.img
+ glance image-create --name="$1" --disk-format=qcow2 --container-format=bare < $WORKSPACE/$1.qcow2
+ fi
+
+}
+
+stage_base_os_in_glance ubuntu-server
+
exit 0
diff --git a/ci/merge.sh b/ci/merge.sh
index 06bd986..bd1d3fe 100755
--- a/ci/merge.sh
+++ b/ci/merge.sh
@@ -1,2 +1,11 @@
#!/bin/bash
-exit 0
+##############################################################################
+# Copyright (c) 2015 EMC and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+PYTHONPATH="`pwd`/storperf":"`pwd`/tests" nosetests --with-xunit .
diff --git a/ci/storperf-master.yaml b/ci/storperf-master.yaml
new file mode 100644
index 0000000..1bc84f5
--- /dev/null
+++ b/ci/storperf-master.yaml
@@ -0,0 +1,117 @@
+heat_template_version: 2013-05-23
+
+parameters:
+ flavor:
+ type: string
+ default: m1.small
+ image:
+ type: string
+ default: ubuntu-server
+ key_name:
+ type: string
+ public_net_id:
+ type: string
+ default: public
+ username:
+ type: string
+ default: storperf
+
+resources:
+ storperf_manager:
+ type: "OS::Nova::Server"
+ properties:
+ name: storperf-manager
+ image: { get_param: image }
+ flavor: { get_param: flavor }
+ key_name: { get_param: key_name }
+ networks:
+ - port: { get_resource: storperf_manager_port }
+ user_data: { get_resource: storperf_manager_config }
+ user_data_format: RAW
+
+ storperf_manager_config:
+ type: "OS::Heat::CloudConfig"
+ properties:
+ cloud_config:
+ users:
+ - name: { get_param: username }
+ groups: users
+ shell: /bin/bash
+ sudo: "ALL=(ALL) NOPASSWD:ALL"
+ ssh_authorized_keys:
+ - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDEbnDiqZ8RjQJJzJPf074J41XlYED+zYBzaUZ5UkkUquXzymyUmoWaFBXJP+XPu4Ns44U/S8614+JxGk96tjUdJlIjL0Ag8HP6KLtTNCabucKcEASpgJIVWqJvE3E9upZLIEiTGsF8I8S67T2qq1J1uvtxyeZmyjm7NMamjyFXE53dhR2EHqSutyKK1CK74NkRY9wr3qWUIt35kLdKSVSfrr4gOOicDALbIRu77skHIvrjt+wK1VWphBdMg6ytuq5mIE6pjWAU3Gwl4aTxOU0z43ARzCLq8HVf8s/dKjYMj8plNqaIfceMbaEUqpNHv/xbvtGNG7N0aB/a4pkUQL07
+ - default
+ package_update: true
+ package_upgrade: true
+ packages:
+ - fio
+ - python
+ - rsync
+ - graphite-carbon
+ - graphite-web
+ - apache2
+ - libapache2-mod-wsgi
+ - curl
+
+ storperf_manager_port:
+ type: "OS::Neutron::Port"
+ properties:
+ network_id: { get_resource: storperf_agent_net }
+ security_groups:
+ - { get_resource: storperf_security_group }
+
+ storperf_manager_ip:
+ type: "OS::Neutron::FloatingIP"
+ properties:
+ floating_network_id: { get_param: public_net_id }
+ port_id: { get_resource: storperf_manager_port }
+
+ storperf_agent_net:
+ type: "OS::Neutron::Net"
+ properties:
+ name: storperf-agent-network
+
+ storperf_agent_subnet:
+ type: "OS::Neutron::Subnet"
+ properties:
+ name: StorPerf-Agent-Subnet
+ network_id: { get_resource: storperf_agent_net }
+ cidr: 192.168.101.0/24
+ gateway_ip: 192.168.101.1
+ enable_dhcp: true
+ allocation_pools:
+ - start: "192.168.101.2"
+ end: "192.168.101.250"
+
+ storperf_security_group:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ description: Neutron security group rules
+ name: storperf_security_group
+ rules:
+ - remote_ip_prefix: 0.0.0.0/0
+ protocol: tcp
+ direction: ingress
+ - remote_ip_prefix: 0.0.0.0/0
+ protocol: icmp
+ direction: ingress
+
+ router:
+ type: OS::Neutron::Router
+
+ router_gateway:
+ type: OS::Neutron::RouterGateway
+ properties:
+ router_id: { get_resource: router }
+ network_id: { get_param: public_net_id }
+
+ router_interface:
+ type: OS::Neutron::RouterInterface
+ properties:
+ router_id: { get_resource: router }
+ subnet_id: { get_resource: storperf_agent_subnet }
+
+outputs:
+ public_ip:
+ description: Floating IP address in public network
+ value: { get_attr: [ storperf_manager_ip, floating_ip_address ] }
diff --git a/ci/verify.sh b/ci/verify.sh
index 06bd986..333a05c 100755
--- a/ci/verify.sh
+++ b/ci/verify.sh
@@ -1,2 +1,11 @@
#!/bin/bash
+##############################################################################
+# Copyright (c) 2015 EMC and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
exit 0