Update openstack-origin-git to take a YAML-formatted two-dimensional array

This commit is contained in:
Corey Bryant 2015-03-07 21:29:39 -05:00
parent 884d0948b0
commit 6986c6fafd
10 changed files with 124 additions and 85 deletions

View File

@ -81,6 +81,96 @@ as the endpoint for Glance).
Note that Glance in this configuration must be used with either Ceph or
Swift providing backing image storage.
Deploying from source
---------------------
The minimal openstack-origin-git config required to deploy from source is:
openstack-origin-git:
"{'glance':
{'repository': 'git://git.openstack.org/openstack/glance.git',
'branch': 'stable/icehouse'}}"
If you specify a 'requirements' repository, it will be used to update the
requirements.txt files of all other git repos that it applies to, before
they are installed:
openstack-origin-git:
"{'requirements':
{'repository': 'git://git.openstack.org/openstack/requirements.git',
'branch': 'master'},
'glance':
{'repository': 'git://git.openstack.org/openstack/glance.git',
'branch': 'master'}}"
Note that there are only two key values the charm knows about for the outermost
dictionary: 'glance' and 'requirements'. These repositories must correspond to
these keys. If the requirements repository is specified, it will be installed
first. The glance repository is always installed last. All other repostories
will be installed in between.
NOTE(coreycb): The following is temporary to keep track of the full list of
current tip repos (may not be up-to-date).
openstack-origin-git:
"{'requirements':
{'repository': 'git://git.openstack.org/openstack/requirements.git',
'branch': 'master'},
'glance-store':
{'repository': 'git://git.openstack.org/openstack/glance_store.git',
'branch': 'master'},
'keystonemiddleware:
{'repository': 'git://git.openstack.org/openstack/keystonemiddleware.git',
'branch: 'master'},
'oslo-concurrency':
{'repository': 'git://git.openstack.org/openstack/oslo.concurrency.git',
'branch: 'master'},
'oslo-config':
{'repository': 'git://git.openstack.org/openstack/oslo.config.git',
'branch: 'master'},
'oslo-db':
{'repository': 'git://git.openstack.org/openstack/oslo.db.git',
'branch: 'master'},
'oslo-i18n':
{'repository': 'git://git.openstack.org/openstack/oslo.i18n.git',
'branch: 'master'},
'oslo-messaging':
{'repository': 'git://git.openstack.org/openstack/oslo.messaging.git',
'branch: 'master'},
'oslo-serialization':
{'repository': 'git://git.openstack.org/openstack/oslo.serialization.git',
'branch: 'master'},
'oslo-utils':
{'repository': 'git://git.openstack.org/openstack/oslo.utils.git',
'branch: 'master'},
'oslo-vmware':
{'repository': 'git://git.openstack.org/openstack/oslo.vmware.git',
'branch: 'master'},
'osprofiler':
{'repository': 'git://git.openstack.org/stackforge/osprofiler.git',
'branch: 'master'},
'pbr':
{'repository': 'git://git.openstack.org/openstack-dev/pbr.git',
'branch: 'master'},
'python-keystoneclient':
{'repository': 'git://git.openstack.org/openstack/python-keystoneclient.git',
'branch: 'master'},
'python-swiftclient':
{'repository': 'git://git.openstack.org/openstack/python-swiftclient.git',
'branch: 'master'},
'stevedore':
{'repository': 'git://git.openstack.org/openstack/stevedore.git',
'branch: 'master'},
'sqlalchemy-migrate':
{'repository': 'git://git.openstack.org/stackforge/sqlalchemy-migrate.git',
'branch: 'master'},
'wsme':
{'repository': 'git://git.openstack.org/stackforge/wsme.git',
'branch': 'master'},
'glance':
{'repository': 'git://git.openstack.org/openstack/glance.git',
'branch': 'master'}}"
Contact Information
-------------------

View File

@ -1,4 +1,5 @@
branch: lp:charm-helpers
#branch: lp:charm-helpers
branch: /home/corey/src/charms/git/charm-helpers
destination: hooks/charmhelpers
include:
- core

View File

@ -1,4 +1,5 @@
branch: lp:charm-helpers
#branch: lp:charm-helpers
branch: /home/corey/src/charms/git/charm-helpers
destination: tests/charmhelpers
include:
- contrib.amulet

View File

@ -15,21 +15,24 @@ options:
provide a later version of OpenStack will trigger a software
upgrade.
Note that when openstack-origin-git is specified, the packages
configured for that option will be installed from git rather
than from the openstack-origin repository.
Note that when openstack-origin-git is specified, openstack-specific
packages will be installed from source rather than from the
openstack-origin repository.
openstack-origin-git:
default: None
type: "string"
type: string
description: |
Specifies a YAML file which lists the git repositories and branches
from which to install OpenStack. See config/git-*.yaml for a
starting point.
Specifies a YAML-formatted two-dimensional array listing the git
repositories and branches from which to install OpenStack and its
dependencies.
Note that the config files that are installed will be determined
based on the OpenStack release in the openstack-origin option.
Note that the installed config files will be determined based on
the OpenStack release of the openstack-origin option.
Note that updating this setting after deployment will do nothing.
Note also that this option is processed for the initial install
only. Setting this option after deployment is not supported.
For more details see README.md.
database-user:
default: glance
type: string

View File

@ -1,6 +0,0 @@
glance:
repository: git://git.openstack.org/openstack/glance.git
branch: stable/juno
requirements:
repository: git://git.openstack.org/openstack/requirements.git
branch: stable/juno

View File

@ -1,57 +0,0 @@
glance:
repository: git://git.openstack.org/openstack/glance.git
branch: master
glance-store:
repository: git://git.openstack.org/openstack/glance_store.git
branch: master
keystonemiddleware:
repository: git://git.openstack.org/openstack/keystonemiddleware.git
branch: master
oslo-config:
repository: git://git.openstack.org/openstack/oslo.config.git
branch: master
oslo-concurrency:
repository: git://git.openstack.org/openstack/oslo.concurrency.git
branch: master
oslo-db:
repository: git://git.openstack.org/openstack/oslo.db.git
branch: master
oslo-i18n:
repository: git://git.openstack.org/openstack/oslo.i18n.git
branch: master
oslo-messaging:
repository: git://git.openstack.org/openstack/oslo.messaging.git
branch: master
oslo-serialization:
repository: git://git.openstack.org/openstack/oslo.serialization.git
branch: master
oslo-utils:
repository: git://git.openstack.org/openstack/oslo.utils.git
branch: master
oslo-vmware:
repository: git://git.openstack.org/openstack/oslo.vmware.git
branch: master
osprofiler:
repository: git://git.openstack.org/stackforge/osprofiler.git
branch: master
pbr:
repository: git://git.openstack.org/openstack-dev/pbr.git
branch: master
python-keystoneclient:
repository: git://git.openstack.org/openstack/python-keystoneclient.git
branch: master
python-swiftclient:
repository: git://git.openstack.org/openstack/python-swiftclient.git
branch: master
requirements:
repository: git://git.openstack.org/openstack/requirements.git
branch: master
stevedore:
repository: git://git.openstack.org/openstack/stevedore.git
branch: master
sqlalchemy-migrate:
repository: git://git.openstack.org/stackforge/sqlalchemy-migrate.git
branch: master
wsme:
repository: git://git.openstack.org/stackforge/wsme.git
branch: master

View File

@ -1,6 +0,0 @@
glance:
repository: git://git.openstack.org/openstack/glance.git
branch: master
requirements:
repository: git://git.openstack.org/openstack/requirements.git
branch: master

View File

@ -103,6 +103,12 @@ def install_hook():
apt_update(fatal=True)
apt_install(determine_packages(), fatal=True)
# NOTE(coreycb): This is temporary for sstack proxy, unless we decide
# we need to code proxy support into the charms.
os.environ["http_proxy"] = "http://squid.internal:3128"
os.environ["https_proxy"] = "https://squid.internal:3128"
git_install(config('openstack-origin-git'))
for service in SERVICES:

View File

@ -3,6 +3,7 @@
import os
import shutil
import subprocess
import yaml
import glance_contexts
@ -297,11 +298,11 @@ def setup_ipv6():
apt_install('haproxy/trusty-backports', fatal=True)
def git_install(file_name):
"""Perform setup, and install git repos specified in yaml config file."""
def git_install(projects):
"""Perform setup, and install git repos specified in yaml parameter."""
if git_install_requested():
git_pre_install()
git_clone_and_install(file_name, core_project='glance')
git_clone_and_install(yaml.load(projects), core_project='glance')
git_post_install()

View File

@ -55,11 +55,17 @@ class GlanceBasicDeployment(OpenStackAmuletDeployment):
def _configure_services(self):
'''Configure all of the services.'''
# NOTE(coreycb): Added the following temporarily to test deploy from source
glance_config = {'openstack-origin-git':
"{'glance':"
" {'repository': 'git://git.openstack.org/openstack/glance.git',"
" 'branch': 'stable/icehouse'}}"}
keystone_config = {'admin-password': 'openstack',
'admin-token': 'ubuntutesting'}
mysql_config = {'dataset-size': '50%'}
configs = {'keystone': keystone_config,
configs = {'glance': glance_config,
'keystone': keystone_config,
'mysql': mysql_config}
super(GlanceBasicDeployment, self)._configure_services(configs)