Support launching rax performance nodes

And recommend them.

Change-Id: I2a45ef250378604aba72b74b170cec127b18d1be
This commit is contained in:
James E. Blair 2013-12-18 10:56:05 -08:00 committed by Jeremy Stanley
parent dd37040caa
commit 8797736821
3 changed files with 11 additions and 11 deletions

View File

@ -223,8 +223,8 @@ to use ``: |``::
contents contents
here here
Launch a node - be sure to pass --ram 10240 to get a flavor with at least 10G+ Launch a node - be sure to pass --flavor "10G" to get a flavor with at
or RAM, as gerrit is configured for 8G of heap. least 10G+ of RAM, as gerrit is configured for 8G of heap.
Follow the :file:`doc/source/gerrit.rst` for instructions on getting gerrit Follow the :file:`doc/source/gerrit.rst` for instructions on getting gerrit
configured once installed. configured once installed.
@ -354,10 +354,10 @@ gets their own puppet cert. The openstack/site.pp has a legacy setting for
#. Remove the certname override - upstream are dropping this gradually. #. Remove the certname override - upstream are dropping this gradually.
#. Launch a node, passing in --image and --ram to get a node that you #. Launch a node, passing in --image and --flavor to get a node that you
want :). e.g:: want :). e.g::
launch-node.py centos6-1.slave.openstack.org --image $IMAGE --ram 1024 \ launch-node.py centos6-1.slave.openstack.org --image $IMAGE --flavor "1G" \
mydns mydns
#. Go into the Jenkins config and press 'test connection' on the gearman config #. Go into the Jenkins config and press 'test connection' on the gearman config

View File

@ -16,9 +16,10 @@ to a group.)
To launch a node in the OpenStack CI account (production servers):: To launch a node in the OpenStack CI account (production servers)::
. ~root/ci-launch/openstackci-rs-nova.sh . ~root/ci-launch/openstackci-rs-nova.sh
export FLAVOR="8 GB Performance"
export FQDN=servername.openstack.org export FQDN=servername.openstack.org
sudo puppet cert generate $FQDN sudo puppet cert generate $FQDN
./launch-node.py $FQDN ./launch-node.py $FQDN --flavor "$FLAVOR"
To launch a node in the OpenStack Jenkins account (slave nodes):: To launch a node in the OpenStack Jenkins account (slave nodes)::
@ -27,9 +28,9 @@ To launch a node in the OpenStack Jenkins account (slave nodes)::
nova image-list nova image-list
export IMAGE='Ubuntu 12.04 LTS (Precise Pangolin)' export IMAGE='Ubuntu 12.04 LTS (Precise Pangolin)'
nova flavor-list nova flavor-list
export RAM=8192 export FLAVOR="8 GB Performance"
sudo puppet cert generate $FQDN sudo puppet cert generate $FQDN
./launch-node.py $FQDN --image "$IMAGE" --ram $RAM --salt ./launch-node.py $FQDN --image "$IMAGE" --flavor "$FLAVOR" --salt
The --salt option tells the script to automatically configure and enroll The --salt option tells the script to automatically configure and enroll
the server as a minion on the salt master. the server as a minion on the salt master.

View File

@ -176,8 +176,8 @@ def build_server(
def main(): def main():
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument("name", help="server name") parser.add_argument("name", help="server name")
parser.add_argument("--ram", dest="ram", default=1024, type=int, parser.add_argument("--flavor", dest="flavor", default='1GB',
help="minimum amount of ram") help="name (or substring) of flavor")
parser.add_argument("--image", dest="image", parser.add_argument("--image", dest="image",
default="Ubuntu 12.04 LTS (Precise Pangolin)", default="Ubuntu 12.04 LTS (Precise Pangolin)",
help="image name") help="image name")
@ -204,8 +204,7 @@ def main():
cert)): cert)):
raise Exception("Please specify the name of a signed puppet cert.") raise Exception("Please specify the name of a signed puppet cert.")
flavors = [f for f in client.flavors.list() if f.ram >= options.ram] flavors = [f for f in client.flavors.list() if options.flavor in f.name]
flavors.sort(lambda a, b: cmp(a.ram, b.ram))
flavor = flavors[0] flavor = flavors[0]
print "Found flavor", flavor print "Found flavor", flavor