~corey.bryant/charms/trusty/keystone/amulet-git-fixups

« back to all changes in this revision

Viewing changes to hooks/keystone_utils.py

  • Committer: Corey Bryant
  • Date: 2015-03-13 09:52:11 UTC
  • mto: This revision was merged to the branch mainline in revision 142.
  • Revision ID: corey.bryant@canonical.com-20150313095211-j0lho03pviv80jlw
Add deploy from source action support and various fixups after rebase

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
    os_release,
48
48
    save_script_rc as _save_script_rc)
49
49
 
50
 
from charmhelpers.core.host import (
51
 
    mkdir,
52
 
    write_file,
53
 
)
54
 
 
55
50
from charmhelpers.core.strutils import (
56
51
    bool_from_string,
57
52
)
331
326
    if git_install_requested():
332
327
        packages.extend(BASE_GIT_PACKAGES)
333
328
        # don't include packages that will be installed from git
 
329
        packages = list(set(packages))
334
330
        for p in GIT_PACKAGE_BLACKLIST:
335
331
            packages.remove(p)
336
332
 
903
899
        return True
904
900
 
905
901
    log("SSL/HTTPS is NOT enabled", level=DEBUG)
906
 
    return True
 
902
    return False
907
903
 
908
904
 
909
905
def get_ssl_cert_master_votes():
1552
1548
 
1553
1549
 
1554
1550
def git_pre_install():
1555
 
    """Perform pre keystone installation setup."""
 
1551
    """Perform keystone pre-install setup."""
1556
1552
    dirs = [
1557
1553
        '/var/lib/keystone',
1558
1554
        '/var/lib/keystone/cache',
1576
1572
 
1577
1573
 
1578
1574
def git_post_install():
1579
 
    """Perform post keystone installation setup."""
 
1575
    """Perform keystone post-install setup."""
 
1576
    # NOTE(coreycb): Should the mount point be a config option?
1580
1577
    src_etc = os.path.join(charm_dir(), '/mnt/openstack-git/keystone.git/etc/')
1581
1578
    configs = {
1582
 
        'keystone': {
1583
 
            'src': os.path.join(src_etc, 'keystone.conf.sample'),
1584
 
            'dest': '/etc/keystone/keystone.conf',
1585
 
        },
1586
1579
        'policy': {
1587
1580
            'src': os.path.join(src_etc, 'policy.json'),
1588
1581
            'dest': '/etc/keystone/policy.json',
1610
1603
    render('upstart/keystone.upstart', '/etc/init/keystone.conf',
1611
1604
           keystone_context, perms=0o644)
1612
1605
 
1613
 
    service_start('keystone')
 
1606
    service_restart('keystone')