INIT
This commit is contained in:
		
							
								
								
									
										14
									
								
								COPYRIGHT
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								COPYRIGHT
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
| # Copyright 2014 Hewlett-Packard Development Company, L.P. | ||||
| # All Rights Reserved. | ||||
| # | ||||
| #    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. | ||||
							
								
								
									
										24
									
								
								README
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								README
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,24 @@ | ||||
| This repository is a place for testers of full rack end-to-end TripleO | ||||
| runs to coordinate around reproducible deployments. | ||||
|  | ||||
| repo_refs.yaml contains the various repos TripleO will clone and allows | ||||
| you to track in-flight Gerrit reviews that need to be pulled down as | ||||
| part of the deployment. | ||||
|  | ||||
| To use: | ||||
|  | ||||
| Ideally, maintain a local rc file with environment variables specific | ||||
| to your environment.  To view which you should be setting, see top of | ||||
| devtestrc. | ||||
|  | ||||
| You'll also want to maintain a nodes.json and bm-network.json specific | ||||
| to your node inventory and seed/undercloud network topology. See examples. | ||||
|  | ||||
| With your local overrides and nodes.json and bm-network.json in place, simply | ||||
| source devtestrc.  This will clone all required repos and patches every time | ||||
| its sourced.  To skip this part, set NO_SOURCE_PREP=1.  Note without this set, | ||||
| you'll likely lose local changes to the repos upon resourcing. | ||||
|  | ||||
| Then you may simply run: | ||||
|  | ||||
| devtest.sh  --trash-my-machine --nodes $PATH_TO/nodes.json --bm-networks $PATH_TO/bm-network.json | ||||
							
								
								
									
										51
									
								
								bin/prep_source_repos
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										51
									
								
								bin/prep_source_repos
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,51 @@ | ||||
| #!/usr/bin/python | ||||
|  | ||||
| import yaml | ||||
| from subprocess import check_call, check_output | ||||
| import os | ||||
|  | ||||
| SRC_ROOT = os.getenv('TRIPLEO_ROOT', 'tripleo') | ||||
| CONF = 'repo_refs.yaml' | ||||
| CONF = yaml.load(open(CONF).read()) | ||||
| GIT_SERVER = 'http://review.openstack.org' | ||||
|  | ||||
| if not os.path.isdir(SRC_ROOT): | ||||
|     os.mkdir(SRC_ROOT) | ||||
|  | ||||
| for repo in CONF['repos']: | ||||
|     rd = os.path.join(SRC_ROOT, repo) | ||||
|     if repo in ['tripleo-ci']: | ||||
|         org = 'openstack-infra' | ||||
|     else: | ||||
|         org = 'openstack' | ||||
|  | ||||
|     remote = GIT_SERVER + '/%s/%s' % (org, repo) | ||||
|     if os.path.isdir(os.path.join(rd)): | ||||
|         check_call(['git', 'checkout', 'master'], cwd=rd) | ||||
|         check_call(['git', 'pull'], cwd=rd) | ||||
|     else: | ||||
|         check_call(['git', 'clone', remote, rd]) | ||||
|  | ||||
|     if repo not in CONF['gerrit_refs']: | ||||
|         print 'no refs for %s' % repo | ||||
|         continue | ||||
|  | ||||
|     refs = CONF['gerrit_refs'][repo] | ||||
|     branch_name = 'rollup_' + \ | ||||
|                   '_'.join([r[1] for r in [ref.split('/') for ref in refs]]) | ||||
|  | ||||
|     branches = check_output(['git', 'branch', '-a'], cwd=rd) | ||||
|  | ||||
|     if branch_name in branches: | ||||
|         print 'Deleting existing branch %s...' % branch_name | ||||
|         check_call(['git', 'branch', '-D', branch_name], cwd=rd) | ||||
|  | ||||
|     check_call(['git', 'checkout', '-b', branch_name], cwd=rd) | ||||
|     check_call(['git', 'branch', '--set-upstream-to=origin/master'], cwd=rd) | ||||
|  | ||||
|     for ref in CONF['gerrit_refs'][repo]: | ||||
|         _, rev, p = ref.split('/') | ||||
|         print 'pulling %s' % (GIT_SERVER + '/#/c/' + rev) | ||||
|         print ' '.join(['git', 'pull', remote, ref]) | ||||
|         check_call(['git', 'pull', '--no-edit', remote, 'refs/changes/' + ref], | ||||
|                    cwd=rd) | ||||
							
								
								
									
										104
									
								
								devtestrc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										104
									
								
								devtestrc
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,104 @@ | ||||
| #PROXY="10.22.167.17";                                       # Using desktop squid | ||||
| #PYPI_MIRROR="10.22.167.17"; | ||||
|  | ||||
|  | ||||
| #### Set these specific to your environment! | ||||
| #### | ||||
|  | ||||
| # IP/Hostname of pypi mirror, or leave blank to not use | ||||
| export PYPI_MIRROR=${PYPI_MIRROR:-''} | ||||
|  | ||||
| # IP/Hostname:Port of HTTP/HTTPS Proxy, or leave blank to not use | ||||
| export PROXY=${PROXY:-''} | ||||
|  | ||||
| export TRIPLEO_ROOT=${TRIPLEO_ROOT:-"$PWD/tripleo"} | ||||
| export TE_DATAFILE=${TE_DATAFILE:-"$TRIPLEO_ROOT/testenv.json"} | ||||
|  | ||||
| # How much CPU/mem/disk available on nodes | ||||
| export NODE_CPU=${NODE_CPU:-24} | ||||
| export NODE_MEM=${NODE_MEM:-98304} | ||||
| export NODE_DISK=${NODE_DISK:-1600} | ||||
|  | ||||
| export NeutronPublicInterface=eth2 | ||||
|  | ||||
| # Scale for overcloud compute/control. | ||||
| export OVERCLOUD_CONTROLSCALE=${OVERCLOUD_CONTROLSCALE:-"29"} | ||||
| export OVERCLOUD_COMPUTESCALE=${OVERCLOUD_COMPUTESCALE:-"29"} | ||||
|  | ||||
| # Specific to your network | ||||
| export FLOATING_START="10.22.157.225" | ||||
| export FLOATING_END="10.22.157.254" | ||||
| export FLOATING_CIDR="10.22.157.244/27" | ||||
| ##### end | ||||
|  | ||||
| if [[ -n "$PROXY" ]] ; then | ||||
|   export http_proxy="http://$PROXY/" | ||||
|   export https_proxy="https://$PROXY/" | ||||
|   export no_proxy="${PYPI_MIRROR},localhost"; | ||||
| fi | ||||
|  | ||||
| if [[ -n "$PYPI_MIRROR" ]] ; then | ||||
|   export PYPI_MIRROR_URL="http://${PYPI_MIRROR}/pypi/latest";   # point this at the pypi mirror. | ||||
|   export DIB_NO_PYPI_PIP=1  | ||||
|   export PYPI_MIRROR_URL_1=http://${PYPI_MIRROR}/pypi/latest/Ubuntu-13.10/ | ||||
| fi | ||||
|  | ||||
| export DIB_COMMON_ELEMENTS="stackuser pypi -u use-ephemeral mellanox" | ||||
| export DEVTEST_PERF_COMMENT="$(hostname): clean re-run, using USEast pypi mirror." | ||||
|  | ||||
| # same arch as host machine, so the wheels in the mirror work | ||||
| export NODE_ARCH=amd64 | ||||
| export NODE_DIST=${NODE_DIST:-"ubuntu"} | ||||
| export DIB_RELEASE=trusty | ||||
|  | ||||
| # NOTE (adam_g): Limit cloud-init data sources to Ec2 to workaround | ||||
| #		 trusty cloud-init bug #1316475. | ||||
| #		 Relies on https://review.openstack.org/#/c/95598/ | ||||
| export DIB_CLOUD_INIT_DATASOURCES="Ec2" | ||||
| export UNDERCLOUD_DIB_EXTRA_ARGS="rabbitmq-server cloud-init-datasources" | ||||
| export OVERCLOUD_DIB_EXTRA_ARGS="rabbitmq-server cloud-init-datasources" | ||||
|  | ||||
| # NOTE (adam_g): Set a long timeout for stack creation | ||||
| #		 Relies on https://review.openstack.org/#/c/95968/ | ||||
| export OVERCLOUD_STACK_TIMEOUT="120" | ||||
|  | ||||
| [[ -z "$NO_SOURCE_PREP" ]] && bin/prep_source_repos | ||||
|  | ||||
| # Clone our local git copies. Make devtest.sh prefer your local repositories. You'll still need to have stuff checked in to them! | ||||
| for n in $TRIPLEO_ROOT/*; | ||||
| do | ||||
|   [ -d "$n" -a -d "$n/.git" ] || continue | ||||
|  | ||||
|   nn=$(basename "$n")      # work around older bash | ||||
|   bn=${nn//[^A-Za-z0-9_]/_} | ||||
|  | ||||
|   DIB_REPOTYPE="DIB_REPOTYPE_${bn}"; | ||||
|   DIB_REPOLOCATION="DIB_REPOLOCATION_${bn}"; | ||||
|   DIB_REPOREF="DIB_REPOREF_${bn}"; | ||||
|  | ||||
|   export "${DIB_REPOTYPE}"="git"; | ||||
|   export "${DIB_REPOLOCATION}"="${n}"; | ||||
|  | ||||
|   unset branch; | ||||
|   if branch=$(cd "${n}" && git symbolic-ref --short -q HEAD);  | ||||
|   then | ||||
|         export "${DIB_REPOREF}"="${branch}"; | ||||
|   else | ||||
|         unset "${DIB_REPOREF}"; | ||||
|   fi | ||||
|  | ||||
|   printf "%-25s %-5s %-60s %s\n" "${bn}" "${!DIB_REPOTYPE}" "${!DIB_REPOLOCATION}" "${!DIB_REPOREF}"; | ||||
|  | ||||
|   pushd "${n}" >/dev/null; | ||||
|   if [[ "$(git rev-parse master)" != "$( git rev-parse HEAD)" ]];  | ||||
|   then | ||||
|     IFS=$'\n'; | ||||
|     for f in $(git log master.. --oneline); do  | ||||
|       printf '  \e[1;31m%-60s \e[1;34m%s\e[m\n' "${f}" "$(git show $(echo $f | cut -d" " -f1) | awk '/Change-Id/ {print "http://review.openstack.org/r/" $2}')";  | ||||
|     done | ||||
|   fi | ||||
|   popd >/dev/null; | ||||
|  | ||||
| done | ||||
|  | ||||
| source $TRIPLEO_ROOT/tripleo-incubator/scripts/devtest_variables.sh | ||||
							
								
								
									
										13
									
								
								example_networks.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								example_networks.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| { | ||||
|     "cidr": "10.22.157.0/24", | ||||
|     "gateway-ip": "10.22.157.1", | ||||
|     "seed": { | ||||
|         "ip": "10.22.157.150", | ||||
|         "range-start": "10.22.157.151", | ||||
|         "range-end": "10.22.157.152" | ||||
|     }, | ||||
|     "undercloud": { | ||||
|         "range-start": "10.22.157.153", | ||||
|         "range-end": "10.22.157.190" | ||||
|     } | ||||
| } | ||||
							
								
								
									
										22
									
								
								example_nodes.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								example_nodes.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,22 @@ | ||||
| [{ | ||||
|     "pm_password": "foo", | ||||
|     "mac": ["78:e7:d1:24:99:a5"], | ||||
|     "pm_addr": "10.22.51.66", | ||||
|     "pm_type": "pxe_ipmitool", | ||||
|     "memory": 98304, | ||||
|     "disk": 1600, | ||||
|     "arch": "amd64", | ||||
|     "cpu": 24, | ||||
|     "pm_user": "Administrator" | ||||
| }, | ||||
| { | ||||
|     "pm_password": "AFDJHTVQ", | ||||
|     "mac": ["78:e7:d1:24:6f:c5"], | ||||
|     "pm_addr": "10.22.51.69", | ||||
|     "pm_type": "pxe_ipmitool", | ||||
|     "memory": 98304, | ||||
|     "disk": 1600, | ||||
|     "arch": "amd64", | ||||
|     "cpu": 24, | ||||
|     "pm_user": "Administrator" | ||||
| }] | ||||
							
								
								
									
										45
									
								
								repo_refs.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								repo_refs.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,45 @@ | ||||
| repos: | ||||
|     - diskimage-builder | ||||
|     - horizon | ||||
|     - tripleo-incubator | ||||
|     - python-keystoneclient | ||||
|     - python-glanceclient | ||||
|     - swift | ||||
|     - glance | ||||
|     - python-neutronclient | ||||
|     - python-ceilometerclient | ||||
|     - neutron | ||||
|     - python-heatclient | ||||
|     - python-swiftclient | ||||
|     - keystone | ||||
|     - cinder | ||||
|     - python-cinderclient | ||||
|     - nova | ||||
|     - python-ironicclient | ||||
|     - python-novaclient | ||||
|     - heat | ||||
|     - ironic | ||||
|     - tripleo-heat-templates | ||||
|     - tripleo-image-elements | ||||
|     - os-cloud-config | ||||
|  | ||||
| gerrit_refs: | ||||
|     tripleo-incubator: | ||||
|         - 53/93553/7 | ||||
|         - 68/95968/3 | ||||
|  | ||||
|     tripleo-heat-templates: | ||||
|         - 06/93806/1 | ||||
|  | ||||
|     tripleo-image-elements: | ||||
|         - 44/93844/3 | ||||
|         - 81/94981/1 | ||||
|  | ||||
|     ironic: | ||||
|         - 31/93731/3 | ||||
|  | ||||
|     heat: | ||||
|         - 31/93931/2 | ||||
|  | ||||
|     diskimage-builder: | ||||
|         - 98/95598/1 | ||||
		Reference in New Issue
	
	Block a user
	 Adam Gandelman
					Adam Gandelman