From 6cfb86c227df0b5f81a4058a16047864c26b2d99 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Mon, 2 Dec 2013 15:10:02 -0800 Subject: [PATCH] Add a bare precise node to nodepool A basic requirement for having fully-dynamic slave nodes (no static slaves). Change-Id: I1d7edaed5fd96091b3e4cbcec92d084ad93f4929 --- .../nodepool/scripts/prepare_node_bare.sh | 22 +++++++++++++++++++ .../templates/nodepool/nodepool.yaml.erb | 10 +++++++++ 2 files changed, 32 insertions(+) create mode 100644 modules/openstack_project/files/nodepool/scripts/prepare_node_bare.sh diff --git a/modules/openstack_project/files/nodepool/scripts/prepare_node_bare.sh b/modules/openstack_project/files/nodepool/scripts/prepare_node_bare.sh new file mode 100644 index 0000000000..9ce8da6ccd --- /dev/null +++ b/modules/openstack_project/files/nodepool/scripts/prepare_node_bare.sh @@ -0,0 +1,22 @@ +#!/bin/bash -xe + +# Copyright (C) 2011-2013 OpenStack Foundation +# +# 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. + +HOSTNAME=$1 + +./prepare_node.sh $HOSTNAME +sudo puppet apply --modulepath=/root/config/modules:/etc/puppet/modules -e "class {'openstack_project::bare_slave': }" diff --git a/modules/openstack_project/templates/nodepool/nodepool.yaml.erb b/modules/openstack_project/templates/nodepool/nodepool.yaml.erb index d7e15c513e..1f0c6f5df7 100644 --- a/modules/openstack_project/templates/nodepool/nodepool.yaml.erb +++ b/modules/openstack_project/templates/nodepool/nodepool.yaml.erb @@ -48,6 +48,12 @@ providers: setup: prepare_node_devstack.sh username: jenkins private-key: /home/nodepool/.ssh/id_rsa + - name: bare-precise + base-image: 'Ubuntu 12.04 LTS (Precise Pangolin)' + min-ram: 8192 + setup: prepare_node_bare.sh + username: jenkins + private-key: /home/nodepool/.ssh/id_rsa - name: rax-iad region-name: 'IAD' service-type: 'compute' @@ -141,6 +147,10 @@ targets: apikey: '<%= jenkins_api_key %>' credentials-id: '<%= jenkins_credentials_id %>' images: + - name: bare-precise + min-ready: 2 + providers: + - name: rax-ord - name: devstack-precise min-ready: 20 providers: